mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-15 10:54:18 +00:00
Compare commits
1 Commits
working-20
...
working_19
Author | SHA1 | Date | |
---|---|---|---|
38bf3ed1dc |
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug_Internal|Win32">
|
||||
@ -106,7 +106,7 @@
|
||||
<StringPooling>true</StringPooling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;d3d9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmdd.lib;libspeex.lib;libjpeg.lib;zlibd.lib;libpngd.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmdd.lib;libspeex.lib;libjpeg.lib;zlibd.lib;libpngd.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\StaticSDKs\Win32\DX9.0c\Lib\x86;..\..\..\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK\libs\Win32;..\..\..\StaticSDKs\XPlatform\OpenSSL\lib;..\..\..\StaticSDKs\Win32\PhysX\lib\win32;..\..\..\StaticSDKs\XPlatform\opus\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\speex-1.0.1\win32\libspeex\Debug;..\..\..\StaticSDKs\XPlatform\webm\libvpx_build_win32_vs10\Win32\Debug;..\..\..\StaticSDKs\XPlatform\oggvorbis\libogg\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\oggvorbis\libvorbis\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\speex\win32\libspeex\Debug;..\..\..\StaticSDKs\XPlatform\expat\StaticLibs\Win32;..\..\..\StaticSDKs\XPlatform\jpeg;..\..\..\StaticSDKs\XPlatform\zlib\lib;..\..\..\StaticSDKs\XPlatform\png\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@ -121,8 +121,6 @@
|
||||
<MapFileName>$(OutDir)$(TargetName).map</MapFileName>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -164,7 +162,7 @@
|
||||
<StringPooling>true</StringPooling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;d3d9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmdd.lib;libspeex.lib;libjpeg.lib;zlibd.lib;libpngd.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmdd.lib;libspeex.lib;libjpeg.lib;zlibd.lib;libpngd.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\StaticSDKs\XPlatform\speex-1.0.1\win32\libspeex\Debug;..\..\..\StaticSDKs\Win32\DX9.0c\Lib\x86;..\..\..\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK\libs\Win32;..\..\..\StaticSDKs\XPlatform\OpenSSL\lib;..\..\..\StaticSDKs\Win32\PhysX\lib\win32;..\..\..\StaticSDKs\XPlatform\opus\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\webm\libvpx_build_win32_vs10\Win32\Debug;..\..\..\StaticSDKs\XPlatform\oggvorbis\libogg\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\oggvorbis\libvorbis\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\speex\win32\libspeex\Debug;..\..\..\StaticSDKs\XPlatform\expat\StaticLibs\Win32;..\..\..\StaticSDKs\XPlatform\jpeg;..\..\..\StaticSDKs\XPlatform\zlib\lib;..\..\..\StaticSDKs\XPlatform\png\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@ -179,8 +177,6 @@
|
||||
<MapFileName>$(OutDir)$(TargetName).map</MapFileName>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -226,7 +222,7 @@
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;d3d9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmd.lib;libspeex.lib;libjpeg.lib;zlib.lib;libpng.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmd.lib;libspeex.lib;libjpeg.lib;zlib.lib;libpng.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\StaticSDKs\Win32\DX9.0c\Lib\x86;..\..\..\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK\libs\Win32;..\..\..\StaticSDKs\XPlatform\OpenSSL\lib;..\..\..\StaticSDKs\Win32\PhysX\lib\win32;..\..\..\StaticSDKs\XPlatform\opus\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\webm\libvpx_build_win32_vs10\Win32\Release;..\..\..\StaticSDKs\XPlatform\oggvorbis\libogg\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\oggvorbis\libvorbis\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\speex\win32\libspeex\Release;..\..\..\StaticSDKs\XPlatform\expat\StaticLibs\Win32;..\..\..\StaticSDKs\XPlatform\jpeg;..\..\..\StaticSDKs\XPlatform\zlib\lib;..\..\..\StaticSDKs\XPlatform\png\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@ -241,8 +237,6 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -289,7 +283,7 @@
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;d3d9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmd.lib;libspeex.lib;libjpeg.lib;zlib.lib;libpng.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;version.lib;Rpcrt4.lib;d3dx9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opus.lib;vpxmd.lib;libspeex.lib;libjpeg.lib;zlib.lib;libpng.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\StaticSDKs\Win32\DX9.0c\Lib\x86;..\..\..\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK\libs\Win32;..\..\..\StaticSDKs\XPlatform\OpenSSL\lib;..\..\..\StaticSDKs\Win32\PhysX\lib\win32;..\..\..\StaticSDKs\XPlatform\speex\win32\libspeex\Release;..\..\..\StaticSDKs\XPlatform\opus\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\webm\libvpx_build_win32_vs10\Win32\Release;..\..\..\StaticSDKs\XPlatform\oggvorbis\libogg\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\oggvorbis\libvorbis\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\expat\StaticLibs\Win32;..\..\..\StaticSDKs\XPlatform\jpeg;..\..\..\StaticSDKs\XPlatform\zlib\lib;..\..\..\StaticSDKs\XPlatform\png\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@ -304,8 +298,6 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -810,4 +802,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -61,7 +61,7 @@
|
||||
<StringPooling>true</StringPooling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CoreLib.lib;CoreLibExe.lib;pfAnimation.lib;pfAudio.lib;pfCamera.lib;pfCharacter.lib;pfConditional.lib;pfGameGUIMgr.lib;pfGameMgr.lib;pfGameScoreMgr.lib;pfJournalBook.lib;pfLocalizationMgr.lib;pfMessage.lib;pfPython.lib;pfSurface.lib;pnAddrInfo.lib;pnAsyncCore.lib;pnAsyncCoreExe.lib;pnDispatch.lib;pnFactory.lib;pnGameMgr.lib;pnIni.lib;pnIniExe.lib;pnInputCore.lib;pnKeyedObject.lib;pnMessage.lib;pnModifier.lib;pnNetBase.lib;pnNetCli.lib;pnNetCommon.lib;pnNetProtocol.lib;pnNucleusInc.lib;pnProduct.lib;pnSceneObject.lib;pnTimer.lib;pnUtils.lib;pnUtilsExe.lib;plAgeDescription.lib;plAgeLoader.lib;plAudible.lib;plAudio.lib;plAudioCore.lib;plAvatar.lib;plClientResMgr.lib;plCompression.lib;plContainer.lib;plDrawable.lib;plEncryption.lib;plFile.lib;plGImage.lib;plGLight.lib;plInputCore.lib;plInterp.lib;plIntersect.lib;plJPEG.lib;plMath.lib;plMessage.lib;plModifier.lib;plNetClient.lib;plNetClientComm.lib;plNetClientRecorder.lib;plNetCommon.lib;plNetGameLib.lib;plNetMessage.lib;plNetTransport.lib;plParticleSystem.lib;plPhysical.lib;plPhysX.lib;plPipeline.lib;plProgressMgr.lib;plResMgr.lib;plScene.lib;plSDL.lib;plStatusLog.lib;plSurface.lib;plTransform.lib;plUnifiedTime.lib;plUUID.lib;plVault.lib;winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;Rpcrt4.lib;pythoncore_static.lib;d3dx9.lib;d3d9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;libspeex.lib;libjpeg.lib;libpngd.lib;zlibd.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>CoreLib.lib;CoreLibExe.lib;pfAnimation.lib;pfAudio.lib;pfCamera.lib;pfCharacter.lib;pfConditional.lib;pfGameGUIMgr.lib;pfGameMgr.lib;pfGameScoreMgr.lib;pfJournalBook.lib;pfLocalizationMgr.lib;pfMessage.lib;pfPython.lib;pfSurface.lib;pnAddrInfo.lib;pnAsyncCore.lib;pnAsyncCoreExe.lib;pnDispatch.lib;pnFactory.lib;pnGameMgr.lib;pnIni.lib;pnIniExe.lib;pnInputCore.lib;pnKeyedObject.lib;pnMessage.lib;pnModifier.lib;pnNetBase.lib;pnNetCli.lib;pnNetCommon.lib;pnNetProtocol.lib;pnNucleusInc.lib;pnProduct.lib;pnSceneObject.lib;pnTimer.lib;pnUtils.lib;pnUtilsExe.lib;plAgeDescription.lib;plAgeLoader.lib;plAudible.lib;plAudio.lib;plAudioCore.lib;plAvatar.lib;plClientResMgr.lib;plCompression.lib;plContainer.lib;plDrawable.lib;plEncryption.lib;plFile.lib;plGImage.lib;plGLight.lib;plInputCore.lib;plInterp.lib;plIntersect.lib;plJPEG.lib;plMath.lib;plMessage.lib;plModifier.lib;plNetClient.lib;plNetClientComm.lib;plNetClientRecorder.lib;plNetCommon.lib;plNetGameLib.lib;plNetMessage.lib;plNetTransport.lib;plParticleSystem.lib;plPhysical.lib;plPhysX.lib;plPipeline.lib;plProgressMgr.lib;plResMgr.lib;plScene.lib;plSDL.lib;plStatusLog.lib;plSurface.lib;plTransform.lib;plUnifiedTime.lib;plUUID.lib;plVault.lib;winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;Rpcrt4.lib;pythoncore_static.lib;d3dx9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;libspeex.lib;libjpeg.lib;libpngd.lib;zlibd.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\CoreLib\Debug;..\..\CoreLibExe\Debug;..\..\FeatureLib\pfAnimation\Debug;..\..\FeatureLib\pfAudio\Debug;..\..\FeatureLib\pfCamera\Debug;..\..\FeatureLib\pfCharacter\Debug;..\..\FeatureLib\pfConditional\Debug;..\..\FeatureLib\pfGameGUIMgr\Debug;..\..\FeatureLib\pfGameMgr\Debug;..\..\FeatureLib\pfGameScoreMgr\Debug;..\..\FeatureLib\pfJournalBook\Debug;..\..\FeatureLib\pfLocalizationMgr\Debug;..\..\FeatureLib\pfMessage\Debug;..\..\FeatureLib\pfPython\Debug;..\..\FeatureLib\pfSurface\Debug;..\..\NucleusLib\pnAddrInfo\Debug;..\..\NucleusLib\pnAsyncCore\Debug;..\..\NucleusLib\pnAsyncCoreExe\Debug;..\..\NucleusLib\pnDispatch\Debug;..\..\NucleusLib\pnFactory\Debug;..\..\NucleusLib\pnGameMgr\Debug;..\..\NucleusLib\pnIni\Debug;..\..\NucleusLib\pnIniExe\Debug;..\..\NucleusLib\pnInputCore\Debug;..\..\NucleusLib\pnKeyedObject\Debug;..\..\NucleusLib\pnMessage\Debug;..\..\NucleusLib\pnModifier\Debug;..\..\NucleusLib\pnNetBase\Debug;..\..\NucleusLib\pnNetCli\Debug;..\..\NucleusLib\pnNetCommon\Debug;..\..\NucleusLib\pnNetProtocol\Debug;..\..\NucleusLib\pnNucleusInc\Debug;..\..\NucleusLib\pnProduct\Debug;..\..\NucleusLib\pnSceneObject\Debug;..\..\NucleusLib\pnTimer\Debug;..\..\NucleusLib\pnUtils\Debug;..\..\NucleusLib\pnUtilsExe\Debug;..\..\PubUtilLib\plAgeDescription\Debug;..\..\PubUtilLib\plAgeLoader\Debug;..\..\PubUtilLib\plAudible\Debug;..\..\PubUtilLib\plAudio\Debug;..\..\PubUtilLib\plAudioCore\Debug;..\..\PubUtilLib\plAvatar\Debug;..\..\PubUtilLib\plClientResMgr\Debug;..\..\PubUtilLib\plCompression\Debug;..\..\PubUtilLib\plContainer\Debug;..\..\PubUtilLib\plDrawable\Debug;..\..\PubUtilLib\plEncryption\Debug;..\..\PubUtilLib\plFile\Debug;..\..\PubUtilLib\plGImage\Debug;..\..\PubUtilLib\plGLight\Debug;..\..\PubUtilLib\plInputCore\Debug;..\..\PubUtilLib\plInterp\Debug;..\..\PubUtilLib\plIntersect\Debug;..\..\PubUtilLib\plJPEG\Debug;..\..\PubUtilLib\plMath\Debug;..\..\PubUtilLib\plMessage\Debug;..\..\PubUtilLib\plModifier\Debug;..\..\PubUtilLib\plNetClient\Debug;..\..\PubUtilLib\plNetClientComm\Debug;..\..\PubUtilLib\plNetClientRecorder\Debug;..\..\PubUtilLib\plNetCommon\Debug;..\..\PubUtilLib\plNetGameLib\Debug;..\..\PubUtilLib\plNetMessage\Debug;..\..\PubUtilLib\plNetTransport\Debug;..\..\PubUtilLib\plParticleSystem\Debug;..\..\PubUtilLib\plPhysical\Debug;..\..\PubUtilLib\plPhysX\Debug;..\..\PubUtilLib\plPipeline\Debug;..\..\PubUtilLib\plProgressMgr\Debug;..\..\PubUtilLib\plResMgr\Debug;..\..\PubUtilLib\plScene\Debug;..\..\PubUtilLib\plSDL\Debug;..\..\PubUtilLib\plStatusLog\Debug;..\..\PubUtilLib\plSurface\Debug;..\..\PubUtilLib\plTransform\Debug;..\..\PubUtilLib\plUnifiedTime\Debug;..\..\PubUtilLib\plUUID\Debug;..\..\PubUtilLib\plVault\Debug;..\..\..\SDKs\XPlatform\Cypython-2.3.3\PCbuild\Debug;..\..\..\StaticSDKs\Win32\DX9.0c\Lib\x86;..\..\..\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK\libs\Win32;..\..\..\StaticSDKs\XPlatform\OpenSSL\lib;..\..\..\StaticSDKs\Win32\PhysX\lib\win32;..\..\..\StaticSDKs\XPlatform\oggvorbis\libogg\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\oggvorbis\libvorbis\win32\VS2010\Win32\Debug;..\..\..\StaticSDKs\XPlatform\speex\win32\libspeex\Debug;..\..\..\StaticSDKs\XPlatform\expat\StaticLibs\Win32;..\..\..\StaticSDKs\XPlatform\jpeg;..\..\..\StaticSDKs\XPlatform\png\lib;..\..\..\StaticSDKs\XPlatform\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;libcid.lib;libcmt.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
@ -95,7 +95,7 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CoreLib.lib;CoreLibExe.lib;pfAnimation.lib;pfAudio.lib;pfCamera.lib;pfCharacter.lib;pfConditional.lib;pfGameGUIMgr.lib;pfGameMgr.lib;pfGameScoreMgr.lib;pfJournalBook.lib;pfLocalizationMgr.lib;pfMessage.lib;pfPython.lib;pfSurface.lib;pnAddrInfo.lib;pnAsyncCore.lib;pnAsyncCoreExe.lib;pnDispatch.lib;pnFactory.lib;pnGameMgr.lib;pnIni.lib;pnIniExe.lib;pnInputCore.lib;pnKeyedObject.lib;pnMessage.lib;pnModifier.lib;pnNetBase.lib;pnNetCli.lib;pnNetCommon.lib;pnNetProtocol.lib;pnNucleusInc.lib;pnProduct.lib;pnSceneObject.lib;pnTimer.lib;pnUtils.lib;pnUtilsExe.lib;plAgeDescription.lib;plAgeLoader.lib;plAudible.lib;plAudio.lib;plAudioCore.lib;plAvatar.lib;plClientResMgr.lib;plCompression.lib;plContainer.lib;plDrawable.lib;plEncryption.lib;plFile.lib;plGImage.lib;plGLight.lib;plInputCore.lib;plInterp.lib;plIntersect.lib;plJPEG.lib;plMath.lib;plMessage.lib;plModifier.lib;plNetClient.lib;plNetClientComm.lib;plNetClientRecorder.lib;plNetCommon.lib;plNetGameLib.lib;plNetMessage.lib;plNetTransport.lib;plParticleSystem.lib;plPhysical.lib;plPhysX.lib;plPipeline.lib;plProgressMgr.lib;plResMgr.lib;plScene.lib;plSDL.lib;plStatusLog.lib;plSurface.lib;plTransform.lib;plUnifiedTime.lib;plUUID.lib;plVault.lib;winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;Rpcrt4.lib;pythoncore_static.lib;d3dx9.lib;d3d9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;libspeex.lib;libjpeg.lib;libpng.lib;zlib.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>CoreLib.lib;CoreLibExe.lib;pfAnimation.lib;pfAudio.lib;pfCamera.lib;pfCharacter.lib;pfConditional.lib;pfGameGUIMgr.lib;pfGameMgr.lib;pfGameScoreMgr.lib;pfJournalBook.lib;pfLocalizationMgr.lib;pfMessage.lib;pfPython.lib;pfSurface.lib;pnAddrInfo.lib;pnAsyncCore.lib;pnAsyncCoreExe.lib;pnDispatch.lib;pnFactory.lib;pnGameMgr.lib;pnIni.lib;pnIniExe.lib;pnInputCore.lib;pnKeyedObject.lib;pnMessage.lib;pnModifier.lib;pnNetBase.lib;pnNetCli.lib;pnNetCommon.lib;pnNetProtocol.lib;pnNucleusInc.lib;pnProduct.lib;pnSceneObject.lib;pnTimer.lib;pnUtils.lib;pnUtilsExe.lib;plAgeDescription.lib;plAgeLoader.lib;plAudible.lib;plAudio.lib;plAudioCore.lib;plAvatar.lib;plClientResMgr.lib;plCompression.lib;plContainer.lib;plDrawable.lib;plEncryption.lib;plFile.lib;plGImage.lib;plGLight.lib;plInputCore.lib;plInterp.lib;plIntersect.lib;plJPEG.lib;plMath.lib;plMessage.lib;plModifier.lib;plNetClient.lib;plNetClientComm.lib;plNetClientRecorder.lib;plNetCommon.lib;plNetGameLib.lib;plNetMessage.lib;plNetTransport.lib;plParticleSystem.lib;plPhysical.lib;plPhysX.lib;plPipeline.lib;plProgressMgr.lib;plResMgr.lib;plScene.lib;plSDL.lib;plStatusLog.lib;plSurface.lib;plTransform.lib;plUnifiedTime.lib;plUUID.lib;plVault.lib;winhttp.lib;ws2_32.lib;strmiids.lib;vfw32.lib;Rpcrt4.lib;pythoncore_static.lib;d3dx9.lib;dinput8.lib;dxerr.lib;dxguid.lib;dsound.lib;OpenAL32.lib;libeay32.lib;NxCharacter.lib;PhysXLoader.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;libspeex.lib;libjpeg.lib;libpng.lib;zlib.lib;NxCooking.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\CoreLib\Release;..\..\CoreLibExe\Release;..\..\FeatureLib\pfAnimation\Release;..\..\FeatureLib\pfAudio\Release;..\..\FeatureLib\pfCamera\Release;..\..\FeatureLib\pfCharacter\Release;..\..\FeatureLib\pfConditional\Release;..\..\FeatureLib\pfGameGUIMgr\Release;..\..\FeatureLib\pfGameMgr\Release;..\..\FeatureLib\pfGameScoreMgr\Release;..\..\FeatureLib\pfJournalBook\Release;..\..\FeatureLib\pfLocalizationMgr\Release;..\..\FeatureLib\pfMessage\Release;..\..\FeatureLib\pfPython\Release;..\..\FeatureLib\pfSurface\Release;..\..\NucleusLib\pnAddrInfo\Release;..\..\NucleusLib\pnAsyncCore\Release;..\..\NucleusLib\pnAsyncCoreExe\Release;..\..\NucleusLib\pnDispatch\Release;..\..\NucleusLib\pnFactory\Release;..\..\NucleusLib\pnGameMgr\Release;..\..\NucleusLib\pnIni\Release;..\..\NucleusLib\pnIniExe\Release;..\..\NucleusLib\pnInputCore\Release;..\..\NucleusLib\pnKeyedObject\Release;..\..\NucleusLib\pnMessage\Release;..\..\NucleusLib\pnModifier\Release;..\..\NucleusLib\pnNetBase\Release;..\..\NucleusLib\pnNetCli\Release;..\..\NucleusLib\pnNetCommon\Release;..\..\NucleusLib\pnNetProtocol\Release;..\..\NucleusLib\pnNucleusInc\Release;..\..\NucleusLib\pnProduct\Release;..\..\NucleusLib\pnSceneObject\Release;..\..\NucleusLib\pnTimer\Release;..\..\NucleusLib\pnUtils\Release;..\..\NucleusLib\pnUtilsExe\Release;..\..\PubUtilLib\plAgeDescription\Release;..\..\PubUtilLib\plAgeLoader\Release;..\..\PubUtilLib\plAudible\Release;..\..\PubUtilLib\plAudio\Release;..\..\PubUtilLib\plAudioCore\Release;..\..\PubUtilLib\plAvatar\Release;..\..\PubUtilLib\plClientResMgr\Release;..\..\PubUtilLib\plCompression\Release;..\..\PubUtilLib\plContainer\Release;..\..\PubUtilLib\plDrawable\Release;..\..\PubUtilLib\plEncryption\Release;..\..\PubUtilLib\plFile\Release;..\..\PubUtilLib\plGImage\Release;..\..\PubUtilLib\plGLight\Release;..\..\PubUtilLib\plInputCore\Release;..\..\PubUtilLib\plInterp\Release;..\..\PubUtilLib\plIntersect\Release;..\..\PubUtilLib\plJPEG\Release;..\..\PubUtilLib\plMath\Release;..\..\PubUtilLib\plMessage\Release;..\..\PubUtilLib\plModifier\Release;..\..\PubUtilLib\plNetClient\Release;..\..\PubUtilLib\plNetClientComm\Release;..\..\PubUtilLib\plNetClientRecorder\Release;..\..\PubUtilLib\plNetCommon\Release;..\..\PubUtilLib\plNetGameLib\Release;..\..\PubUtilLib\plNetMessage\Release;..\..\PubUtilLib\plNetTransport\Release;..\..\PubUtilLib\plParticleSystem\Release;..\..\PubUtilLib\plPhysical\Release;..\..\PubUtilLib\plPhysX\Release;..\..\PubUtilLib\plPipeline\Release;..\..\PubUtilLib\plProgressMgr\Release;..\..\PubUtilLib\plResMgr\Release;..\..\PubUtilLib\plScene\Release;..\..\PubUtilLib\plSDL\Release;..\..\PubUtilLib\plStatusLog\Release;..\..\PubUtilLib\plSurface\Release;..\..\PubUtilLib\plTransform\Release;..\..\PubUtilLib\plUnifiedTime\Release;..\..\PubUtilLib\plUUID\Release;..\..\PubUtilLib\plVault\Release;..\..\..\SDKs\XPlatform\Cypython-2.3.3\PCbuild\Release;..\..\..\StaticSDKs\Win32\DX9.0c\Lib\x86;..\..\..\StaticSDKs\Win32\OpenAL 1.1 with EFX SDK\libs\Win32;..\..\..\StaticSDKs\XPlatform\OpenSSL\lib;..\..\..\StaticSDKs\Win32\PhysX\lib\win32;..\..\..\StaticSDKs\XPlatform\oggvorbis\libogg\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\oggvorbis\libvorbis\win32\VS2010\Win32\Release;..\..\..\StaticSDKs\XPlatform\speex\win32\libspeex\Release;..\..\..\StaticSDKs\XPlatform\expat\StaticLibs\Win32;..\..\..\StaticSDKs\XPlatform\jpeg;..\..\..\StaticSDKs\XPlatform\png\lib;..\..\..\StaticSDKs\XPlatform\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>libc.lib;libci.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
@ -129,4 +129,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -244,7 +244,6 @@
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_Internal|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plSrtFileReader.cpp" />
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudio\plOGGCodec.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug_Internal|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
@ -316,7 +315,6 @@
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plAudioFileReader.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plBufferedFileReader.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plFastWavReader.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plSrtFileReader.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudio\plOGGCodec.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plSoundBuffer.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plSoundDeswizzler.h" />
|
||||
|
@ -32,9 +32,6 @@
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudio\plWavFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plSrtFileReader.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plAudioCore.h">
|
||||
@ -64,8 +61,5 @@
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudio\plWavFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plAudioCore\plSrtFileReader.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -817,7 +817,6 @@
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plSimStateMsg.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plSpawnModMsg.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plSpawnRequestMsg.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plSubtitleMsg.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plSwimMsg.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plSynchEnableMsg.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plTimerCallbackMsg.h" />
|
||||
|
@ -361,8 +361,5 @@
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plVaultNotifyMsg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plMessage\plSubtitleMsg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -229,6 +229,22 @@
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_Internal|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsGDDrawDllLoad.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug_Internal|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Internal|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Internal|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug_Internal|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release_Internal|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release_Internal|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release_Internal|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\plCaptureRender.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug_Internal|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
@ -526,6 +542,7 @@
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsFogControl.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsG3DDeviceSelector.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsGColorizer.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsGDDrawDllLoad.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsWinRef.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\plBinkPlayer.h" />
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\plCaptureRender.h" />
|
||||
@ -567,4 +584,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -20,6 +20,9 @@
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsGColorizer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsGDDrawDllLoad.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\plCaptureRender.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -97,6 +100,9 @@
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsGColorizer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsGDDrawDllLoad.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\Sources\Plasma\PubUtilLib\plPipeline\hsWinRef.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -209,4 +215,4 @@
|
||||
<Filter>DeviceRefs</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
BIN
Build/VS2010/SDKs/Win32/HawkVoice/lib/HawkVoiceDIstatic.lib
Normal file
BIN
Build/VS2010/SDKs/Win32/HawkVoice/lib/HawkVoiceDIstatic.lib
Normal file
Binary file not shown.
122
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Blowfish.001
Normal file
122
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Blowfish.001
Normal file
@ -0,0 +1,122 @@
|
||||
# Microsoft Developer Studio Project File - Name="blowfish" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=blowfish - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Blowfish.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Blowfish.mak" CFG="blowfish - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "blowfish - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "blowfish - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "blowfish - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /GB /Za /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "blowfish - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /GB /Za /W4 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "blowfish - Win32 Release"
|
||||
# Name "blowfish - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter ".c"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_cbc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_cfb64.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_ecb.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_enc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_ofb64.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_skey.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Include Files"
|
||||
|
||||
# PROP Default_Filter ".h"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_locl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_pi.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\blowfish.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
128
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Blowfish.dsp
Normal file
128
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Blowfish.dsp
Normal file
@ -0,0 +1,128 @@
|
||||
# Microsoft Developer Studio Project File - Name="blowfish" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=blowfish - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Blowfish.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Blowfish.mak" CFG="blowfish - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "blowfish - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "blowfish - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "blowfish - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /Za /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "blowfish - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /Za /W4 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "blowfish - Win32 Release"
|
||||
# Name "blowfish - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter ".c"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_cbc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_cfb64.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_ecb.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_enc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_ofb64.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_skey.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Include Files"
|
||||
|
||||
# PROP Default_Filter ".h"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_locl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bf_pi.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\blowfish.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
46
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/COPYRIGHT
Normal file
46
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/COPYRIGHT
Normal file
@ -0,0 +1,46 @@
|
||||
Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
All rights reserved.
|
||||
|
||||
This package is an Blowfish implementation written
|
||||
by Eric Young (eay@mincom.oz.au).
|
||||
|
||||
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.
|
||||
|
||||
Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
the code are not to be removed.
|
||||
|
||||
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 software developed by Eric Young (eay@mincom.oz.au)
|
||||
|
||||
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 license 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 distrubution license
|
||||
[including the GNU Public License.]
|
||||
|
||||
The reason behind this being stated in this direct manner is past
|
||||
experience in code simply being copied and the attribution removed
|
||||
from it and then being distributed as part of other packages. This
|
||||
implementation was a non-trivial and unpaid effort.
|
14
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/INSTALL
Normal file
14
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/INSTALL
Normal file
@ -0,0 +1,14 @@
|
||||
This Eric Young's blowfish implementation, taken from his SSLeay library
|
||||
and made available as a separate library.
|
||||
|
||||
The version number (0.7.2m) is the SSLeay version that this library was
|
||||
taken from.
|
||||
|
||||
To build, just unpack and type make.
|
||||
If you are not using gcc, edit the Makefile.
|
||||
If you are compiling for an x86 box, try the assembler (it needs improving).
|
||||
There are also some compile time options that can improve performance,
|
||||
these are documented in the Makefile.
|
||||
|
||||
eric 15-Apr-1997
|
||||
|
160
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Makefile
Normal file
160
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Makefile
Normal file
@ -0,0 +1,160 @@
|
||||
# Targets
|
||||
# make - twidle the options yourself :-)
|
||||
# make cc - standard cc options
|
||||
# make gcc - standard gcc options
|
||||
# make x86-elf - linux-elf etc
|
||||
# make x86-out - linux-a.out, FreeBSD etc
|
||||
# make x86-solaris
|
||||
# make x86-bdsi
|
||||
|
||||
# use BF_PTR2 for intel boxes,
|
||||
# BF_PTR for sparc and MIPS/SGI
|
||||
# use nothing for Alpha and HP.
|
||||
|
||||
# There are 3 possible performance options, experiment :-)
|
||||
#OPTS= -DBF_PTR # usr for sparc and MIPS/SGI
|
||||
#OPTS= -DBF_PTR2 # use for pentium
|
||||
#OPTS= # use for pentium pro, Alpha and HP
|
||||
|
||||
MAKE=make -f Makefile
|
||||
CC=cc
|
||||
CFLAG= -O
|
||||
|
||||
#CC=gcc
|
||||
#CFLAG= -O4 -funroll-loops -fomit-frame-pointer
|
||||
#CFLAG= -O3 -fomit-frame-pointer
|
||||
|
||||
CFLAGS=$(OPTS) $(CFLAG)
|
||||
CPP=$(CC) -E
|
||||
AS=as
|
||||
|
||||
# Assember version of bf_encrypt().
|
||||
BF_ENC=bf_enc.o # normal C version
|
||||
#BF_ENC=asm/bx86-elf.o # elf format x86
|
||||
#BF_ENC=asm/bx86-out.o # a.out format x86
|
||||
#BF_ENC=asm/bx86-sol.o # solaris format x86
|
||||
#BF_ENC=asm/bx86bsdi.o # bsdi format x86
|
||||
|
||||
LIBDIR=/usr/local/lib
|
||||
BINDIR=/usr/local/bin
|
||||
INCDIR=/usr/local/include
|
||||
MANDIR=/usr/local/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
SHELL=/bin/sh
|
||||
LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cbc.o bf_cfb64.o bf_ofb64.o
|
||||
LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cbc.c bf_cfb64.c bf_ofb64.c
|
||||
|
||||
GENERAL=Makefile Makefile.ssl Makefile.uni asm bf_locl.org README \
|
||||
COPYRIGHT INSTALL blowfish.doc
|
||||
|
||||
TESTING= bftest bfspeed
|
||||
TESTING_SRC=bftest.c bfspeed.c
|
||||
HEADERS=bf_locl.h blowfish.h bf_pi.h
|
||||
|
||||
ALL= $(GENERAL) $(TESTING_SRC) $(LIBSRC) $(HEADERS)
|
||||
|
||||
BLIB= libblowfish.a
|
||||
|
||||
all: $(BLIB) $(TESTING)
|
||||
|
||||
cc:
|
||||
$(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all
|
||||
|
||||
gcc:
|
||||
$(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-elf:
|
||||
$(MAKE) BF_ENC='asm/bx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-out:
|
||||
$(MAKE) BF_ENC='asm/bx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-solaris:
|
||||
$(MAKE) BF_ENC='asm/bx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-bsdi:
|
||||
$(MAKE) BF_ENC='asm/bx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all
|
||||
|
||||
# elf
|
||||
asm/bx86-elf.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DELF asm/bx86unix.cpp | $(AS) -o asm/bx86-elf.o
|
||||
|
||||
# solaris
|
||||
asm/bx86-sol.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
|
||||
as -o asm/bx86-sol.o asm/bx86-sol.s
|
||||
rm -f asm/bx86-sol.s
|
||||
|
||||
# a.out
|
||||
asm/bx86-out.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DOUT asm/bx86unix.cpp | $(AS) -o asm/bx86-out.o
|
||||
|
||||
# bsdi
|
||||
asm/bx86bsdi.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DBSDI asm/bx86unix.cpp | $(AS) -o asm/bx86bsdi.o
|
||||
|
||||
test: all
|
||||
./bftest
|
||||
|
||||
$(BLIB): $(LIBOBJ)
|
||||
/bin/rm -f $(BLIB)
|
||||
ar cr $(BLIB) $(LIBOBJ)
|
||||
-if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \
|
||||
else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \
|
||||
else exit 0; fi; fi
|
||||
|
||||
bftest: bftest.o $(BLIB)
|
||||
$(CC) $(CFLAGS) -o bftest bftest.o $(BLIB)
|
||||
|
||||
bfspeed: bfspeed.o $(BLIB)
|
||||
$(CC) $(CFLAGS) -o bfspeed bfspeed.o $(BLIB)
|
||||
|
||||
tags:
|
||||
ctags $(TESTING_SRC) $(LIBBF)
|
||||
|
||||
tar:
|
||||
tar chf libbf.tar $(ALL)
|
||||
|
||||
shar:
|
||||
shar $(ALL) >libbf.shar
|
||||
|
||||
depend:
|
||||
makedepend $(LIBBF) $(TESTING_SRC)
|
||||
|
||||
clean:
|
||||
rm -f *.o tags core $(TESTING) $(BLIB) .nfs* *.old *.bak asm/*.o
|
||||
|
||||
dclean:
|
||||
sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
|
||||
mv -f Makefile.new Makefile
|
||||
|
||||
# Eric is probably going to choke when he next looks at this --tjh
|
||||
install: $(BLIB)
|
||||
if test $(INSTALLTOP); then \
|
||||
echo SSL style install; \
|
||||
cp $(BLIB) $(INSTALLTOP)/lib; \
|
||||
if test -s /bin/ranlib; then \
|
||||
/bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \
|
||||
else \
|
||||
if test -s /usr/bin/ranlib; then \
|
||||
/usr/bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \
|
||||
fi; fi; \
|
||||
chmod 644 $(INSTALLTOP)/lib/$(BLIB); \
|
||||
cp blowfish.h $(INSTALLTOP)/include; \
|
||||
chmod 644 $(INSTALLTOP)/include/blowfish.h; \
|
||||
else \
|
||||
echo Standalone install; \
|
||||
cp $(BLIB) $(LIBDIR)/$(BLIB); \
|
||||
if test -s /bin/ranlib; then \
|
||||
/bin/ranlib $(LIBDIR)/$(BLIB); \
|
||||
else \
|
||||
if test -s /usr/bin/ranlib; then \
|
||||
/usr/bin/ranlib $(LIBDIR)/$(BLIB); \
|
||||
fi; \
|
||||
fi; \
|
||||
chmod 644 $(LIBDIR)/$(BLIB); \
|
||||
cp blowfish.h $(INCDIR)/blowfish.h; \
|
||||
chmod 644 $(INCDIR)/blowfish.h; \
|
||||
fi
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
104
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Makefile.ssl
Normal file
104
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Makefile.ssl
Normal file
@ -0,0 +1,104 @@
|
||||
#
|
||||
# SSLeay/crypto/blowfish/Makefile
|
||||
#
|
||||
|
||||
DIR= bf
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES=
|
||||
CFLAG=-g
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKE= make -f Makefile.ssl
|
||||
MAKEDEPEND= makedepend -fMakefile.ssl
|
||||
MAKEFILE= Makefile.ssl
|
||||
|
||||
BF_ENC= bf_enc.o
|
||||
# or use
|
||||
#DES_ENC= bx86-elf.o
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=bftest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cbc.c bf_cfb64.c bf_ofb64.c
|
||||
LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cbc.o bf_cfb64.o bf_ofb64.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= blowfish.h
|
||||
HEADER= bf_pi.h bf_locl.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
ar r $(LIB) $(LIBOBJ)
|
||||
sh $(TOP)/util/ranlib.sh $(LIB)
|
||||
@touch lib
|
||||
|
||||
# elf
|
||||
asm/bx86-elf.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DELF asm/bx86unix.cpp | as -o asm/bx86-elf.o
|
||||
|
||||
# solaris
|
||||
asm/bx86-sol.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
|
||||
as -o asm/bx86-sol.o asm/bx86-sol.s
|
||||
rm -f asm/bx86-sol.s
|
||||
|
||||
# a.out
|
||||
asm/bx86-out.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o
|
||||
|
||||
# bsdi
|
||||
asm/bx86bsdi.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DBSDI asm/bx86unix.cpp | as -o asm/bx86bsdi.o
|
||||
|
||||
files:
|
||||
perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
/bin/rm -f Makefile
|
||||
$(TOP)/util/point.sh Makefile.ssl Makefile ;
|
||||
/bin/rm -f des.doc
|
||||
$(TOP)/util/point.sh ../../doc/blowfish.doc blowfish.doc ;
|
||||
$(TOP)/util/mklink.sh ../../include $(EXHEADER)
|
||||
$(TOP)/util/mklink.sh ../../test $(TEST)
|
||||
$(TOP)/util/mklink.sh ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALLTOP)/include/$$i; \
|
||||
chmod 644 $(INSTALLTOP)/include/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
errors:
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
160
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Makefile.uni
Normal file
160
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/Makefile.uni
Normal file
@ -0,0 +1,160 @@
|
||||
# Targets
|
||||
# make - twidle the options yourself :-)
|
||||
# make cc - standard cc options
|
||||
# make gcc - standard gcc options
|
||||
# make x86-elf - linux-elf etc
|
||||
# make x86-out - linux-a.out, FreeBSD etc
|
||||
# make x86-solaris
|
||||
# make x86-bdsi
|
||||
|
||||
# use BF_PTR2 for intel boxes,
|
||||
# BF_PTR for sparc and MIPS/SGI
|
||||
# use nothing for Alpha and HP.
|
||||
|
||||
# There are 3 possible performance options, experiment :-)
|
||||
OPTS= -DBF_PTR # usr for sparc and MIPS/SGI
|
||||
#OPTS= -DBF_PTR2 # use for pentium
|
||||
#OPTS= # use for pentium pro, Alpha and HP
|
||||
|
||||
MAKE=make -f Makefile
|
||||
#CC=cc
|
||||
#CFLAG= -O
|
||||
|
||||
CC=gcc
|
||||
#CFLAG= -O4 -funroll-loops -fomit-frame-pointer
|
||||
CFLAG= -O3 -fomit-frame-pointer
|
||||
|
||||
CFLAGS=$(OPTS) $(CFLAG)
|
||||
CPP=$(CC) -E
|
||||
AS=as
|
||||
|
||||
# Assember version of bf_encrypt().
|
||||
BF_ENC=bf_enc.o # normal C version
|
||||
#BF_ENC=asm/bx86-elf.o # elf format x86
|
||||
#BF_ENC=asm/bx86-out.o # a.out format x86
|
||||
#BF_ENC=asm/bx86-sol.o # solaris format x86
|
||||
#BF_ENC=asm/bx86bsdi.o # bsdi format x86
|
||||
|
||||
LIBDIR=/usr/local/lib
|
||||
BINDIR=/usr/local/bin
|
||||
INCDIR=/usr/local/include
|
||||
MANDIR=/usr/local/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
SHELL=/bin/sh
|
||||
LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cbc.o bf_cfb64.o bf_ofb64.o
|
||||
LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cbc.c bf_cfb64.c bf_ofb64.c
|
||||
|
||||
GENERAL=Makefile Makefile.ssl Makefile.uni asm bf_locl.org README \
|
||||
COPYRIGHT INSTALL blowfish.doc
|
||||
|
||||
TESTING= bftest bfspeed
|
||||
TESTING_SRC=bftest.c bfspeed.c
|
||||
HEADERS=bf_locl.h blowfish.h bf_pi.h
|
||||
|
||||
ALL= $(GENERAL) $(TESTING_SRC) $(LIBSRC) $(HEADERS)
|
||||
|
||||
BLIB= libblowfish.a
|
||||
|
||||
all: $(BLIB) $(TESTING)
|
||||
|
||||
cc:
|
||||
$(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all
|
||||
|
||||
gcc:
|
||||
$(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-elf:
|
||||
$(MAKE) BF_ENC='asm/bx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-out:
|
||||
$(MAKE) BF_ENC='asm/bx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-solaris:
|
||||
$(MAKE) BF_ENC='asm/bx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all
|
||||
|
||||
x86-bsdi:
|
||||
$(MAKE) BF_ENC='asm/bx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all
|
||||
|
||||
# elf
|
||||
asm/bx86-elf.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DELF asm/bx86unix.cpp | $(AS) -o asm/bx86-elf.o
|
||||
|
||||
# solaris
|
||||
asm/bx86-sol.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
|
||||
as -o asm/bx86-sol.o asm/bx86-sol.s
|
||||
rm -f asm/bx86-sol.s
|
||||
|
||||
# a.out
|
||||
asm/bx86-out.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DOUT asm/bx86unix.cpp | $(AS) -o asm/bx86-out.o
|
||||
|
||||
# bsdi
|
||||
asm/bx86bsdi.o: asm/bx86-cpp.s asm/bx86unix.cpp
|
||||
$(CPP) -DBSDI asm/bx86unix.cpp | $(AS) -o asm/bx86bsdi.o
|
||||
|
||||
test: all
|
||||
./bftest
|
||||
|
||||
$(BLIB): $(LIBOBJ)
|
||||
/bin/rm -f $(BLIB)
|
||||
ar cr $(BLIB) $(LIBOBJ)
|
||||
-if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \
|
||||
else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \
|
||||
else exit 0; fi; fi
|
||||
|
||||
bftest: bftest.o $(BLIB)
|
||||
$(CC) $(CFLAGS) -o bftest bftest.o $(BLIB)
|
||||
|
||||
bfspeed: bfspeed.o $(BLIB)
|
||||
$(CC) $(CFLAGS) -o bfspeed bfspeed.o $(BLIB)
|
||||
|
||||
tags:
|
||||
ctags $(TESTING_SRC) $(LIBBF)
|
||||
|
||||
tar:
|
||||
tar chf libbf.tar $(ALL)
|
||||
|
||||
shar:
|
||||
shar $(ALL) >libbf.shar
|
||||
|
||||
depend:
|
||||
makedepend $(LIBBF) $(TESTING_SRC)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o tags core $(TESTING) $(BLIB) .nfs* *.old *.bak asm/*.o
|
||||
|
||||
dclean:
|
||||
sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
|
||||
mv -f Makefile.new Makefile
|
||||
|
||||
# Eric is probably going to choke when he next looks at this --tjh
|
||||
install: $(BLIB)
|
||||
if test $(INSTALLTOP); then \
|
||||
echo SSL style install; \
|
||||
cp $(BLIB) $(INSTALLTOP)/lib; \
|
||||
if test -s /bin/ranlib; then \
|
||||
/bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \
|
||||
else \
|
||||
if test -s /usr/bin/ranlib; then \
|
||||
/usr/bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \
|
||||
fi; fi; \
|
||||
chmod 644 $(INSTALLTOP)/lib/$(BLIB); \
|
||||
cp blowfish.h $(INSTALLTOP)/include; \
|
||||
chmod 644 $(INSTALLTOP)/include/blowfish.h; \
|
||||
else \
|
||||
echo Standalone install; \
|
||||
cp $(BLIB) $(LIBDIR)/$(BLIB); \
|
||||
if test -s /bin/ranlib; then \
|
||||
/bin/ranlib $(LIBDIR)/$(BLIB); \
|
||||
else \
|
||||
if test -s /usr/bin/ranlib; then \
|
||||
/usr/bin/ranlib $(LIBDIR)/$(BLIB); \
|
||||
fi; \
|
||||
fi; \
|
||||
chmod 644 $(LIBDIR)/$(BLIB); \
|
||||
cp blowfish.h $(INCDIR)/blowfish.h; \
|
||||
chmod 644 $(INCDIR)/blowfish.h; \
|
||||
fi
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
8
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/README
Normal file
8
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/README
Normal file
@ -0,0 +1,8 @@
|
||||
This is a quick packaging up of my blowfish code into a library.
|
||||
It has been lifted from SSLeay.
|
||||
The copyright notices seem a little harsh because I have not spent the
|
||||
time to rewrite the conditions from the normal SSLeay ones.
|
||||
|
||||
Basically if you just want to play with the library, not a problem.
|
||||
|
||||
eric 15-Apr-1997
|
159
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/bf586.pl
Normal file
159
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/bf586.pl
Normal file
@ -0,0 +1,159 @@
|
||||
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
$prog="bf586.pl";
|
||||
|
||||
# base code is in microsft
|
||||
# op dest, source
|
||||
# format.
|
||||
#
|
||||
|
||||
if ( ($ARGV[0] eq "elf"))
|
||||
{ require "x86unix.pl"; }
|
||||
elsif ( ($ARGV[0] eq "a.out"))
|
||||
{ $aout=1; require "x86unix.pl"; }
|
||||
elsif ( ($ARGV[0] eq "sol"))
|
||||
{ $sol=1; require "x86unix.pl"; }
|
||||
elsif ( ($ARGV[0] eq "cpp"))
|
||||
{ $cpp=1; require "x86unix.pl"; }
|
||||
elsif ( ($ARGV[0] eq "win32"))
|
||||
{ require "x86ms.pl"; }
|
||||
else
|
||||
{
|
||||
print STDERR <<"EOF";
|
||||
Pick one target type from
|
||||
elf - linux, FreeBSD etc
|
||||
a.out - old linux
|
||||
sol - x86 solaris
|
||||
cpp - format so x86unix.cpp can be used
|
||||
win32 - Windows 95/Windows NT
|
||||
EOF
|
||||
exit(1);
|
||||
}
|
||||
|
||||
&comment("Don't even think of reading this code");
|
||||
&comment("It was automatically generated by $prog");
|
||||
&comment("Which is a perl program used to generate the x86 assember for");
|
||||
&comment("any of elf, a.out, Win32, or Solaris");
|
||||
&comment("It can be found in SSLeay 0.7.0+");
|
||||
&comment("eric <eay\@mincom.oz.au>");
|
||||
&comment("");
|
||||
|
||||
&file("bfx86xxxx");
|
||||
|
||||
$BF_ROUNDS=16;
|
||||
$BF_OFF=($BF_ROUNDS+2)*4;
|
||||
$L="ecx";
|
||||
$R="edx";
|
||||
$P="edi";
|
||||
$tot="esi";
|
||||
$tmp1="eax";
|
||||
$tmp2="ebx";
|
||||
$tmp3="ebp";
|
||||
|
||||
&des_encrypt("BF_encrypt");
|
||||
|
||||
&file_end();
|
||||
|
||||
sub des_encrypt
|
||||
{
|
||||
local($name)=@_;
|
||||
|
||||
&function_begin($name,3);
|
||||
|
||||
&comment("");
|
||||
&comment("Load the 2 words");
|
||||
&mov("eax",&wparam(0));
|
||||
&mov($L,&DWP(0,"eax","",0));
|
||||
&mov($R,&DWP(4,"eax","",0));
|
||||
|
||||
&comment("");
|
||||
&comment("P pointer, s and enc flag");
|
||||
&mov($P,&wparam(1));
|
||||
|
||||
&xor( $tmp1, $tmp1);
|
||||
&xor( $tmp2, $tmp2);
|
||||
|
||||
# encrypting part
|
||||
|
||||
&mov("ebp",&wparam(2)); # get encrypt flag
|
||||
&cmp("ebp","0");
|
||||
&je(&label("start_decrypt"));
|
||||
|
||||
&xor($L,&DWP(0,$P,"",0));
|
||||
for ($i=0; $i<$BF_ROUNDS; $i+=2)
|
||||
{
|
||||
&comment("");
|
||||
&comment("Round $i");
|
||||
&BF_ENCRYPT($i+1,$R,$L,$P,$tot,$tmp1,$tmp2,$tmp3);
|
||||
|
||||
&comment("");
|
||||
&comment("Round ".sprintf("%d",$i+1));
|
||||
&BF_ENCRYPT($i+2,$L,$R,$P,$tot,$tmp1,$tmp2,$tmp3);
|
||||
}
|
||||
&xor($R,&DWP(($BF_ROUNDS+1)*4,$P,"",0));
|
||||
|
||||
&mov("eax",&wparam(0));
|
||||
&mov(&DWP(0,"eax","",0),$R);
|
||||
&mov(&DWP(4,"eax","",0),$L);
|
||||
&function_end_A($name);
|
||||
|
||||
&set_label("start_decrypt");
|
||||
|
||||
&xor($L,&DWP(($BF_ROUNDS+1)*4,$P,"",0));
|
||||
for ($i=$BF_ROUNDS; $i>0; $i-=2)
|
||||
{
|
||||
&comment("");
|
||||
&comment("Round $i");
|
||||
&BF_ENCRYPT($i,$R,$L,$P,$tot,$tmp1,$tmp2,$tmp3);
|
||||
&comment("");
|
||||
&comment("Round ".sprintf("%d",$i-1));
|
||||
&BF_ENCRYPT($i-1,$L,$R,$P,$tot,$tmp1,$tmp2,$tmp3);
|
||||
}
|
||||
&xor($R,&DWP(0,$P,"",0));
|
||||
|
||||
&mov("eax",&wparam(0));
|
||||
&mov(&DWP(0,"eax","",0),$R);
|
||||
&mov(&DWP(4,"eax","",0),$L);
|
||||
&function_end_A($name);
|
||||
|
||||
&function_end_B($name);
|
||||
}
|
||||
|
||||
sub BF_ENCRYPT
|
||||
{
|
||||
local($i,$L,$R,$P,$tot,$tmp1,$tmp2,$tmp3)=@_;
|
||||
|
||||
&rotr( $R, 16);
|
||||
&mov( $tot, &DWP(&n2a($i*4),$P,"",0));
|
||||
|
||||
&movb( &LB($tmp1), &HB($R));
|
||||
&movb( &LB($tmp2), &LB($R));
|
||||
|
||||
&rotr( $R, 16);
|
||||
&xor( $L, $tot);
|
||||
|
||||
&mov( $tot, &DWP(&n2a($BF_OFF+0x0000),$P,$tmp1,4));
|
||||
&mov( $tmp3, &DWP(&n2a($BF_OFF+0x0400),$P,$tmp2,4));
|
||||
|
||||
&movb( &LB($tmp1), &HB($R));
|
||||
&movb( &LB($tmp2), &LB($R));
|
||||
|
||||
&add( $tot, $tmp3);
|
||||
&mov( $tmp1, &DWP(&n2a($BF_OFF+0x0800),$P,$tmp1,4)); # delay
|
||||
|
||||
&xor( $tot, $tmp1);
|
||||
&mov( $tmp3, &DWP(&n2a($BF_OFF+0x0C00),$P,$tmp2,4));
|
||||
|
||||
&add( $tot, $tmp3);
|
||||
&xor( $tmp1, $tmp1);
|
||||
|
||||
&xor( $L, $tot);
|
||||
# delay
|
||||
}
|
||||
|
||||
sub n2a
|
||||
{
|
||||
sprintf("%d",$_[0]);
|
||||
}
|
||||
|
666
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/bx86-cpp.s
Normal file
666
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/bx86-cpp.s
Normal file
@ -0,0 +1,666 @@
|
||||
/* Don't even think of reading this code */
|
||||
/* It was automatically generated by bf586.pl */
|
||||
/* Which is a perl program used to generate the x86 assember for */
|
||||
/* any of elf, a.out, Win32, or Solaris */
|
||||
/* It can be found in SSLeay 0.7.0+ */
|
||||
/* eric <eay@mincom.oz.au> */
|
||||
|
||||
.file "bfx86xxxx.s"
|
||||
.version "01.01"
|
||||
gcc2_compiled.:
|
||||
.text
|
||||
.align ALIGN
|
||||
.globl BF_encrypt
|
||||
TYPE(BF_encrypt,@function)
|
||||
BF_encrypt:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
|
||||
|
||||
/* Load the 2 words */
|
||||
movl 20(%esp), %eax
|
||||
movl (%eax), %ecx
|
||||
movl 4(%eax), %edx
|
||||
|
||||
/* P pointer, s and enc flag */
|
||||
movl 24(%esp), %edi
|
||||
xorl %eax, %eax
|
||||
xorl %ebx, %ebx
|
||||
movl 28(%esp), %ebp
|
||||
cmpl $0, %ebp
|
||||
je .L000start_decrypt
|
||||
xorl (%edi), %ecx
|
||||
|
||||
/* Round 0 */
|
||||
rorl $16, %ecx
|
||||
movl 4(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 1 */
|
||||
rorl $16, %edx
|
||||
movl 8(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 2 */
|
||||
rorl $16, %ecx
|
||||
movl 12(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 3 */
|
||||
rorl $16, %edx
|
||||
movl 16(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 4 */
|
||||
rorl $16, %ecx
|
||||
movl 20(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 5 */
|
||||
rorl $16, %edx
|
||||
movl 24(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 6 */
|
||||
rorl $16, %ecx
|
||||
movl 28(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 7 */
|
||||
rorl $16, %edx
|
||||
movl 32(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 8 */
|
||||
rorl $16, %ecx
|
||||
movl 36(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 9 */
|
||||
rorl $16, %edx
|
||||
movl 40(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 10 */
|
||||
rorl $16, %ecx
|
||||
movl 44(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 11 */
|
||||
rorl $16, %edx
|
||||
movl 48(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 12 */
|
||||
rorl $16, %ecx
|
||||
movl 52(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 13 */
|
||||
rorl $16, %edx
|
||||
movl 56(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 14 */
|
||||
rorl $16, %ecx
|
||||
movl 60(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 15 */
|
||||
rorl $16, %edx
|
||||
movl 64(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
xorl 68(%edi), %edx
|
||||
movl 20(%esp), %eax
|
||||
movl %edx, (%eax)
|
||||
movl %ecx, 4(%eax)
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.align ALIGN
|
||||
.L000start_decrypt:
|
||||
xorl 68(%edi), %ecx
|
||||
|
||||
/* Round 16 */
|
||||
rorl $16, %ecx
|
||||
movl 64(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 15 */
|
||||
rorl $16, %edx
|
||||
movl 60(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 14 */
|
||||
rorl $16, %ecx
|
||||
movl 56(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 13 */
|
||||
rorl $16, %edx
|
||||
movl 52(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 12 */
|
||||
rorl $16, %ecx
|
||||
movl 48(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 11 */
|
||||
rorl $16, %edx
|
||||
movl 44(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 10 */
|
||||
rorl $16, %ecx
|
||||
movl 40(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 9 */
|
||||
rorl $16, %edx
|
||||
movl 36(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 8 */
|
||||
rorl $16, %ecx
|
||||
movl 32(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 7 */
|
||||
rorl $16, %edx
|
||||
movl 28(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 6 */
|
||||
rorl $16, %ecx
|
||||
movl 24(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 5 */
|
||||
rorl $16, %edx
|
||||
movl 20(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 4 */
|
||||
rorl $16, %ecx
|
||||
movl 16(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 3 */
|
||||
rorl $16, %edx
|
||||
movl 12(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
|
||||
/* Round 2 */
|
||||
rorl $16, %ecx
|
||||
movl 8(%edi), %esi
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
rorl $16, %ecx
|
||||
xorl %esi, %edx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %ch, %al
|
||||
movb %cl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %edx
|
||||
|
||||
/* Round 1 */
|
||||
rorl $16, %edx
|
||||
movl 4(%edi), %esi
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
rorl $16, %edx
|
||||
xorl %esi, %ecx
|
||||
movl 72(%edi,%eax,4),%esi
|
||||
movl 1096(%edi,%ebx,4),%ebp
|
||||
movb %dh, %al
|
||||
movb %dl, %bl
|
||||
addl %ebp, %esi
|
||||
movl 2120(%edi,%eax,4),%eax
|
||||
xorl %eax, %esi
|
||||
movl 3144(%edi,%ebx,4),%ebp
|
||||
addl %ebp, %esi
|
||||
xorl %eax, %eax
|
||||
xorl %esi, %ecx
|
||||
xorl (%edi), %edx
|
||||
movl 20(%esp), %eax
|
||||
movl %edx, (%eax)
|
||||
movl %ecx, 4(%eax)
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.BF_encrypt_end:
|
||||
SIZE(BF_encrypt,.BF_encrypt_end-BF_encrypt)
|
||||
.ident "desasm.pl"
|
@ -0,0 +1,33 @@
|
||||
|
||||
#define TYPE(a,b) .type a,b
|
||||
#define SIZE(a,b) .size a,b
|
||||
|
||||
#ifdef OUT
|
||||
#define OK 1
|
||||
#define BF_encrypt _BF_encrypt
|
||||
#define ALIGN 4
|
||||
#endif
|
||||
|
||||
#ifdef BSDI
|
||||
#define OK 1
|
||||
#define BF_encrypt _BF_encrypt
|
||||
#define ALIGN 4
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
#endif
|
||||
|
||||
#if defined(ELF) || defined(SOL)
|
||||
#define OK 1
|
||||
#define ALIGN 16
|
||||
#endif
|
||||
|
||||
#ifndef OK
|
||||
You need to define one of
|
||||
ELF - elf systems - linux-elf, NetBSD and DG-UX
|
||||
OUT - a.out systems - linux-a.out and FreeBSD
|
||||
SOL - solaris systems, which are elf with strange comment lines
|
||||
BSDI - a.out with a very primative version of as.
|
||||
#endif
|
||||
|
||||
#include "bx86-cpp.s"
|
||||
|
@ -0,0 +1,3 @@
|
||||
If you want more of an idea of how this all works,
|
||||
have a read of the readme file in SSLeay/crypto/des/asm.
|
||||
SSLeay can be found at ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL.
|
663
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/win32.asm
Normal file
663
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/win32.asm
Normal file
@ -0,0 +1,663 @@
|
||||
; Don't even think of reading this code
|
||||
; It was automatically generated by bf586.pl
|
||||
; Which is a perl program used to generate the x86 assember for
|
||||
; any of elf, a.out, Win32, or Solaris
|
||||
; It can be found in SSLeay 0.7.0+
|
||||
; eric <eay@mincom.oz.au>
|
||||
;
|
||||
TITLE bfx86xxxx.asm
|
||||
.386
|
||||
.model FLAT
|
||||
_TEXT SEGMENT
|
||||
PUBLIC _BF_encrypt
|
||||
EXTRN _des_SPtrans:DWORD
|
||||
_BF_encrypt PROC NEAR
|
||||
push ebp
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
;
|
||||
; Load the 2 words
|
||||
mov eax, DWORD PTR 20[esp]
|
||||
mov ecx, DWORD PTR [eax]
|
||||
mov edx, DWORD PTR 4[eax]
|
||||
;
|
||||
; P pointer, s and enc flag
|
||||
mov edi, DWORD PTR 24[esp]
|
||||
xor eax, eax
|
||||
xor ebx, ebx
|
||||
mov ebp, DWORD PTR 28[esp]
|
||||
cmp ebp, 0
|
||||
je $L000start_decrypt
|
||||
xor ecx, DWORD PTR [edi]
|
||||
;
|
||||
; Round 0
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 4[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 1
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 8[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 2
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 12[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 3
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 16[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 4
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 20[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 5
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 24[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 6
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 28[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 7
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 32[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 8
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 36[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 9
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 40[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 10
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 44[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 11
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 48[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 12
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 52[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 13
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 56[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 14
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 60[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 15
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 64[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
xor edx, DWORD PTR 68[edi]
|
||||
mov eax, DWORD PTR 20[esp]
|
||||
mov DWORD PTR [eax],edx
|
||||
mov DWORD PTR 4[eax],ecx
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
pop ebp
|
||||
ret
|
||||
$L000start_decrypt:
|
||||
xor ecx, DWORD PTR 68[edi]
|
||||
;
|
||||
; Round 16
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 64[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 15
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 60[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 14
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 56[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 13
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 52[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 12
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 48[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 11
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 44[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 10
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 40[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 9
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 36[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 8
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 32[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 7
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 28[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 6
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 24[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 5
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 20[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 4
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 16[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 3
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 12[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
;
|
||||
; Round 2
|
||||
ror ecx, 16
|
||||
mov esi, DWORD PTR 8[edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
ror ecx, 16
|
||||
xor edx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, ch
|
||||
mov bl, cl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor edx, esi
|
||||
;
|
||||
; Round 1
|
||||
ror edx, 16
|
||||
mov esi, DWORD PTR 4[edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
ror edx, 16
|
||||
xor ecx, esi
|
||||
mov esi, DWORD PTR 72[eax*4+edi]
|
||||
mov ebp, DWORD PTR 1096[ebx*4+edi]
|
||||
mov al, dh
|
||||
mov bl, dl
|
||||
add esi, ebp
|
||||
mov eax, DWORD PTR 2120[eax*4+edi]
|
||||
xor esi, eax
|
||||
mov ebp, DWORD PTR 3144[ebx*4+edi]
|
||||
add esi, ebp
|
||||
xor eax, eax
|
||||
xor ecx, esi
|
||||
xor edx, DWORD PTR [edi]
|
||||
mov eax, DWORD PTR 20[esp]
|
||||
mov DWORD PTR [eax],edx
|
||||
mov DWORD PTR 4[eax],ecx
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
pop ebp
|
||||
ret
|
||||
_BF_encrypt ENDP
|
||||
_TEXT ENDS
|
||||
END
|
249
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/x86ms.pl
Normal file
249
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/x86ms.pl
Normal file
@ -0,0 +1,249 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
package x86ms;
|
||||
|
||||
$label="L000";
|
||||
|
||||
%lb=( 'eax', 'al',
|
||||
'ebx', 'bl',
|
||||
'ecx', 'cl',
|
||||
'edx', 'dl',
|
||||
'ax', 'al',
|
||||
'bx', 'bl',
|
||||
'cx', 'cl',
|
||||
'dx', 'dl',
|
||||
);
|
||||
|
||||
%hb=( 'eax', 'ah',
|
||||
'ebx', 'bh',
|
||||
'ecx', 'ch',
|
||||
'edx', 'dh',
|
||||
'ax', 'ah',
|
||||
'bx', 'bh',
|
||||
'cx', 'ch',
|
||||
'dx', 'dh',
|
||||
);
|
||||
|
||||
sub main'LB
|
||||
{
|
||||
(defined($lb{$_[0]})) || die "$_[0] does not have a 'low byte'\n";
|
||||
return($lb{$_[0]});
|
||||
}
|
||||
|
||||
sub main'HB
|
||||
{
|
||||
(defined($hb{$_[0]})) || die "$_[0] does not have a 'high byte'\n";
|
||||
return($hb{$_[0]});
|
||||
}
|
||||
|
||||
sub main'DWP
|
||||
{
|
||||
local($addr,$reg1,$reg2,$idx)=@_;
|
||||
local($t);
|
||||
local($ret)="DWORD PTR ";
|
||||
|
||||
$addr =~ s/^\s+//;
|
||||
if ($addr =~ /^(.+)\+(.+)$/)
|
||||
{
|
||||
$reg2=&conv($1);
|
||||
$addr="_$2";
|
||||
}
|
||||
elsif ($addr =~ /^[_a-zA-Z]/)
|
||||
{
|
||||
$addr="_$addr";
|
||||
}
|
||||
|
||||
$reg1="$regs{$reg1}" if defined($regs{$reg1});
|
||||
$reg2="$regs{$reg2}" if defined($regs{$reg2});
|
||||
$ret.=$addr if ($addr ne "") && ($addr ne 0);
|
||||
if ($reg2 ne "")
|
||||
{
|
||||
$t="";
|
||||
$t="*$idx" if ($idx != 0);
|
||||
$ret.="[$reg2$t+$reg1]";
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret.="[$reg1]"
|
||||
}
|
||||
return($ret);
|
||||
}
|
||||
|
||||
sub main'mov { &out2("mov",@_); }
|
||||
sub main'movb { &out2("mov",@_); }
|
||||
sub main'and { &out2("and",@_); }
|
||||
sub main'or { &out2("or",@_); }
|
||||
sub main'shl { &out2("shl",@_); }
|
||||
sub main'shr { &out2("shr",@_); }
|
||||
sub main'xor { &out2("xor",@_); }
|
||||
sub main'add { &out2("add",@_); }
|
||||
sub main'sub { &out2("sub",@_); }
|
||||
sub main'rotl { &out2("rol",@_); }
|
||||
sub main'rotr { &out2("ror",@_); }
|
||||
sub main'exch { &out2("xchg",@_); }
|
||||
sub main'cmp { &out2("cmp",@_); }
|
||||
sub main'dec { &out1("dec",@_); }
|
||||
sub main'jmp { &out1("jmp",@_); }
|
||||
sub main'je { &out1("je",@_); }
|
||||
sub main'jz { &out1("jz",@_); }
|
||||
sub main'jnz { &out1("jnz",@_); }
|
||||
sub main'push { &out1("push",@_); }
|
||||
sub main'call { &out1("call",'_'.$_[0]); }
|
||||
|
||||
|
||||
sub out2
|
||||
{
|
||||
local($name,$p1,$p2)=@_;
|
||||
local($l,$t);
|
||||
|
||||
print "\t$name\t";
|
||||
$t=&conv($p1).",";
|
||||
$l=length($t);
|
||||
print $t;
|
||||
$l=4-($l+9)/8;
|
||||
print "\t" x $l;
|
||||
print &conv($p2);
|
||||
print "\n";
|
||||
}
|
||||
|
||||
sub out1
|
||||
{
|
||||
local($name,$p1)=@_;
|
||||
local($l,$t);
|
||||
|
||||
print "\t$name\t";
|
||||
print &conv($p1);
|
||||
print "\n";
|
||||
}
|
||||
|
||||
sub conv
|
||||
{
|
||||
local($p)=@_;
|
||||
|
||||
$p =~ s/0x([0-9A-Fa-f]+)/0$1h/;
|
||||
return $p;
|
||||
}
|
||||
|
||||
sub main'file
|
||||
{
|
||||
local($file)=@_;
|
||||
|
||||
print <<"EOF";
|
||||
TITLE $file.asm
|
||||
.386
|
||||
.model FLAT
|
||||
EOF
|
||||
}
|
||||
|
||||
sub main'function_begin
|
||||
{
|
||||
local($func,$num)=@_;
|
||||
|
||||
$params=$num*4;
|
||||
|
||||
print <<"EOF";
|
||||
_TEXT SEGMENT
|
||||
PUBLIC _$func
|
||||
EXTRN _des_SPtrans:DWORD
|
||||
_$func PROC NEAR
|
||||
push ebp
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
EOF
|
||||
$stack=20;
|
||||
}
|
||||
|
||||
sub main'function_end
|
||||
{
|
||||
local($func)=@_;
|
||||
|
||||
print <<"EOF";
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
pop ebp
|
||||
ret
|
||||
_$func ENDP
|
||||
_TEXT ENDS
|
||||
EOF
|
||||
$stack=0;
|
||||
%label=();
|
||||
}
|
||||
|
||||
sub main'function_end_A
|
||||
{
|
||||
local($func)=@_;
|
||||
|
||||
print <<"EOF";
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
pop ebp
|
||||
ret
|
||||
EOF
|
||||
}
|
||||
|
||||
sub main'function_end_B
|
||||
{
|
||||
local($func)=@_;
|
||||
|
||||
print <<"EOF";
|
||||
_$func ENDP
|
||||
_TEXT ENDS
|
||||
EOF
|
||||
$stack=0;
|
||||
%label=();
|
||||
}
|
||||
|
||||
sub main'file_end
|
||||
{
|
||||
print "END\n"
|
||||
}
|
||||
|
||||
sub main'wparam
|
||||
{
|
||||
local($num)=@_;
|
||||
|
||||
return(&main'DWP($stack+$num*4,"esp","",0));
|
||||
}
|
||||
|
||||
sub main'wtmp
|
||||
{
|
||||
local($num)=@_;
|
||||
|
||||
return(&main'DWP($stack+$params+$num*4,"esp","",0));
|
||||
}
|
||||
|
||||
sub main'comment
|
||||
{
|
||||
foreach (@_)
|
||||
{
|
||||
print "\t; $_\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub main'label
|
||||
{
|
||||
if (!defined($label{$_[0]}))
|
||||
{
|
||||
$label{$_[0]}="\$${label}${_[0]}";
|
||||
$label++;
|
||||
}
|
||||
return($label{$_[0]});
|
||||
}
|
||||
|
||||
sub main'set_label
|
||||
{
|
||||
if (!defined($label{$_[0]}))
|
||||
{
|
||||
$label{$_[0]}="${label}${_[0]}";
|
||||
$label++;
|
||||
}
|
||||
print "$label{$_[0]}:\n";
|
||||
}
|
||||
|
||||
sub main'file_end
|
||||
{
|
||||
print "END\n";
|
||||
}
|
313
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/x86unix.pl
Normal file
313
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/asm/x86unix.pl
Normal file
@ -0,0 +1,313 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
package x86ms;
|
||||
|
||||
$label="L000";
|
||||
|
||||
$align=($main'aout)?"4":"16";
|
||||
$under=($main'aout)?"_":"";
|
||||
$com_start=($main'sol)?"/":"#";
|
||||
|
||||
if ($main'cpp)
|
||||
{
|
||||
$align="ALIGN";
|
||||
$under="";
|
||||
$com_start='/*';
|
||||
$com_end='*/';
|
||||
}
|
||||
|
||||
%lb=( 'eax', '%al',
|
||||
'ebx', '%bl',
|
||||
'ecx', '%cl',
|
||||
'edx', '%dl',
|
||||
'ax', '%al',
|
||||
'bx', '%bl',
|
||||
'cx', '%cl',
|
||||
'dx', '%dl',
|
||||
);
|
||||
|
||||
%hb=( 'eax', '%ah',
|
||||
'ebx', '%bh',
|
||||
'ecx', '%ch',
|
||||
'edx', '%dh',
|
||||
'ax', '%ah',
|
||||
'bx', '%bh',
|
||||
'cx', '%ch',
|
||||
'dx', '%dh',
|
||||
);
|
||||
|
||||
%regs=( 'eax', '%eax',
|
||||
'ebx', '%ebx',
|
||||
'ecx', '%ecx',
|
||||
'edx', '%edx',
|
||||
'esi', '%esi',
|
||||
'edi', '%edi',
|
||||
'ebp', '%ebp',
|
||||
'esp', '%esp',
|
||||
);
|
||||
|
||||
sub main'LB
|
||||
{
|
||||
(defined($lb{$_[0]})) || die "$_[0] does not have a 'low byte'\n";
|
||||
return($lb{$_[0]});
|
||||
}
|
||||
|
||||
sub main'HB
|
||||
{
|
||||
(defined($hb{$_[0]})) || die "$_[0] does not have a 'high byte'\n";
|
||||
return($hb{$_[0]});
|
||||
}
|
||||
|
||||
sub main'DWP
|
||||
{
|
||||
local($addr,$reg1,$reg2,$idx)=@_;
|
||||
|
||||
|
||||
$ret="";
|
||||
|
||||
$addr =~ s/(^|[+ \t])([A-Za-z_]+)($|[+ \t])/$1$under$2$3/;
|
||||
|
||||
$reg1="$regs{$reg1}" if defined($regs{$reg1});
|
||||
$reg2="$regs{$reg2}" if defined($regs{$reg2});
|
||||
$ret.=$addr if ($addr ne "") && ($addr ne 0);
|
||||
if ($reg2 ne "")
|
||||
{
|
||||
$ret.="($reg1,$reg2,$idx)";
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret.="($reg1)"
|
||||
}
|
||||
return($ret);
|
||||
}
|
||||
|
||||
sub main'BP
|
||||
{
|
||||
local($addr,$reg1,$reg2,$idx)=@_;
|
||||
|
||||
|
||||
$ret="";
|
||||
|
||||
$addr =~ s/(^|[+ \t])([A-Za-z_]+)($|[+ \t])/$1$under$2$3/;
|
||||
|
||||
$reg1="$regs{$reg1}" if defined($regs{$reg1});
|
||||
$reg2="$regs{$reg2}" if defined($regs{$reg2});
|
||||
$ret.=$addr if ($addr ne "") && ($addr ne 0);
|
||||
if ($reg2 ne "")
|
||||
{
|
||||
$ret.="($reg1,$reg2,$idx)";
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret.="($reg1)"
|
||||
}
|
||||
return($ret);
|
||||
}
|
||||
|
||||
sub main'mov { &out2("movl",@_); }
|
||||
sub main'movb { &out2("movb",@_); }
|
||||
sub main'and { &out2("andl",@_); }
|
||||
sub main'or { &out2("orl",@_); }
|
||||
sub main'shl { &out2("sall",@_); }
|
||||
sub main'shr { &out2("shrl",@_); }
|
||||
sub main'xor { &out2("xorl",@_); }
|
||||
sub main'add { &out2("addl",@_); }
|
||||
sub main'sub { &out2("subl",@_); }
|
||||
sub main'rotl { &out2("roll",@_); }
|
||||
sub main'rotr { &out2("rorl",@_); }
|
||||
sub main'exch { &out2("xchg",@_); }
|
||||
sub main'cmp { &out2("cmpl",@_); }
|
||||
sub main'jmp { &out1("jmp",@_); }
|
||||
sub main'je { &out1("je",@_); }
|
||||
sub main'jne { &out1("jne",@_); }
|
||||
sub main'jnz { &out1("jnz",@_); }
|
||||
sub main'jz { &out1("jz",@_); }
|
||||
sub main'dec { &out1("decl",@_); }
|
||||
sub main'push { &out1("pushl",@_); }
|
||||
sub main'call { &out1("call",$under.$_[0]); }
|
||||
|
||||
|
||||
sub out2
|
||||
{
|
||||
local($name,$p1,$p2)=@_;
|
||||
local($l,$ll,$t);
|
||||
|
||||
print "\t$name\t";
|
||||
$t=&conv($p2).",";
|
||||
$l=length($t);
|
||||
print $t;
|
||||
$ll=4-($l+9)/8;
|
||||
print "\t" x $ll;
|
||||
print &conv($p1);
|
||||
print "\n";
|
||||
}
|
||||
|
||||
sub out1
|
||||
{
|
||||
local($name,$p1)=@_;
|
||||
local($l,$t);
|
||||
|
||||
print "\t$name\t";
|
||||
print &conv($p1);
|
||||
print "\n";
|
||||
}
|
||||
|
||||
sub conv
|
||||
{
|
||||
local($p)=@_;
|
||||
|
||||
# $p =~ s/0x([0-9A-Fa-f]+)/0$1h/;
|
||||
|
||||
$p=$regs{$p} if (defined($regs{$p}));
|
||||
|
||||
$p =~ s/^([0-9A-Fa-f]+)$/\$$1/;
|
||||
$p =~ s/^(0x[0-9A-Fa-f]+)$/\$$1/;
|
||||
return $p;
|
||||
}
|
||||
|
||||
sub main'file
|
||||
{
|
||||
local($file)=@_;
|
||||
|
||||
print <<"EOF";
|
||||
.file "$file.s"
|
||||
.version "01.01"
|
||||
gcc2_compiled.:
|
||||
EOF
|
||||
}
|
||||
|
||||
sub main'function_begin
|
||||
{
|
||||
local($func,$num)=@_;
|
||||
|
||||
$params=$num*4;
|
||||
|
||||
$func=$under.$func;
|
||||
|
||||
print <<"EOF";
|
||||
.text
|
||||
.align $align
|
||||
.globl $func
|
||||
EOF
|
||||
if ($main'cpp)
|
||||
{ printf("\tTYPE($func,\@function)\n"); }
|
||||
else { printf("\t.type $func,\@function\n"); }
|
||||
print <<"EOF";
|
||||
$func:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
|
||||
EOF
|
||||
$stack=20;
|
||||
}
|
||||
|
||||
sub main'function_end
|
||||
{
|
||||
local($func)=@_;
|
||||
|
||||
$func=$under.$func;
|
||||
|
||||
print <<"EOF";
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.${func}_end:
|
||||
EOF
|
||||
if ($main'cpp)
|
||||
{ printf("\tSIZE($func,.${func}_end-$func)\n"); }
|
||||
else { printf("\t.size\t$func,.${func}_end-$func\n"); }
|
||||
print ".ident \"desasm.pl\"\n";
|
||||
$stack=0;
|
||||
%label=();
|
||||
}
|
||||
|
||||
sub main'function_end_A
|
||||
{
|
||||
local($func)=@_;
|
||||
|
||||
print <<"EOF";
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
EOF
|
||||
}
|
||||
|
||||
sub main'function_end_B
|
||||
{
|
||||
local($func)=@_;
|
||||
|
||||
$func=$under.$func;
|
||||
|
||||
print <<"EOF";
|
||||
.${func}_end:
|
||||
EOF
|
||||
if ($main'cpp)
|
||||
{ printf("\tSIZE($func,.${func}_end-$func)\n"); }
|
||||
else { printf("\t.size\t$func,.${func}_end-$func\n"); }
|
||||
print ".ident \"desasm.pl\"\n";
|
||||
$stack=0;
|
||||
%label=();
|
||||
}
|
||||
|
||||
sub main'wparam
|
||||
{
|
||||
local($num)=@_;
|
||||
|
||||
return(&main'DWP($stack+$num*4,"esp","",0));
|
||||
}
|
||||
|
||||
sub main'wtmp_b
|
||||
{
|
||||
local($num,$b)=@_;
|
||||
|
||||
return(&main'BP(-(($num+1)*4)+$b,"esp","",0));
|
||||
}
|
||||
|
||||
sub main'wtmp
|
||||
{
|
||||
local($num)=@_;
|
||||
|
||||
return(&main'DWP(-($num+1)*4,"esp","",0));
|
||||
}
|
||||
|
||||
sub main'comment
|
||||
{
|
||||
foreach (@_)
|
||||
{
|
||||
if (/^\s*$/)
|
||||
{ print "\n"; }
|
||||
else
|
||||
{ print "\t$com_start $_ $com_end\n"; }
|
||||
}
|
||||
}
|
||||
|
||||
sub main'label
|
||||
{
|
||||
if (!defined($label{$_[0]}))
|
||||
{
|
||||
$label{$_[0]}=".${label}${_[0]}";
|
||||
$label++;
|
||||
}
|
||||
return($label{$_[0]});
|
||||
}
|
||||
|
||||
sub main'set_label
|
||||
{
|
||||
if (!defined($label{$_[0]}))
|
||||
{
|
||||
$label{$_[0]}=".${label}${_[0]}";
|
||||
$label++;
|
||||
}
|
||||
print ".align $align\n";
|
||||
print "$label{$_[0]}:\n";
|
||||
}
|
||||
|
||||
sub main'file_end
|
||||
{
|
||||
}
|
143
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_cbc.c
Normal file
143
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_cbc.c
Normal file
@ -0,0 +1,143 @@
|
||||
/* crypto/bf/bf_cbc.c */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
|
||||
#include "blowfish.h"
|
||||
#include "bf_locl.h"
|
||||
|
||||
void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length, BF_KEY *ks,
|
||||
unsigned char *iv, int encrypt)
|
||||
{
|
||||
register BF_LONG tin0,tin1;
|
||||
register BF_LONG tout0,tout1,xor0,xor1;
|
||||
register long l=length;
|
||||
BF_LONG tin[2];
|
||||
|
||||
if (encrypt != 0)
|
||||
{
|
||||
n2l(iv,tout0);
|
||||
n2l(iv,tout1);
|
||||
iv-=8;
|
||||
for (l-=8; l>=0; l-=8)
|
||||
{
|
||||
n2l(in,tin0);
|
||||
n2l(in,tin1);
|
||||
tin0^=tout0;
|
||||
tin1^=tout1;
|
||||
tin[0]=tin0;
|
||||
tin[1]=tin1;
|
||||
BF_encrypt(tin,ks,BF_ENCRYPT);
|
||||
tout0=tin[0];
|
||||
tout1=tin[1];
|
||||
l2n(tout0,out);
|
||||
l2n(tout1,out);
|
||||
}
|
||||
if (l != -8)
|
||||
{
|
||||
n2ln(in,tin0,tin1,l+8);
|
||||
tin0^=tout0;
|
||||
tin1^=tout1;
|
||||
tin[0]=tin0;
|
||||
tin[1]=tin1;
|
||||
BF_encrypt(tin,ks,BF_ENCRYPT);
|
||||
tout0=tin[0];
|
||||
tout1=tin[1];
|
||||
l2n(tout0,out);
|
||||
l2n(tout1,out);
|
||||
}
|
||||
l2n(tout0,iv);
|
||||
l2n(tout1,iv);
|
||||
}
|
||||
else
|
||||
{
|
||||
n2l(iv,xor0);
|
||||
n2l(iv,xor1);
|
||||
iv-=8;
|
||||
for (l-=8; l>=0; l-=8)
|
||||
{
|
||||
n2l(in,tin0);
|
||||
n2l(in,tin1);
|
||||
tin[0]=tin0;
|
||||
tin[1]=tin1;
|
||||
BF_encrypt(tin,ks,BF_DECRYPT);
|
||||
tout0=tin[0]^xor0;
|
||||
tout1=tin[1]^xor1;
|
||||
l2n(tout0,out);
|
||||
l2n(tout1,out);
|
||||
xor0=tin0;
|
||||
xor1=tin1;
|
||||
}
|
||||
if (l != -8)
|
||||
{
|
||||
n2l(in,tin0);
|
||||
n2l(in,tin1);
|
||||
tin[0]=tin0;
|
||||
tin[1]=tin1;
|
||||
BF_encrypt(tin,ks,BF_DECRYPT);
|
||||
tout0=tin[0]^xor0;
|
||||
tout1=tin[1]^xor1;
|
||||
l2nn(tout0,tout1,out,l+8);
|
||||
xor0=tin0;
|
||||
xor1=tin1;
|
||||
}
|
||||
l2n(xor0,iv);
|
||||
l2n(xor1,iv);
|
||||
}
|
||||
tin0=tin1=tout0=tout1=xor0=xor1=0;
|
||||
tin[0]=tin[1]=0;
|
||||
}
|
||||
|
122
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_cfb64.c
Normal file
122
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_cfb64.c
Normal file
@ -0,0 +1,122 @@
|
||||
/* crypto/bf/bf_cfb64.c */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
|
||||
#include "blowfish.h"
|
||||
#include "bf_locl.h"
|
||||
|
||||
/* The input and output encrypted as though 64bit cfb mode is being
|
||||
* used. The extra state information to record how much of the
|
||||
* 64bit block we have used is contained in *num;
|
||||
*/
|
||||
|
||||
void BF_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int encrypt)
|
||||
{
|
||||
register BF_LONG v0,v1,t;
|
||||
register int n= *num;
|
||||
register long l=length;
|
||||
BF_LONG ti[2];
|
||||
unsigned char *iv,c,cc;
|
||||
|
||||
iv=(unsigned char *)ivec;
|
||||
if (encrypt != 0)
|
||||
{
|
||||
while (l-- != 0)
|
||||
{
|
||||
if (n == 0)
|
||||
{
|
||||
n2l(iv,v0); ti[0]=v0;
|
||||
n2l(iv,v1); ti[1]=v1;
|
||||
BF_encrypt((unsigned long *)ti,schedule,BF_ENCRYPT);
|
||||
iv=(unsigned char *)ivec;
|
||||
t=ti[0]; l2n(t,iv);
|
||||
t=ti[1]; l2n(t,iv);
|
||||
iv=(unsigned char *)ivec;
|
||||
}
|
||||
c= (unsigned char)(*(in++)^iv[n]);
|
||||
*(out++)=c;
|
||||
iv[n]=c;
|
||||
n=(n+1)&0x07;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (l-- != 0)
|
||||
{
|
||||
if (n == 0)
|
||||
{
|
||||
n2l(iv,v0); ti[0]=v0;
|
||||
n2l(iv,v1); ti[1]=v1;
|
||||
BF_encrypt((unsigned long *)ti,schedule,BF_ENCRYPT);
|
||||
iv=(unsigned char *)ivec;
|
||||
t=ti[0]; l2n(t,iv);
|
||||
t=ti[1]; l2n(t,iv);
|
||||
iv=(unsigned char *)ivec;
|
||||
}
|
||||
cc= *(in++);
|
||||
c=iv[n];
|
||||
iv[n]=cc;
|
||||
*(out++)=(unsigned char)(c^cc);
|
||||
n=(n+1)&0x07;
|
||||
}
|
||||
}
|
||||
v0=v1=ti[0]=ti[1]=t=0;
|
||||
c=cc=(unsigned char)0;
|
||||
*num=n;
|
||||
}
|
||||
|
91
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_ecb.c
Normal file
91
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_ecb.c
Normal file
@ -0,0 +1,91 @@
|
||||
/* crypto/bf/bf_ecb.c */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
|
||||
#include "blowfish.h"
|
||||
#include "bf_locl.h"
|
||||
|
||||
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
|
||||
* (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
|
||||
* CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
|
||||
*/
|
||||
|
||||
char *BF_version="BlowFish part of SSLeay 0.7.0 30-Jan-1997";
|
||||
|
||||
char *BF_options()
|
||||
{
|
||||
#ifdef BF_PTR
|
||||
return("blowfish(ptr)");
|
||||
#elif defined(BF_PTR2)
|
||||
return("blowfish(ptr2)");
|
||||
#else
|
||||
return("blowfish(idx)");
|
||||
#endif
|
||||
}
|
||||
|
||||
void BF_ecb_encrypt(unsigned char *in, unsigned char *out, BF_KEY *ks, int encrypt)
|
||||
{
|
||||
BF_LONG l,d[2];
|
||||
|
||||
n2l(in,l); d[0]=l;
|
||||
n2l(in,l); d[1]=l;
|
||||
BF_encrypt(d,ks,encrypt);
|
||||
l=d[0]; l2n(l,out);
|
||||
l=d[1]; l2n(l,out);
|
||||
l=d[0]=d[1]=0;
|
||||
}
|
||||
|
137
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_enc.c
Normal file
137
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_enc.c
Normal file
@ -0,0 +1,137 @@
|
||||
/* crypto/bf/bf_enc.c */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
|
||||
#include "blowfish.h"
|
||||
#include "bf_locl.h"
|
||||
|
||||
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
|
||||
* (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
|
||||
* CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
|
||||
*/
|
||||
|
||||
#if (BF_ROUNDS != 16) && (BF_ROUNDS != 20)
|
||||
If you set BF_ROUNDS to some value other than 16 or 20, you will have
|
||||
to modify the code.
|
||||
#endif
|
||||
|
||||
void BF_encrypt(BF_LONG *data, BF_KEY *key, int encrypt)
|
||||
{
|
||||
register BF_LONG l,r,*p,*s;
|
||||
|
||||
p=key->P;
|
||||
s= &(key->S[0]);
|
||||
l=data[0];
|
||||
r=data[1];
|
||||
|
||||
if (encrypt != 0)
|
||||
{
|
||||
l^=p[0];
|
||||
BF_ENC(r,l,s,p[ 1]);
|
||||
BF_ENC(l,r,s,p[ 2]);
|
||||
BF_ENC(r,l,s,p[ 3]);
|
||||
BF_ENC(l,r,s,p[ 4]);
|
||||
BF_ENC(r,l,s,p[ 5]);
|
||||
BF_ENC(l,r,s,p[ 6]);
|
||||
BF_ENC(r,l,s,p[ 7]);
|
||||
BF_ENC(l,r,s,p[ 8]);
|
||||
BF_ENC(r,l,s,p[ 9]);
|
||||
BF_ENC(l,r,s,p[10]);
|
||||
BF_ENC(r,l,s,p[11]);
|
||||
BF_ENC(l,r,s,p[12]);
|
||||
BF_ENC(r,l,s,p[13]);
|
||||
BF_ENC(l,r,s,p[14]);
|
||||
BF_ENC(r,l,s,p[15]);
|
||||
BF_ENC(l,r,s,p[16]);
|
||||
#if BF_ROUNDS == 20
|
||||
BF_ENC(r,l,s,p[17]);
|
||||
BF_ENC(l,r,s,p[18]);
|
||||
BF_ENC(r,l,s,p[19]);
|
||||
BF_ENC(l,r,s,p[20]);
|
||||
#endif
|
||||
r^=p[BF_ROUNDS+1];
|
||||
}
|
||||
else
|
||||
{
|
||||
l^=p[BF_ROUNDS+1];
|
||||
#if BF_ROUNDS == 20
|
||||
BF_ENC(r,l,s,p[20]);
|
||||
BF_ENC(l,r,s,p[19]);
|
||||
BF_ENC(r,l,s,p[18]);
|
||||
BF_ENC(l,r,s,p[17]);
|
||||
#endif
|
||||
BF_ENC(r,l,s,p[16]);
|
||||
BF_ENC(l,r,s,p[15]);
|
||||
BF_ENC(r,l,s,p[14]);
|
||||
BF_ENC(l,r,s,p[13]);
|
||||
BF_ENC(r,l,s,p[12]);
|
||||
BF_ENC(l,r,s,p[11]);
|
||||
BF_ENC(r,l,s,p[10]);
|
||||
BF_ENC(l,r,s,p[ 9]);
|
||||
BF_ENC(r,l,s,p[ 8]);
|
||||
BF_ENC(l,r,s,p[ 7]);
|
||||
BF_ENC(r,l,s,p[ 6]);
|
||||
BF_ENC(l,r,s,p[ 5]);
|
||||
BF_ENC(r,l,s,p[ 4]);
|
||||
BF_ENC(l,r,s,p[ 3]);
|
||||
BF_ENC(r,l,s,p[ 2]);
|
||||
BF_ENC(l,r,s,p[ 1]);
|
||||
r^=p[0];
|
||||
}
|
||||
data[1]=l&0xffffffff;
|
||||
data[0]=r&0xffffffff;
|
||||
}
|
236
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_locl.h
Normal file
236
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_locl.h
Normal file
@ -0,0 +1,236 @@
|
||||
/* crypto/bf/bf_local.h */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
*
|
||||
* Always modify bf_locl.org since bf_locl.h is automatically generated from
|
||||
* it during SSLeay configuration.
|
||||
*
|
||||
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
/*
|
||||
Notwithstanding the above warning, bf_locl.h is *not* regenerated
|
||||
in this stand-alone implementation. The following auto-configuration
|
||||
based on compiler CPU identification was added by John Walker to
|
||||
avoid having to modify the Makefile to choose the best optimisation
|
||||
for an individual platform.
|
||||
*/
|
||||
|
||||
#ifdef sparc
|
||||
#define BF_PTR
|
||||
#endif
|
||||
#ifdef mips
|
||||
#define BF_PTR
|
||||
#endif
|
||||
/* In addition, for best performance we should define BF_PTR2 for
|
||||
Pentium and below x86 machines, but not define it for Pentium
|
||||
Pro and above. I don't know of any compiler-independent way
|
||||
to distinguish these platforms, so I'm leaving the optimisation
|
||||
as best for the newer platforms. The actual performance difference
|
||||
for this application is trivial in any case. */
|
||||
|
||||
#undef c2l
|
||||
#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
|
||||
l|=((unsigned long)(*((c)++)))<< 8L, \
|
||||
l|=((unsigned long)(*((c)++)))<<16L, \
|
||||
l|=((unsigned long)(*((c)++)))<<24L)
|
||||
|
||||
/* NOTE - c is not incremented as per c2l */
|
||||
#undef c2ln
|
||||
#define c2ln(c,l1,l2,n) { \
|
||||
c+=n; \
|
||||
l1=l2=0; \
|
||||
switch (n) { \
|
||||
case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
|
||||
case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
|
||||
case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
|
||||
case 5: l2|=((unsigned long)(*(--(c)))); \
|
||||
case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
|
||||
case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
|
||||
case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
|
||||
case 1: l1|=((unsigned long)(*(--(c)))); \
|
||||
} \
|
||||
}
|
||||
|
||||
#undef l2c
|
||||
#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>>24L)&0xff))
|
||||
|
||||
/* NOTE - c is not incremented as per l2c */
|
||||
#undef l2cn
|
||||
#define l2cn(l1,l2,c,n) { \
|
||||
c+=n; \
|
||||
switch (n) { \
|
||||
case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \
|
||||
case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \
|
||||
case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \
|
||||
case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \
|
||||
case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \
|
||||
case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \
|
||||
case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \
|
||||
case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* NOTE - c is not incremented as per n2l */
|
||||
#define n2ln(c,l1,l2,n) { \
|
||||
c+=n; \
|
||||
l1=l2=0; \
|
||||
switch (n) { \
|
||||
case 8: l2 =((unsigned long)(*(--(c)))) ; \
|
||||
case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
|
||||
case 6: l2|=((unsigned long)(*(--(c))))<<16; \
|
||||
case 5: l2|=((unsigned long)(*(--(c))))<<24; \
|
||||
case 4: l1 =((unsigned long)(*(--(c)))) ; \
|
||||
case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
|
||||
case 2: l1|=((unsigned long)(*(--(c))))<<16; \
|
||||
case 1: l1|=((unsigned long)(*(--(c))))<<24; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* NOTE - c is not incremented as per l2n */
|
||||
#define l2nn(l1,l2,c,n) { \
|
||||
c+=n; \
|
||||
switch (n) { \
|
||||
case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \
|
||||
case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
|
||||
case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
|
||||
case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
|
||||
case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \
|
||||
case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
|
||||
case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
|
||||
case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
|
||||
} \
|
||||
}
|
||||
|
||||
#undef n2l
|
||||
#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
|
||||
l|=((unsigned long)(*((c)++)))<<16L, \
|
||||
l|=((unsigned long)(*((c)++)))<< 8L, \
|
||||
l|=((unsigned long)(*((c)++))))
|
||||
|
||||
#undef l2n
|
||||
#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l) )&0xff))
|
||||
|
||||
/* This is actually a big endian algorithm, the most significate byte
|
||||
* is used to lookup array 0 */
|
||||
|
||||
/* use BF_PTR2 for intel boxes,
|
||||
* BF_PTR for sparc and MIPS/SGI
|
||||
* use nothing for Alpha and HP.
|
||||
*/
|
||||
#if !defined(BF_PTR) && !defined(BF_PTR2)
|
||||
#undef BF_PTR
|
||||
#endif
|
||||
|
||||
#define BF_M 0x3fc
|
||||
#define BF_0 22L
|
||||
#define BF_1 14L
|
||||
#define BF_2 6L
|
||||
#define BF_3 2L /* left shift */
|
||||
|
||||
#if defined(BF_PTR2)
|
||||
|
||||
/* This is basically a special pentium verson */
|
||||
#define BF_ENC(LL,R,S,P) \
|
||||
{ \
|
||||
BF_LONG t,u,v; \
|
||||
u=R>>BF_0; \
|
||||
v=R>>BF_1; \
|
||||
u&=BF_M; \
|
||||
v&=BF_M; \
|
||||
t= *(BF_LONG *)((unsigned char *)&(S[ 0])+u); \
|
||||
u=R>>BF_2; \
|
||||
t+= *(BF_LONG *)((unsigned char *)&(S[256])+v); \
|
||||
v=R<<BF_3; \
|
||||
u&=BF_M; \
|
||||
v&=BF_M; \
|
||||
t^= *(BF_LONG *)((unsigned char *)&(S[512])+u); \
|
||||
LL^=P; \
|
||||
t+= *(BF_LONG *)((unsigned char *)&(S[768])+v); \
|
||||
LL^=t; \
|
||||
}
|
||||
|
||||
#elif defined(BF_PTR)
|
||||
|
||||
/* This is normally very good */
|
||||
|
||||
#define BF_ENC(LL,R,S,P) \
|
||||
LL^=P; \
|
||||
LL^= (((*(BF_LONG *)((unsigned char *)&(S[ 0])+((R>>BF_0)&BF_M))+ \
|
||||
*(BF_LONG *)((unsigned char *)&(S[256])+((R>>BF_1)&BF_M)))^ \
|
||||
*(BF_LONG *)((unsigned char *)&(S[512])+((R>>BF_2)&BF_M)))+ \
|
||||
*(BF_LONG *)((unsigned char *)&(S[768])+((R<<BF_3)&BF_M)));
|
||||
#else
|
||||
|
||||
/* This will always work, even on 64 bit machines and strangly enough,
|
||||
* on the Alpha it is faster than the pointer versions (both 32 and 64
|
||||
* versions of BF_LONG) */
|
||||
|
||||
#define BF_ENC(LL,R,S,P) \
|
||||
LL^=P; \
|
||||
LL^=((( S[ (R>>24L) ] + \
|
||||
S[0x0100+((R>>16L)&0xff)])^ \
|
||||
S[0x0200+((R>> 8L)&0xff)])+ \
|
||||
S[0x0300+((R )&0xff)])&0xffffffff;
|
||||
#endif
|
215
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_locl.org
Normal file
215
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_locl.org
Normal file
@ -0,0 +1,215 @@
|
||||
/* crypto/bf/bf_local.h */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
*
|
||||
* Always modify bf_locl.org since bf_locl.h is automatically generated from
|
||||
* it during SSLeay configuration.
|
||||
*
|
||||
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#undef c2l
|
||||
#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
|
||||
l|=((unsigned long)(*((c)++)))<< 8L, \
|
||||
l|=((unsigned long)(*((c)++)))<<16L, \
|
||||
l|=((unsigned long)(*((c)++)))<<24L)
|
||||
|
||||
/* NOTE - c is not incremented as per c2l */
|
||||
#undef c2ln
|
||||
#define c2ln(c,l1,l2,n) { \
|
||||
c+=n; \
|
||||
l1=l2=0; \
|
||||
switch (n) { \
|
||||
case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
|
||||
case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
|
||||
case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
|
||||
case 5: l2|=((unsigned long)(*(--(c)))); \
|
||||
case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
|
||||
case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
|
||||
case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
|
||||
case 1: l1|=((unsigned long)(*(--(c)))); \
|
||||
} \
|
||||
}
|
||||
|
||||
#undef l2c
|
||||
#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>>24L)&0xff))
|
||||
|
||||
/* NOTE - c is not incremented as per l2c */
|
||||
#undef l2cn
|
||||
#define l2cn(l1,l2,c,n) { \
|
||||
c+=n; \
|
||||
switch (n) { \
|
||||
case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \
|
||||
case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \
|
||||
case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \
|
||||
case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \
|
||||
case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \
|
||||
case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \
|
||||
case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \
|
||||
case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* NOTE - c is not incremented as per n2l */
|
||||
#define n2ln(c,l1,l2,n) { \
|
||||
c+=n; \
|
||||
l1=l2=0; \
|
||||
switch (n) { \
|
||||
case 8: l2 =((unsigned long)(*(--(c)))) ; \
|
||||
case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
|
||||
case 6: l2|=((unsigned long)(*(--(c))))<<16; \
|
||||
case 5: l2|=((unsigned long)(*(--(c))))<<24; \
|
||||
case 4: l1 =((unsigned long)(*(--(c)))) ; \
|
||||
case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
|
||||
case 2: l1|=((unsigned long)(*(--(c))))<<16; \
|
||||
case 1: l1|=((unsigned long)(*(--(c))))<<24; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* NOTE - c is not incremented as per l2n */
|
||||
#define l2nn(l1,l2,c,n) { \
|
||||
c+=n; \
|
||||
switch (n) { \
|
||||
case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \
|
||||
case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
|
||||
case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
|
||||
case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
|
||||
case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \
|
||||
case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
|
||||
case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
|
||||
case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
|
||||
} \
|
||||
}
|
||||
|
||||
#undef n2l
|
||||
#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
|
||||
l|=((unsigned long)(*((c)++)))<<16L, \
|
||||
l|=((unsigned long)(*((c)++)))<< 8L, \
|
||||
l|=((unsigned long)(*((c)++))))
|
||||
|
||||
#undef l2n
|
||||
#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l) )&0xff))
|
||||
|
||||
/* This is actually a big endian algorithm, the most significate byte
|
||||
* is used to lookup array 0 */
|
||||
|
||||
/* use BF_PTR2 for intel boxes,
|
||||
* BF_PTR for sparc and MIPS/SGI
|
||||
* use nothing for Alpha and HP.
|
||||
*/
|
||||
#if !defined(BF_PTR) && !defined(BF_PTR2)
|
||||
#undef BF_PTR
|
||||
#endif
|
||||
|
||||
#define BF_M 0x3fc
|
||||
#define BF_0 22L
|
||||
#define BF_1 14L
|
||||
#define BF_2 6L
|
||||
#define BF_3 2L /* left shift */
|
||||
|
||||
#if defined(BF_PTR2)
|
||||
|
||||
/* This is basically a special pentium verson */
|
||||
#define BF_ENC(LL,R,S,P) \
|
||||
{ \
|
||||
BF_LONG t,u,v; \
|
||||
u=R>>BF_0; \
|
||||
v=R>>BF_1; \
|
||||
u&=BF_M; \
|
||||
v&=BF_M; \
|
||||
t= *(BF_LONG *)((unsigned char *)&(S[ 0])+u); \
|
||||
u=R>>BF_2; \
|
||||
t+= *(BF_LONG *)((unsigned char *)&(S[256])+v); \
|
||||
v=R<<BF_3; \
|
||||
u&=BF_M; \
|
||||
v&=BF_M; \
|
||||
t^= *(BF_LONG *)((unsigned char *)&(S[512])+u); \
|
||||
LL^=P; \
|
||||
t+= *(BF_LONG *)((unsigned char *)&(S[768])+v); \
|
||||
LL^=t; \
|
||||
}
|
||||
|
||||
#elif defined(BF_PTR)
|
||||
|
||||
/* This is normally very good */
|
||||
|
||||
#define BF_ENC(LL,R,S,P) \
|
||||
LL^=P; \
|
||||
LL^= (((*(BF_LONG *)((unsigned char *)&(S[ 0])+((R>>BF_0)&BF_M))+ \
|
||||
*(BF_LONG *)((unsigned char *)&(S[256])+((R>>BF_1)&BF_M)))^ \
|
||||
*(BF_LONG *)((unsigned char *)&(S[512])+((R>>BF_2)&BF_M)))+ \
|
||||
*(BF_LONG *)((unsigned char *)&(S[768])+((R<<BF_3)&BF_M)));
|
||||
#else
|
||||
|
||||
/* This will always work, even on 64 bit machines and strangly enough,
|
||||
* on the Alpha it is faster than the pointer versions (both 32 and 64
|
||||
* versions of BF_LONG) */
|
||||
|
||||
#define BF_ENC(LL,R,S,P) \
|
||||
LL^=P; \
|
||||
LL^=((( S[ (R>>24L) ] + \
|
||||
S[0x0100+((R>>16L)&0xff)])^ \
|
||||
S[0x0200+((R>> 8L)&0xff)])+ \
|
||||
S[0x0300+((R )&0xff)])&0xffffffff;
|
||||
#endif
|
110
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_ofb64.c
Normal file
110
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_ofb64.c
Normal file
@ -0,0 +1,110 @@
|
||||
/* crypto/bf/bf_ofb64.c */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
|
||||
#include "blowfish.h"
|
||||
#include "bf_locl.h"
|
||||
|
||||
/* The input and output encrypted as though 64bit ofb mode is being
|
||||
* used. The extra state information to record how much of the
|
||||
* 64bit block we have used is contained in *num;
|
||||
*/
|
||||
void BF_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num)
|
||||
{
|
||||
register unsigned long v0,v1,t;
|
||||
register int n= *num;
|
||||
register long l=length;
|
||||
unsigned char d[8];
|
||||
register unsigned char *dp;
|
||||
unsigned long ti[2];
|
||||
unsigned char *iv;
|
||||
int save=0;
|
||||
|
||||
iv=(unsigned char *)ivec;
|
||||
n2l(iv,v0);
|
||||
n2l(iv,v1);
|
||||
ti[0]=v0;
|
||||
ti[1]=v1;
|
||||
dp=(unsigned char *)d;
|
||||
l2n(v0,dp);
|
||||
l2n(v1,dp);
|
||||
while (l-- != 0)
|
||||
{
|
||||
if (n == 0)
|
||||
{
|
||||
BF_encrypt((unsigned long *)ti,schedule,BF_ENCRYPT);
|
||||
dp=(unsigned char *)d;
|
||||
t=ti[0]; l2n(t,dp);
|
||||
t=ti[1]; l2n(t,dp);
|
||||
save++;
|
||||
}
|
||||
*(out++)= (unsigned char)(*(in++)^d[n]);
|
||||
n=(n+1)&0x07;
|
||||
}
|
||||
if (save != 0)
|
||||
{
|
||||
v0=ti[0];
|
||||
v1=ti[1];
|
||||
iv=(unsigned char *)ivec;
|
||||
l2n(v0,iv);
|
||||
l2n(v1,iv);
|
||||
}
|
||||
t=v0=v1=ti[0]=ti[1]=0;
|
||||
*num=n;
|
||||
}
|
||||
|
325
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_pi.h
Normal file
325
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_pi.h
Normal file
@ -0,0 +1,325 @@
|
||||
/* crypto/bf/bf_pi.h */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
|
||||
static BF_KEY bf_init= {
|
||||
{
|
||||
0x243f6a88UL, 0x85a308d3UL, 0x13198a2eUL, 0x03707344UL,
|
||||
0xa4093822UL, 0x299f31d0UL, 0x082efa98UL, 0xec4e6c89UL,
|
||||
0x452821e6UL, 0x38d01377UL, 0xbe5466cfUL, 0x34e90c6cUL,
|
||||
0xc0ac29b7UL, 0xc97c50ddUL, 0x3f84d5b5UL, 0xb5470917UL,
|
||||
0x9216d5d9UL, 0x8979fb1bUL
|
||||
},{
|
||||
0xd1310ba6UL, 0x98dfb5acUL, 0x2ffd72dbUL, 0xd01adfb7UL,
|
||||
0xb8e1afedUL, 0x6a267e96UL, 0xba7c9045UL, 0xf12c7f99UL,
|
||||
0x24a19947UL, 0xb3916cf7UL, 0x0801f2e2UL, 0x858efc16UL,
|
||||
0x636920d8UL, 0x71574e69UL, 0xa458fea3UL, 0xf4933d7eUL,
|
||||
0x0d95748fUL, 0x728eb658UL, 0x718bcd58UL, 0x82154aeeUL,
|
||||
0x7b54a41dUL, 0xc25a59b5UL, 0x9c30d539UL, 0x2af26013UL,
|
||||
0xc5d1b023UL, 0x286085f0UL, 0xca417918UL, 0xb8db38efUL,
|
||||
0x8e79dcb0UL, 0x603a180eUL, 0x6c9e0e8bUL, 0xb01e8a3eUL,
|
||||
0xd71577c1UL, 0xbd314b27UL, 0x78af2fdaUL, 0x55605c60UL,
|
||||
0xe65525f3UL, 0xaa55ab94UL, 0x57489862UL, 0x63e81440UL,
|
||||
0x55ca396aUL, 0x2aab10b6UL, 0xb4cc5c34UL, 0x1141e8ceUL,
|
||||
0xa15486afUL, 0x7c72e993UL, 0xb3ee1411UL, 0x636fbc2aUL,
|
||||
0x2ba9c55dUL, 0x741831f6UL, 0xce5c3e16UL, 0x9b87931eUL,
|
||||
0xafd6ba33UL, 0x6c24cf5cUL, 0x7a325381UL, 0x28958677UL,
|
||||
0x3b8f4898UL, 0x6b4bb9afUL, 0xc4bfe81bUL, 0x66282193UL,
|
||||
0x61d809ccUL, 0xfb21a991UL, 0x487cac60UL, 0x5dec8032UL,
|
||||
0xef845d5dUL, 0xe98575b1UL, 0xdc262302UL, 0xeb651b88UL,
|
||||
0x23893e81UL, 0xd396acc5UL, 0x0f6d6ff3UL, 0x83f44239UL,
|
||||
0x2e0b4482UL, 0xa4842004UL, 0x69c8f04aUL, 0x9e1f9b5eUL,
|
||||
0x21c66842UL, 0xf6e96c9aUL, 0x670c9c61UL, 0xabd388f0UL,
|
||||
0x6a51a0d2UL, 0xd8542f68UL, 0x960fa728UL, 0xab5133a3UL,
|
||||
0x6eef0b6cUL, 0x137a3be4UL, 0xba3bf050UL, 0x7efb2a98UL,
|
||||
0xa1f1651dUL, 0x39af0176UL, 0x66ca593eUL, 0x82430e88UL,
|
||||
0x8cee8619UL, 0x456f9fb4UL, 0x7d84a5c3UL, 0x3b8b5ebeUL,
|
||||
0xe06f75d8UL, 0x85c12073UL, 0x401a449fUL, 0x56c16aa6UL,
|
||||
0x4ed3aa62UL, 0x363f7706UL, 0x1bfedf72UL, 0x429b023dUL,
|
||||
0x37d0d724UL, 0xd00a1248UL, 0xdb0fead3UL, 0x49f1c09bUL,
|
||||
0x075372c9UL, 0x80991b7bUL, 0x25d479d8UL, 0xf6e8def7UL,
|
||||
0xe3fe501aUL, 0xb6794c3bUL, 0x976ce0bdUL, 0x04c006baUL,
|
||||
0xc1a94fb6UL, 0x409f60c4UL, 0x5e5c9ec2UL, 0x196a2463UL,
|
||||
0x68fb6fafUL, 0x3e6c53b5UL, 0x1339b2ebUL, 0x3b52ec6fUL,
|
||||
0x6dfc511fUL, 0x9b30952cUL, 0xcc814544UL, 0xaf5ebd09UL,
|
||||
0xbee3d004UL, 0xde334afdUL, 0x660f2807UL, 0x192e4bb3UL,
|
||||
0xc0cba857UL, 0x45c8740fUL, 0xd20b5f39UL, 0xb9d3fbdbUL,
|
||||
0x5579c0bdUL, 0x1a60320aUL, 0xd6a100c6UL, 0x402c7279UL,
|
||||
0x679f25feUL, 0xfb1fa3ccUL, 0x8ea5e9f8UL, 0xdb3222f8UL,
|
||||
0x3c7516dfUL, 0xfd616b15UL, 0x2f501ec8UL, 0xad0552abUL,
|
||||
0x323db5faUL, 0xfd238760UL, 0x53317b48UL, 0x3e00df82UL,
|
||||
0x9e5c57bbUL, 0xca6f8ca0UL, 0x1a87562eUL, 0xdf1769dbUL,
|
||||
0xd542a8f6UL, 0x287effc3UL, 0xac6732c6UL, 0x8c4f5573UL,
|
||||
0x695b27b0UL, 0xbbca58c8UL, 0xe1ffa35dUL, 0xb8f011a0UL,
|
||||
0x10fa3d98UL, 0xfd2183b8UL, 0x4afcb56cUL, 0x2dd1d35bUL,
|
||||
0x9a53e479UL, 0xb6f84565UL, 0xd28e49bcUL, 0x4bfb9790UL,
|
||||
0xe1ddf2daUL, 0xa4cb7e33UL, 0x62fb1341UL, 0xcee4c6e8UL,
|
||||
0xef20cadaUL, 0x36774c01UL, 0xd07e9efeUL, 0x2bf11fb4UL,
|
||||
0x95dbda4dUL, 0xae909198UL, 0xeaad8e71UL, 0x6b93d5a0UL,
|
||||
0xd08ed1d0UL, 0xafc725e0UL, 0x8e3c5b2fUL, 0x8e7594b7UL,
|
||||
0x8ff6e2fbUL, 0xf2122b64UL, 0x8888b812UL, 0x900df01cUL,
|
||||
0x4fad5ea0UL, 0x688fc31cUL, 0xd1cff191UL, 0xb3a8c1adUL,
|
||||
0x2f2f2218UL, 0xbe0e1777UL, 0xea752dfeUL, 0x8b021fa1UL,
|
||||
0xe5a0cc0fUL, 0xb56f74e8UL, 0x18acf3d6UL, 0xce89e299UL,
|
||||
0xb4a84fe0UL, 0xfd13e0b7UL, 0x7cc43b81UL, 0xd2ada8d9UL,
|
||||
0x165fa266UL, 0x80957705UL, 0x93cc7314UL, 0x211a1477UL,
|
||||
0xe6ad2065UL, 0x77b5fa86UL, 0xc75442f5UL, 0xfb9d35cfUL,
|
||||
0xebcdaf0cUL, 0x7b3e89a0UL, 0xd6411bd3UL, 0xae1e7e49UL,
|
||||
0x00250e2dUL, 0x2071b35eUL, 0x226800bbUL, 0x57b8e0afUL,
|
||||
0x2464369bUL, 0xf009b91eUL, 0x5563911dUL, 0x59dfa6aaUL,
|
||||
0x78c14389UL, 0xd95a537fUL, 0x207d5ba2UL, 0x02e5b9c5UL,
|
||||
0x83260376UL, 0x6295cfa9UL, 0x11c81968UL, 0x4e734a41UL,
|
||||
0xb3472dcaUL, 0x7b14a94aUL, 0x1b510052UL, 0x9a532915UL,
|
||||
0xd60f573fUL, 0xbc9bc6e4UL, 0x2b60a476UL, 0x81e67400UL,
|
||||
0x08ba6fb5UL, 0x571be91fUL, 0xf296ec6bUL, 0x2a0dd915UL,
|
||||
0xb6636521UL, 0xe7b9f9b6UL, 0xff34052eUL, 0xc5855664UL,
|
||||
0x53b02d5dUL, 0xa99f8fa1UL, 0x08ba4799UL, 0x6e85076aUL,
|
||||
0x4b7a70e9UL, 0xb5b32944UL, 0xdb75092eUL, 0xc4192623UL,
|
||||
0xad6ea6b0UL, 0x49a7df7dUL, 0x9cee60b8UL, 0x8fedb266UL,
|
||||
0xecaa8c71UL, 0x699a17ffUL, 0x5664526cUL, 0xc2b19ee1UL,
|
||||
0x193602a5UL, 0x75094c29UL, 0xa0591340UL, 0xe4183a3eUL,
|
||||
0x3f54989aUL, 0x5b429d65UL, 0x6b8fe4d6UL, 0x99f73fd6UL,
|
||||
0xa1d29c07UL, 0xefe830f5UL, 0x4d2d38e6UL, 0xf0255dc1UL,
|
||||
0x4cdd2086UL, 0x8470eb26UL, 0x6382e9c6UL, 0x021ecc5eUL,
|
||||
0x09686b3fUL, 0x3ebaefc9UL, 0x3c971814UL, 0x6b6a70a1UL,
|
||||
0x687f3584UL, 0x52a0e286UL, 0xb79c5305UL, 0xaa500737UL,
|
||||
0x3e07841cUL, 0x7fdeae5cUL, 0x8e7d44ecUL, 0x5716f2b8UL,
|
||||
0xb03ada37UL, 0xf0500c0dUL, 0xf01c1f04UL, 0x0200b3ffUL,
|
||||
0xae0cf51aUL, 0x3cb574b2UL, 0x25837a58UL, 0xdc0921bdUL,
|
||||
0xd19113f9UL, 0x7ca92ff6UL, 0x94324773UL, 0x22f54701UL,
|
||||
0x3ae5e581UL, 0x37c2dadcUL, 0xc8b57634UL, 0x9af3dda7UL,
|
||||
0xa9446146UL, 0x0fd0030eUL, 0xecc8c73eUL, 0xa4751e41UL,
|
||||
0xe238cd99UL, 0x3bea0e2fUL, 0x3280bba1UL, 0x183eb331UL,
|
||||
0x4e548b38UL, 0x4f6db908UL, 0x6f420d03UL, 0xf60a04bfUL,
|
||||
0x2cb81290UL, 0x24977c79UL, 0x5679b072UL, 0xbcaf89afUL,
|
||||
0xde9a771fUL, 0xd9930810UL, 0xb38bae12UL, 0xdccf3f2eUL,
|
||||
0x5512721fUL, 0x2e6b7124UL, 0x501adde6UL, 0x9f84cd87UL,
|
||||
0x7a584718UL, 0x7408da17UL, 0xbc9f9abcUL, 0xe94b7d8cUL,
|
||||
0xec7aec3aUL, 0xdb851dfaUL, 0x63094366UL, 0xc464c3d2UL,
|
||||
0xef1c1847UL, 0x3215d908UL, 0xdd433b37UL, 0x24c2ba16UL,
|
||||
0x12a14d43UL, 0x2a65c451UL, 0x50940002UL, 0x133ae4ddUL,
|
||||
0x71dff89eUL, 0x10314e55UL, 0x81ac77d6UL, 0x5f11199bUL,
|
||||
0x043556f1UL, 0xd7a3c76bUL, 0x3c11183bUL, 0x5924a509UL,
|
||||
0xf28fe6edUL, 0x97f1fbfaUL, 0x9ebabf2cUL, 0x1e153c6eUL,
|
||||
0x86e34570UL, 0xeae96fb1UL, 0x860e5e0aUL, 0x5a3e2ab3UL,
|
||||
0x771fe71cUL, 0x4e3d06faUL, 0x2965dcb9UL, 0x99e71d0fUL,
|
||||
0x803e89d6UL, 0x5266c825UL, 0x2e4cc978UL, 0x9c10b36aUL,
|
||||
0xc6150ebaUL, 0x94e2ea78UL, 0xa5fc3c53UL, 0x1e0a2df4UL,
|
||||
0xf2f74ea7UL, 0x361d2b3dUL, 0x1939260fUL, 0x19c27960UL,
|
||||
0x5223a708UL, 0xf71312b6UL, 0xebadfe6eUL, 0xeac31f66UL,
|
||||
0xe3bc4595UL, 0xa67bc883UL, 0xb17f37d1UL, 0x018cff28UL,
|
||||
0xc332ddefUL, 0xbe6c5aa5UL, 0x65582185UL, 0x68ab9802UL,
|
||||
0xeecea50fUL, 0xdb2f953bUL, 0x2aef7dadUL, 0x5b6e2f84UL,
|
||||
0x1521b628UL, 0x29076170UL, 0xecdd4775UL, 0x619f1510UL,
|
||||
0x13cca830UL, 0xeb61bd96UL, 0x0334fe1eUL, 0xaa0363cfUL,
|
||||
0xb5735c90UL, 0x4c70a239UL, 0xd59e9e0bUL, 0xcbaade14UL,
|
||||
0xeecc86bcUL, 0x60622ca7UL, 0x9cab5cabUL, 0xb2f3846eUL,
|
||||
0x648b1eafUL, 0x19bdf0caUL, 0xa02369b9UL, 0x655abb50UL,
|
||||
0x40685a32UL, 0x3c2ab4b3UL, 0x319ee9d5UL, 0xc021b8f7UL,
|
||||
0x9b540b19UL, 0x875fa099UL, 0x95f7997eUL, 0x623d7da8UL,
|
||||
0xf837889aUL, 0x97e32d77UL, 0x11ed935fUL, 0x16681281UL,
|
||||
0x0e358829UL, 0xc7e61fd6UL, 0x96dedfa1UL, 0x7858ba99UL,
|
||||
0x57f584a5UL, 0x1b227263UL, 0x9b83c3ffUL, 0x1ac24696UL,
|
||||
0xcdb30aebUL, 0x532e3054UL, 0x8fd948e4UL, 0x6dbc3128UL,
|
||||
0x58ebf2efUL, 0x34c6ffeaUL, 0xfe28ed61UL, 0xee7c3c73UL,
|
||||
0x5d4a14d9UL, 0xe864b7e3UL, 0x42105d14UL, 0x203e13e0UL,
|
||||
0x45eee2b6UL, 0xa3aaabeaUL, 0xdb6c4f15UL, 0xfacb4fd0UL,
|
||||
0xc742f442UL, 0xef6abbb5UL, 0x654f3b1dUL, 0x41cd2105UL,
|
||||
0xd81e799eUL, 0x86854dc7UL, 0xe44b476aUL, 0x3d816250UL,
|
||||
0xcf62a1f2UL, 0x5b8d2646UL, 0xfc8883a0UL, 0xc1c7b6a3UL,
|
||||
0x7f1524c3UL, 0x69cb7492UL, 0x47848a0bUL, 0x5692b285UL,
|
||||
0x095bbf00UL, 0xad19489dUL, 0x1462b174UL, 0x23820e00UL,
|
||||
0x58428d2aUL, 0x0c55f5eaUL, 0x1dadf43eUL, 0x233f7061UL,
|
||||
0x3372f092UL, 0x8d937e41UL, 0xd65fecf1UL, 0x6c223bdbUL,
|
||||
0x7cde3759UL, 0xcbee7460UL, 0x4085f2a7UL, 0xce77326eUL,
|
||||
0xa6078084UL, 0x19f8509eUL, 0xe8efd855UL, 0x61d99735UL,
|
||||
0xa969a7aaUL, 0xc50c06c2UL, 0x5a04abfcUL, 0x800bcadcUL,
|
||||
0x9e447a2eUL, 0xc3453484UL, 0xfdd56705UL, 0x0e1e9ec9UL,
|
||||
0xdb73dbd3UL, 0x105588cdUL, 0x675fda79UL, 0xe3674340UL,
|
||||
0xc5c43465UL, 0x713e38d8UL, 0x3d28f89eUL, 0xf16dff20UL,
|
||||
0x153e21e7UL, 0x8fb03d4aUL, 0xe6e39f2bUL, 0xdb83adf7UL,
|
||||
0xe93d5a68UL, 0x948140f7UL, 0xf64c261cUL, 0x94692934UL,
|
||||
0x411520f7UL, 0x7602d4f7UL, 0xbcf46b2eUL, 0xd4a20068UL,
|
||||
0xd4082471UL, 0x3320f46aUL, 0x43b7d4b7UL, 0x500061afUL,
|
||||
0x1e39f62eUL, 0x97244546UL, 0x14214f74UL, 0xbf8b8840UL,
|
||||
0x4d95fc1dUL, 0x96b591afUL, 0x70f4ddd3UL, 0x66a02f45UL,
|
||||
0xbfbc09ecUL, 0x03bd9785UL, 0x7fac6dd0UL, 0x31cb8504UL,
|
||||
0x96eb27b3UL, 0x55fd3941UL, 0xda2547e6UL, 0xabca0a9aUL,
|
||||
0x28507825UL, 0x530429f4UL, 0x0a2c86daUL, 0xe9b66dfbUL,
|
||||
0x68dc1462UL, 0xd7486900UL, 0x680ec0a4UL, 0x27a18deeUL,
|
||||
0x4f3ffea2UL, 0xe887ad8cUL, 0xb58ce006UL, 0x7af4d6b6UL,
|
||||
0xaace1e7cUL, 0xd3375fecUL, 0xce78a399UL, 0x406b2a42UL,
|
||||
0x20fe9e35UL, 0xd9f385b9UL, 0xee39d7abUL, 0x3b124e8bUL,
|
||||
0x1dc9faf7UL, 0x4b6d1856UL, 0x26a36631UL, 0xeae397b2UL,
|
||||
0x3a6efa74UL, 0xdd5b4332UL, 0x6841e7f7UL, 0xca7820fbUL,
|
||||
0xfb0af54eUL, 0xd8feb397UL, 0x454056acUL, 0xba489527UL,
|
||||
0x55533a3aUL, 0x20838d87UL, 0xfe6ba9b7UL, 0xd096954bUL,
|
||||
0x55a867bcUL, 0xa1159a58UL, 0xcca92963UL, 0x99e1db33UL,
|
||||
0xa62a4a56UL, 0x3f3125f9UL, 0x5ef47e1cUL, 0x9029317cUL,
|
||||
0xfdf8e802UL, 0x04272f70UL, 0x80bb155cUL, 0x05282ce3UL,
|
||||
0x95c11548UL, 0xe4c66d22UL, 0x48c1133fUL, 0xc70f86dcUL,
|
||||
0x07f9c9eeUL, 0x41041f0fUL, 0x404779a4UL, 0x5d886e17UL,
|
||||
0x325f51ebUL, 0xd59bc0d1UL, 0xf2bcc18fUL, 0x41113564UL,
|
||||
0x257b7834UL, 0x602a9c60UL, 0xdff8e8a3UL, 0x1f636c1bUL,
|
||||
0x0e12b4c2UL, 0x02e1329eUL, 0xaf664fd1UL, 0xcad18115UL,
|
||||
0x6b2395e0UL, 0x333e92e1UL, 0x3b240b62UL, 0xeebeb922UL,
|
||||
0x85b2a20eUL, 0xe6ba0d99UL, 0xde720c8cUL, 0x2da2f728UL,
|
||||
0xd0127845UL, 0x95b794fdUL, 0x647d0862UL, 0xe7ccf5f0UL,
|
||||
0x5449a36fUL, 0x877d48faUL, 0xc39dfd27UL, 0xf33e8d1eUL,
|
||||
0x0a476341UL, 0x992eff74UL, 0x3a6f6eabUL, 0xf4f8fd37UL,
|
||||
0xa812dc60UL, 0xa1ebddf8UL, 0x991be14cUL, 0xdb6e6b0dUL,
|
||||
0xc67b5510UL, 0x6d672c37UL, 0x2765d43bUL, 0xdcd0e804UL,
|
||||
0xf1290dc7UL, 0xcc00ffa3UL, 0xb5390f92UL, 0x690fed0bUL,
|
||||
0x667b9ffbUL, 0xcedb7d9cUL, 0xa091cf0bUL, 0xd9155ea3UL,
|
||||
0xbb132f88UL, 0x515bad24UL, 0x7b9479bfUL, 0x763bd6ebUL,
|
||||
0x37392eb3UL, 0xcc115979UL, 0x8026e297UL, 0xf42e312dUL,
|
||||
0x6842ada7UL, 0xc66a2b3bUL, 0x12754cccUL, 0x782ef11cUL,
|
||||
0x6a124237UL, 0xb79251e7UL, 0x06a1bbe6UL, 0x4bfb6350UL,
|
||||
0x1a6b1018UL, 0x11caedfaUL, 0x3d25bdd8UL, 0xe2e1c3c9UL,
|
||||
0x44421659UL, 0x0a121386UL, 0xd90cec6eUL, 0xd5abea2aUL,
|
||||
0x64af674eUL, 0xda86a85fUL, 0xbebfe988UL, 0x64e4c3feUL,
|
||||
0x9dbc8057UL, 0xf0f7c086UL, 0x60787bf8UL, 0x6003604dUL,
|
||||
0xd1fd8346UL, 0xf6381fb0UL, 0x7745ae04UL, 0xd736fcccUL,
|
||||
0x83426b33UL, 0xf01eab71UL, 0xb0804187UL, 0x3c005e5fUL,
|
||||
0x77a057beUL, 0xbde8ae24UL, 0x55464299UL, 0xbf582e61UL,
|
||||
0x4e58f48fUL, 0xf2ddfda2UL, 0xf474ef38UL, 0x8789bdc2UL,
|
||||
0x5366f9c3UL, 0xc8b38e74UL, 0xb475f255UL, 0x46fcd9b9UL,
|
||||
0x7aeb2661UL, 0x8b1ddf84UL, 0x846a0e79UL, 0x915f95e2UL,
|
||||
0x466e598eUL, 0x20b45770UL, 0x8cd55591UL, 0xc902de4cUL,
|
||||
0xb90bace1UL, 0xbb8205d0UL, 0x11a86248UL, 0x7574a99eUL,
|
||||
0xb77f19b6UL, 0xe0a9dc09UL, 0x662d09a1UL, 0xc4324633UL,
|
||||
0xe85a1f02UL, 0x09f0be8cUL, 0x4a99a025UL, 0x1d6efe10UL,
|
||||
0x1ab93d1dUL, 0x0ba5a4dfUL, 0xa186f20fUL, 0x2868f169UL,
|
||||
0xdcb7da83UL, 0x573906feUL, 0xa1e2ce9bUL, 0x4fcd7f52UL,
|
||||
0x50115e01UL, 0xa70683faUL, 0xa002b5c4UL, 0x0de6d027UL,
|
||||
0x9af88c27UL, 0x773f8641UL, 0xc3604c06UL, 0x61a806b5UL,
|
||||
0xf0177a28UL, 0xc0f586e0UL, 0x006058aaUL, 0x30dc7d62UL,
|
||||
0x11e69ed7UL, 0x2338ea63UL, 0x53c2dd94UL, 0xc2c21634UL,
|
||||
0xbbcbee56UL, 0x90bcb6deUL, 0xebfc7da1UL, 0xce591d76UL,
|
||||
0x6f05e409UL, 0x4b7c0188UL, 0x39720a3dUL, 0x7c927c24UL,
|
||||
0x86e3725fUL, 0x724d9db9UL, 0x1ac15bb4UL, 0xd39eb8fcUL,
|
||||
0xed545578UL, 0x08fca5b5UL, 0xd83d7cd3UL, 0x4dad0fc4UL,
|
||||
0x1e50ef5eUL, 0xb161e6f8UL, 0xa28514d9UL, 0x6c51133cUL,
|
||||
0x6fd5c7e7UL, 0x56e14ec4UL, 0x362abfceUL, 0xddc6c837UL,
|
||||
0xd79a3234UL, 0x92638212UL, 0x670efa8eUL, 0x406000e0UL,
|
||||
0x3a39ce37UL, 0xd3faf5cfUL, 0xabc27737UL, 0x5ac52d1bUL,
|
||||
0x5cb0679eUL, 0x4fa33742UL, 0xd3822740UL, 0x99bc9bbeUL,
|
||||
0xd5118e9dUL, 0xbf0f7315UL, 0xd62d1c7eUL, 0xc700c47bUL,
|
||||
0xb78c1b6bUL, 0x21a19045UL, 0xb26eb1beUL, 0x6a366eb4UL,
|
||||
0x5748ab2fUL, 0xbc946e79UL, 0xc6a376d2UL, 0x6549c2c8UL,
|
||||
0x530ff8eeUL, 0x468dde7dUL, 0xd5730a1dUL, 0x4cd04dc6UL,
|
||||
0x2939bbdbUL, 0xa9ba4650UL, 0xac9526e8UL, 0xbe5ee304UL,
|
||||
0xa1fad5f0UL, 0x6a2d519aUL, 0x63ef8ce2UL, 0x9a86ee22UL,
|
||||
0xc089c2b8UL, 0x43242ef6UL, 0xa51e03aaUL, 0x9cf2d0a4UL,
|
||||
0x83c061baUL, 0x9be96a4dUL, 0x8fe51550UL, 0xba645bd6UL,
|
||||
0x2826a2f9UL, 0xa73a3ae1UL, 0x4ba99586UL, 0xef5562e9UL,
|
||||
0xc72fefd3UL, 0xf752f7daUL, 0x3f046f69UL, 0x77fa0a59UL,
|
||||
0x80e4a915UL, 0x87b08601UL, 0x9b09e6adUL, 0x3b3ee593UL,
|
||||
0xe990fd5aUL, 0x9e34d797UL, 0x2cf0b7d9UL, 0x022b8b51UL,
|
||||
0x96d5ac3aUL, 0x017da67dUL, 0xd1cf3ed6UL, 0x7c7d2d28UL,
|
||||
0x1f9f25cfUL, 0xadf2b89bUL, 0x5ad6b472UL, 0x5a88f54cUL,
|
||||
0xe029ac71UL, 0xe019a5e6UL, 0x47b0acfdUL, 0xed93fa9bUL,
|
||||
0xe8d3c48dUL, 0x283b57ccUL, 0xf8d56629UL, 0x79132e28UL,
|
||||
0x785f0191UL, 0xed756055UL, 0xf7960e44UL, 0xe3d35e8cUL,
|
||||
0x15056dd4UL, 0x88f46dbaUL, 0x03a16125UL, 0x0564f0bdUL,
|
||||
0xc3eb9e15UL, 0x3c9057a2UL, 0x97271aecUL, 0xa93a072aUL,
|
||||
0x1b3f6d9bUL, 0x1e6321f5UL, 0xf59c66fbUL, 0x26dcf319UL,
|
||||
0x7533d928UL, 0xb155fdf5UL, 0x03563482UL, 0x8aba3cbbUL,
|
||||
0x28517711UL, 0xc20ad9f8UL, 0xabcc5167UL, 0xccad925fUL,
|
||||
0x4de81751UL, 0x3830dc8eUL, 0x379d5862UL, 0x9320f991UL,
|
||||
0xea7a90c2UL, 0xfb3e7bceUL, 0x5121ce64UL, 0x774fbe32UL,
|
||||
0xa8b6e37eUL, 0xc3293d46UL, 0x48de5369UL, 0x6413e680UL,
|
||||
0xa2ae0810UL, 0xdd6db224UL, 0x69852dfdUL, 0x09072166UL,
|
||||
0xb39a460aUL, 0x6445c0ddUL, 0x586cdecfUL, 0x1c20c8aeUL,
|
||||
0x5bbef7ddUL, 0x1b588d40UL, 0xccd2017fUL, 0x6bb4e3bbUL,
|
||||
0xdda26a7eUL, 0x3a59ff45UL, 0x3e350a44UL, 0xbcb4cdd5UL,
|
||||
0x72eacea8UL, 0xfa6484bbUL, 0x8d6612aeUL, 0xbf3c6f47UL,
|
||||
0xd29be463UL, 0x542f5d9eUL, 0xaec2771bUL, 0xf64e6370UL,
|
||||
0x740e0d8dUL, 0xe75b1357UL, 0xf8721671UL, 0xaf537d5dUL,
|
||||
0x4040cb08UL, 0x4eb4e2ccUL, 0x34d2466aUL, 0x0115af84UL,
|
||||
0xe1b00428UL, 0x95983a1dUL, 0x06b89fb4UL, 0xce6ea048UL,
|
||||
0x6f3f3b82UL, 0x3520ab82UL, 0x011a1d4bUL, 0x277227f8UL,
|
||||
0x611560b1UL, 0xe7933fdcUL, 0xbb3a792bUL, 0x344525bdUL,
|
||||
0xa08839e1UL, 0x51ce794bUL, 0x2f32c9b7UL, 0xa01fbac9UL,
|
||||
0xe01cc87eUL, 0xbcc7d1f6UL, 0xcf0111c3UL, 0xa1e8aac7UL,
|
||||
0x1a908749UL, 0xd44fbd9aUL, 0xd0dadecbUL, 0xd50ada38UL,
|
||||
0x0339c32aUL, 0xc6913667UL, 0x8df9317cUL, 0xe0b12b4fUL,
|
||||
0xf79e59b7UL, 0x43f5bb3aUL, 0xf2d519ffUL, 0x27d9459cUL,
|
||||
0xbf97222cUL, 0x15e6fc2aUL, 0x0f91fc71UL, 0x9b941525UL,
|
||||
0xfae59361UL, 0xceb69cebUL, 0xc2a86459UL, 0x12baa8d1UL,
|
||||
0xb6c1075eUL, 0xe3056a0cUL, 0x10d25065UL, 0xcb03a442UL,
|
||||
0xe0ec6e0eUL, 0x1698db3bUL, 0x4c98a0beUL, 0x3278e964UL,
|
||||
0x9f1f9532UL, 0xe0d392dfUL, 0xd3a0342bUL, 0x8971f21eUL,
|
||||
0x1b0a7441UL, 0x4ba3348cUL, 0xc5be7120UL, 0xc37632d8UL,
|
||||
0xdf359f8dUL, 0x9b992f2eUL, 0xe60b6f47UL, 0x0fe3f11dUL,
|
||||
0xe54cda54UL, 0x1edad891UL, 0xce6279cfUL, 0xcd3e7e6fUL,
|
||||
0x1618b166UL, 0xfd2c1d05UL, 0x848fd2c5UL, 0xf6fb2299UL,
|
||||
0xf523f357UL, 0xa6327623UL, 0x93a83531UL, 0x56cccd02UL,
|
||||
0xacf08162UL, 0x5a75ebb5UL, 0x6e163697UL, 0x88d273ccUL,
|
||||
0xde966292UL, 0x81b949d0UL, 0x4c50901bUL, 0x71c65614UL,
|
||||
0xe6c6c7bdUL, 0x327a140aUL, 0x45e1d006UL, 0xc3f27b9aUL,
|
||||
0xc9aa53fdUL, 0x62a80f00UL, 0xbb25bfe2UL, 0x35bdd2f6UL,
|
||||
0x71126905UL, 0xb2040222UL, 0xb6cbcf7cUL, 0xcd769c2bUL,
|
||||
0x53113ec0UL, 0x1640e3d3UL, 0x38abbd60UL, 0x2547adf0UL,
|
||||
0xba38209cUL, 0xf746ce76UL, 0x77afa1c5UL, 0x20756060UL,
|
||||
0x85cbfe4eUL, 0x8ae88dd8UL, 0x7aaaf9b0UL, 0x4cf9aa7eUL,
|
||||
0x1948c25cUL, 0x02fb8a8cUL, 0x01c36ae4UL, 0xd6ebe1f9UL,
|
||||
0x90d4f869UL, 0xa65cdea0UL, 0x3f09252dUL, 0xc208e69fUL,
|
||||
0xb74e6132UL, 0xce77e25bUL, 0x578fdfe3UL, 0x3ac372e6UL,
|
||||
}
|
||||
};
|
||||
|
116
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_skey.c
Normal file
116
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/bf_skey.c
Normal file
@ -0,0 +1,116 @@
|
||||
/* crypto/bf/bf_skey.c */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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.]
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "blowfish.h"
|
||||
#include "bf_locl.h"
|
||||
#include "bf_pi.h"
|
||||
|
||||
void BF_set_key(BF_KEY *key, int len, unsigned char *data)
|
||||
{
|
||||
int i;
|
||||
BF_LONG *p,ri,in[2];
|
||||
unsigned char *d,*end;
|
||||
|
||||
|
||||
memcpy((char *)key,(char *)&bf_init,sizeof(BF_KEY));
|
||||
p=key->P;
|
||||
|
||||
if (len > ((BF_ROUNDS+2)*4)) len=(BF_ROUNDS+2)*4;
|
||||
|
||||
d=data;
|
||||
end= &(data[len]);
|
||||
for (i=0; i<(BF_ROUNDS+2); i++)
|
||||
{
|
||||
ri= (BF_LONG)*(d++);
|
||||
if (d >= end) d=data;
|
||||
|
||||
ri<<=8;
|
||||
ri|= *(d++);
|
||||
if (d >= end) d=data;
|
||||
|
||||
ri<<=8;
|
||||
ri|= *(d++);
|
||||
if (d >= end) d=data;
|
||||
|
||||
ri<<=8;
|
||||
ri|= *(d++);
|
||||
if (d >= end) d=data;
|
||||
|
||||
p[i]^=ri;
|
||||
}
|
||||
|
||||
in[0]=0L;
|
||||
in[1]=0L;
|
||||
for (i=0; i<(BF_ROUNDS+2); i+=2)
|
||||
{
|
||||
BF_encrypt(in,key,BF_ENCRYPT);
|
||||
p[i ]=in[0];
|
||||
p[i+1]=in[1];
|
||||
}
|
||||
|
||||
p=key->S;
|
||||
for (i=0; i<4*256; i+=2)
|
||||
{
|
||||
BF_encrypt(in,key,BF_ENCRYPT);
|
||||
p[i ]=in[0];
|
||||
p[i+1]=in[1];
|
||||
}
|
||||
}
|
||||
|
149
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/blowfish.doc
Normal file
149
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/blowfish.doc
Normal file
@ -0,0 +1,149 @@
|
||||
The Blowfish library.
|
||||
|
||||
Blowfish is a block cipher that operates on 64bit (8 byte) quantities. It
|
||||
uses variable size key, but 128bit (16 byte) key would normally be considered
|
||||
good. It can be used in all the modes that DES can be used. This
|
||||
library implements the ecb, cbc, cfb64, ofb64 modes.
|
||||
|
||||
Blowfish is quite a bit faster that DES, and much faster than IDEA or
|
||||
RC2. It is one of the faster block ciphers.
|
||||
|
||||
For all calls that have an 'input' and 'output' variables, they can be the
|
||||
same.
|
||||
|
||||
This library requires the inclusion of 'blowfish.h'.
|
||||
|
||||
All of the encryption functions take what is called an BF_KEY as an
|
||||
argument. An BF_KEY is an expanded form of the Blowfish key.
|
||||
For all modes of the Blowfish algorithm, the BF_KEY used for
|
||||
decryption is the same one that was used for encryption.
|
||||
|
||||
The define BF_ENCRYPT is passed to specify encryption for the functions
|
||||
that require an encryption/decryption flag. BF_DECRYPT is passed to
|
||||
specify decryption.
|
||||
|
||||
Please note that any of the encryption modes specified in my DES library
|
||||
could be used with Blowfish. I have only implemented ecb, cbc, cfb64 and
|
||||
ofb64 for the following reasons.
|
||||
- ecb is the basic Blowfish encryption.
|
||||
- cbc is the normal 'chaining' form for block ciphers.
|
||||
- cfb64 can be used to encrypt single characters, therefore input and output
|
||||
do not need to be a multiple of 8.
|
||||
- ofb64 is similar to cfb64 but is more like a stream cipher, not as
|
||||
secure (not cipher feedback) but it does not have an encrypt/decrypt mode.
|
||||
- If you want triple Blowfish, thats 384 bits of key and you must be totally
|
||||
obsessed with security. Still, if you want it, it is simple enough to
|
||||
copy the function from the DES library and change the des_encrypt to
|
||||
BF_encrypt; an exercise left for the paranoid reader :-).
|
||||
|
||||
The functions are as follows:
|
||||
|
||||
void BF_set_key(
|
||||
BF_KEY *ks;
|
||||
int len;
|
||||
unsigned char *key;
|
||||
BF_set_key converts an 'len' byte key into a BF_KEY.
|
||||
A 'ks' is an expanded form of the 'key' which is used to
|
||||
perform actual encryption. It can be regenerated from the Blowfish key
|
||||
so it only needs to be kept when encryption or decryption is about
|
||||
to occur. Don't save or pass around BF_KEY's since they
|
||||
are CPU architecture dependent, 'key's are not. Blowfish is an
|
||||
interesting cipher in that it can be used with a variable length
|
||||
key. 'len' is the length of 'key' to be used as the key.
|
||||
A 'len' of 16 is recomended by me, but blowfish can use upto
|
||||
72 bytes. As a warning, blowfish has a very very slow set_key
|
||||
function, it actually runs BF_encrypt 521 times.
|
||||
|
||||
void BF_encrypt(
|
||||
unsigned long *data,
|
||||
BF_KEY *key,
|
||||
int encrypt);
|
||||
This is the Blowfish encryption function that gets called by just about
|
||||
every other Blowfish routine in the library. You should not use this
|
||||
function except to implement 'modes' of Blowfish.
|
||||
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.
|
||||
Data is a pointer to 2 unsigned long's and key is the
|
||||
BF_KEY to use. Encryption or decryption is indicated by 'encrypt'.
|
||||
which can have the values BF_ENCRYPT or BF_DECRYPT.
|
||||
|
||||
void BF_ecb_encrypt(
|
||||
unsigned char *in,
|
||||
unsigned char *out,
|
||||
BF_KEY *key,
|
||||
int encrypt);
|
||||
This is the basic Electronic Code Book form of Blowfish (in DES this
|
||||
mode is called Electronic Code Book so I'm going to use the term
|
||||
for blowfish as well.
|
||||
Input is encrypted into output using the key represented by
|
||||
key. Depending on the encrypt, encryption or
|
||||
decryption occurs. Input is 8 bytes long and output is 8 bytes.
|
||||
|
||||
void BF_cbc_encrypt(
|
||||
unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length,
|
||||
BF_KEY *ks,
|
||||
unsigned char *ivec,
|
||||
int encrypt);
|
||||
This routine implements Blowfish in Cipher Block Chaining mode.
|
||||
Input, which should be a multiple of 8 bytes is encrypted
|
||||
(or decrypted) to output which will also be a multiple of 8 bytes.
|
||||
The number of bytes is in length (and from what I've said above,
|
||||
should be a multiple of 8). If length is not a multiple of 8, bad
|
||||
things will probably happen. ivec is the initialisation vector.
|
||||
This function updates iv after each call so that it can be passed to
|
||||
the next call to BF_cbc_encrypt().
|
||||
|
||||
void BF_cfb64_encrypt(
|
||||
unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length,
|
||||
BF_KEY *schedule,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
int encrypt);
|
||||
This is one of the more useful functions in this Blowfish library, it
|
||||
implements CFB mode of Blowfish with 64bit feedback.
|
||||
This allows you to encrypt an arbitrary number of bytes,
|
||||
you do not require 8 byte padding. Each call to this
|
||||
routine will encrypt the input bytes to output and then update ivec
|
||||
and num. Num contains 'how far' we are though ivec.
|
||||
'Encrypt' is used to indicate encryption or decryption.
|
||||
CFB64 mode operates by using the cipher to generate a stream
|
||||
of bytes which is used to encrypt the plain text.
|
||||
The cipher text is then encrypted to generate the next 64 bits to
|
||||
be xored (incrementally) with the next 64 bits of plain
|
||||
text. As can be seen from this, to encrypt or decrypt,
|
||||
the same 'cipher stream' needs to be generated but the way the next
|
||||
block of data is gathered for encryption is different for
|
||||
encryption and decryption.
|
||||
|
||||
void BF_ofb64_encrypt(
|
||||
unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length,
|
||||
BF_KEY *schedule,
|
||||
unsigned char *ivec,
|
||||
int *num);
|
||||
This functions implements OFB mode of Blowfish with 64bit feedback.
|
||||
This allows you to encrypt an arbitrary number of bytes,
|
||||
you do not require 8 byte padding. Each call to this
|
||||
routine will encrypt the input bytes to output and then update ivec
|
||||
and num. Num contains 'how far' we are though ivec.
|
||||
This is in effect a stream cipher, there is no encryption or
|
||||
decryption mode.
|
||||
|
||||
For reading passwords, I suggest using des_read_pw_string() from my DES library.
|
||||
To generate a password from a text string, I suggest using MD5 (or MD2) to
|
||||
produce a 16 byte message digest that can then be passed directly to
|
||||
BF_set_key().
|
||||
|
||||
=====
|
||||
For more information about the specific Blowfish modes in this library
|
||||
(ecb, cbc, cfb and ofb), read the section entitled 'Modes of DES' from the
|
||||
documentation on my DES library. What is said about DES is directly
|
||||
applicable for Blowfish.
|
||||
|
114
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/blowfish.h
Normal file
114
Build/VS2010/SDKs/Win32/HawkVoice/src/BLOWFISH/blowfish.h
Normal file
@ -0,0 +1,114 @@
|
||||
/* crypto/bf/blowfish.h */
|
||||
/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@mincom.oz.au).
|
||||
* 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@mincom.oz.au).
|
||||
*
|
||||
* 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@mincom.oz.au)"
|
||||
* 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@mincom.oz.au)"
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BF_ENCRYPT 1
|
||||
#define BF_DECRYPT 0
|
||||
|
||||
/* If you make this 'unsigned int' the pointer variants will work on
|
||||
* the Alpha, otherwise they will not. Strangly using the '8 byte'
|
||||
* BF_LONG and the default 'non-pointer' inner loop is the best configuration
|
||||
* for the Alpha */
|
||||
#define BF_LONG unsigned long
|
||||
|
||||
#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;
|
||||
|
||||
#ifndef NOPROTO
|
||||
|
||||
void BF_set_key(BF_KEY *key, int len, unsigned char *data);
|
||||
void BF_ecb_encrypt(unsigned char *in,unsigned char *out,BF_KEY *key,
|
||||
int encrypt);
|
||||
void BF_encrypt(BF_LONG *data,BF_KEY *key,int encrypt);
|
||||
void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
|
||||
BF_KEY *ks, unsigned char *iv, int encrypt);
|
||||
void BF_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
|
||||
BF_KEY *schedule, unsigned char *ivec, int *num, int encrypt);
|
||||
void BF_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
|
||||
BF_KEY *schedule, unsigned char *ivec, int *num);
|
||||
char *BF_options(void);
|
||||
|
||||
#else
|
||||
|
||||
void BF_set_key();
|
||||
void BF_ecb_encrypt();
|
||||
void BF_encrypt();
|
||||
void BF_cbc_encrypt();
|
||||
void BF_cfb64_encrypt();
|
||||
void BF_ofb64_encrypt();
|
||||
char *BF_options();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
194
Build/VS2010/SDKs/Win32/HawkVoice/src/hvdi.h
Normal file
194
Build/VS2010/SDKs/Win32/HawkVoice/src/hvdi.h
Normal file
@ -0,0 +1,194 @@
|
||||
/*
|
||||
HawkVoice Direct Interface (HVDI) cross platform network voice library
|
||||
Copyright (C) 2001 Phil Frisbie, Jr. (phil@hawksoft.com)
|
||||
|
||||
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; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
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.
|
||||
|
||||
Or go to http://www.gnu.org/copyleft/lgpl.html
|
||||
*/
|
||||
|
||||
#ifndef HVDI_H
|
||||
#define HVDI_H
|
||||
|
||||
#include "blowfish/blowfish.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define HVDI_MAJOR_VERSION 0
|
||||
#define HVDI_MINOR_VERSION 7
|
||||
#define HVDI_VERSION_STRING "HVDI 0.7 beta"
|
||||
|
||||
/* This was copied from nl.h so that it did not need to be included */
|
||||
|
||||
#if defined WIN32 || defined WIN64
|
||||
#pragma warning (disable:4514) /* disable "unreferenced inline function has
|
||||
been removed" warning */
|
||||
/* The default build for Windows is as a DLL. */
|
||||
/* If you want a static library, define WIN_STATIC_LIB. */
|
||||
#ifdef WIN_STATIC_LIB
|
||||
#define NL_EXP
|
||||
#else
|
||||
#if defined __LCC__
|
||||
#define NL_EXP extern
|
||||
#else
|
||||
#define NL_EXP __declspec(dllexport)
|
||||
#endif
|
||||
#endif
|
||||
#define NL_APIENTRY __stdcall
|
||||
#define NL_CALLBACK __cdecl
|
||||
#ifdef __GNUC__
|
||||
#define NL_INLINE extern __inline__
|
||||
#else
|
||||
#define NL_INLINE __inline
|
||||
#endif
|
||||
#else
|
||||
#define NL_EXP extern
|
||||
#define NL_APIENTRY
|
||||
#define NL_CALLBACK
|
||||
#ifdef __GNUC__
|
||||
#define NL_INLINE extern __inline__
|
||||
#else
|
||||
#define NL_INLINE inline /* assuming C99 compliant compiler */
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* WIN32 || WIN64 */
|
||||
|
||||
#ifndef NL_INVALID
|
||||
#define NL_INVALID (-1)
|
||||
#define NL_FALSE (0)
|
||||
#define NL_TRUE (1)
|
||||
#endif
|
||||
|
||||
|
||||
/* We will use HVDI or hvdi to prefix all HawkVoiceDI defines and functions */
|
||||
|
||||
/*
|
||||
The internal state of the codec. This is READ ONLY! You can read hvdi_dec_state->codec
|
||||
if you want to know what type of codec is being used on the other side, but DO NOT
|
||||
write to this structure!! I could have hidden these structures behind an index, but
|
||||
this IS low level quick and dirty ;)
|
||||
|
||||
hvdi_enc_state and hvdi_dec_state are defined separately to help the compiler spot
|
||||
your mistakes ;)
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned char codec; /* the codec used with the last packet */
|
||||
unsigned short sequence;/* the sequence number of the last packet */
|
||||
void *state; /* the codec state */
|
||||
} hvdi_enc_state;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char codec; /* the codec used with the last packet */
|
||||
unsigned short sequence;/* the sequence number of the last packet */
|
||||
void *state; /* the codec state */
|
||||
} hvdi_dec_state;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int rate; /* HVDI_VOX_FAST, HVDI_VOX_MEDIUM, or HVDI_VOX_SLOW */
|
||||
int noisethreshold; /* 0(always pass) to 1000(never pass), 300 is a good starting point */
|
||||
int samplecount; /* init to 0; used internally by hvdiVOX */
|
||||
} hvdi_vox;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long lcmrate; /* least common multiple of rates */
|
||||
unsigned long inskip, outskip; /* LCM increments for I & O rates */
|
||||
unsigned long total;
|
||||
unsigned long intot, outtot; /* total samples in terms of LCM rate */
|
||||
long lastsamp;
|
||||
} hvdi_rate;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int sample_max;
|
||||
int counter;
|
||||
float gain;
|
||||
float peak;
|
||||
int silence_counter;
|
||||
} hvdi_agc;
|
||||
|
||||
/* The basic codecs, from hawkvoice.h */
|
||||
#define HV_2_4K_CODEC 0x0001 /* LPC-10 2.4 Kbps codec */
|
||||
#define HV_4_8K_CODEC 0x0002 /* LPC 4.8 Kbps codec */
|
||||
#define HV_13_2K_CODEC 0x0004 /* GSM 13.2 Kbps codec */
|
||||
#define HV_32K_CODEC 0x0008 /* Intel/DVI ADPCM 32 Kbps codec */
|
||||
#define HV_64K_CODEC 0x0010 /* G.711 u-law 64 Kbps codec */
|
||||
#define HV_1_4K_CODEC 0x0011 /* OpenLPC 1.4 Kbps codec */
|
||||
#define HV_1_8K_CODEC 0x0012 /* OpenLPC 1.8 Kbps codec */
|
||||
|
||||
/* Alternate codec names */
|
||||
#define HV_LPC10_CODEC HV_2_4K_CODEC
|
||||
#define HV_LPC_CODEC HV_4_8K_CODEC
|
||||
#define HV_GSM_CODEC HV_13_2K_CODEC
|
||||
#define HV_ADPCM_32_CODEC HV_32K_CODEC
|
||||
#define HV_PCM_64_CODEC HV_64K_CODEC
|
||||
#define HV_G_711_CODEC HV_64K_CODEC
|
||||
#define HV_ULAW_CODEC HV_64K_CODEC
|
||||
#define HV_LPC_1_4_CODEC HV_1_4K_CODEC
|
||||
#define HV_LPC_1_8_CODEC HV_1_8K_CODEC
|
||||
|
||||
/* VOX options */
|
||||
/* how many samples of silence to wait after voice stops */
|
||||
#define HVDI_VOX_FAST 4000 /* 1/2 second */
|
||||
#define HVDI_VOX_MEDIUM 8000 /* 1 second */
|
||||
#define HVDI_VOX_SLOW 12000 /* 1 1/2 seconds */
|
||||
|
||||
|
||||
/* HawkVoiceDI API */
|
||||
|
||||
NL_EXP hvdi_enc_state* NL_APIENTRY hvdiCreateEncoderState(void);
|
||||
|
||||
NL_EXP hvdi_dec_state* NL_APIENTRY hvdiCreateDecoderState(void);
|
||||
|
||||
NL_EXP void NL_APIENTRY hvdiFreeEncoderState(hvdi_enc_state *state);
|
||||
|
||||
NL_EXP void NL_APIENTRY hvdiFreeDecoderState(hvdi_dec_state *state);
|
||||
|
||||
NL_EXP int NL_APIENTRY hvdiSetCodec(unsigned char codec, hvdi_enc_state *state);
|
||||
|
||||
NL_EXP BF_KEY* NL_APIENTRY hvdiMakeEncryptionKey(const char *string);
|
||||
|
||||
NL_EXP int NL_APIENTRY hvdiIsVoicePacket(unsigned char *packet, int length);
|
||||
|
||||
NL_EXP int NL_APIENTRY hvdiDecodePacket(unsigned char *packet, int paclen, short *buffer,
|
||||
int buflen, BF_KEY *key, hvdi_dec_state *state);
|
||||
|
||||
NL_EXP int NL_APIENTRY hvdiEncodePacket(short *buffer, int buflen, unsigned char *packet,
|
||||
int paclen, BF_KEY *key, hvdi_enc_state *state);
|
||||
|
||||
NL_EXP int NL_APIENTRY hvdiVOX(short *buffer, int buflen, hvdi_vox *vox);
|
||||
|
||||
NL_EXP void NL_APIENTRY hvdiRateInit(hvdi_rate *rate, int inrate, int outrate);
|
||||
|
||||
NL_EXP void NL_APIENTRY hvdiRateFlow(hvdi_rate *rate, short *inbuf, short *outbuf, int *inlen, int *outlen);
|
||||
|
||||
NL_EXP void NL_APIENTRY hvdiAGCInit(hvdi_agc *agc, float level);
|
||||
|
||||
NL_EXP void NL_APIENTRY hvdiAGC(hvdi_agc *agc, short *buffer, int len);
|
||||
|
||||
NL_EXP void NL_APIENTRY hvdiMix(short *outbuf, short **inbuf, int number, int inlen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* HVDI_H */
|
||||
|
22
Build/VS2010/StaticSDKs/XPlatform/expat/COPYING.txt
Normal file
22
Build/VS2010/StaticSDKs/XPlatform/expat/COPYING.txt
Normal file
@ -0,0 +1,22 @@
|
||||
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
and Clark Cooper
|
||||
Copyright (c) 2001, 2002 Expat maintainers.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
124
Build/VS2010/StaticSDKs/XPlatform/expat/Changes.txt
Normal file
124
Build/VS2010/StaticSDKs/XPlatform/expat/Changes.txt
Normal file
@ -0,0 +1,124 @@
|
||||
Release 1.95.7 Mon Oct 20 2003
|
||||
- Fixed enum XML_Status issue (reported on SourceForge many
|
||||
times), so compilers that are properly picky will be happy.
|
||||
- Introduced an XMLCALL macro to control the calling
|
||||
convention used by the Expat API; this macro should be used
|
||||
to annotate prototypes and definitions of callback
|
||||
implementations in code compiled with a calling convention
|
||||
other than the default convention for the host platform.
|
||||
- Improved ability to build without the configure-generated
|
||||
expat_config.h header. This is useful for applications
|
||||
which embed Expat rather than linking in the library.
|
||||
- Fixed a variety of bugs: see SF issues 458907, 609603,
|
||||
676844, 679754, 692878, 692964, 695401, 699323, 699487,
|
||||
820946.
|
||||
- Improved hash table lookups.
|
||||
- Added more regression tests and improved documentation.
|
||||
|
||||
Release 1.95.6 Tue Jan 28 2003
|
||||
- Added XML_FreeContentModel().
|
||||
- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
|
||||
- Fixed a variety of bugs: see SF issues 615606, 616863,
|
||||
618199, 653180, 673791.
|
||||
- Enhanced the regression test suite.
|
||||
- Man page improvements: includes SF issue 632146.
|
||||
|
||||
Release 1.95.5 Fri Sep 6 2002
|
||||
- Added XML_UseForeignDTD() for improved SAX2 support.
|
||||
- Added XML_GetFeatureList().
|
||||
- Defined XML_Bool type and the values XML_TRUE and XML_FALSE.
|
||||
- Use an incomplete struct instead of a void* for the parser
|
||||
(may not retain).
|
||||
- Fixed UTF-8 decoding bug that caused legal UTF-8 to be rejected.
|
||||
- Finally fixed bug where default handler would report DTD
|
||||
events that were already handled by another handler.
|
||||
Initial patch contributed by Darryl Miles.
|
||||
- Removed unnecessary DllMain() function that caused static
|
||||
linking into a DLL to be difficult.
|
||||
- Added VC++ projects for building static libraries.
|
||||
- Reduced line-length for all source code and headers to be
|
||||
no longer than 80 characters, to help with AS/400 support.
|
||||
- Reduced memory copying during parsing (SF patch #600964).
|
||||
- Fixed a variety of bugs: see SF issues 580793, 434664,
|
||||
483514, 580503, 581069, 584041, 584183, 584832, 585537,
|
||||
596555, 596678, 598352, 598944, 599715, 600479, 600971.
|
||||
|
||||
Release 1.95.4 Fri Jul 12 2002
|
||||
- Added support for VMS, contributed by Craig Berry. See
|
||||
vms/README.vms for more information.
|
||||
- Added Mac OS (classic) support, with a makefile for MPW,
|
||||
contributed by Thomas Wegner and Daryle Walker.
|
||||
- Added Borland C++ Builder 5 / BCC 5.5 support, contributed
|
||||
by Patrick McConnell (SF patch #538032).
|
||||
- Fixed a variety of bugs: see SF issues 441449, 563184,
|
||||
564342, 566334, 566901, 569461, 570263, 575168, 579196.
|
||||
- Made skippedEntityHandler conform to SAX2 (see source comment)
|
||||
- Re-implemented WFC: Entity Declared from XML 1.0 spec and
|
||||
added a new error "entity declared in parameter entity":
|
||||
see SF bug report 569461 and SF patch 578161
|
||||
- Re-implemented section 5.1 from XML 1.0 spec:
|
||||
see SF bug report 570263 and SF patch 578161
|
||||
|
||||
Release 1.95.3 Mon Jun 3 2002
|
||||
- Added a project to the MSVC workspace to create a wchar_t
|
||||
version of the library; the DLLs are named libexpatw.dll.
|
||||
- Changed the name of the Windows DLLs from expat.dll to
|
||||
libexpat.dll; this fixes SF bug #432456.
|
||||
- Added the XML_ParserReset() API function.
|
||||
- Fixed XML_SetReturnNSTriplet() to work for element names.
|
||||
- Made the XML_UNICODE builds usable (thanks, Karl!).
|
||||
- Allow xmlwf to read from standard input.
|
||||
- Install a man page for xmlwf on Unix systems.
|
||||
- Fixed many bugs; see SF bug reports 231864, 461380, 464837,
|
||||
466885, 469226, 477667, 484419, 487840, 494749, 496505,
|
||||
547350. Other bugs which we can't test as easily may also
|
||||
have been fixed, especially in the area of build support.
|
||||
|
||||
Release 1.95.2 Fri Jul 27 2001
|
||||
- More changes to make MSVC happy with the build; add a single
|
||||
workspace to support both the library and xmlwf application.
|
||||
- Added a Windows installer for Windows users; includes
|
||||
xmlwf.exe.
|
||||
- Added compile-time constants that can be used to determine the
|
||||
Expat version
|
||||
- Removed a lot of GNU-specific dependencies to aide portability
|
||||
among the various Unix flavors.
|
||||
- Fix the UTF-8 BOM bug.
|
||||
- Cleaned up warning messages for several compilers.
|
||||
- Added the -Wall, -Wstrict-prototypes options for GCC.
|
||||
|
||||
Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000
|
||||
- Changes to get expat to build under Microsoft compiler
|
||||
- Removed all aborts and instead return an UNEXPECTED_STATE error.
|
||||
- Fixed a bug where a stray '%' in an entity value would cause an
|
||||
abort.
|
||||
- Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for
|
||||
finding this oversight.
|
||||
- Changed default patterns in lib/Makefile.in to fit non-GNU makes
|
||||
Thanks to robin@unrated.net for reporting and providing an
|
||||
account to test on.
|
||||
- The reference had the wrong label for XML_SetStartNamespaceDecl.
|
||||
Reported by an anonymous user.
|
||||
|
||||
Release 1.95.0 Fri Sep 29 2000
|
||||
- XML_ParserCreate_MM
|
||||
Allows you to set a memory management suite to replace the
|
||||
standard malloc,realloc, and free.
|
||||
- XML_SetReturnNSTriplet
|
||||
If you turn this feature on when namespace processing is in
|
||||
effect, then qualified, prefixed element and attribute names
|
||||
are returned as "uri|name|prefix" where '|' is whatever
|
||||
separator character is used in namespace processing.
|
||||
- Merged in features from perl-expat
|
||||
o XML_SetElementDeclHandler
|
||||
o XML_SetAttlistDeclHandler
|
||||
o XML_SetXmlDeclHandler
|
||||
o XML_SetEntityDeclHandler
|
||||
o StartDoctypeDeclHandler takes 3 additional parameters:
|
||||
sysid, pubid, has_internal_subset
|
||||
o Many paired handler setters (like XML_SetElementHandler)
|
||||
now have corresponding individual handler setters
|
||||
o XML_GetInputContext for getting the input context of
|
||||
the current parse position.
|
||||
- Added reference material
|
||||
- Packaged into a distribution that builds a sharable library
|
1001
Build/VS2010/StaticSDKs/XPlatform/expat/Include/expat.h
Normal file
1001
Build/VS2010/StaticSDKs/XPlatform/expat/Include/expat.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpat.dll
Normal file
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpat.dll
Normal file
Binary file not shown.
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpat.exp
Normal file
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpat.exp
Normal file
Binary file not shown.
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpat.lib
Normal file
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpat.lib
Normal file
Binary file not shown.
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpatw.dll
Normal file
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpatw.dll
Normal file
Binary file not shown.
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpatw.exp
Normal file
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpatw.exp
Normal file
Binary file not shown.
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpatw.lib
Normal file
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/Libs/libexpatw.lib
Normal file
Binary file not shown.
119
Build/VS2010/StaticSDKs/XPlatform/expat/README.txt
Normal file
119
Build/VS2010/StaticSDKs/XPlatform/expat/README.txt
Normal file
@ -0,0 +1,119 @@
|
||||
|
||||
Expat, Release 1.95.7
|
||||
|
||||
This is Expat, a C library for parsing XML, written by James Clark.
|
||||
Expat is a stream-oriented XML parser. This means that you register
|
||||
handlers with the parser before starting the parse. These handlers
|
||||
are called when the parser discovers the associated structures in the
|
||||
document being parsed. A start tag is an example of the kind of
|
||||
structures for which you may register handlers.
|
||||
|
||||
Windows users should use the expat_win32bin package, which includes
|
||||
both precompiled libraries and executalbes, and source code for
|
||||
developers.
|
||||
|
||||
Expat is free software. You may copy, distribute, and modify it under
|
||||
the terms of the License contained in the file COPYING distributed
|
||||
with this package. This license is the same as the MIT/X Consortium
|
||||
license.
|
||||
|
||||
Versions of Expat that have an odd minor version (the middle number in
|
||||
the release above), are development releases and should be considered
|
||||
as beta software. Releases with even minor version numbers are
|
||||
intended to be production grade software.
|
||||
|
||||
If you are building Expat from a check-out from the CVS repository,
|
||||
you need to run a script that generates the configure script using the
|
||||
GNU autoconf and libtool tools. To do this, you need to have
|
||||
autoconf 2.52 or newer and libtool 1.4 or newer. Run the script like
|
||||
this:
|
||||
|
||||
./buildconf.sh
|
||||
|
||||
Once this has been done, follow the same instructions as for building
|
||||
from a source distribution.
|
||||
|
||||
To build Expat from a source distribution, you first run the
|
||||
configuration shell script in the top level distribution directory:
|
||||
|
||||
./configure
|
||||
|
||||
There are many options which you may provide to configure (which you
|
||||
can discover by running configure with the --help option). But the
|
||||
one of most interest is the one that sets the installation directory.
|
||||
By default, the configure script will set things up to install
|
||||
libexpat into /usr/local/lib, expat.h into /usr/local/include, and
|
||||
xmlwf into /usr/local/bin. If, for example, you'd prefer to install
|
||||
into /home/me/mystuff/lib, /home/me/mystuff/include, and
|
||||
/home/me/mystuff/bin, you can tell configure about that with:
|
||||
|
||||
./configure --prefix=/home/me/mystuff
|
||||
|
||||
After running the configure script, the "make" command will build
|
||||
things and "make install" will install things into their proper
|
||||
location. Note that you need to have write permission into the
|
||||
directories into which things will be installed.
|
||||
|
||||
If you are interested in building Expat to provide document
|
||||
information in UTF-16 rather than the default UTF-8, following these
|
||||
instructions:
|
||||
|
||||
1. For UTF-16 output as unsigned short (and version/error
|
||||
strings as char), run:
|
||||
|
||||
./configure CPPFLAGS=-DXML_UNICODE
|
||||
|
||||
For UTF-16 output as wchar_t (incl. version/error strings),
|
||||
run:
|
||||
|
||||
./configure CFLAGS="-g -O2 -fshort-wchar" \
|
||||
CPPFLAGS=-DXML_UNICODE_WCHAR_T
|
||||
|
||||
2. Edit the MakeFile, changing:
|
||||
|
||||
LIBRARY = libexpat.la
|
||||
|
||||
to:
|
||||
|
||||
LIBRARY = libexpatw.la
|
||||
|
||||
(Note the additional "w" in the library name.)
|
||||
|
||||
3. Run "make buildlib" (which builds the library only).
|
||||
|
||||
4. Run "make installlib" (which installs the library only).
|
||||
|
||||
Note for Solaris users: The "ar" command is usually located in
|
||||
"/usr/ccs/bin", which is not in the default PATH. You will need to
|
||||
add this to your path for the "make" command, and probably also switch
|
||||
to GNU make (the "make" found in /usr/ccs/bin does not seem to work
|
||||
properly -- appearantly it does not understand .PHONY directives). If
|
||||
you're using ksh or bash, use this command to build:
|
||||
|
||||
PATH=/usr/ccs/bin:$PATH make
|
||||
|
||||
The unit and regression tests for Expat require the "check" library on
|
||||
Unix; more information is available at http://check.sourceforge.net/,
|
||||
and downloadable packages are available from the library's project
|
||||
page on SourceForge: http://sourceforge.net/projects/check/. You do
|
||||
not need to install the check library to build and use Expat, only to
|
||||
build and run Expat's test suite.
|
||||
|
||||
When using Expat with a project using autoconf for configuration, you
|
||||
can use the probing macro in conftools/expat.m4 to determine how to
|
||||
include Expat. See the comments at the top of that file for more
|
||||
information.
|
||||
|
||||
A reference manual is available in the file doc/reference.html in this
|
||||
distribution.
|
||||
|
||||
The homepage for this project is http://www.libexpat.org/. There
|
||||
are links there to connect you to the bug reports page. If you need
|
||||
to report a bug when you don't have access to a browser, you may also
|
||||
send a bug report by email to expat-bugs@mail.libexpat.org.
|
||||
|
||||
Discussion related to the direction of future expat development takes
|
||||
place on expat-discuss@mail.libexpat.org. Archives of this list and
|
||||
other Expat-related lists may be found at:
|
||||
|
||||
http://mail.libexpat.org/mailman-21/listinfo/
|
58
Build/VS2010/StaticSDKs/XPlatform/expat/Source/README.txt
Normal file
58
Build/VS2010/StaticSDKs/XPlatform/expat/Source/README.txt
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
Expat can be built on Windows in three ways:
|
||||
using MS Visual C++ 6, Borland C++ Builder 5 or Cygwin.
|
||||
|
||||
* Cygwin:
|
||||
This follows the Unix build procedures.
|
||||
|
||||
* C++ Builder 5:
|
||||
Possible with make files in the BCB5 subdirectory.
|
||||
Details can be found in the ReadMe file located there.
|
||||
|
||||
* MS Visual C++ 6:
|
||||
Based on workspace (.dsw) and project files (.dsp)
|
||||
located in the lib subdirectory.
|
||||
|
||||
* Special note about MS VC++ and runtime libraries:
|
||||
|
||||
There are three possible configurations: using the
|
||||
single threaded or multithreaded run-time library,
|
||||
or using the multi-threaded run-time Dll. That is,
|
||||
one can build three different Expat libraries depending
|
||||
on the needs of the application.
|
||||
|
||||
Dynamic Linking:
|
||||
|
||||
By default the Expat Dlls are built to link with the
|
||||
multi-threaded run-time Dll. The libraries are named
|
||||
- libexpat(w).dll
|
||||
- libexpat(w).lib (import library)
|
||||
The "w" indicates the UTF-16 version of the library.
|
||||
|
||||
One rarely uses other versions of the Dll, but they can
|
||||
be built easily by specifying a different RTL linkage in
|
||||
the IDE on the C/C++ tab under the category Code Generation.
|
||||
|
||||
Static Linking:
|
||||
|
||||
The libraries should be named like this:
|
||||
Single-theaded: libexpat(w)ML.lib
|
||||
Multi-threaded: libexpat(w)MT.lib
|
||||
Multi-threaded Dll: libexpat(w)MD.lib
|
||||
The suffixes conform to the compiler switch settings
|
||||
/ML, /MT and /MD for MS VC++.
|
||||
|
||||
By default, the expat-static and expatw-static projects are set up
|
||||
to link dynamically against the multithreaded run-time library,
|
||||
so they will build libexpatMT.lib or libexpatwMT.lib files.
|
||||
|
||||
To build the other versions of the static library,
|
||||
go to Project - Settings:
|
||||
- specify a different RTL linkage on the C/C++ tab
|
||||
under the category Code Generation.
|
||||
- then, on the Library tab, change the output file name
|
||||
accordingly, as described above
|
||||
|
||||
An application linking to the static libraries must
|
||||
have the global macro XML_STATIC defined.
|
||||
|
86
Build/VS2010/StaticSDKs/XPlatform/expat/Source/expat.sln
Normal file
86
Build/VS2010/StaticSDKs/XPlatform/expat/Source/expat.sln
Normal file
@ -0,0 +1,86 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expat", "lib\expat.vcproj", "{99ACAECA-2C32-4E24-B162-26687AB9C87B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expat_static", "lib\expat_static.vcproj", "{170D8E27-945D-47E2-9031-F893E22C058F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expatw", "lib\expatw.vcproj", "{4473BB4C-E512-45F8-A810-27A1688113DF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expatw_static", "lib\expatw_static.vcproj", "{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expatw_static_xbox", "lib\expatw_static_xbox.vcproj", "{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Profile = Profile
|
||||
Profile_FastCap = Profile_FastCap
|
||||
Release = Release
|
||||
Release_LTCG = Release_LTCG
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Debug.ActiveCfg = Debug|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Debug.Build.0 = Debug|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Profile.ActiveCfg = Release|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Profile.Build.0 = Release|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Profile_FastCap.ActiveCfg = Release|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Profile_FastCap.Build.0 = Release|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Release.ActiveCfg = Release|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Release.Build.0 = Release|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Release_LTCG.ActiveCfg = Release|Win32
|
||||
{99ACAECA-2C32-4E24-B162-26687AB9C87B}.Release_LTCG.Build.0 = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Debug.ActiveCfg = Debug|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Debug.Build.0 = Debug|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Profile.ActiveCfg = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Profile.Build.0 = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Profile_FastCap.ActiveCfg = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Profile_FastCap.Build.0 = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Release.ActiveCfg = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Release.Build.0 = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Release_LTCG.ActiveCfg = Release|Win32
|
||||
{170D8E27-945D-47E2-9031-F893E22C058F}.Release_LTCG.Build.0 = Release|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Debug.ActiveCfg = Debug|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Debug.Build.0 = Debug|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Profile.ActiveCfg = Debug|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Profile.Build.0 = Debug|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Profile_FastCap.ActiveCfg = Debug|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Profile_FastCap.Build.0 = Debug|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Release.ActiveCfg = Release|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Release.Build.0 = Release|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Release_LTCG.ActiveCfg = Release|Win32
|
||||
{4473BB4C-E512-45F8-A810-27A1688113DF}.Release_LTCG.Build.0 = Release|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Debug.ActiveCfg = Debug|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Debug.Build.0 = Debug|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Profile.ActiveCfg = Debug|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Profile.Build.0 = Debug|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Profile_FastCap.ActiveCfg = Debug|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Profile_FastCap.Build.0 = Debug|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Release.ActiveCfg = Release|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Release.Build.0 = Release|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Release_LTCG.ActiveCfg = Release|Win32
|
||||
{716F7CB2-1E3A-4AB5-9E81-E5D61E972072}.Release_LTCG.Build.0 = Release|Win32
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Debug.ActiveCfg = Debug|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Debug.Build.0 = Debug|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Profile.ActiveCfg = Profile|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Profile.Build.0 = Profile|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Release.ActiveCfg = Release|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Release.Build.0 = Release|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox
|
||||
{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}.Release_LTCG.Build.0 = Release_LTCG|Xbox
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
85
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/ascii.h
Normal file
85
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/ascii.h
Normal file
@ -0,0 +1,85 @@
|
||||
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
#define ASCII_A 0x41
|
||||
#define ASCII_B 0x42
|
||||
#define ASCII_C 0x43
|
||||
#define ASCII_D 0x44
|
||||
#define ASCII_E 0x45
|
||||
#define ASCII_F 0x46
|
||||
#define ASCII_G 0x47
|
||||
#define ASCII_H 0x48
|
||||
#define ASCII_I 0x49
|
||||
#define ASCII_J 0x4A
|
||||
#define ASCII_K 0x4B
|
||||
#define ASCII_L 0x4C
|
||||
#define ASCII_M 0x4D
|
||||
#define ASCII_N 0x4E
|
||||
#define ASCII_O 0x4F
|
||||
#define ASCII_P 0x50
|
||||
#define ASCII_Q 0x51
|
||||
#define ASCII_R 0x52
|
||||
#define ASCII_S 0x53
|
||||
#define ASCII_T 0x54
|
||||
#define ASCII_U 0x55
|
||||
#define ASCII_V 0x56
|
||||
#define ASCII_W 0x57
|
||||
#define ASCII_X 0x58
|
||||
#define ASCII_Y 0x59
|
||||
#define ASCII_Z 0x5A
|
||||
|
||||
#define ASCII_a 0x61
|
||||
#define ASCII_b 0x62
|
||||
#define ASCII_c 0x63
|
||||
#define ASCII_d 0x64
|
||||
#define ASCII_e 0x65
|
||||
#define ASCII_f 0x66
|
||||
#define ASCII_g 0x67
|
||||
#define ASCII_h 0x68
|
||||
#define ASCII_i 0x69
|
||||
#define ASCII_j 0x6A
|
||||
#define ASCII_k 0x6B
|
||||
#define ASCII_l 0x6C
|
||||
#define ASCII_m 0x6D
|
||||
#define ASCII_n 0x6E
|
||||
#define ASCII_o 0x6F
|
||||
#define ASCII_p 0x70
|
||||
#define ASCII_q 0x71
|
||||
#define ASCII_r 0x72
|
||||
#define ASCII_s 0x73
|
||||
#define ASCII_t 0x74
|
||||
#define ASCII_u 0x75
|
||||
#define ASCII_v 0x76
|
||||
#define ASCII_w 0x77
|
||||
#define ASCII_x 0x78
|
||||
#define ASCII_y 0x79
|
||||
#define ASCII_z 0x7A
|
||||
|
||||
#define ASCII_0 0x30
|
||||
#define ASCII_1 0x31
|
||||
#define ASCII_2 0x32
|
||||
#define ASCII_3 0x33
|
||||
#define ASCII_4 0x34
|
||||
#define ASCII_5 0x35
|
||||
#define ASCII_6 0x36
|
||||
#define ASCII_7 0x37
|
||||
#define ASCII_8 0x38
|
||||
#define ASCII_9 0x39
|
||||
|
||||
#define ASCII_TAB 0x09
|
||||
#define ASCII_SPACE 0x20
|
||||
#define ASCII_EXCL 0x21
|
||||
#define ASCII_QUOT 0x22
|
||||
#define ASCII_AMP 0x26
|
||||
#define ASCII_APOS 0x27
|
||||
#define ASCII_MINUS 0x2D
|
||||
#define ASCII_PERIOD 0x2E
|
||||
#define ASCII_COLON 0x3A
|
||||
#define ASCII_SEMI 0x3B
|
||||
#define ASCII_LT 0x3C
|
||||
#define ASCII_EQUALS 0x3D
|
||||
#define ASCII_GT 0x3E
|
||||
#define ASCII_LSQB 0x5B
|
||||
#define ASCII_RSQB 0x5D
|
||||
#define ASCII_UNDERSCORE 0x5F
|
@ -0,0 +1,36 @@
|
||||
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
|
||||
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
|
||||
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
|
||||
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
|
||||
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
|
||||
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
|
||||
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
|
||||
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
|
||||
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
|
||||
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
|
||||
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
|
1001
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/expat.h
Normal file
1001
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/expat.h
Normal file
File diff suppressed because it is too large
Load Diff
246
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/expat.vcproj
Normal file
246
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/expat.vcproj
Normal file
@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="expat"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\Debug/expat.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="Debug\libexpat.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\libexpat.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ImportLibrary=".\Debug/libexpat.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/expat.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;COMPILED_FROM_DSP"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\Release/expat.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="Release\libexpat.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\libexpat.def"
|
||||
ImportLibrary=".\Release/libexpat.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/expat.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="libexpat.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlparse.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
ExceptionHandling="FALSE"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;COMPILED_FROM_DSP;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;COMPILED_FROM_DSP;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;COMPILED_FROM_DSP;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="ascii.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="asciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="expat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iasciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="latin1tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="nametab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utf8tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok_impl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="expat_static"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug_static"
|
||||
IntermediateDirectory=".\Debug_static"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;COMPILED_FROM_DSP;_LIB"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\Debug_static/expat_static.pch"
|
||||
AssemblerListingLocation=".\Debug_static/"
|
||||
ObjectFile=".\Debug_static/"
|
||||
ProgramDataBaseFileName=".\Debug_static/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="Debug_static\libexpatMT.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release_static"
|
||||
IntermediateDirectory=".\Release_static"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\Release_static/expat_static.pch"
|
||||
AssemblerListingLocation=".\Release_static/"
|
||||
ObjectFile=".\Release_static/"
|
||||
ProgramDataBaseFileName=".\Release_static/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="Release_static\libexpatMT.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="xmlparse.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="ascii.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="asciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="expat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iasciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="latin1tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="nametab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utf8tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok_impl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
246
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/expatw.vcproj
Normal file
246
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/expatw.vcproj
Normal file
@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="expatw"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release-w"
|
||||
IntermediateDirectory=".\Release-w"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;XML_UNICODE_WCHAR_T"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\Release-w/expatw.pch"
|
||||
AssemblerListingLocation=".\Release-w/"
|
||||
ObjectFile=".\Release-w/"
|
||||
ProgramDataBaseFileName=".\Release-w/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="Release-w\libexpatw.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\libexpatw.def"
|
||||
ImportLibrary=".\Release-w/libexpatw.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release-w/expatw.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug-w"
|
||||
IntermediateDirectory=".\Debug-w"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;XML_UNICODE_WCHAR_T"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\Debug-w/expatw.pch"
|
||||
AssemblerListingLocation=".\Debug-w/"
|
||||
ObjectFile=".\Debug-w/"
|
||||
ProgramDataBaseFileName=".\Debug-w/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="Debug-w\libexpatw.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\libexpatw.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ImportLibrary=".\Debug-w/libexpatw.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug-w/expatw.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="libexpatw.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlparse.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;XML_UNICODE_WCHAR_T;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;XML_UNICODE_WCHAR_T;$(NoInherit)"
|
||||
ExceptionHandling="FALSE"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;XML_UNICODE_WCHAR_T;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;XML_UNICODE_WCHAR_T;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;XML_UNICODE_WCHAR_T;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;XML_UNICODE_WCHAR_T;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="ascii.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="asciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="expat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iasciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="latin1tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="nametab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utf8tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok_impl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="expatw_static"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release-w_static"
|
||||
IntermediateDirectory=".\Release-w_static"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\Release-w_static/expatw_static.pch"
|
||||
AssemblerListingLocation=".\Release-w_static/"
|
||||
ObjectFile=".\Release-w_static/"
|
||||
ProgramDataBaseFileName=".\Release-w_static/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="Release-w_static\libexpatwMT.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug-w_static"
|
||||
IntermediateDirectory=".\Debug-w_static"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;COMPILED_FROM_DSP;_LIB"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\Debug-w_static/expatw_static.pch"
|
||||
AssemblerListingLocation=".\Debug-w_static/"
|
||||
ObjectFile=".\Debug-w_static/"
|
||||
ProgramDataBaseFileName=".\Debug-w_static/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="Debug-w_static\libexpatwMT.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="xmlparse.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="ascii.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="asciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="expat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="iasciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="latin1tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="nametab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="utf8tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmlrole.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="xmltok_impl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="expatw_static_xbox"
|
||||
ProjectGUID="{8357A40B-7550-41E2-AFEE-AEFB1C3403FB}"
|
||||
Keyword="XboxProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Xbox"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Xbox"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
OptimizeForProcessor="2"
|
||||
PreprocessorDefinitions="_DEBUG;_XBOX;_LIB"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/$(ProjectName).lib"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Profile|Xbox"
|
||||
OutputDirectory="Profile"
|
||||
IntermediateDirectory="Profile"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;_LIB"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/$(ProjectName).lib"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Profile_FastCap|Xbox"
|
||||
OutputDirectory="Profile_FastCap"
|
||||
IntermediateDirectory="Profile_FastCap"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;FASTCAP;_LIB"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"
|
||||
FastCAP="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/$(ProjectName).lib"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Xbox"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_LIB,COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/$(ProjectName).lib"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_LTCG|Xbox"
|
||||
OutputDirectory="Release_LTCG"
|
||||
IntermediateDirectory="Release_LTCG"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;LTCG;_LIB"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/$(ProjectName).lib"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\xmlparse.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\xmlrole.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\xmltok.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\ascii.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\asciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\expat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\iasciitab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\latin1tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\nametab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\utf8tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\xmlrole.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\xmltok.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\xmltok_impl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -0,0 +1,37 @@
|
||||
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
|
||||
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
|
||||
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
|
||||
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
|
||||
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
|
||||
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
|
||||
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
|
||||
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
|
||||
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
|
||||
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
|
||||
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
|
||||
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
|
@ -0,0 +1,73 @@
|
||||
/* internal.h
|
||||
|
||||
Internal definitions used by Expat. This is not needed to compile
|
||||
client code.
|
||||
|
||||
The following calling convention macros are defined for frequently
|
||||
called functions:
|
||||
|
||||
FASTCALL - Used for those internal functions that have a simple
|
||||
body and a low number of arguments and local variables.
|
||||
|
||||
PTRCALL - Used for functions called though function pointers.
|
||||
|
||||
PTRFASTCALL - Like PTRCALL, but for low number of arguments.
|
||||
|
||||
inline - Used for selected internal functions for which inlining
|
||||
may improve performance on some platforms.
|
||||
|
||||
Note: Use of these macros is based on judgement, not hard rules,
|
||||
and therefore subject to change.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
/* We'll use this version by default only where we know it helps.
|
||||
|
||||
regparm() generates warnings on Solaris boxes. See SF bug #692878.
|
||||
|
||||
Instability reported with egcs on a RedHat Linux 7.3.
|
||||
Let's comment out:
|
||||
#define FASTCALL __attribute__((stdcall, regparm(3)))
|
||||
and let's try this:
|
||||
*/
|
||||
#define FASTCALL __attribute__((regparm(3)))
|
||||
#define PTRFASTCALL __attribute__((regparm(3)))
|
||||
#endif
|
||||
|
||||
/* Using __fastcall seems to have an unexpected negative effect under
|
||||
MS VC++, especially for function pointers, so we won't use it for
|
||||
now on that platform. It may be reconsidered for a future release
|
||||
if it can be made more effective.
|
||||
Likely reason: __fastcall on Windows is like stdcall, therefore
|
||||
the compiler cannot perform stack optimizations for call clusters.
|
||||
*/
|
||||
|
||||
/* Make sure all of these are defined if they aren't already. */
|
||||
|
||||
#ifndef FASTCALL
|
||||
#define FASTCALL
|
||||
#endif
|
||||
|
||||
#ifndef PTRCALL
|
||||
#define PTRCALL
|
||||
#endif
|
||||
|
||||
#ifndef PTRFASTCALL
|
||||
#define PTRFASTCALL
|
||||
#endif
|
||||
|
||||
#ifndef XML_MIN_SIZE
|
||||
#if !defined(__cplusplus) && !defined(inline)
|
||||
#ifdef __GNUC__
|
||||
#define inline __inline
|
||||
#endif /* __GNUC__ */
|
||||
#endif
|
||||
#endif /* XML_MIN_SIZE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define inline inline
|
||||
#else
|
||||
#ifndef inline
|
||||
#define inline
|
||||
#endif
|
||||
#endif
|
@ -0,0 +1,36 @@
|
||||
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
|
||||
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
@ -0,0 +1,69 @@
|
||||
; DEF file for MS VC++
|
||||
LIBRARY LIBEXPAT
|
||||
DESCRIPTION "Implements an XML parser."
|
||||
EXPORTS
|
||||
XML_DefaultCurrent @1
|
||||
XML_ErrorString @2
|
||||
XML_ExpatVersion @3
|
||||
XML_ExpatVersionInfo @4
|
||||
XML_ExternalEntityParserCreate @5
|
||||
XML_GetBase @6
|
||||
XML_GetBuffer @7
|
||||
XML_GetCurrentByteCount @8
|
||||
XML_GetCurrentByteIndex @9
|
||||
XML_GetCurrentColumnNumber @10
|
||||
XML_GetCurrentLineNumber @11
|
||||
XML_GetErrorCode @12
|
||||
XML_GetIdAttributeIndex @13
|
||||
XML_GetInputContext @14
|
||||
XML_GetSpecifiedAttributeCount @15
|
||||
XML_Parse @16
|
||||
XML_ParseBuffer @17
|
||||
XML_ParserCreate @18
|
||||
XML_ParserCreateNS @19
|
||||
XML_ParserCreate_MM @20
|
||||
XML_ParserFree @21
|
||||
XML_SetAttlistDeclHandler @22
|
||||
XML_SetBase @23
|
||||
XML_SetCdataSectionHandler @24
|
||||
XML_SetCharacterDataHandler @25
|
||||
XML_SetCommentHandler @26
|
||||
XML_SetDefaultHandler @27
|
||||
XML_SetDefaultHandlerExpand @28
|
||||
XML_SetDoctypeDeclHandler @29
|
||||
XML_SetElementDeclHandler @30
|
||||
XML_SetElementHandler @31
|
||||
XML_SetEncoding @32
|
||||
XML_SetEndCdataSectionHandler @33
|
||||
XML_SetEndDoctypeDeclHandler @34
|
||||
XML_SetEndElementHandler @35
|
||||
XML_SetEndNamespaceDeclHandler @36
|
||||
XML_SetEntityDeclHandler @37
|
||||
XML_SetExternalEntityRefHandler @38
|
||||
XML_SetExternalEntityRefHandlerArg @39
|
||||
XML_SetNamespaceDeclHandler @40
|
||||
XML_SetNotStandaloneHandler @41
|
||||
XML_SetNotationDeclHandler @42
|
||||
XML_SetParamEntityParsing @43
|
||||
XML_SetProcessingInstructionHandler @44
|
||||
XML_SetReturnNSTriplet @45
|
||||
XML_SetStartCdataSectionHandler @46
|
||||
XML_SetStartDoctypeDeclHandler @47
|
||||
XML_SetStartElementHandler @48
|
||||
XML_SetStartNamespaceDeclHandler @49
|
||||
XML_SetUnknownEncodingHandler @50
|
||||
XML_SetUnparsedEntityDeclHandler @51
|
||||
XML_SetUserData @52
|
||||
XML_SetXmlDeclHandler @53
|
||||
XML_UseParserAsHandlerArg @54
|
||||
; added with version 1.95.3
|
||||
XML_ParserReset @55
|
||||
XML_SetSkippedEntityHandler @56
|
||||
; added with version 1.95.5
|
||||
XML_GetFeatureList @57
|
||||
XML_UseForeignDTD @58
|
||||
; added with version 1.95.6
|
||||
XML_FreeContentModel @59
|
||||
XML_MemMalloc @60
|
||||
XML_MemRealloc @61
|
||||
XML_MemFree @62
|
@ -0,0 +1,69 @@
|
||||
; DEF file for MS VC++
|
||||
LIBRARY LIBEXPATW
|
||||
DESCRIPTION "Implements an XML parser."
|
||||
EXPORTS
|
||||
XML_DefaultCurrent @1
|
||||
XML_ErrorString @2
|
||||
XML_ExpatVersion @3
|
||||
XML_ExpatVersionInfo @4
|
||||
XML_ExternalEntityParserCreate @5
|
||||
XML_GetBase @6
|
||||
XML_GetBuffer @7
|
||||
XML_GetCurrentByteCount @8
|
||||
XML_GetCurrentByteIndex @9
|
||||
XML_GetCurrentColumnNumber @10
|
||||
XML_GetCurrentLineNumber @11
|
||||
XML_GetErrorCode @12
|
||||
XML_GetIdAttributeIndex @13
|
||||
XML_GetInputContext @14
|
||||
XML_GetSpecifiedAttributeCount @15
|
||||
XML_Parse @16
|
||||
XML_ParseBuffer @17
|
||||
XML_ParserCreate @18
|
||||
XML_ParserCreateNS @19
|
||||
XML_ParserCreate_MM @20
|
||||
XML_ParserFree @21
|
||||
XML_SetAttlistDeclHandler @22
|
||||
XML_SetBase @23
|
||||
XML_SetCdataSectionHandler @24
|
||||
XML_SetCharacterDataHandler @25
|
||||
XML_SetCommentHandler @26
|
||||
XML_SetDefaultHandler @27
|
||||
XML_SetDefaultHandlerExpand @28
|
||||
XML_SetDoctypeDeclHandler @29
|
||||
XML_SetElementDeclHandler @30
|
||||
XML_SetElementHandler @31
|
||||
XML_SetEncoding @32
|
||||
XML_SetEndCdataSectionHandler @33
|
||||
XML_SetEndDoctypeDeclHandler @34
|
||||
XML_SetEndElementHandler @35
|
||||
XML_SetEndNamespaceDeclHandler @36
|
||||
XML_SetEntityDeclHandler @37
|
||||
XML_SetExternalEntityRefHandler @38
|
||||
XML_SetExternalEntityRefHandlerArg @39
|
||||
XML_SetNamespaceDeclHandler @40
|
||||
XML_SetNotStandaloneHandler @41
|
||||
XML_SetNotationDeclHandler @42
|
||||
XML_SetParamEntityParsing @43
|
||||
XML_SetProcessingInstructionHandler @44
|
||||
XML_SetReturnNSTriplet @45
|
||||
XML_SetStartCdataSectionHandler @46
|
||||
XML_SetStartDoctypeDeclHandler @47
|
||||
XML_SetStartElementHandler @48
|
||||
XML_SetStartNamespaceDeclHandler @49
|
||||
XML_SetUnknownEncodingHandler @50
|
||||
XML_SetUnparsedEntityDeclHandler @51
|
||||
XML_SetUserData @52
|
||||
XML_SetXmlDeclHandler @53
|
||||
XML_UseParserAsHandlerArg @54
|
||||
; added with version 1.95.3
|
||||
XML_ParserReset @55
|
||||
XML_SetSkippedEntityHandler @56
|
||||
; added with version 1.95.5
|
||||
XML_GetFeatureList @57
|
||||
XML_UseForeignDTD @58
|
||||
; added with version 1.95.6
|
||||
XML_FreeContentModel @59
|
||||
XML_MemMalloc @60
|
||||
XML_MemRealloc @61
|
||||
XML_MemFree @62
|
104
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/macconfig.h
Normal file
104
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/macconfig.h
Normal file
@ -0,0 +1,104 @@
|
||||
/*================================================================
|
||||
** Copyright 2000, Clark Cooper
|
||||
** All rights reserved.
|
||||
**
|
||||
** This is free software. You are permitted to copy, distribute, or modify
|
||||
** it under the terms of the MIT/X license (contained in the COPYING file
|
||||
** with this distribution.)
|
||||
**
|
||||
*/
|
||||
|
||||
#ifndef MACCONFIG_H
|
||||
#define MACCONFIG_H
|
||||
|
||||
|
||||
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
|
||||
#define BYTEORDER 4321
|
||||
|
||||
/* Define to 1 if you have the `bcopy' function. */
|
||||
#undef HAVE_BCOPY
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS
|
||||
|
||||
/* whether byteorder is bigendian */
|
||||
#define WORDS_BIGENDIAN
|
||||
|
||||
/* Define to specify how much context to retain around the current parse
|
||||
point. */
|
||||
#undef XML_CONTEXT_BYTES
|
||||
|
||||
/* Define to make parameter entity parsing functionality available. */
|
||||
#define XML_DTD
|
||||
|
||||
/* Define to make XML Namespaces functionality available. */
|
||||
#define XML_NS
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
#define off_t long
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
|
||||
#endif /* ifndef MACCONFIG_H */
|
150
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/nametab.h
Normal file
150
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/nametab.h
Normal file
@ -0,0 +1,150 @@
|
||||
static const unsigned namingBitmap[] = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
|
||||
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
|
||||
0x00000000, 0x04000000, 0x87FFFFFE, 0x07FFFFFE,
|
||||
0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF,
|
||||
0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF,
|
||||
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFE00F, 0xFC31FFFF,
|
||||
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
|
||||
0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
|
||||
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
|
||||
0xFFFF0003, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
|
||||
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
|
||||
0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF,
|
||||
0x00000000, 0x07FFFFFE, 0x000007FE, 0xFFFE0000,
|
||||
0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060,
|
||||
0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003,
|
||||
0xFFF99FE0, 0x03C5FDFF, 0xB0000000, 0x00030003,
|
||||
0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000,
|
||||
0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001,
|
||||
0xFFF99FE0, 0x23CDFDFF, 0xB0000000, 0x00000003,
|
||||
0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000,
|
||||
0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003,
|
||||
0xFFFDDFE0, 0x03EFFDFF, 0x40000000, 0x00000003,
|
||||
0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0xFFFFFFFE, 0x000D7FFF, 0x0000003F, 0x00000000,
|
||||
0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000,
|
||||
0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF,
|
||||
0x0007DAED, 0x50000000, 0x82315001, 0x002C62AB,
|
||||
0x40000000, 0xF580C900, 0x00000007, 0x02010800,
|
||||
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
|
||||
0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF,
|
||||
0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
|
||||
0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF,
|
||||
0x00000000, 0x00004C40, 0x00000000, 0x00000000,
|
||||
0x00000007, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF,
|
||||
0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x07FFFFFF,
|
||||
0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
|
||||
0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
|
||||
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
|
||||
0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE,
|
||||
0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF,
|
||||
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
|
||||
0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000,
|
||||
0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003,
|
||||
0xFFFFD7C0, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
|
||||
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
|
||||
0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
|
||||
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
|
||||
0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF,
|
||||
0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF,
|
||||
0xFFFFFFFF, 0x7CFFFFFF, 0xFFEF7FFF, 0x03FF3DFF,
|
||||
0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF,
|
||||
0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF,
|
||||
0xFFF987E4, 0xD36DFDFF, 0x5E003987, 0x001FFFC0,
|
||||
0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1,
|
||||
0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3,
|
||||
0xD63DC7EC, 0xC3BFC718, 0x00803DC7, 0x0000FF80,
|
||||
0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3,
|
||||
0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3,
|
||||
0xFFFDDFEC, 0xC3FFFDFF, 0x00803DCF, 0x0000FFC3,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000,
|
||||
0xFEF02596, 0x3BFF6CAE, 0x03FF3F5F, 0x00000000,
|
||||
0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF,
|
||||
0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x1FFF0000, 0x00000002,
|
||||
0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF,
|
||||
0x661FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x77FFFFFF,
|
||||
};
|
||||
static const unsigned char nmstrtPages[] = {
|
||||
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00,
|
||||
0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
|
||||
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
|
||||
0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 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, 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, 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, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static const unsigned char namePages[] = {
|
||||
0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00,
|
||||
0x00, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
|
||||
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
|
||||
0x26, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 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, 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, 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, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
37
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/utf8tab.h
Normal file
37
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/utf8tab.h
Normal file
@ -0,0 +1,37 @@
|
||||
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
|
||||
/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
|
||||
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,
|
@ -0,0 +1,34 @@
|
||||
/*================================================================
|
||||
** Copyright 2000, Clark Cooper
|
||||
** All rights reserved.
|
||||
**
|
||||
** This is free software. You are permitted to copy, distribute, or modify
|
||||
** it under the terms of the MIT/X license (contained in the COPYING file
|
||||
** with this distribution.)
|
||||
*/
|
||||
|
||||
#ifndef WINCONFIG_H
|
||||
#define WINCONFIG_H
|
||||
|
||||
#ifdef _XBOX
|
||||
# include <xtl.h>
|
||||
#else
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
||||
#define XML_NS 1
|
||||
#define XML_DTD 1
|
||||
#define XML_CONTEXT_BYTES 1024
|
||||
|
||||
/* we will assume all Windows platforms are little endian */
|
||||
#define BYTEORDER 1234
|
||||
|
||||
/* Windows has memmove() available. */
|
||||
#define HAVE_MEMMOVE
|
||||
|
||||
#endif /* ndef WINCONFIG_H */
|
5814
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmlparse.c
Normal file
5814
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmlparse.c
Normal file
File diff suppressed because it is too large
Load Diff
1323
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmlrole.c
Normal file
1323
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmlrole.c
Normal file
File diff suppressed because it is too large
Load Diff
114
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmlrole.h
Normal file
114
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmlrole.h
Normal file
@ -0,0 +1,114 @@
|
||||
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
#ifndef XmlRole_INCLUDED
|
||||
#define XmlRole_INCLUDED 1
|
||||
|
||||
#ifdef __VMS
|
||||
/* 0 1 2 3 0 1 2 3
|
||||
1234567890123456789012345678901 1234567890123456789012345678901 */
|
||||
#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
|
||||
#endif
|
||||
|
||||
#include "xmltok.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
XML_ROLE_ERROR = -1,
|
||||
XML_ROLE_NONE = 0,
|
||||
XML_ROLE_XML_DECL,
|
||||
XML_ROLE_INSTANCE_START,
|
||||
XML_ROLE_DOCTYPE_NONE,
|
||||
XML_ROLE_DOCTYPE_NAME,
|
||||
XML_ROLE_DOCTYPE_SYSTEM_ID,
|
||||
XML_ROLE_DOCTYPE_PUBLIC_ID,
|
||||
XML_ROLE_DOCTYPE_INTERNAL_SUBSET,
|
||||
XML_ROLE_DOCTYPE_CLOSE,
|
||||
XML_ROLE_GENERAL_ENTITY_NAME,
|
||||
XML_ROLE_PARAM_ENTITY_NAME,
|
||||
XML_ROLE_ENTITY_NONE,
|
||||
XML_ROLE_ENTITY_VALUE,
|
||||
XML_ROLE_ENTITY_SYSTEM_ID,
|
||||
XML_ROLE_ENTITY_PUBLIC_ID,
|
||||
XML_ROLE_ENTITY_COMPLETE,
|
||||
XML_ROLE_ENTITY_NOTATION_NAME,
|
||||
XML_ROLE_NOTATION_NONE,
|
||||
XML_ROLE_NOTATION_NAME,
|
||||
XML_ROLE_NOTATION_SYSTEM_ID,
|
||||
XML_ROLE_NOTATION_NO_SYSTEM_ID,
|
||||
XML_ROLE_NOTATION_PUBLIC_ID,
|
||||
XML_ROLE_ATTRIBUTE_NAME,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_CDATA,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_ID,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_IDREF,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
|
||||
XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
|
||||
XML_ROLE_ATTRIBUTE_ENUM_VALUE,
|
||||
XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
|
||||
XML_ROLE_ATTLIST_NONE,
|
||||
XML_ROLE_ATTLIST_ELEMENT_NAME,
|
||||
XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
|
||||
XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
|
||||
XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
|
||||
XML_ROLE_FIXED_ATTRIBUTE_VALUE,
|
||||
XML_ROLE_ELEMENT_NONE,
|
||||
XML_ROLE_ELEMENT_NAME,
|
||||
XML_ROLE_CONTENT_ANY,
|
||||
XML_ROLE_CONTENT_EMPTY,
|
||||
XML_ROLE_CONTENT_PCDATA,
|
||||
XML_ROLE_GROUP_OPEN,
|
||||
XML_ROLE_GROUP_CLOSE,
|
||||
XML_ROLE_GROUP_CLOSE_REP,
|
||||
XML_ROLE_GROUP_CLOSE_OPT,
|
||||
XML_ROLE_GROUP_CLOSE_PLUS,
|
||||
XML_ROLE_GROUP_CHOICE,
|
||||
XML_ROLE_GROUP_SEQUENCE,
|
||||
XML_ROLE_CONTENT_ELEMENT,
|
||||
XML_ROLE_CONTENT_ELEMENT_REP,
|
||||
XML_ROLE_CONTENT_ELEMENT_OPT,
|
||||
XML_ROLE_CONTENT_ELEMENT_PLUS,
|
||||
XML_ROLE_PI,
|
||||
XML_ROLE_COMMENT,
|
||||
#ifdef XML_DTD
|
||||
XML_ROLE_TEXT_DECL,
|
||||
XML_ROLE_IGNORE_SECT,
|
||||
XML_ROLE_INNER_PARAM_ENTITY_REF,
|
||||
#endif /* XML_DTD */
|
||||
XML_ROLE_PARAM_ENTITY_REF
|
||||
};
|
||||
|
||||
typedef struct prolog_state {
|
||||
int (PTRCALL *handler) (struct prolog_state *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc);
|
||||
unsigned level;
|
||||
int role_none;
|
||||
#ifdef XML_DTD
|
||||
unsigned includeLevel;
|
||||
int documentEntity;
|
||||
int inEntityValue;
|
||||
#endif /* XML_DTD */
|
||||
} PROLOG_STATE;
|
||||
|
||||
void XmlPrologStateInit(PROLOG_STATE *);
|
||||
#ifdef XML_DTD
|
||||
void XmlPrologStateInitExternalEntity(PROLOG_STATE *);
|
||||
#endif /* XML_DTD */
|
||||
|
||||
#define XmlTokenRole(state, tok, ptr, end, enc) \
|
||||
(((state)->handler)(state, tok, ptr, end, enc))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* not XmlRole_INCLUDED */
|
1634
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok.c
Normal file
1634
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok.c
Normal file
File diff suppressed because it is too large
Load Diff
315
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok.h
Normal file
315
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok.h
Normal file
@ -0,0 +1,315 @@
|
||||
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
#ifndef XmlTok_INCLUDED
|
||||
#define XmlTok_INCLUDED 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The following token may be returned by XmlContentTok */
|
||||
#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be
|
||||
start of illegal ]]> sequence */
|
||||
/* The following tokens may be returned by both XmlPrologTok and
|
||||
XmlContentTok.
|
||||
*/
|
||||
#define XML_TOK_NONE -4 /* The string to be scanned is empty */
|
||||
#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan;
|
||||
might be part of CRLF sequence */
|
||||
#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
|
||||
#define XML_TOK_PARTIAL -1 /* only part of a token */
|
||||
#define XML_TOK_INVALID 0
|
||||
|
||||
/* The following tokens are returned by XmlContentTok; some are also
|
||||
returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok.
|
||||
*/
|
||||
#define XML_TOK_START_TAG_WITH_ATTS 1
|
||||
#define XML_TOK_START_TAG_NO_ATTS 2
|
||||
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
|
||||
#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
|
||||
#define XML_TOK_END_TAG 5
|
||||
#define XML_TOK_DATA_CHARS 6
|
||||
#define XML_TOK_DATA_NEWLINE 7
|
||||
#define XML_TOK_CDATA_SECT_OPEN 8
|
||||
#define XML_TOK_ENTITY_REF 9
|
||||
#define XML_TOK_CHAR_REF 10 /* numeric character reference */
|
||||
|
||||
/* The following tokens may be returned by both XmlPrologTok and
|
||||
XmlContentTok.
|
||||
*/
|
||||
#define XML_TOK_PI 11 /* processing instruction */
|
||||
#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
|
||||
#define XML_TOK_COMMENT 13
|
||||
#define XML_TOK_BOM 14 /* Byte order mark */
|
||||
|
||||
/* The following tokens are returned only by XmlPrologTok */
|
||||
#define XML_TOK_PROLOG_S 15
|
||||
#define XML_TOK_DECL_OPEN 16 /* <!foo */
|
||||
#define XML_TOK_DECL_CLOSE 17 /* > */
|
||||
#define XML_TOK_NAME 18
|
||||
#define XML_TOK_NMTOKEN 19
|
||||
#define XML_TOK_POUND_NAME 20 /* #name */
|
||||
#define XML_TOK_OR 21 /* | */
|
||||
#define XML_TOK_PERCENT 22
|
||||
#define XML_TOK_OPEN_PAREN 23
|
||||
#define XML_TOK_CLOSE_PAREN 24
|
||||
#define XML_TOK_OPEN_BRACKET 25
|
||||
#define XML_TOK_CLOSE_BRACKET 26
|
||||
#define XML_TOK_LITERAL 27
|
||||
#define XML_TOK_PARAM_ENTITY_REF 28
|
||||
#define XML_TOK_INSTANCE_START 29
|
||||
|
||||
/* The following occur only in element type declarations */
|
||||
#define XML_TOK_NAME_QUESTION 30 /* name? */
|
||||
#define XML_TOK_NAME_ASTERISK 31 /* name* */
|
||||
#define XML_TOK_NAME_PLUS 32 /* name+ */
|
||||
#define XML_TOK_COND_SECT_OPEN 33 /* <![ */
|
||||
#define XML_TOK_COND_SECT_CLOSE 34 /* ]]> */
|
||||
#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
|
||||
#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
|
||||
#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */
|
||||
#define XML_TOK_COMMA 38
|
||||
|
||||
/* The following token is returned only by XmlAttributeValueTok */
|
||||
#define XML_TOK_ATTRIBUTE_VALUE_S 39
|
||||
|
||||
/* The following token is returned only by XmlCdataSectionTok */
|
||||
#define XML_TOK_CDATA_SECT_CLOSE 40
|
||||
|
||||
/* With namespace processing this is returned by XmlPrologTok for a
|
||||
name with a colon.
|
||||
*/
|
||||
#define XML_TOK_PREFIXED_NAME 41
|
||||
|
||||
#ifdef XML_DTD
|
||||
#define XML_TOK_IGNORE_SECT 42
|
||||
#endif /* XML_DTD */
|
||||
|
||||
#ifdef XML_DTD
|
||||
#define XML_N_STATES 4
|
||||
#else /* not XML_DTD */
|
||||
#define XML_N_STATES 3
|
||||
#endif /* not XML_DTD */
|
||||
|
||||
#define XML_PROLOG_STATE 0
|
||||
#define XML_CONTENT_STATE 1
|
||||
#define XML_CDATA_SECTION_STATE 2
|
||||
#ifdef XML_DTD
|
||||
#define XML_IGNORE_SECTION_STATE 3
|
||||
#endif /* XML_DTD */
|
||||
|
||||
#define XML_N_LITERAL_TYPES 2
|
||||
#define XML_ATTRIBUTE_VALUE_LITERAL 0
|
||||
#define XML_ENTITY_VALUE_LITERAL 1
|
||||
|
||||
/* The size of the buffer passed to XmlUtf8Encode must be at least this. */
|
||||
#define XML_UTF8_ENCODE_MAX 4
|
||||
/* The size of the buffer passed to XmlUtf16Encode must be at least this. */
|
||||
#define XML_UTF16_ENCODE_MAX 2
|
||||
|
||||
typedef struct position {
|
||||
/* first line and first column are 0 not 1 */
|
||||
unsigned long lineNumber;
|
||||
unsigned long columnNumber;
|
||||
} POSITION;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const char *valuePtr;
|
||||
const char *valueEnd;
|
||||
char normalized;
|
||||
} ATTRIBUTE;
|
||||
|
||||
struct encoding;
|
||||
typedef struct encoding ENCODING;
|
||||
|
||||
typedef int (PTRCALL *SCANNER)(const ENCODING *,
|
||||
const char *,
|
||||
const char *,
|
||||
const char **);
|
||||
|
||||
struct encoding {
|
||||
SCANNER scanners[XML_N_STATES];
|
||||
SCANNER literalScanners[XML_N_LITERAL_TYPES];
|
||||
int (PTRCALL *sameName)(const ENCODING *,
|
||||
const char *,
|
||||
const char *);
|
||||
int (PTRCALL *nameMatchesAscii)(const ENCODING *,
|
||||
const char *,
|
||||
const char *,
|
||||
const char *);
|
||||
int (PTRFASTCALL *nameLength)(const ENCODING *, const char *);
|
||||
const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
|
||||
int (PTRCALL *getAtts)(const ENCODING *enc,
|
||||
const char *ptr,
|
||||
int attsMax,
|
||||
ATTRIBUTE *atts);
|
||||
int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
|
||||
int (PTRCALL *predefinedEntityName)(const ENCODING *,
|
||||
const char *,
|
||||
const char *);
|
||||
void (PTRCALL *updatePosition)(const ENCODING *,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
POSITION *);
|
||||
int (PTRCALL *isPublicId)(const ENCODING *enc,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const char **badPtr);
|
||||
void (PTRCALL *utf8Convert)(const ENCODING *enc,
|
||||
const char **fromP,
|
||||
const char *fromLim,
|
||||
char **toP,
|
||||
const char *toLim);
|
||||
void (PTRCALL *utf16Convert)(const ENCODING *enc,
|
||||
const char **fromP,
|
||||
const char *fromLim,
|
||||
unsigned short **toP,
|
||||
const unsigned short *toLim);
|
||||
int minBytesPerChar;
|
||||
char isUtf8;
|
||||
char isUtf16;
|
||||
};
|
||||
|
||||
/* Scan the string starting at ptr until the end of the next complete
|
||||
token, but do not scan past eptr. Return an integer giving the
|
||||
type of token.
|
||||
|
||||
Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
|
||||
|
||||
Return XML_TOK_PARTIAL when the string does not contain a complete
|
||||
token; nextTokPtr will not be set.
|
||||
|
||||
Return XML_TOK_INVALID when the string does not start a valid
|
||||
token; nextTokPtr will be set to point to the character which made
|
||||
the token invalid.
|
||||
|
||||
Otherwise the string starts with a valid token; nextTokPtr will be
|
||||
set to point to the character following the end of that token.
|
||||
|
||||
Each data character counts as a single token, but adjacent data
|
||||
characters may be returned together. Similarly for characters in
|
||||
the prolog outside literals, comments and processing instructions.
|
||||
*/
|
||||
|
||||
|
||||
#define XmlTok(enc, state, ptr, end, nextTokPtr) \
|
||||
(((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
|
||||
|
||||
#define XmlPrologTok(enc, ptr, end, nextTokPtr) \
|
||||
XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
|
||||
|
||||
#define XmlContentTok(enc, ptr, end, nextTokPtr) \
|
||||
XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
|
||||
|
||||
#define XmlCdataSectionTok(enc, ptr, end, nextTokPtr) \
|
||||
XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
|
||||
|
||||
#ifdef XML_DTD
|
||||
|
||||
#define XmlIgnoreSectionTok(enc, ptr, end, nextTokPtr) \
|
||||
XmlTok(enc, XML_IGNORE_SECTION_STATE, ptr, end, nextTokPtr)
|
||||
|
||||
#endif /* XML_DTD */
|
||||
|
||||
/* This is used for performing a 2nd-level tokenization on the content
|
||||
of a literal that has already been returned by XmlTok.
|
||||
*/
|
||||
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \
|
||||
(((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
|
||||
|
||||
#define XmlAttributeValueTok(enc, ptr, end, nextTokPtr) \
|
||||
XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
|
||||
|
||||
#define XmlEntityValueTok(enc, ptr, end, nextTokPtr) \
|
||||
XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
|
||||
|
||||
#define XmlSameName(enc, ptr1, ptr2) (((enc)->sameName)(enc, ptr1, ptr2))
|
||||
|
||||
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2) \
|
||||
(((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
|
||||
|
||||
#define XmlNameLength(enc, ptr) \
|
||||
(((enc)->nameLength)(enc, ptr))
|
||||
|
||||
#define XmlSkipS(enc, ptr) \
|
||||
(((enc)->skipS)(enc, ptr))
|
||||
|
||||
#define XmlGetAttributes(enc, ptr, attsMax, atts) \
|
||||
(((enc)->getAtts)(enc, ptr, attsMax, atts))
|
||||
|
||||
#define XmlCharRefNumber(enc, ptr) \
|
||||
(((enc)->charRefNumber)(enc, ptr))
|
||||
|
||||
#define XmlPredefinedEntityName(enc, ptr, end) \
|
||||
(((enc)->predefinedEntityName)(enc, ptr, end))
|
||||
|
||||
#define XmlUpdatePosition(enc, ptr, end, pos) \
|
||||
(((enc)->updatePosition)(enc, ptr, end, pos))
|
||||
|
||||
#define XmlIsPublicId(enc, ptr, end, badPtr) \
|
||||
(((enc)->isPublicId)(enc, ptr, end, badPtr))
|
||||
|
||||
#define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim) \
|
||||
(((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
|
||||
|
||||
#define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \
|
||||
(((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))
|
||||
|
||||
typedef struct {
|
||||
ENCODING initEnc;
|
||||
const ENCODING **encPtr;
|
||||
} INIT_ENCODING;
|
||||
|
||||
int XmlParseXmlDecl(int isGeneralTextEntity,
|
||||
const ENCODING *enc,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const char **badPtr,
|
||||
const char **versionPtr,
|
||||
const char **versionEndPtr,
|
||||
const char **encodingNamePtr,
|
||||
const ENCODING **namedEncodingPtr,
|
||||
int *standalonePtr);
|
||||
|
||||
int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
|
||||
const ENCODING *XmlGetUtf8InternalEncoding(void);
|
||||
const ENCODING *XmlGetUtf16InternalEncoding(void);
|
||||
int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
|
||||
int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
|
||||
int XmlSizeOfUnknownEncoding(void);
|
||||
|
||||
typedef int (*CONVERTER)(void *userData, const char *p);
|
||||
|
||||
ENCODING *
|
||||
XmlInitUnknownEncoding(void *mem,
|
||||
int *table,
|
||||
CONVERTER convert,
|
||||
void *userData);
|
||||
|
||||
int XmlParseXmlDeclNS(int isGeneralTextEntity,
|
||||
const ENCODING *enc,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const char **badPtr,
|
||||
const char **versionPtr,
|
||||
const char **versionEndPtr,
|
||||
const char **encodingNamePtr,
|
||||
const ENCODING **namedEncodingPtr,
|
||||
int *standalonePtr);
|
||||
|
||||
int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
|
||||
const ENCODING *XmlGetUtf8InternalEncodingNS(void);
|
||||
const ENCODING *XmlGetUtf16InternalEncodingNS(void);
|
||||
ENCODING *
|
||||
XmlInitUnknownEncodingNS(void *mem,
|
||||
int *table,
|
||||
CONVERTER convert,
|
||||
void *userData);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* not XmlTok_INCLUDED */
|
1779
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok_impl.c
Normal file
1779
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok_impl.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||
See the file COPYING for copying permission.
|
||||
*/
|
||||
|
||||
enum {
|
||||
BT_NONXML,
|
||||
BT_MALFORM,
|
||||
BT_LT,
|
||||
BT_AMP,
|
||||
BT_RSQB,
|
||||
BT_LEAD2,
|
||||
BT_LEAD3,
|
||||
BT_LEAD4,
|
||||
BT_TRAIL,
|
||||
BT_CR,
|
||||
BT_LF,
|
||||
BT_GT,
|
||||
BT_QUOT,
|
||||
BT_APOS,
|
||||
BT_EQUALS,
|
||||
BT_QUEST,
|
||||
BT_EXCL,
|
||||
BT_SOL,
|
||||
BT_SEMI,
|
||||
BT_NUM,
|
||||
BT_LSQB,
|
||||
BT_S,
|
||||
BT_NMSTRT,
|
||||
BT_COLON,
|
||||
BT_HEX,
|
||||
BT_DIGIT,
|
||||
BT_NAME,
|
||||
BT_MINUS,
|
||||
BT_OTHER, /* known not to be a name or name start character */
|
||||
BT_NONASCII, /* might be a name or name start character */
|
||||
BT_PERCNT,
|
||||
BT_LPAR,
|
||||
BT_RPAR,
|
||||
BT_AST,
|
||||
BT_PLUS,
|
||||
BT_COMMA,
|
||||
BT_VERBAR
|
||||
};
|
||||
|
||||
#include <stddef.h>
|
106
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok_ns.c
Normal file
106
Build/VS2010/StaticSDKs/XPlatform/expat/Source/lib/xmltok_ns.c
Normal file
@ -0,0 +1,106 @@
|
||||
const ENCODING *
|
||||
NS(XmlGetUtf8InternalEncoding)(void)
|
||||
{
|
||||
return &ns(internal_utf8_encoding).enc;
|
||||
}
|
||||
|
||||
const ENCODING *
|
||||
NS(XmlGetUtf16InternalEncoding)(void)
|
||||
{
|
||||
#if BYTEORDER == 1234
|
||||
return &ns(internal_little2_encoding).enc;
|
||||
#elif BYTEORDER == 4321
|
||||
return &ns(internal_big2_encoding).enc;
|
||||
#else
|
||||
const short n = 1;
|
||||
return (*(const char *)&n
|
||||
? &ns(internal_little2_encoding).enc
|
||||
: &ns(internal_big2_encoding).enc);
|
||||
#endif
|
||||
}
|
||||
|
||||
static const ENCODING *NS(encodings)[] = {
|
||||
&ns(latin1_encoding).enc,
|
||||
&ns(ascii_encoding).enc,
|
||||
&ns(utf8_encoding).enc,
|
||||
&ns(big2_encoding).enc,
|
||||
&ns(big2_encoding).enc,
|
||||
&ns(little2_encoding).enc,
|
||||
&ns(utf8_encoding).enc /* NO_ENC */
|
||||
};
|
||||
|
||||
static int PTRCALL
|
||||
NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
|
||||
XML_PROLOG_STATE, ptr, end, nextTokPtr);
|
||||
}
|
||||
|
||||
static int PTRCALL
|
||||
NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
|
||||
XML_CONTENT_STATE, ptr, end, nextTokPtr);
|
||||
}
|
||||
|
||||
int
|
||||
NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr,
|
||||
const char *name)
|
||||
{
|
||||
int i = getEncodingIndex(name);
|
||||
if (i == UNKNOWN_ENC)
|
||||
return 0;
|
||||
SET_INIT_ENC_INDEX(p, i);
|
||||
p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
|
||||
p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
|
||||
p->initEnc.updatePosition = initUpdatePosition;
|
||||
p->encPtr = encPtr;
|
||||
*encPtr = &(p->initEnc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const ENCODING *
|
||||
NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end)
|
||||
{
|
||||
#define ENCODING_MAX 128
|
||||
char buf[ENCODING_MAX];
|
||||
char *p = buf;
|
||||
int i;
|
||||
XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
|
||||
if (ptr != end)
|
||||
return 0;
|
||||
*p = 0;
|
||||
if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2)
|
||||
return enc;
|
||||
i = getEncodingIndex(buf);
|
||||
if (i == UNKNOWN_ENC)
|
||||
return 0;
|
||||
return NS(encodings)[i];
|
||||
}
|
||||
|
||||
int
|
||||
NS(XmlParseXmlDecl)(int isGeneralTextEntity,
|
||||
const ENCODING *enc,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const char **badPtr,
|
||||
const char **versionPtr,
|
||||
const char **versionEndPtr,
|
||||
const char **encodingName,
|
||||
const ENCODING **encoding,
|
||||
int *standalone)
|
||||
{
|
||||
return doParseXmlDecl(NS(findEncoding),
|
||||
isGeneralTextEntity,
|
||||
enc,
|
||||
ptr,
|
||||
end,
|
||||
badPtr,
|
||||
versionPtr,
|
||||
versionEndPtr,
|
||||
encodingName,
|
||||
encoding,
|
||||
standalone);
|
||||
}
|
Binary file not shown.
Binary file not shown.
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/StaticLibs/Xbox/vc70.pdb
Normal file
BIN
Build/VS2010/StaticSDKs/XPlatform/expat/StaticLibs/Xbox/vc70.pdb
Normal file
Binary file not shown.
134
Build/VS2010/StaticSDKs/XPlatform/jpeg/Makefile.am
Normal file
134
Build/VS2010/StaticSDKs/XPlatform/jpeg/Makefile.am
Normal file
@ -0,0 +1,134 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
#
|
||||
# Automake Makefile for the JPEG library
|
||||
#
|
||||
# This file is written by Bob Friesenhahn, Guido Vollbeding
|
||||
#
|
||||
|
||||
# Sources to build library
|
||||
LIBSOURCES = jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
|
||||
jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
|
||||
jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
|
||||
jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
|
||||
jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
|
||||
jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
|
||||
jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
|
||||
jquant2.c jutils.c jmemmgr.c @MEMORYMGR@.c
|
||||
|
||||
# System dependent sources
|
||||
SYSDEPSOURCES = jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
|
||||
|
||||
# Headers which are installed to support the library
|
||||
INSTINCLUDES = jerror.h jmorecfg.h jpeglib.h
|
||||
|
||||
# Headers which are not installed
|
||||
OTHERINCLUDES = cderror.h cdjpeg.h jdct.h jinclude.h jmemsys.h jpegint.h \
|
||||
jversion.h transupp.h
|
||||
|
||||
# Manual pages (Automake uses 'MANS' for itself)
|
||||
DISTMANS= cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
|
||||
|
||||
# Other documentation files
|
||||
DOCS= README install.txt usage.txt wizard.txt example.c libjpeg.txt \
|
||||
structure.txt coderules.txt filelist.txt change.log
|
||||
|
||||
# Makefiles for various systems
|
||||
MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
|
||||
makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
|
||||
makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
|
||||
makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
|
||||
maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
|
||||
makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.v10 \
|
||||
makeasln.v10 makejvcx.v10 makejfil.v10 makecvcx.v10 makecfil.v10 \
|
||||
makedvcx.v10 makedfil.v10 maketvcx.v10 maketfil.v10 makervcx.v10 \
|
||||
makerfil.v10 makewvcx.v10 makewfil.v10 makeproj.mac makcjpeg.st \
|
||||
makdjpeg.st makljpeg.st maktjpeg.st makefile.manx makefile.sas \
|
||||
makefile.mms makefile.vms makvms.opt
|
||||
|
||||
# Configuration files
|
||||
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
|
||||
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
|
||||
jconfig.vms
|
||||
|
||||
# Support scripts for configure
|
||||
CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
|
||||
|
||||
# Miscellaneous support files
|
||||
OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
|
||||
libjpeg.map
|
||||
|
||||
# Test support files
|
||||
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
|
||||
testimgp.jpg
|
||||
|
||||
# libtool libraries to build
|
||||
lib_LTLIBRARIES = libjpeg.la
|
||||
|
||||
# Library sources for libjpeg.la
|
||||
libjpeg_la_SOURCES = $(LIBSOURCES)
|
||||
|
||||
# LDFLAGS for libjpeg.la
|
||||
libjpeg_la_LDFLAGS = -no-undefined \
|
||||
-version-info $(JPEG_LIB_VERSION)
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
libjpeg_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libjpeg.map
|
||||
endif
|
||||
|
||||
# Executables to build
|
||||
bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom
|
||||
|
||||
# Executable sources & libs
|
||||
cjpeg_SOURCES = cjpeg.c rdppm.c rdgif.c rdtarga.c rdrle.c rdbmp.c \
|
||||
rdswitch.c cdjpeg.c
|
||||
cjpeg_LDADD = libjpeg.la
|
||||
djpeg_SOURCES = djpeg.c wrppm.c wrgif.c wrtarga.c wrrle.c wrbmp.c \
|
||||
rdcolmap.c cdjpeg.c
|
||||
djpeg_LDADD = libjpeg.la
|
||||
jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c
|
||||
jpegtran_LDADD = libjpeg.la
|
||||
rdjpgcom_SOURCES = rdjpgcom.c
|
||||
wrjpgcom_SOURCES = wrjpgcom.c
|
||||
|
||||
# Manual pages to install
|
||||
man_MANS = $(DISTMANS)
|
||||
|
||||
# Headers to install
|
||||
include_HEADERS = $(INSTINCLUDES)
|
||||
|
||||
# Other distributed headers
|
||||
noinst_HEADERS = $(OTHERINCLUDES)
|
||||
|
||||
# Other distributed files
|
||||
EXTRA_DIST = $(DOCS) $(DISTMANS) $(MKFILES) $(CONFIGFILES) $(SYSDEPSOURCES) \
|
||||
$(OTHERFILES) $(TESTFILES)
|
||||
|
||||
# Files to be cleaned
|
||||
CLEANFILES = testout.ppm testout.bmp testout.jpg testoutp.ppm testoutp.jpg \
|
||||
testoutt.jpg
|
||||
|
||||
# Install jconfig.h
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||
$(INSTALL_HEADER) jconfig.h $(DESTDIR)$(includedir)/jconfig.h
|
||||
|
||||
# Uninstall jconfig.h
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(includedir)/jconfig.h
|
||||
|
||||
# Run tests
|
||||
test: check-local
|
||||
check-local:
|
||||
rm -f testout*
|
||||
./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg
|
||||
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
|
||||
./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm
|
||||
./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg
|
||||
./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm
|
||||
./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg
|
||||
cmp $(srcdir)/testimg.ppm testout.ppm
|
||||
cmp $(srcdir)/testimg.bmp testout.bmp
|
||||
cmp $(srcdir)/testimg.jpg testout.jpg
|
||||
cmp $(srcdir)/testimg.ppm testoutp.ppm
|
||||
cmp $(srcdir)/testimgp.jpg testoutp.jpg
|
||||
cmp $(srcdir)/testorig.jpg testoutt.jpg
|
1092
Build/VS2010/StaticSDKs/XPlatform/jpeg/Makefile.in
Normal file
1092
Build/VS2010/StaticSDKs/XPlatform/jpeg/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
326
Build/VS2010/StaticSDKs/XPlatform/jpeg/README
Normal file
326
Build/VS2010/StaticSDKs/XPlatform/jpeg/README
Normal file
@ -0,0 +1,326 @@
|
||||
The Independent JPEG Group's JPEG software
|
||||
==========================================
|
||||
|
||||
README for release 8c of 16-Jan-2011
|
||||
====================================
|
||||
|
||||
This distribution contains the eighth public release of the Independent JPEG
|
||||
Group's free JPEG software. You are welcome to redistribute this software and
|
||||
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
|
||||
|
||||
This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone,
|
||||
Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson,
|
||||
Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers,
|
||||
and other members of the Independent JPEG Group.
|
||||
|
||||
IJG is not affiliated with the official ISO JPEG standards committee.
|
||||
|
||||
|
||||
DOCUMENTATION ROADMAP
|
||||
=====================
|
||||
|
||||
This file contains the following sections:
|
||||
|
||||
OVERVIEW General description of JPEG and the IJG software.
|
||||
LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
|
||||
REFERENCES Where to learn more about JPEG.
|
||||
ARCHIVE LOCATIONS Where to find newer versions of this software.
|
||||
ACKNOWLEDGMENTS Special thanks.
|
||||
FILE FORMAT WARS Software *not* to get.
|
||||
TO DO Plans for future IJG releases.
|
||||
|
||||
Other documentation files in the distribution are:
|
||||
|
||||
User documentation:
|
||||
install.txt How to configure and install the IJG software.
|
||||
usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
|
||||
rdjpgcom, and wrjpgcom.
|
||||
*.1 Unix-style man pages for programs (same info as usage.txt).
|
||||
wizard.txt Advanced usage instructions for JPEG wizards only.
|
||||
change.log Version-to-version change highlights.
|
||||
Programmer and internal documentation:
|
||||
libjpeg.txt How to use the JPEG library in your own programs.
|
||||
example.c Sample code for calling the JPEG library.
|
||||
structure.txt Overview of the JPEG library's internal structure.
|
||||
filelist.txt Road map of IJG files.
|
||||
coderules.txt Coding style rules --- please read if you contribute code.
|
||||
|
||||
Please read at least the files install.txt and usage.txt. Some information
|
||||
can also be found in the JPEG FAQ (Frequently Asked Questions) article. See
|
||||
ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
|
||||
|
||||
If you want to understand how the JPEG code works, we suggest reading one or
|
||||
more of the REFERENCES, then looking at the documentation files (in roughly
|
||||
the order listed) before diving into the code.
|
||||
|
||||
|
||||
OVERVIEW
|
||||
========
|
||||
|
||||
This package contains C software to implement JPEG image encoding, decoding,
|
||||
and transcoding. JPEG (pronounced "jay-peg") is a standardized compression
|
||||
method for full-color and gray-scale images.
|
||||
|
||||
This software implements JPEG baseline, extended-sequential, and progressive
|
||||
compression processes. Provision is made for supporting all variants of these
|
||||
processes, although some uncommon parameter settings aren't implemented yet.
|
||||
We have made no provision for supporting the hierarchical or lossless
|
||||
processes defined in the standard.
|
||||
|
||||
We provide a set of library routines for reading and writing JPEG image files,
|
||||
plus two sample applications "cjpeg" and "djpeg", which use the library to
|
||||
perform conversion between JPEG and some other popular image file formats.
|
||||
The library is intended to be reused in other applications.
|
||||
|
||||
In order to support file conversion and viewing software, we have included
|
||||
considerable functionality beyond the bare JPEG coding/decoding capability;
|
||||
for example, the color quantization modules are not strictly part of JPEG
|
||||
decoding, but they are essential for output to colormapped file formats or
|
||||
colormapped displays. These extra functions can be compiled out of the
|
||||
library if not required for a particular application.
|
||||
|
||||
We have also included "jpegtran", a utility for lossless transcoding between
|
||||
different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple
|
||||
applications for inserting and extracting textual comments in JFIF files.
|
||||
|
||||
The emphasis in designing this software has been on achieving portability and
|
||||
flexibility, while also making it fast enough to be useful. In particular,
|
||||
the software is not intended to be read as a tutorial on JPEG. (See the
|
||||
REFERENCES section for introductory material.) Rather, it is intended to
|
||||
be reliable, portable, industrial-strength code. We do not claim to have
|
||||
achieved that goal in every aspect of the software, but we strive for it.
|
||||
|
||||
We welcome the use of this software as a component of commercial products.
|
||||
No royalty is required, but we do ask for an acknowledgement in product
|
||||
documentation, as described under LEGAL ISSUES.
|
||||
|
||||
|
||||
LEGAL ISSUES
|
||||
============
|
||||
|
||||
In plain English:
|
||||
|
||||
1. We don't promise that this software works. (But if you find any bugs,
|
||||
please let us know!)
|
||||
2. You can use this software for whatever you want. You don't have to pay us.
|
||||
3. You may not pretend that you wrote this software. If you use it in a
|
||||
program, you must acknowledge somewhere in your documentation that
|
||||
you've used the IJG code.
|
||||
|
||||
In legalese:
|
||||
|
||||
The authors make NO WARRANTY or representation, either express or implied,
|
||||
with respect to this software, its quality, accuracy, merchantability, or
|
||||
fitness for a particular purpose. This software is provided "AS IS", and you,
|
||||
its user, assume the entire risk as to its quality and accuracy.
|
||||
|
||||
This software is copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
|
||||
All Rights Reserved except as specified below.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
software (or portions thereof) for any purpose, without fee, subject to these
|
||||
conditions:
|
||||
(1) If any part of the source code for this software is distributed, then this
|
||||
README file must be included, with this copyright and no-warranty notice
|
||||
unaltered; and any additions, deletions, or changes to the original files
|
||||
must be clearly indicated in accompanying documentation.
|
||||
(2) If only executable code is distributed, then the accompanying
|
||||
documentation must state that "this software is based in part on the work of
|
||||
the Independent JPEG Group".
|
||||
(3) Permission for use of this software is granted only if the user accepts
|
||||
full responsibility for any undesirable consequences; the authors accept
|
||||
NO LIABILITY for damages of any kind.
|
||||
|
||||
These conditions apply to any software derived from or based on the IJG code,
|
||||
not just to the unmodified library. If you use our work, you ought to
|
||||
acknowledge us.
|
||||
|
||||
Permission is NOT granted for the use of any IJG author's name or company name
|
||||
in advertising or publicity relating to this software or products derived from
|
||||
it. This software may be referred to only as "the Independent JPEG Group's
|
||||
software".
|
||||
|
||||
We specifically permit and encourage the use of this software as the basis of
|
||||
commercial products, provided that all warranty or liability claims are
|
||||
assumed by the product vendor.
|
||||
|
||||
|
||||
ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
|
||||
sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
|
||||
ansi2knr.c is NOT covered by the above copyright and conditions, but instead
|
||||
by the usual distribution terms of the Free Software Foundation; principally,
|
||||
that you must include source code if you redistribute it. (See the file
|
||||
ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
|
||||
of any program generated from the IJG code, this does not limit you more than
|
||||
the foregoing paragraphs do.
|
||||
|
||||
The Unix configuration script "configure" was produced with GNU Autoconf.
|
||||
It is copyright by the Free Software Foundation but is freely distributable.
|
||||
The same holds for its supporting scripts (config.guess, config.sub,
|
||||
ltmain.sh). Another support script, install-sh, is copyright by X Consortium
|
||||
but is also freely distributable.
|
||||
|
||||
The IJG distribution formerly included code to read and write GIF files.
|
||||
To avoid entanglement with the Unisys LZW patent, GIF reading support has
|
||||
been removed altogether, and the GIF writer has been simplified to produce
|
||||
"uncompressed GIFs". This technique does not use the LZW algorithm; the
|
||||
resulting GIF files are larger than usual, but are readable by all standard
|
||||
GIF decoders.
|
||||
|
||||
We are required to state that
|
||||
"The Graphics Interchange Format(c) is the Copyright property of
|
||||
CompuServe Incorporated. GIF(sm) is a Service Mark property of
|
||||
CompuServe Incorporated."
|
||||
|
||||
|
||||
REFERENCES
|
||||
==========
|
||||
|
||||
We recommend reading one or more of these references before trying to
|
||||
understand the innards of the JPEG software.
|
||||
|
||||
The best short technical introduction to the JPEG compression algorithm is
|
||||
Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
|
||||
Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
|
||||
(Adjacent articles in that issue discuss MPEG motion picture compression,
|
||||
applications of JPEG, and related topics.) If you don't have the CACM issue
|
||||
handy, a PostScript file containing a revised version of Wallace's article is
|
||||
available at http://www.ijg.org/files/wallace.ps.gz. The file (actually
|
||||
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
|
||||
omits the sample images that appeared in CACM, but it includes corrections
|
||||
and some added material. Note: the Wallace article is copyright ACM and IEEE,
|
||||
and it may not be used for commercial purposes.
|
||||
|
||||
A somewhat less technical, more leisurely introduction to JPEG can be found in
|
||||
"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
|
||||
M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
|
||||
good explanations and example C code for a multitude of compression methods
|
||||
including JPEG. It is an excellent source if you are comfortable reading C
|
||||
code but don't know much about data compression in general. The book's JPEG
|
||||
sample code is far from industrial-strength, but when you are ready to look
|
||||
at a full implementation, you've got one here...
|
||||
|
||||
The best currently available description of JPEG is the textbook "JPEG Still
|
||||
Image Data Compression Standard" by William B. Pennebaker and Joan L.
|
||||
Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.
|
||||
Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG
|
||||
standards (DIS 10918-1 and draft DIS 10918-2).
|
||||
Although this is by far the most detailed and comprehensive exposition of
|
||||
JPEG publicly available, we point out that it is still missing an explanation
|
||||
of the most essential properties and algorithms of the underlying DCT
|
||||
technology.
|
||||
If you think that you know about DCT-based JPEG after reading this book,
|
||||
then you are in delusion. The real fundamentals and corresponding potential
|
||||
of DCT-based JPEG are not publicly known so far, and that is the reason for
|
||||
all the mistaken developments taking place in the image coding domain.
|
||||
|
||||
The original JPEG standard is divided into two parts, Part 1 being the actual
|
||||
specification, while Part 2 covers compliance testing methods. Part 1 is
|
||||
titled "Digital Compression and Coding of Continuous-tone Still Images,
|
||||
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
|
||||
10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
|
||||
Continuous-tone Still Images, Part 2: Compliance testing" and has document
|
||||
numbers ISO/IEC IS 10918-2, ITU-T T.83.
|
||||
IJG JPEG 8 introduces an implementation of the JPEG SmartScale extension
|
||||
which is specified in a contributed document at ITU and ISO with title "ITU-T
|
||||
JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced Image Coding", April
|
||||
2006, Geneva, Switzerland. The latest version of the document is Revision 3.
|
||||
|
||||
The JPEG standard does not specify all details of an interchangeable file
|
||||
format. For the omitted details we follow the "JFIF" conventions, revision
|
||||
1.02. JFIF 1.02 has been adopted as an Ecma International Technical Report
|
||||
and thus received a formal publication status. It is available as a free
|
||||
download in PDF format from
|
||||
http://www.ecma-international.org/publications/techreports/E-TR-098.htm.
|
||||
A PostScript version of the JFIF document is available at
|
||||
http://www.ijg.org/files/jfif.ps.gz. There is also a plain text version at
|
||||
http://www.ijg.org/files/jfif.txt.gz, but it is missing the figures.
|
||||
|
||||
The TIFF 6.0 file format specification can be obtained by FTP from
|
||||
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
|
||||
found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
|
||||
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
|
||||
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
|
||||
(Compression tag 7). Copies of this Note can be obtained from
|
||||
http://www.ijg.org/files/. It is expected that the next revision
|
||||
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
|
||||
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
|
||||
uses our library to implement TIFF/JPEG per the Note.
|
||||
|
||||
|
||||
ARCHIVE LOCATIONS
|
||||
=================
|
||||
|
||||
The "official" archive site for this software is www.ijg.org.
|
||||
The most recent released version can always be found there in
|
||||
directory "files". This particular version will be archived as
|
||||
http://www.ijg.org/files/jpegsrc.v8c.tar.gz, and in Windows-compatible
|
||||
"zip" archive format as http://www.ijg.org/files/jpegsr8c.zip.
|
||||
|
||||
The JPEG FAQ (Frequently Asked Questions) article is a source of some
|
||||
general information about JPEG.
|
||||
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
|
||||
and other news.answers archive sites, including the official news.answers
|
||||
archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
|
||||
If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
|
||||
with body
|
||||
send usenet/news.answers/jpeg-faq/part1
|
||||
send usenet/news.answers/jpeg-faq/part2
|
||||
|
||||
|
||||
ACKNOWLEDGMENTS
|
||||
===============
|
||||
|
||||
Thank to Juergen Bruder for providing me with a copy of the common DCT
|
||||
algorithm article, only to find out that I had come to the same result
|
||||
in a more direct and comprehensible way with a more generative approach.
|
||||
|
||||
Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the
|
||||
ITU JPEG (Study Group 16) meeting in Geneva, Switzerland.
|
||||
|
||||
Thank to Thomas Wiegand and Gary Sullivan for inviting me to the
|
||||
Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland.
|
||||
|
||||
Thank to John Korejwa and Massimo Ballerini for inviting me to
|
||||
fruitful consultations in Boston, MA and Milan, Italy.
|
||||
|
||||
Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther
|
||||
Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel
|
||||
for corresponding business development.
|
||||
|
||||
Thank to Nico Zschach and Dirk Stelling of the technical support team
|
||||
at the Digital Images company in Halle for providing me with extra
|
||||
equipment for configuration tests.
|
||||
|
||||
Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful
|
||||
communication about JPEG configuration in Sigma Photo Pro software.
|
||||
|
||||
Thank to Andrew Finkenstadt for hosting the ijg.org site.
|
||||
|
||||
Last but not least special thank to Thomas G. Lane for the original
|
||||
design and development of this singular software package.
|
||||
|
||||
|
||||
FILE FORMAT WARS
|
||||
================
|
||||
|
||||
The ISO JPEG standards committee actually promotes different formats like
|
||||
"JPEG 2000" or "JPEG XR" which are incompatible with original DCT-based
|
||||
JPEG and which are based on faulty technologies. IJG therefore does not
|
||||
and will not support such momentary mistakes (see REFERENCES).
|
||||
We have little or no sympathy for the promotion of these formats. Indeed,
|
||||
one of the original reasons for developing this free software was to help
|
||||
force convergence on common, interoperable format standards for JPEG files.
|
||||
Don't use an incompatible file format!
|
||||
(In any case, our decoder will remain capable of reading existing JPEG
|
||||
image files indefinitely.)
|
||||
|
||||
|
||||
TO DO
|
||||
=====
|
||||
|
||||
Version 8 is the first release of a new generation JPEG standard
|
||||
to overcome the limitations of the original JPEG specification.
|
||||
More features are being prepared for coming releases...
|
||||
|
||||
Please send bug reports, offers of help, etc. to jpeg-info@uc.ag.
|
5
Build/VS2010/StaticSDKs/XPlatform/jpeg/README.CWE
Normal file
5
Build/VS2010/StaticSDKs/XPlatform/jpeg/README.CWE
Normal file
@ -0,0 +1,5 @@
|
||||
This is a slightly modified version of the jpeg library. A new color space
|
||||
is added, "JCS_RGBA", for reading from/writing to jpeg files using the format
|
||||
expected by the CyanWorlds.com Engine. This code does not pretend to provide
|
||||
more RGBA support than needed for the CyanWorlds.com Engine.
|
||||
|
9471
Build/VS2010/StaticSDKs/XPlatform/jpeg/aclocal.m4
vendored
Normal file
9471
Build/VS2010/StaticSDKs/XPlatform/jpeg/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
36
Build/VS2010/StaticSDKs/XPlatform/jpeg/ansi2knr.1
Normal file
36
Build/VS2010/StaticSDKs/XPlatform/jpeg/ansi2knr.1
Normal file
@ -0,0 +1,36 @@
|
||||
.TH ANSI2KNR 1 "19 Jan 1996"
|
||||
.SH NAME
|
||||
ansi2knr \- convert ANSI C to Kernighan & Ritchie C
|
||||
.SH SYNOPSIS
|
||||
.I ansi2knr
|
||||
[--varargs] input_file [output_file]
|
||||
.SH DESCRIPTION
|
||||
If no output_file is supplied, output goes to stdout.
|
||||
.br
|
||||
There are no error messages.
|
||||
.sp
|
||||
.I ansi2knr
|
||||
recognizes function definitions by seeing a non-keyword identifier at the left
|
||||
margin, followed by a left parenthesis, with a right parenthesis as the last
|
||||
character on the line, and with a left brace as the first token on the
|
||||
following line (ignoring possible intervening comments). It will recognize a
|
||||
multi-line header provided that no intervening line ends with a left or right
|
||||
brace or a semicolon. These algorithms ignore whitespace and comments, except
|
||||
that the function name must be the first thing on the line.
|
||||
.sp
|
||||
The following constructs will confuse it:
|
||||
.br
|
||||
- Any other construct that starts at the left margin and follows the
|
||||
above syntax (such as a macro or function call).
|
||||
.br
|
||||
- Some macros that tinker with the syntax of the function header.
|
||||
.sp
|
||||
The --varargs switch is obsolete, and is recognized only for
|
||||
backwards compatibility. The present version of
|
||||
.I ansi2knr
|
||||
will always attempt to convert a ... argument to va_alist and va_dcl.
|
||||
.SH AUTHOR
|
||||
L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
|
||||
continues to maintain the current version; most of the code in the current
|
||||
version is his work. ansi2knr also includes contributions by Francois
|
||||
Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
|
739
Build/VS2010/StaticSDKs/XPlatform/jpeg/ansi2knr.c
Normal file
739
Build/VS2010/StaticSDKs/XPlatform/jpeg/ansi2knr.c
Normal file
@ -0,0 +1,739 @@
|
||||
/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
|
||||
|
||||
/*$Id: ansi2knr.c,v 1.14 2003/09/06 05:36:56 eggert Exp $*/
|
||||
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
|
||||
|
||||
/*
|
||||
ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY. No author or distributor accepts responsibility to anyone for the
|
||||
consequences of using it or for whether it serves any particular purpose or
|
||||
works at all, unless he says so in writing. Refer to the GNU General Public
|
||||
License (the "GPL") for full details.
|
||||
|
||||
Everyone is granted permission to copy, modify and redistribute ansi2knr,
|
||||
but only under the conditions described in the GPL. A copy of this license
|
||||
is supposed to have been given to you along with ansi2knr so you can know
|
||||
your rights and responsibilities. It should be in a file named COPYLEFT,
|
||||
or, if there is no file named COPYLEFT, a file named COPYING. Among other
|
||||
things, the copyright notice and this notice must be preserved on all
|
||||
copies.
|
||||
|
||||
We explicitly state here what we believe is already implied by the GPL: if
|
||||
the ansi2knr program is distributed as a separate set of sources and a
|
||||
separate executable file which are aggregated on a storage medium together
|
||||
with another program, this in itself does not bring the other program under
|
||||
the GPL, nor does the mere fact that such a program or the procedures for
|
||||
constructing it invoke the ansi2knr executable bring any other part of the
|
||||
program under the GPL.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
|
||||
* --filename provides the file name for the #line directive in the output,
|
||||
* overriding input_file (if present).
|
||||
* If no input_file is supplied, input is read from stdin.
|
||||
* If no output_file is supplied, output goes to stdout.
|
||||
* There are no error messages.
|
||||
*
|
||||
* ansi2knr recognizes function definitions by seeing a non-keyword
|
||||
* identifier at the left margin, followed by a left parenthesis, with a
|
||||
* right parenthesis as the last character on the line, and with a left
|
||||
* brace as the first token on the following line (ignoring possible
|
||||
* intervening comments and/or preprocessor directives), except that a line
|
||||
* consisting of only
|
||||
* identifier1(identifier2)
|
||||
* will not be considered a function definition unless identifier2 is
|
||||
* the word "void", and a line consisting of
|
||||
* identifier1(identifier2, <<arbitrary>>)
|
||||
* will not be considered a function definition.
|
||||
* ansi2knr will recognize a multi-line header provided that no intervening
|
||||
* line ends with a left or right brace or a semicolon. These algorithms
|
||||
* ignore whitespace, comments, and preprocessor directives, except that
|
||||
* the function name must be the first thing on the line. The following
|
||||
* constructs will confuse it:
|
||||
* - Any other construct that starts at the left margin and
|
||||
* follows the above syntax (such as a macro or function call).
|
||||
* - Some macros that tinker with the syntax of function headers.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The original and principal author of ansi2knr is L. Peter Deutsch
|
||||
* <ghost@aladdin.com>. Other authors are noted in the change history
|
||||
* that follows (in reverse chronological order):
|
||||
|
||||
lpd 2000-04-12 backs out Eggert's changes because of bugs:
|
||||
- concatlits didn't declare the type of its bufend argument;
|
||||
- concatlits didn't recognize when it was inside a comment;
|
||||
- scanstring could scan backward past the beginning of the string; when
|
||||
- the check for \ + newline in scanstring was unnecessary.
|
||||
|
||||
2000-03-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Add support for concatenated string literals.
|
||||
* ansi2knr.c (concatlits): New decl.
|
||||
(main): Invoke concatlits to concatenate string literals.
|
||||
(scanstring): Handle backslash-newline correctly. Work with
|
||||
character constants. Fix bug when scanning backwards through
|
||||
backslash-quote. Check for unterminated strings.
|
||||
(convert1): Parse character constants, too.
|
||||
(appendline, concatlits): New functions.
|
||||
* ansi2knr.1: Document this.
|
||||
|
||||
lpd 1999-08-17 added code to allow preprocessor directives
|
||||
wherever comments are allowed
|
||||
lpd 1999-04-12 added minor fixes from Pavel Roskin
|
||||
<pavel_roskin@geocities.com> for clean compilation with
|
||||
gcc -W -Wall
|
||||
lpd 1999-03-22 added hack to recognize lines consisting of
|
||||
identifier1(identifier2, xxx) as *not* being procedures
|
||||
lpd 1999-02-03 made indentation of preprocessor commands consistent
|
||||
lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
|
||||
endless loop; quoted strings within an argument list
|
||||
confused the parser
|
||||
lpd 1999-01-24 added a check for write errors on the output,
|
||||
suggested by Jim Meyering <meyering@ascend.com>
|
||||
lpd 1998-11-09 added further hack to recognize identifier(void)
|
||||
as being a procedure
|
||||
lpd 1998-10-23 added hack to recognize lines consisting of
|
||||
identifier1(identifier2) as *not* being procedures
|
||||
lpd 1997-12-08 made input_file optional; only closes input and/or
|
||||
output file if not stdin or stdout respectively; prints
|
||||
usage message on stderr rather than stdout; adds
|
||||
--filename switch (changes suggested by
|
||||
<ceder@lysator.liu.se>)
|
||||
lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
|
||||
compilers that don't understand void, as suggested by
|
||||
Tom Lane
|
||||
lpd 1996-01-15 changed to require that the first non-comment token
|
||||
on the line following a function header be a left brace,
|
||||
to reduce sensitivity to macros, as suggested by Tom Lane
|
||||
<tgl@sss.pgh.pa.us>
|
||||
lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
|
||||
undefined preprocessor symbols as 0; changed all #ifdefs
|
||||
for configuration symbols to #ifs
|
||||
lpd 1995-04-05 changed copyright notice to make it clear that
|
||||
including ansi2knr in a program does not bring the entire
|
||||
program under the GPL
|
||||
lpd 1994-12-18 added conditionals for systems where ctype macros
|
||||
don't handle 8-bit characters properly, suggested by
|
||||
Francois Pinard <pinard@iro.umontreal.ca>;
|
||||
removed --varargs switch (this is now the default)
|
||||
lpd 1994-10-10 removed CONFIG_BROKETS conditional
|
||||
lpd 1994-07-16 added some conditionals to help GNU `configure',
|
||||
suggested by Francois Pinard <pinard@iro.umontreal.ca>;
|
||||
properly erase prototype args in function parameters,
|
||||
contributed by Jim Avera <jima@netcom.com>;
|
||||
correct error in writeblanks (it shouldn't erase EOLs)
|
||||
lpd 1989-xx-xx original version
|
||||
*/
|
||||
|
||||
/* Most of the conditionals here are to make ansi2knr work with */
|
||||
/* or without the GNU configure machinery. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
|
||||
/*
|
||||
For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
|
||||
This will define HAVE_CONFIG_H and so, activate the following lines.
|
||||
*/
|
||||
|
||||
# if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# else
|
||||
# include <strings.h>
|
||||
# endif
|
||||
|
||||
#else /* not HAVE_CONFIG_H */
|
||||
|
||||
/* Otherwise do it the hard way */
|
||||
|
||||
# ifdef BSD
|
||||
# include <strings.h>
|
||||
# else
|
||||
# ifdef VMS
|
||||
extern int strlen(), strncmp();
|
||||
# else
|
||||
# include <string.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* not HAVE_CONFIG_H */
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
/*
|
||||
malloc and free should be declared in stdlib.h,
|
||||
but if you've got a K&R compiler, they probably aren't.
|
||||
*/
|
||||
# ifdef MSDOS
|
||||
# include <malloc.h>
|
||||
# else
|
||||
# ifdef VMS
|
||||
extern char *malloc();
|
||||
extern void free();
|
||||
# else
|
||||
extern char *malloc();
|
||||
extern int free();
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Define NULL (for *very* old compilers). */
|
||||
#ifndef NULL
|
||||
# define NULL (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The ctype macros don't always handle 8-bit characters correctly.
|
||||
* Compensate for this here.
|
||||
*/
|
||||
#ifdef isascii
|
||||
# undef HAVE_ISASCII /* just in case */
|
||||
# define HAVE_ISASCII 1
|
||||
#else
|
||||
#endif
|
||||
#if STDC_HEADERS || !HAVE_ISASCII
|
||||
# define is_ascii(c) 1
|
||||
#else
|
||||
# define is_ascii(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#define is_space(c) (is_ascii(c) && isspace(c))
|
||||
#define is_alpha(c) (is_ascii(c) && isalpha(c))
|
||||
#define is_alnum(c) (is_ascii(c) && isalnum(c))
|
||||
|
||||
/* Scanning macros */
|
||||
#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
|
||||
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
|
||||
|
||||
/* Forward references */
|
||||
char *ppdirforward();
|
||||
char *ppdirbackward();
|
||||
char *skipspace();
|
||||
char *scanstring();
|
||||
int writeblanks();
|
||||
int test1();
|
||||
int convert1();
|
||||
|
||||
/* The main program */
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{ FILE *in = stdin;
|
||||
FILE *out = stdout;
|
||||
char *filename = 0;
|
||||
char *program_name = argv[0];
|
||||
char *output_name = 0;
|
||||
#define bufsize 5000 /* arbitrary size */
|
||||
char *buf;
|
||||
char *line;
|
||||
char *more;
|
||||
char *usage =
|
||||
"Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
|
||||
/*
|
||||
* In previous versions, ansi2knr recognized a --varargs switch.
|
||||
* If this switch was supplied, ansi2knr would attempt to convert
|
||||
* a ... argument to va_alist and va_dcl; if this switch was not
|
||||
* supplied, ansi2knr would simply drop any such arguments.
|
||||
* Now, ansi2knr always does this conversion, and we only
|
||||
* check for this switch for backward compatibility.
|
||||
*/
|
||||
int convert_varargs = 1;
|
||||
int output_error;
|
||||
|
||||
while ( argc > 1 && argv[1][0] == '-' ) {
|
||||
if ( !strcmp(argv[1], "--varargs") ) {
|
||||
convert_varargs = 1;
|
||||
argc--;
|
||||
argv++;
|
||||
continue;
|
||||
}
|
||||
if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
|
||||
filename = argv[2];
|
||||
argc -= 2;
|
||||
argv += 2;
|
||||
continue;
|
||||
}
|
||||
fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
|
||||
argv[1]);
|
||||
fprintf(stderr, usage);
|
||||
exit(1);
|
||||
}
|
||||
switch ( argc )
|
||||
{
|
||||
default:
|
||||
fprintf(stderr, usage);
|
||||
exit(0);
|
||||
case 3:
|
||||
output_name = argv[2];
|
||||
out = fopen(output_name, "w");
|
||||
if ( out == NULL ) {
|
||||
fprintf(stderr, "%s: Cannot open output file %s\n",
|
||||
program_name, output_name);
|
||||
exit(1);
|
||||
}
|
||||
/* falls through */
|
||||
case 2:
|
||||
in = fopen(argv[1], "r");
|
||||
if ( in == NULL ) {
|
||||
fprintf(stderr, "%s: Cannot open input file %s\n",
|
||||
program_name, argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
if ( filename == 0 )
|
||||
filename = argv[1];
|
||||
/* falls through */
|
||||
case 1:
|
||||
break;
|
||||
}
|
||||
if ( filename )
|
||||
fprintf(out, "#line 1 \"%s\"\n", filename);
|
||||
buf = malloc(bufsize);
|
||||
if ( buf == NULL )
|
||||
{
|
||||
fprintf(stderr, "Unable to allocate read buffer!\n");
|
||||
exit(1);
|
||||
}
|
||||
line = buf;
|
||||
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
|
||||
{
|
||||
test: line += strlen(line);
|
||||
switch ( test1(buf) )
|
||||
{
|
||||
case 2: /* a function header */
|
||||
convert1(buf, out, 1, convert_varargs);
|
||||
break;
|
||||
case 1: /* a function */
|
||||
/* Check for a { at the start of the next line. */
|
||||
more = ++line;
|
||||
f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
|
||||
goto wl;
|
||||
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
|
||||
goto wl;
|
||||
switch ( *skipspace(ppdirforward(more), 1) )
|
||||
{
|
||||
case '{':
|
||||
/* Definitely a function header. */
|
||||
convert1(buf, out, 0, convert_varargs);
|
||||
fputs(more, out);
|
||||
break;
|
||||
case 0:
|
||||
/* The next line was blank or a comment: */
|
||||
/* keep scanning for a non-comment. */
|
||||
line += strlen(line);
|
||||
goto f;
|
||||
default:
|
||||
/* buf isn't a function header, but */
|
||||
/* more might be. */
|
||||
fputs(buf, out);
|
||||
strcpy(buf, more);
|
||||
line = buf;
|
||||
goto test;
|
||||
}
|
||||
break;
|
||||
case -1: /* maybe the start of a function */
|
||||
if ( line != buf + (bufsize - 1) ) /* overflow check */
|
||||
continue;
|
||||
/* falls through */
|
||||
default: /* not a function */
|
||||
wl: fputs(buf, out);
|
||||
break;
|
||||
}
|
||||
line = buf;
|
||||
}
|
||||
if ( line != buf )
|
||||
fputs(buf, out);
|
||||
free(buf);
|
||||
if ( output_name ) {
|
||||
output_error = ferror(out);
|
||||
output_error |= fclose(out);
|
||||
} else { /* out == stdout */
|
||||
fflush(out);
|
||||
output_error = ferror(out);
|
||||
}
|
||||
if ( output_error ) {
|
||||
fprintf(stderr, "%s: error writing to %s\n", program_name,
|
||||
(output_name ? output_name : "stdout"));
|
||||
exit(1);
|
||||
}
|
||||
if ( in != stdin )
|
||||
fclose(in);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip forward or backward over one or more preprocessor directives.
|
||||
*/
|
||||
char *
|
||||
ppdirforward(p)
|
||||
char *p;
|
||||
{
|
||||
for (; *p == '#'; ++p) {
|
||||
for (; *p != '\r' && *p != '\n'; ++p)
|
||||
if (*p == 0)
|
||||
return p;
|
||||
if (*p == '\r' && p[1] == '\n')
|
||||
++p;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
char *
|
||||
ppdirbackward(p, limit)
|
||||
char *p;
|
||||
char *limit;
|
||||
{
|
||||
char *np = p;
|
||||
|
||||
for (;; p = --np) {
|
||||
if (*np == '\n' && np[-1] == '\r')
|
||||
--np;
|
||||
for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
|
||||
if (np[-1] == 0)
|
||||
return np;
|
||||
if (*np != '#')
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip over whitespace, comments, and preprocessor directives,
|
||||
* in either direction.
|
||||
*/
|
||||
char *
|
||||
skipspace(p, dir)
|
||||
char *p;
|
||||
int dir; /* 1 for forward, -1 for backward */
|
||||
{
|
||||
for ( ; ; ) {
|
||||
while ( is_space(*p) )
|
||||
p += dir;
|
||||
if ( !(*p == '/' && p[dir] == '*') )
|
||||
break;
|
||||
p += dir; p += dir;
|
||||
while ( !(*p == '*' && p[dir] == '/') ) {
|
||||
if ( *p == 0 )
|
||||
return p; /* multi-line comment?? */
|
||||
p += dir;
|
||||
}
|
||||
p += dir; p += dir;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/* Scan over a quoted string, in either direction. */
|
||||
char *
|
||||
scanstring(p, dir)
|
||||
char *p;
|
||||
int dir;
|
||||
{
|
||||
for (p += dir; ; p += dir)
|
||||
if (*p == '"' && p[-dir] != '\\')
|
||||
return p + dir;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write blanks over part of a string.
|
||||
* Don't overwrite end-of-line characters.
|
||||
*/
|
||||
int
|
||||
writeblanks(start, end)
|
||||
char *start;
|
||||
char *end;
|
||||
{ char *p;
|
||||
for ( p = start; p < end; p++ )
|
||||
if ( *p != '\r' && *p != '\n' )
|
||||
*p = ' ';
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test whether the string in buf is a function definition.
|
||||
* The string may contain and/or end with a newline.
|
||||
* Return as follows:
|
||||
* 0 - definitely not a function definition;
|
||||
* 1 - definitely a function definition;
|
||||
* 2 - definitely a function prototype (NOT USED);
|
||||
* -1 - may be the beginning of a function definition,
|
||||
* append another line and look again.
|
||||
* The reason we don't attempt to convert function prototypes is that
|
||||
* Ghostscript's declaration-generating macros look too much like
|
||||
* prototypes, and confuse the algorithms.
|
||||
*/
|
||||
int
|
||||
test1(buf)
|
||||
char *buf;
|
||||
{ char *p = buf;
|
||||
char *bend;
|
||||
char *endfn;
|
||||
int contin;
|
||||
|
||||
if ( !isidfirstchar(*p) )
|
||||
return 0; /* no name at left margin */
|
||||
bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
|
||||
switch ( *bend )
|
||||
{
|
||||
case ';': contin = 0 /*2*/; break;
|
||||
case ')': contin = 1; break;
|
||||
case '{': return 0; /* not a function */
|
||||
case '}': return 0; /* not a function */
|
||||
default: contin = -1;
|
||||
}
|
||||
while ( isidchar(*p) )
|
||||
p++;
|
||||
endfn = p;
|
||||
p = skipspace(p, 1);
|
||||
if ( *p++ != '(' )
|
||||
return 0; /* not a function */
|
||||
p = skipspace(p, 1);
|
||||
if ( *p == ')' )
|
||||
return 0; /* no parameters */
|
||||
/* Check that the apparent function name isn't a keyword. */
|
||||
/* We only need to check for keywords that could be followed */
|
||||
/* by a left parenthesis (which, unfortunately, is most of them). */
|
||||
{ static char *words[] =
|
||||
{ "asm", "auto", "case", "char", "const", "double",
|
||||
"extern", "float", "for", "if", "int", "long",
|
||||
"register", "return", "short", "signed", "sizeof",
|
||||
"static", "switch", "typedef", "unsigned",
|
||||
"void", "volatile", "while", 0
|
||||
};
|
||||
char **key = words;
|
||||
char *kp;
|
||||
unsigned len = endfn - buf;
|
||||
|
||||
while ( (kp = *key) != 0 )
|
||||
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
|
||||
return 0; /* name is a keyword */
|
||||
key++;
|
||||
}
|
||||
}
|
||||
{
|
||||
char *id = p;
|
||||
int len;
|
||||
/*
|
||||
* Check for identifier1(identifier2) and not
|
||||
* identifier1(void), or identifier1(identifier2, xxxx).
|
||||
*/
|
||||
|
||||
while ( isidchar(*p) )
|
||||
p++;
|
||||
len = p - id;
|
||||
p = skipspace(p, 1);
|
||||
if (*p == ',' ||
|
||||
(*p == ')' && (len != 4 || strncmp(id, "void", 4)))
|
||||
)
|
||||
return 0; /* not a function */
|
||||
}
|
||||
/*
|
||||
* If the last significant character was a ), we need to count
|
||||
* parentheses, because it might be part of a formal parameter
|
||||
* that is a procedure.
|
||||
*/
|
||||
if (contin > 0) {
|
||||
int level = 0;
|
||||
|
||||
for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
|
||||
level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
|
||||
if (level > 0)
|
||||
contin = -1;
|
||||
}
|
||||
return contin;
|
||||
}
|
||||
|
||||
/* Convert a recognized function definition or header to K&R syntax. */
|
||||
int
|
||||
convert1(buf, out, header, convert_varargs)
|
||||
char *buf;
|
||||
FILE *out;
|
||||
int header; /* Boolean */
|
||||
int convert_varargs; /* Boolean */
|
||||
{ char *endfn;
|
||||
char *p;
|
||||
/*
|
||||
* The breaks table contains pointers to the beginning and end
|
||||
* of each argument.
|
||||
*/
|
||||
char **breaks;
|
||||
unsigned num_breaks = 2; /* for testing */
|
||||
char **btop;
|
||||
char **bp;
|
||||
char **ap;
|
||||
char *vararg = 0;
|
||||
|
||||
/* Pre-ANSI implementations don't agree on whether strchr */
|
||||
/* is called strchr or index, so we open-code it here. */
|
||||
for ( endfn = buf; *(endfn++) != '('; )
|
||||
;
|
||||
top: p = endfn;
|
||||
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
|
||||
if ( breaks == NULL )
|
||||
{ /* Couldn't allocate break table, give up */
|
||||
fprintf(stderr, "Unable to allocate break table!\n");
|
||||
fputs(buf, out);
|
||||
return -1;
|
||||
}
|
||||
btop = breaks + num_breaks * 2 - 2;
|
||||
bp = breaks;
|
||||
/* Parse the argument list */
|
||||
do
|
||||
{ int level = 0;
|
||||
char *lp = NULL;
|
||||
char *rp = NULL;
|
||||
char *end = NULL;
|
||||
|
||||
if ( bp >= btop )
|
||||
{ /* Filled up break table. */
|
||||
/* Allocate a bigger one and start over. */
|
||||
free((char *)breaks);
|
||||
num_breaks <<= 1;
|
||||
goto top;
|
||||
}
|
||||
*bp++ = p;
|
||||
/* Find the end of the argument */
|
||||
for ( ; end == NULL; p++ )
|
||||
{ switch(*p)
|
||||
{
|
||||
case ',':
|
||||
if ( !level ) end = p;
|
||||
break;
|
||||
case '(':
|
||||
if ( !level ) lp = p;
|
||||
level++;
|
||||
break;
|
||||
case ')':
|
||||
if ( --level < 0 ) end = p;
|
||||
else rp = p;
|
||||
break;
|
||||
case '/':
|
||||
if (p[1] == '*')
|
||||
p = skipspace(p, 1) - 1;
|
||||
break;
|
||||
case '"':
|
||||
p = scanstring(p, 1) - 1;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
/* Erase any embedded prototype parameters. */
|
||||
if ( lp && rp )
|
||||
writeblanks(lp + 1, rp);
|
||||
p--; /* back up over terminator */
|
||||
/* Find the name being declared. */
|
||||
/* This is complicated because of procedure and */
|
||||
/* array modifiers. */
|
||||
for ( ; ; )
|
||||
{ p = skipspace(p - 1, -1);
|
||||
switch ( *p )
|
||||
{
|
||||
case ']': /* skip array dimension(s) */
|
||||
case ')': /* skip procedure args OR name */
|
||||
{ int level = 1;
|
||||
while ( level )
|
||||
switch ( *--p )
|
||||
{
|
||||
case ']': case ')':
|
||||
level++;
|
||||
break;
|
||||
case '[': case '(':
|
||||
level--;
|
||||
break;
|
||||
case '/':
|
||||
if (p > buf && p[-1] == '*')
|
||||
p = skipspace(p, -1) + 1;
|
||||
break;
|
||||
case '"':
|
||||
p = scanstring(p, -1) + 1;
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
|
||||
{ /* We found the name being declared */
|
||||
while ( !isidfirstchar(*p) )
|
||||
p = skipspace(p, 1) + 1;
|
||||
goto found;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
|
||||
{ if ( convert_varargs )
|
||||
{ *bp++ = "va_alist";
|
||||
vararg = p-2;
|
||||
}
|
||||
else
|
||||
{ p++;
|
||||
if ( bp == breaks + 1 ) /* sole argument */
|
||||
writeblanks(breaks[0], p);
|
||||
else
|
||||
writeblanks(bp[-1] - 1, p);
|
||||
bp--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ while ( isidchar(*p) ) p--;
|
||||
*bp++ = p+1;
|
||||
}
|
||||
p = end;
|
||||
}
|
||||
while ( *p++ == ',' );
|
||||
*bp = p;
|
||||
/* Make a special check for 'void' arglist */
|
||||
if ( bp == breaks+2 )
|
||||
{ p = skipspace(breaks[0], 1);
|
||||
if ( !strncmp(p, "void", 4) )
|
||||
{ p = skipspace(p+4, 1);
|
||||
if ( p == breaks[2] - 1 )
|
||||
{ bp = breaks; /* yup, pretend arglist is empty */
|
||||
writeblanks(breaks[0], p + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Put out the function name and left parenthesis. */
|
||||
p = buf;
|
||||
while ( p != endfn ) putc(*p, out), p++;
|
||||
/* Put out the declaration. */
|
||||
if ( header )
|
||||
{ fputs(");", out);
|
||||
for ( p = breaks[0]; *p; p++ )
|
||||
if ( *p == '\r' || *p == '\n' )
|
||||
putc(*p, out);
|
||||
}
|
||||
else
|
||||
{ for ( ap = breaks+1; ap < bp; ap += 2 )
|
||||
{ p = *ap;
|
||||
while ( isidchar(*p) )
|
||||
putc(*p, out), p++;
|
||||
if ( ap < bp - 1 )
|
||||
fputs(", ", out);
|
||||
}
|
||||
fputs(") ", out);
|
||||
/* Put out the argument declarations */
|
||||
for ( ap = breaks+2; ap <= bp; ap += 2 )
|
||||
(*ap)[-1] = ';';
|
||||
if ( vararg != 0 )
|
||||
{ *vararg = 0;
|
||||
fputs(breaks[0], out); /* any prior args */
|
||||
fputs("va_dcl", out); /* the final arg */
|
||||
fputs(bp[0], out);
|
||||
}
|
||||
else
|
||||
fputs(breaks[0], out);
|
||||
}
|
||||
free((char *)breaks);
|
||||
return 0;
|
||||
}
|
134
Build/VS2010/StaticSDKs/XPlatform/jpeg/cderror.h
Normal file
134
Build/VS2010/StaticSDKs/XPlatform/jpeg/cderror.h
Normal file
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* cderror.h
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file defines the error and message codes for the cjpeg/djpeg
|
||||
* applications. These strings are not needed as part of the JPEG library
|
||||
* proper.
|
||||
* Edit this file to add new codes, or to translate the message strings to
|
||||
* some other language.
|
||||
*/
|
||||
|
||||
/*
|
||||
* To define the enum list of message codes, include this file without
|
||||
* defining macro JMESSAGE. To create a message string table, include it
|
||||
* again with a suitable JMESSAGE definition (see jerror.c for an example).
|
||||
*/
|
||||
#ifndef JMESSAGE
|
||||
#ifndef CDERROR_H
|
||||
#define CDERROR_H
|
||||
/* First time through, define the enum list */
|
||||
#define JMAKE_ENUM_LIST
|
||||
#else
|
||||
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
|
||||
#define JMESSAGE(code,string)
|
||||
#endif /* CDERROR_H */
|
||||
#endif /* JMESSAGE */
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
typedef enum {
|
||||
|
||||
#define JMESSAGE(code,string) code ,
|
||||
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
|
||||
|
||||
#ifdef BMP_SUPPORTED
|
||||
JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
|
||||
JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
|
||||
JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
|
||||
JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
|
||||
JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
|
||||
JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
|
||||
JMESSAGE(JERR_BMP_EMPTY, "Empty BMP image")
|
||||
JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
|
||||
JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
|
||||
JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
|
||||
JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
|
||||
JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
|
||||
#endif /* BMP_SUPPORTED */
|
||||
|
||||
#ifdef GIF_SUPPORTED
|
||||
JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
|
||||
JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
|
||||
JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
|
||||
JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
|
||||
JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
|
||||
JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
|
||||
JMESSAGE(JTRC_GIF_BADVERSION,
|
||||
"Warning: unexpected GIF version number '%c%c%c'")
|
||||
JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
|
||||
JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
|
||||
JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
|
||||
JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
|
||||
JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
|
||||
JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
|
||||
#endif /* GIF_SUPPORTED */
|
||||
|
||||
#ifdef PPM_SUPPORTED
|
||||
JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
|
||||
JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
|
||||
JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
|
||||
JMESSAGE(JTRC_PGM, "%ux%u PGM image")
|
||||
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
|
||||
JMESSAGE(JTRC_PPM, "%ux%u PPM image")
|
||||
JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
|
||||
#endif /* PPM_SUPPORTED */
|
||||
|
||||
#ifdef RLE_SUPPORTED
|
||||
JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
|
||||
JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
|
||||
JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
|
||||
JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
|
||||
JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
|
||||
JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
|
||||
JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
|
||||
JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
|
||||
JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
|
||||
JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
|
||||
JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
|
||||
JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
|
||||
JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
|
||||
JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
|
||||
#endif /* RLE_SUPPORTED */
|
||||
|
||||
#ifdef TARGA_SUPPORTED
|
||||
JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
|
||||
JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
|
||||
JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
|
||||
JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
|
||||
JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
|
||||
JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
|
||||
#else
|
||||
JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
|
||||
#endif /* TARGA_SUPPORTED */
|
||||
|
||||
JMESSAGE(JERR_BAD_CMAP_FILE,
|
||||
"Color map file is invalid or of unsupported format")
|
||||
JMESSAGE(JERR_TOO_MANY_COLORS,
|
||||
"Output file format cannot handle %d colormap entries")
|
||||
JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
|
||||
#ifdef TARGA_SUPPORTED
|
||||
JMESSAGE(JERR_UNKNOWN_FORMAT,
|
||||
"Unrecognized input file format --- perhaps you need -targa")
|
||||
#else
|
||||
JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
|
||||
#endif
|
||||
JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
JMSG_LASTADDONCODE
|
||||
} ADDON_MESSAGE_CODE;
|
||||
|
||||
#undef JMAKE_ENUM_LIST
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
|
||||
#undef JMESSAGE
|
181
Build/VS2010/StaticSDKs/XPlatform/jpeg/cdjpeg.c
Normal file
181
Build/VS2010/StaticSDKs/XPlatform/jpeg/cdjpeg.c
Normal file
@ -0,0 +1,181 @@
|
||||
/*
|
||||
* cdjpeg.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains common support routines used by the IJG application
|
||||
* programs (cjpeg, djpeg, jpegtran).
|
||||
*/
|
||||
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include <ctype.h> /* to declare isupper(), tolower() */
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
#include <signal.h> /* to declare signal() */
|
||||
#endif
|
||||
#ifdef USE_SETMODE
|
||||
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
||||
/* If you have setmode() but not <io.h>, just delete this line: */
|
||||
#include <io.h> /* to declare setmode() */
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Signal catcher to ensure that temporary files are removed before aborting.
|
||||
* NB: for Amiga Manx C this is actually a global routine named _abort();
|
||||
* we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus...
|
||||
*/
|
||||
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
|
||||
static j_common_ptr sig_cinfo;
|
||||
|
||||
void /* must be global for Manx C */
|
||||
signal_catcher (int signum)
|
||||
{
|
||||
if (sig_cinfo != NULL) {
|
||||
if (sig_cinfo->err != NULL) /* turn off trace output */
|
||||
sig_cinfo->err->trace_level = 0;
|
||||
jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */
|
||||
}
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
GLOBAL(void)
|
||||
enable_signal_catcher (j_common_ptr cinfo)
|
||||
{
|
||||
sig_cinfo = cinfo;
|
||||
#ifdef SIGINT /* not all systems have SIGINT */
|
||||
signal(SIGINT, signal_catcher);
|
||||
#endif
|
||||
#ifdef SIGTERM /* not all systems have SIGTERM */
|
||||
signal(SIGTERM, signal_catcher);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Optional progress monitor: display a percent-done figure on stderr.
|
||||
*/
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
|
||||
METHODDEF(void)
|
||||
progress_monitor (j_common_ptr cinfo)
|
||||
{
|
||||
cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
|
||||
int total_passes = prog->pub.total_passes + prog->total_extra_passes;
|
||||
int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
|
||||
|
||||
if (percent_done != prog->percent_done) {
|
||||
prog->percent_done = percent_done;
|
||||
if (total_passes > 1) {
|
||||
fprintf(stderr, "\rPass %d/%d: %3d%% ",
|
||||
prog->pub.completed_passes + prog->completed_extra_passes + 1,
|
||||
total_passes, percent_done);
|
||||
} else {
|
||||
fprintf(stderr, "\r %3d%% ", percent_done);
|
||||
}
|
||||
fflush(stderr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GLOBAL(void)
|
||||
start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
|
||||
{
|
||||
/* Enable progress display, unless trace output is on */
|
||||
if (cinfo->err->trace_level == 0) {
|
||||
progress->pub.progress_monitor = progress_monitor;
|
||||
progress->completed_extra_passes = 0;
|
||||
progress->total_extra_passes = 0;
|
||||
progress->percent_done = -1;
|
||||
cinfo->progress = &progress->pub;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GLOBAL(void)
|
||||
end_progress_monitor (j_common_ptr cinfo)
|
||||
{
|
||||
/* Clear away progress display */
|
||||
if (cinfo->err->trace_level == 0) {
|
||||
fprintf(stderr, "\r \r");
|
||||
fflush(stderr);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Case-insensitive matching of possibly-abbreviated keyword switches.
|
||||
* keyword is the constant keyword (must be lower case already),
|
||||
* minchars is length of minimum legal abbreviation.
|
||||
*/
|
||||
|
||||
GLOBAL(boolean)
|
||||
keymatch (char * arg, const char * keyword, int minchars)
|
||||
{
|
||||
register int ca, ck;
|
||||
register int nmatched = 0;
|
||||
|
||||
while ((ca = *arg++) != '\0') {
|
||||
if ((ck = *keyword++) == '\0')
|
||||
return FALSE; /* arg longer than keyword, no good */
|
||||
if (isupper(ca)) /* force arg to lcase (assume ck is already) */
|
||||
ca = tolower(ca);
|
||||
if (ca != ck)
|
||||
return FALSE; /* no good */
|
||||
nmatched++; /* count matched characters */
|
||||
}
|
||||
/* reached end of argument; fail if it's too short for unique abbrev */
|
||||
if (nmatched < minchars)
|
||||
return FALSE;
|
||||
return TRUE; /* A-OK */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Routines to establish binary I/O mode for stdin and stdout.
|
||||
* Non-Unix systems often require some hacking to get out of text mode.
|
||||
*/
|
||||
|
||||
GLOBAL(FILE *)
|
||||
read_stdin (void)
|
||||
{
|
||||
FILE * input_file = stdin;
|
||||
|
||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
||||
setmode(fileno(stdin), O_BINARY);
|
||||
#endif
|
||||
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
||||
if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
|
||||
fprintf(stderr, "Cannot reopen stdin\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
return input_file;
|
||||
}
|
||||
|
||||
|
||||
GLOBAL(FILE *)
|
||||
write_stdout (void)
|
||||
{
|
||||
FILE * output_file = stdout;
|
||||
|
||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
||||
setmode(fileno(stdout), O_BINARY);
|
||||
#endif
|
||||
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
||||
if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
|
||||
fprintf(stderr, "Cannot reopen stdout\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
return output_file;
|
||||
}
|
187
Build/VS2010/StaticSDKs/XPlatform/jpeg/cdjpeg.h
Normal file
187
Build/VS2010/StaticSDKs/XPlatform/jpeg/cdjpeg.h
Normal file
@ -0,0 +1,187 @@
|
||||
/*
|
||||
* cdjpeg.h
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains common declarations for the sample applications
|
||||
* cjpeg and djpeg. It is NOT used by the core JPEG library.
|
||||
*/
|
||||
|
||||
#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
|
||||
#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
#include "jerror.h" /* get library error codes too */
|
||||
#include "cderror.h" /* get application-specific error codes */
|
||||
|
||||
|
||||
/*
|
||||
* Object interface for cjpeg's source file decoding modules
|
||||
*/
|
||||
|
||||
typedef struct cjpeg_source_struct * cjpeg_source_ptr;
|
||||
|
||||
struct cjpeg_source_struct {
|
||||
JMETHOD(void, start_input, (j_compress_ptr cinfo,
|
||||
cjpeg_source_ptr sinfo));
|
||||
JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
|
||||
cjpeg_source_ptr sinfo));
|
||||
JMETHOD(void, finish_input, (j_compress_ptr cinfo,
|
||||
cjpeg_source_ptr sinfo));
|
||||
|
||||
FILE *input_file;
|
||||
|
||||
JSAMPARRAY buffer;
|
||||
JDIMENSION buffer_height;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Object interface for djpeg's output file encoding modules
|
||||
*/
|
||||
|
||||
typedef struct djpeg_dest_struct * djpeg_dest_ptr;
|
||||
|
||||
struct djpeg_dest_struct {
|
||||
/* start_output is called after jpeg_start_decompress finishes.
|
||||
* The color map will be ready at this time, if one is needed.
|
||||
*/
|
||||
JMETHOD(void, start_output, (j_decompress_ptr cinfo,
|
||||
djpeg_dest_ptr dinfo));
|
||||
/* Emit the specified number of pixel rows from the buffer. */
|
||||
JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
|
||||
djpeg_dest_ptr dinfo,
|
||||
JDIMENSION rows_supplied));
|
||||
/* Finish up at the end of the image. */
|
||||
JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
|
||||
djpeg_dest_ptr dinfo));
|
||||
|
||||
/* Target file spec; filled in by djpeg.c after object is created. */
|
||||
FILE * output_file;
|
||||
|
||||
/* Output pixel-row buffer. Created by module init or start_output.
|
||||
* Width is cinfo->output_width * cinfo->output_components;
|
||||
* height is buffer_height.
|
||||
*/
|
||||
JSAMPARRAY buffer;
|
||||
JDIMENSION buffer_height;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* cjpeg/djpeg may need to perform extra passes to convert to or from
|
||||
* the source/destination file format. The JPEG library does not know
|
||||
* about these passes, but we'd like them to be counted by the progress
|
||||
* monitor. We use an expanded progress monitor object to hold the
|
||||
* additional pass count.
|
||||
*/
|
||||
|
||||
struct cdjpeg_progress_mgr {
|
||||
struct jpeg_progress_mgr pub; /* fields known to JPEG library */
|
||||
int completed_extra_passes; /* extra passes completed */
|
||||
int total_extra_passes; /* total extra */
|
||||
/* last printed percentage stored here to avoid multiple printouts */
|
||||
int percent_done;
|
||||
};
|
||||
|
||||
typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jinit_read_bmp jIRdBMP
|
||||
#define jinit_write_bmp jIWrBMP
|
||||
#define jinit_read_gif jIRdGIF
|
||||
#define jinit_write_gif jIWrGIF
|
||||
#define jinit_read_ppm jIRdPPM
|
||||
#define jinit_write_ppm jIWrPPM
|
||||
#define jinit_read_rle jIRdRLE
|
||||
#define jinit_write_rle jIWrRLE
|
||||
#define jinit_read_targa jIRdTarga
|
||||
#define jinit_write_targa jIWrTarga
|
||||
#define read_quant_tables RdQTables
|
||||
#define read_scan_script RdScnScript
|
||||
#define set_quality_ratings SetQRates
|
||||
#define set_quant_slots SetQSlots
|
||||
#define set_sample_factors SetSFacts
|
||||
#define read_color_map RdCMap
|
||||
#define enable_signal_catcher EnSigCatcher
|
||||
#define start_progress_monitor StProgMon
|
||||
#define end_progress_monitor EnProgMon
|
||||
#define read_stdin RdStdin
|
||||
#define write_stdout WrStdout
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
/* Module selection routines for I/O modules. */
|
||||
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
|
||||
boolean is_os2));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
|
||||
|
||||
/* cjpeg support routines (in rdswitch.c) */
|
||||
|
||||
EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
|
||||
boolean force_baseline));
|
||||
EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
|
||||
EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg,
|
||||
boolean force_baseline));
|
||||
EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
|
||||
EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
|
||||
|
||||
/* djpeg support routines (in rdcolmap.c) */
|
||||
|
||||
EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
|
||||
|
||||
/* common support routines (in cdjpeg.c) */
|
||||
|
||||
EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
|
||||
EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
|
||||
cd_progress_ptr progress));
|
||||
EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
|
||||
EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
|
||||
EXTERN(FILE *) read_stdin JPP((void));
|
||||
EXTERN(FILE *) write_stdout JPP((void));
|
||||
|
||||
/* miscellaneous useful macros */
|
||||
|
||||
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
|
||||
#define READ_BINARY "r"
|
||||
#define WRITE_BINARY "w"
|
||||
#else
|
||||
#ifdef VMS /* VMS is very nonstandard */
|
||||
#define READ_BINARY "rb", "ctx=stm"
|
||||
#define WRITE_BINARY "wb", "ctx=stm"
|
||||
#else /* standard ANSI-compliant case */
|
||||
#define READ_BINARY "rb"
|
||||
#define WRITE_BINARY "wb"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
#ifndef EXIT_SUCCESS
|
||||
#ifdef VMS
|
||||
#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
|
||||
#else
|
||||
#define EXIT_SUCCESS 0
|
||||
#endif
|
||||
#endif
|
||||
#ifndef EXIT_WARNING
|
||||
#ifdef VMS
|
||||
#define EXIT_WARNING 1 /* VMS is very nonstandard */
|
||||
#else
|
||||
#define EXIT_WARNING 2
|
||||
#endif
|
||||
#endif
|
326
Build/VS2010/StaticSDKs/XPlatform/jpeg/change.log
Normal file
326
Build/VS2010/StaticSDKs/XPlatform/jpeg/change.log
Normal file
@ -0,0 +1,326 @@
|
||||
CHANGE LOG for Independent JPEG Group's JPEG software
|
||||
|
||||
|
||||
Version 8c 16-Jan-2011
|
||||
-----------------------
|
||||
|
||||
Add option to compression library and cjpeg (-block N) to use
|
||||
different DCT block size.
|
||||
All N from 1 to 16 are possible. Default is 8 (baseline format).
|
||||
Larger values produce higher compression,
|
||||
smaller values produce higher quality.
|
||||
SmartScale capable decoder (introduced with IJG JPEG 8) required.
|
||||
|
||||
|
||||
Version 8b 16-May-2010
|
||||
-----------------------
|
||||
|
||||
Repair problem in new memory source manager with corrupt JPEG data.
|
||||
Thank to Ted Campbell and Samuel Chun for the report.
|
||||
|
||||
Repair problem in Makefile.am test target.
|
||||
Thank to anonymous user for the report.
|
||||
|
||||
Support MinGW installation with automatic configure.
|
||||
Thank to Volker Grabsch for the suggestion.
|
||||
|
||||
|
||||
Version 8a 28-Feb-2010
|
||||
-----------------------
|
||||
|
||||
Writing tables-only datastreams via jpeg_write_tables works again.
|
||||
|
||||
Support 32-bit BMPs (RGB image with Alpha channel) for read in cjpeg.
|
||||
Thank to Brett Blackham for the suggestion.
|
||||
|
||||
Improve accuracy in floating point IDCT calculation.
|
||||
Thank to Robert Hooke for the hint.
|
||||
|
||||
|
||||
Version 8 10-Jan-2010
|
||||
----------------------
|
||||
|
||||
jpegtran now supports the same -scale option as djpeg for "lossless" resize.
|
||||
An implementation of the JPEG SmartScale extension is required for this
|
||||
feature. A (draft) specification of the JPEG SmartScale extension is
|
||||
available as a contributed document at ITU and ISO. Revision 2 or later
|
||||
of the document is required (latest document version is Revision 3).
|
||||
The SmartScale extension will enable more features beside lossless resize
|
||||
in future implementations, as described in the document (new compression
|
||||
options).
|
||||
|
||||
Add sanity check in BMP reader module to avoid cjpeg crash for empty input
|
||||
image (thank to Isaev Ildar of ISP RAS, Moscow, RU for reporting this error).
|
||||
|
||||
Add data source and destination managers for read from and write to
|
||||
memory buffers. New API functions jpeg_mem_src and jpeg_mem_dest.
|
||||
Thank to Roberto Boni from Italy for the suggestion.
|
||||
|
||||
|
||||
Version 7 27-Jun-2009
|
||||
----------------------
|
||||
|
||||
New scaled DCTs implemented.
|
||||
djpeg now supports scalings N/8 with all N from 1 to 16.
|
||||
cjpeg now supports scalings 8/N with all N from 1 to 16.
|
||||
Scaled DCTs with size larger than 8 are now also used for resolving the
|
||||
common 2x2 chroma subsampling case without additional spatial resampling.
|
||||
Separate spatial resampling for those kind of files is now only necessary
|
||||
for N>8 scaling cases.
|
||||
Furthermore, separate scaled DCT functions are provided for direct resolving
|
||||
of the common asymmetric subsampling cases (2x1 and 1x2) without additional
|
||||
spatial resampling.
|
||||
|
||||
cjpeg -quality option has been extended for support of separate quality
|
||||
settings for luminance and chrominance (or in general, for every provided
|
||||
quantization table slot).
|
||||
New API function jpeg_default_qtables() and q_scale_factor array in library.
|
||||
|
||||
Added -nosmooth option to cjpeg, complementary to djpeg.
|
||||
New variable "do_fancy_downsampling" in library, complement to fancy
|
||||
upsampling. Fancy upsampling now uses direct DCT scaling with sizes
|
||||
larger than 8. The old method is not reversible and has been removed.
|
||||
|
||||
Support arithmetic entropy encoding and decoding.
|
||||
Added files jaricom.c, jcarith.c, jdarith.c.
|
||||
|
||||
Straighten the file structure:
|
||||
Removed files jidctred.c, jcphuff.c, jchuff.h, jdphuff.c, jdhuff.h.
|
||||
|
||||
jpegtran has a new "lossless" cropping feature.
|
||||
|
||||
Implement -perfect option in jpegtran, new API function
|
||||
jtransform_perfect_transform() in transupp. (DP 204_perfect.dpatch)
|
||||
|
||||
Better error messages for jpegtran fopen failure.
|
||||
(DP 203_jpegtran_errmsg.dpatch)
|
||||
|
||||
Fix byte order issue with 16bit PPM/PGM files in rdppm.c/wrppm.c:
|
||||
according to Netpbm, the de facto standard implementation of the PNM formats,
|
||||
the most significant byte is first. (DP 203_rdppm.dpatch)
|
||||
|
||||
Add -raw option to rdjpgcom not to mangle the output.
|
||||
(DP 205_rdjpgcom_raw.dpatch)
|
||||
|
||||
Make rdjpgcom locale aware. (DP 201_rdjpgcom_locale.dpatch)
|
||||
|
||||
Add extern "C" to jpeglib.h.
|
||||
This avoids the need to put extern "C" { ... } around #include "jpeglib.h"
|
||||
in your C++ application. Defining the symbol DONT_USE_EXTERN_C in the
|
||||
configuration prevents this. (DP 202_jpeglib.h_c++.dpatch)
|
||||
|
||||
|
||||
Version 6b 27-Mar-1998
|
||||
-----------------------
|
||||
|
||||
jpegtran has new features for lossless image transformations (rotation
|
||||
and flipping) as well as "lossless" reduction to grayscale.
|
||||
|
||||
jpegtran now copies comments by default; it has a -copy switch to enable
|
||||
copying all APPn blocks as well, or to suppress comments. (Formerly it
|
||||
always suppressed comments and APPn blocks.) jpegtran now also preserves
|
||||
JFIF version and resolution information.
|
||||
|
||||
New decompressor library feature: COM and APPn markers found in the input
|
||||
file can be saved in memory for later use by the application. (Before,
|
||||
you had to code this up yourself with a custom marker processor.)
|
||||
|
||||
There is an unused field "void * client_data" now in compress and decompress
|
||||
parameter structs; this may be useful in some applications.
|
||||
|
||||
JFIF version number information is now saved by the decoder and accepted by
|
||||
the encoder. jpegtran uses this to copy the source file's version number,
|
||||
to ensure "jpegtran -copy all" won't create bogus files that contain JFXX
|
||||
extensions but claim to be version 1.01. Applications that generate their
|
||||
own JFXX extension markers also (finally) have a supported way to cause the
|
||||
encoder to emit JFIF version number 1.02.
|
||||
|
||||
djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather
|
||||
than as unknown APP0 markers.
|
||||
|
||||
In -verbose mode, djpeg and rdjpgcom will try to print the contents of
|
||||
APP12 markers as text. Some digital cameras store useful text information
|
||||
in APP12 markers.
|
||||
|
||||
Handling of truncated data streams is more robust: blocks beyond the one in
|
||||
which the error occurs will be output as uniform gray, or left unchanged
|
||||
if decoding a progressive JPEG. The appearance no longer depends on the
|
||||
Huffman tables being used.
|
||||
|
||||
Huffman tables are checked for validity much more carefully than before.
|
||||
|
||||
To avoid the Unisys LZW patent, djpeg's GIF output capability has been
|
||||
changed to produce "uncompressed GIFs", and cjpeg's GIF input capability
|
||||
has been removed altogether. We're not happy about it either, but there
|
||||
seems to be no good alternative.
|
||||
|
||||
The configure script now supports building libjpeg as a shared library
|
||||
on many flavors of Unix (all the ones that GNU libtool knows how to
|
||||
build shared libraries for). Use "./configure --enable-shared" to
|
||||
try this out.
|
||||
|
||||
New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio.
|
||||
Also, a jconfig file and a build script for Metrowerks CodeWarrior
|
||||
on Apple Macintosh. makefile.dj has been updated for DJGPP v2, and there
|
||||
are miscellaneous other minor improvements in the makefiles.
|
||||
|
||||
jmemmac.c now knows how to create temporary files following Mac System 7
|
||||
conventions.
|
||||
|
||||
djpeg's -map switch is now able to read raw-format PPM files reliably.
|
||||
|
||||
cjpeg -progressive -restart no longer generates any unnecessary DRI markers.
|
||||
|
||||
Multiple calls to jpeg_simple_progression for a single JPEG object
|
||||
no longer leak memory.
|
||||
|
||||
|
||||
Version 6a 7-Feb-96
|
||||
--------------------
|
||||
|
||||
Library initialization sequence modified to detect version mismatches
|
||||
and struct field packing mismatches between library and calling application.
|
||||
This change requires applications to be recompiled, but does not require
|
||||
any application source code change.
|
||||
|
||||
All routine declarations changed to the style "GLOBAL(type) name ...",
|
||||
that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the
|
||||
routine's return type as an argument. This makes it possible to add
|
||||
Microsoft-style linkage keywords to all the routines by changing just
|
||||
these macros. Note that any application code that was using these macros
|
||||
will have to be changed.
|
||||
|
||||
DCT coefficient quantization tables are now stored in normal array order
|
||||
rather than zigzag order. Application code that calls jpeg_add_quant_table,
|
||||
or otherwise manipulates quantization tables directly, will need to be
|
||||
changed. If you need to make such code work with either older or newer
|
||||
versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is
|
||||
recommended.
|
||||
|
||||
djpeg's trace capability now dumps DQT tables in natural order, not zigzag
|
||||
order. This allows the trace output to be made into a "-qtables" file
|
||||
more easily.
|
||||
|
||||
New system-dependent memory manager module for use on Apple Macintosh.
|
||||
|
||||
Fix bug in cjpeg's -smooth option: last one or two scanlines would be
|
||||
duplicates of the prior line unless the image height mod 16 was 1 or 2.
|
||||
|
||||
Repair minor problems in VMS, BCC, MC6 makefiles.
|
||||
|
||||
New configure script based on latest GNU Autoconf.
|
||||
|
||||
Correct the list of include files needed by MetroWerks C for ccommand().
|
||||
|
||||
Numerous small documentation updates.
|
||||
|
||||
|
||||
Version 6 2-Aug-95
|
||||
-------------------
|
||||
|
||||
Progressive JPEG support: library can read and write full progressive JPEG
|
||||
files. A "buffered image" mode supports incremental decoding for on-the-fly
|
||||
display of progressive images. Simply recompiling an existing IJG-v5-based
|
||||
decoder with v6 should allow it to read progressive files, though of course
|
||||
without any special progressive display.
|
||||
|
||||
New "jpegtran" application performs lossless transcoding between different
|
||||
JPEG formats; primarily, it can be used to convert baseline to progressive
|
||||
JPEG and vice versa. In support of jpegtran, the library now allows lossless
|
||||
reading and writing of JPEG files as DCT coefficient arrays. This ability
|
||||
may be of use in other applications.
|
||||
|
||||
Notes for programmers:
|
||||
* We changed jpeg_start_decompress() to be able to suspend; this makes all
|
||||
decoding modes available to suspending-input applications. However,
|
||||
existing applications that use suspending input will need to be changed
|
||||
to check the return value from jpeg_start_decompress(). You don't need to
|
||||
do anything if you don't use a suspending data source.
|
||||
* We changed the interface to the virtual array routines: access_virt_array
|
||||
routines now take a count of the number of rows to access this time. The
|
||||
last parameter to request_virt_array routines is now interpreted as the
|
||||
maximum number of rows that may be accessed at once, but not necessarily
|
||||
the height of every access.
|
||||
|
||||
|
||||
Version 5b 15-Mar-95
|
||||
---------------------
|
||||
|
||||
Correct bugs with grayscale images having v_samp_factor > 1.
|
||||
|
||||
jpeg_write_raw_data() now supports output suspension.
|
||||
|
||||
Correct bugs in "configure" script for case of compiling in
|
||||
a directory other than the one containing the source files.
|
||||
|
||||
Repair bug in jquant1.c: sometimes didn't use as many colors as it could.
|
||||
|
||||
Borland C makefile and jconfig file work under either MS-DOS or OS/2.
|
||||
|
||||
Miscellaneous improvements to documentation.
|
||||
|
||||
|
||||
Version 5a 7-Dec-94
|
||||
--------------------
|
||||
|
||||
Changed color conversion roundoff behavior so that grayscale values are
|
||||
represented exactly. (This causes test image files to change.)
|
||||
|
||||
Make ordered dither use 16x16 instead of 4x4 pattern for a small quality
|
||||
improvement.
|
||||
|
||||
New configure script based on latest GNU Autoconf.
|
||||
Fix configure script to handle CFLAGS correctly.
|
||||
Rename *.auto files to *.cfg, so that configure script still works if
|
||||
file names have been truncated for DOS.
|
||||
|
||||
Fix bug in rdbmp.c: didn't allow for extra data between header and image.
|
||||
|
||||
Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data.
|
||||
|
||||
Fix several bugs in rdrle.c.
|
||||
|
||||
NEED_SHORT_EXTERNAL_NAMES option was broken.
|
||||
|
||||
Revise jerror.h/jerror.c for more flexibility in message table.
|
||||
|
||||
Repair oversight in jmemname.c NO_MKTEMP case: file could be there
|
||||
but unreadable.
|
||||
|
||||
|
||||
Version 5 24-Sep-94
|
||||
--------------------
|
||||
|
||||
Version 5 represents a nearly complete redesign and rewrite of the IJG
|
||||
software. Major user-visible changes include:
|
||||
* Automatic configuration simplifies installation for most Unix systems.
|
||||
* A range of speed vs. image quality tradeoffs are supported.
|
||||
This includes resizing of an image during decompression: scaling down
|
||||
by a factor of 1/2, 1/4, or 1/8 is handled very efficiently.
|
||||
* New programs rdjpgcom and wrjpgcom allow insertion and extraction
|
||||
of text comments in a JPEG file.
|
||||
|
||||
The application programmer's interface to the library has changed completely.
|
||||
Notable improvements include:
|
||||
* We have eliminated the use of callback routines for handling the
|
||||
uncompressed image data. The application now sees the library as a
|
||||
set of routines that it calls to read or write image data on a
|
||||
scanline-by-scanline basis.
|
||||
* The application image data is represented in a conventional interleaved-
|
||||
pixel format, rather than as a separate array for each color channel.
|
||||
This can save a copying step in many programs.
|
||||
* The handling of compressed data has been cleaned up: the application can
|
||||
supply routines to source or sink the compressed data. It is possible to
|
||||
suspend processing on source/sink buffer overrun, although this is not
|
||||
supported in all operating modes.
|
||||
* All static state has been eliminated from the library, so that multiple
|
||||
instances of compression or decompression can be active concurrently.
|
||||
* JPEG abbreviated datastream formats are supported, ie, quantization and
|
||||
Huffman tables can be stored separately from the image data.
|
||||
* And not only that, but the documentation of the library has improved
|
||||
considerably!
|
||||
|
||||
|
||||
The last widely used release before the version 5 rewrite was version 4A of
|
||||
18-Feb-93. Change logs before that point have been discarded, since they
|
||||
are not of much interest after the rewrite.
|
339
Build/VS2010/StaticSDKs/XPlatform/jpeg/cjpeg.1
Normal file
339
Build/VS2010/StaticSDKs/XPlatform/jpeg/cjpeg.1
Normal file
@ -0,0 +1,339 @@
|
||||
.TH CJPEG 1 "14 November 2010"
|
||||
.SH NAME
|
||||
cjpeg \- compress an image file to a JPEG file
|
||||
.SH SYNOPSIS
|
||||
.B cjpeg
|
||||
[
|
||||
.I options
|
||||
]
|
||||
[
|
||||
.I filename
|
||||
]
|
||||
.LP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
.B cjpeg
|
||||
compresses the named image file, or the standard input if no file is
|
||||
named, and produces a JPEG/JFIF file on the standard output.
|
||||
The currently supported input file formats are: PPM (PBMPLUS color
|
||||
format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
|
||||
Toolkit format). (RLE is supported only if the URT library is available.)
|
||||
.SH OPTIONS
|
||||
All switch names may be abbreviated; for example,
|
||||
.B \-grayscale
|
||||
may be written
|
||||
.B \-gray
|
||||
or
|
||||
.BR \-gr .
|
||||
Most of the "basic" switches can be abbreviated to as little as one letter.
|
||||
Upper and lower case are equivalent (thus
|
||||
.B \-BMP
|
||||
is the same as
|
||||
.BR \-bmp ).
|
||||
British spellings are also accepted (e.g.,
|
||||
.BR \-greyscale ),
|
||||
though for brevity these are not mentioned below.
|
||||
.PP
|
||||
The basic switches are:
|
||||
.TP
|
||||
.BI \-quality " N[,...]"
|
||||
Scale quantization tables to adjust image quality. Quality is 0 (worst) to
|
||||
100 (best); default is 75. (See below for more info.)
|
||||
.TP
|
||||
.B \-grayscale
|
||||
Create monochrome JPEG file from color input. Be sure to use this switch when
|
||||
compressing a grayscale BMP file, because
|
||||
.B cjpeg
|
||||
isn't bright enough to notice whether a BMP file uses only shades of gray.
|
||||
By saying
|
||||
.BR \-grayscale ,
|
||||
you'll get a smaller JPEG file that takes less time to process.
|
||||
.TP
|
||||
.B \-optimize
|
||||
Perform optimization of entropy encoding parameters. Without this, default
|
||||
encoding parameters are used.
|
||||
.B \-optimize
|
||||
usually makes the JPEG file a little smaller, but
|
||||
.B cjpeg
|
||||
runs somewhat slower and needs much more memory. Image quality and speed of
|
||||
decompression are unaffected by
|
||||
.BR \-optimize .
|
||||
.TP
|
||||
.B \-progressive
|
||||
Create progressive JPEG file (see below).
|
||||
.TP
|
||||
.BI \-scale " M/N"
|
||||
Scale the output image by a factor M/N. Currently supported scale factors are
|
||||
M/N with all N from 1 to 16, where M is the destination DCT size, which is 8
|
||||
by default (see
|
||||
.BI \-block " N"
|
||||
switch below).
|
||||
.TP
|
||||
.B \-targa
|
||||
Input file is Targa format. Targa files that contain an "identification"
|
||||
field will not be automatically recognized by
|
||||
.BR cjpeg ;
|
||||
for such files you must specify
|
||||
.B \-targa
|
||||
to make
|
||||
.B cjpeg
|
||||
treat the input as Targa format.
|
||||
For most Targa files, you won't need this switch.
|
||||
.PP
|
||||
The
|
||||
.B \-quality
|
||||
switch lets you trade off compressed file size against quality of the
|
||||
reconstructed image: the higher the quality setting, the larger the JPEG file,
|
||||
and the closer the output image will be to the original input. Normally you
|
||||
want to use the lowest quality setting (smallest file) that decompresses into
|
||||
something visually indistinguishable from the original image. For this
|
||||
purpose the quality setting should be between 50 and 95; the default of 75 is
|
||||
often about right. If you see defects at
|
||||
.B \-quality
|
||||
75, then go up 5 or 10 counts at a time until you are happy with the output
|
||||
image. (The optimal setting will vary from one image to another.)
|
||||
.PP
|
||||
.B \-quality
|
||||
100 will generate a quantization table of all 1's, minimizing loss in the
|
||||
quantization step (but there is still information loss in subsampling, as well
|
||||
as roundoff error). This setting is mainly of interest for experimental
|
||||
purposes. Quality values above about 95 are
|
||||
.B not
|
||||
recommended for normal use; the compressed file size goes up dramatically for
|
||||
hardly any gain in output image quality.
|
||||
.PP
|
||||
In the other direction, quality values below 50 will produce very small files
|
||||
of low image quality. Settings around 5 to 10 might be useful in preparing an
|
||||
index of a large image library, for example. Try
|
||||
.B \-quality
|
||||
2 (or so) for some amusing Cubist effects. (Note: quality
|
||||
values below about 25 generate 2-byte quantization tables, which are
|
||||
considered optional in the JPEG standard.
|
||||
.B cjpeg
|
||||
emits a warning message when you give such a quality value, because some
|
||||
other JPEG programs may be unable to decode the resulting file. Use
|
||||
.B \-baseline
|
||||
if you need to ensure compatibility at low quality values.)
|
||||
.PP
|
||||
The
|
||||
.B \-quality
|
||||
option has been extended in IJG version 7 for support of separate quality
|
||||
settings for luminance and chrominance (or in general, for every provided
|
||||
quantization table slot). This feature is useful for high-quality
|
||||
applications which cannot accept the damage of color data by coarse
|
||||
subsampling settings. You can now easily reduce the color data amount more
|
||||
smoothly with finer control without separate subsampling. The resulting file
|
||||
is fully compliant with standard JPEG decoders.
|
||||
Note that the
|
||||
.B \-quality
|
||||
ratings refer to the quantization table slots, and that the last value is
|
||||
replicated if there are more q-table slots than parameters. The default
|
||||
q-table slots are 0 for luminance and 1 for chrominance with default tables as
|
||||
given in the JPEG standard. This is compatible with the old behaviour in case
|
||||
that only one parameter is given, which is then used for both luminance and
|
||||
chrominance (slots 0 and 1). More or custom quantization tables can be set
|
||||
with
|
||||
.B \-qtables
|
||||
and assigned to components with
|
||||
.B \-qslots
|
||||
parameter (see the "wizard" switches below).
|
||||
.B Caution:
|
||||
You must explicitly add
|
||||
.BI \-sample " 1x1"
|
||||
for efficient separate color
|
||||
quality selection, since the default value used by library is 2x2!
|
||||
.PP
|
||||
The
|
||||
.B \-progressive
|
||||
switch creates a "progressive JPEG" file. In this type of JPEG file, the data
|
||||
is stored in multiple scans of increasing quality. If the file is being
|
||||
transmitted over a slow communications link, the decoder can use the first
|
||||
scan to display a low-quality image very quickly, and can then improve the
|
||||
display with each subsequent scan. The final image is exactly equivalent to a
|
||||
standard JPEG file of the same quality setting, and the total file size is
|
||||
about the same --- often a little smaller.
|
||||
.PP
|
||||
Switches for advanced users:
|
||||
.TP
|
||||
.BI \-block " N"
|
||||
Set DCT block size. All N from 1 to 16 are possible.
|
||||
Default is 8 (baseline format).
|
||||
Larger values produce higher compression,
|
||||
smaller values produce higher quality
|
||||
(exact DCT stage possible with 1 or 2; with the default quality of 75 and
|
||||
default Luminance qtable the DCT+Quantization stage is lossless for N=1).
|
||||
CAUTION: An implementation of the JPEG SmartScale extension is required for
|
||||
this feature. SmartScale enabled JPEG is not yet widely implemented, so
|
||||
many decoders will be unable to view a SmartScale extended JPEG file at all.
|
||||
.TP
|
||||
.B \-dct int
|
||||
Use integer DCT method (default).
|
||||
.TP
|
||||
.B \-dct fast
|
||||
Use fast integer DCT (less accurate).
|
||||
.TP
|
||||
.B \-dct float
|
||||
Use floating-point DCT method.
|
||||
The float method is very slightly more accurate than the int method, but is
|
||||
much slower unless your machine has very fast floating-point hardware. Also
|
||||
note that results of the floating-point method may vary slightly across
|
||||
machines, while the integer methods should give the same results everywhere.
|
||||
The fast integer method is much less accurate than the other two.
|
||||
.TP
|
||||
.B \-nosmooth
|
||||
Don't use high-quality downsampling.
|
||||
.TP
|
||||
.BI \-restart " N"
|
||||
Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
|
||||
attached to the number.
|
||||
.B \-restart 0
|
||||
(the default) means no restart markers.
|
||||
.TP
|
||||
.BI \-smooth " N"
|
||||
Smooth the input image to eliminate dithering noise. N, ranging from 1 to
|
||||
100, indicates the strength of smoothing. 0 (the default) means no smoothing.
|
||||
.TP
|
||||
.BI \-maxmemory " N"
|
||||
Set limit for amount of memory to use in processing large images. Value is
|
||||
in thousands of bytes, or millions of bytes if "M" is attached to the
|
||||
number. For example,
|
||||
.B \-max 4m
|
||||
selects 4000000 bytes. If more space is needed, temporary files will be used.
|
||||
.TP
|
||||
.BI \-outfile " name"
|
||||
Send output image to the named file, not to standard output.
|
||||
.TP
|
||||
.B \-verbose
|
||||
Enable debug printout. More
|
||||
.BR \-v 's
|
||||
give more output. Also, version information is printed at startup.
|
||||
.TP
|
||||
.B \-debug
|
||||
Same as
|
||||
.BR \-verbose .
|
||||
.PP
|
||||
The
|
||||
.B \-restart
|
||||
option inserts extra markers that allow a JPEG decoder to resynchronize after
|
||||
a transmission error. Without restart markers, any damage to a compressed
|
||||
file will usually ruin the image from the point of the error to the end of the
|
||||
image; with restart markers, the damage is usually confined to the portion of
|
||||
the image up to the next restart marker. Of course, the restart markers
|
||||
occupy extra space. We recommend
|
||||
.B \-restart 1
|
||||
for images that will be transmitted across unreliable networks such as Usenet.
|
||||
.PP
|
||||
The
|
||||
.B \-smooth
|
||||
option filters the input to eliminate fine-scale noise. This is often useful
|
||||
when converting dithered images to JPEG: a moderate smoothing factor of 10 to
|
||||
50 gets rid of dithering patterns in the input file, resulting in a smaller
|
||||
JPEG file and a better-looking image. Too large a smoothing factor will
|
||||
visibly blur the image, however.
|
||||
.PP
|
||||
Switches for wizards:
|
||||
.TP
|
||||
.B \-arithmetic
|
||||
Use arithmetic coding.
|
||||
.B Caution:
|
||||
arithmetic coded JPEG is not yet widely implemented, so many decoders will be
|
||||
unable to view an arithmetic coded JPEG file at all.
|
||||
.TP
|
||||
.B \-baseline
|
||||
Force baseline-compatible quantization tables to be generated. This clamps
|
||||
quantization values to 8 bits even at low quality settings. (This switch is
|
||||
poorly named, since it does not ensure that the output is actually baseline
|
||||
JPEG. For example, you can use
|
||||
.B \-baseline
|
||||
and
|
||||
.B \-progressive
|
||||
together.)
|
||||
.TP
|
||||
.BI \-qtables " file"
|
||||
Use the quantization tables given in the specified text file.
|
||||
.TP
|
||||
.BI \-qslots " N[,...]"
|
||||
Select which quantization table to use for each color component.
|
||||
.TP
|
||||
.BI \-sample " HxV[,...]"
|
||||
Set JPEG sampling factors for each color component.
|
||||
.TP
|
||||
.BI \-scans " file"
|
||||
Use the scan script given in the specified text file.
|
||||
.PP
|
||||
The "wizard" switches are intended for experimentation with JPEG. If you
|
||||
don't know what you are doing, \fBdon't use them\fR. These switches are
|
||||
documented further in the file wizard.txt.
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
This example compresses the PPM file foo.ppm with a quality factor of
|
||||
60 and saves the output as foo.jpg:
|
||||
.IP
|
||||
.B cjpeg \-quality
|
||||
.I 60 foo.ppm
|
||||
.B >
|
||||
.I foo.jpg
|
||||
.SH HINTS
|
||||
Color GIF files are not the ideal input for JPEG; JPEG is really intended for
|
||||
compressing full-color (24-bit) images. In particular, don't try to convert
|
||||
cartoons, line drawings, and other images that have only a few distinct
|
||||
colors. GIF works great on these, JPEG does not. If you want to convert a
|
||||
GIF to JPEG, you should experiment with
|
||||
.BR cjpeg 's
|
||||
.B \-quality
|
||||
and
|
||||
.B \-smooth
|
||||
options to get a satisfactory conversion.
|
||||
.B \-smooth 10
|
||||
or so is often helpful.
|
||||
.PP
|
||||
Avoid running an image through a series of JPEG compression/decompression
|
||||
cycles. Image quality loss will accumulate; after ten or so cycles the image
|
||||
may be noticeably worse than it was after one cycle. It's best to use a
|
||||
lossless format while manipulating an image, then convert to JPEG format when
|
||||
you are ready to file the image away.
|
||||
.PP
|
||||
The
|
||||
.B \-optimize
|
||||
option to
|
||||
.B cjpeg
|
||||
is worth using when you are making a "final" version for posting or archiving.
|
||||
It's also a win when you are using low quality settings to make very small
|
||||
JPEG files; the percentage improvement is often a lot more than it is on
|
||||
larger files. (At present,
|
||||
.B \-optimize
|
||||
mode is always selected when generating progressive JPEG files.)
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B JPEGMEM
|
||||
If this environment variable is set, its value is the default memory limit.
|
||||
The value is specified as described for the
|
||||
.B \-maxmemory
|
||||
switch.
|
||||
.B JPEGMEM
|
||||
overrides the default value specified when the program was compiled, and
|
||||
itself is overridden by an explicit
|
||||
.BR \-maxmemory .
|
||||
.SH SEE ALSO
|
||||
.BR djpeg (1),
|
||||
.BR jpegtran (1),
|
||||
.BR rdjpgcom (1),
|
||||
.BR wrjpgcom (1)
|
||||
.br
|
||||
.BR ppm (5),
|
||||
.BR pgm (5)
|
||||
.br
|
||||
Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
|
||||
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
|
||||
.SH AUTHOR
|
||||
Independent JPEG Group
|
||||
.SH BUGS
|
||||
GIF input files are no longer supported, to avoid the Unisys LZW patent.
|
||||
(Conversion of GIF files to JPEG is usually a bad idea anyway.)
|
||||
.PP
|
||||
Not all variants of BMP and Targa file formats are supported.
|
||||
.PP
|
||||
The
|
||||
.B \-targa
|
||||
switch is not a bug, it's a feature. (It would be a bug if the Targa format
|
||||
designers had not been clueless.)
|
639
Build/VS2010/StaticSDKs/XPlatform/jpeg/cjpeg.c
Normal file
639
Build/VS2010/StaticSDKs/XPlatform/jpeg/cjpeg.c
Normal file
@ -0,0 +1,639 @@
|
||||
/*
|
||||
* cjpeg.c
|
||||
*
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2003-2010 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains a command-line user interface for the JPEG compressor.
|
||||
* It should work on any system with Unix- or MS-DOS-style command lines.
|
||||
*
|
||||
* Two different command line styles are permitted, depending on the
|
||||
* compile-time switch TWO_FILE_COMMANDLINE:
|
||||
* cjpeg [options] inputfile outputfile
|
||||
* cjpeg [options] [inputfile]
|
||||
* In the second style, output is always to standard output, which you'd
|
||||
* normally redirect to a file or pipe to some other program. Input is
|
||||
* either from a named file or from standard input (typically redirected).
|
||||
* The second style is convenient on Unix but is unhelpful on systems that
|
||||
* don't support pipes. Also, you MUST use the first style if your system
|
||||
* doesn't do binary I/O to stdin/stdout.
|
||||
* To simplify script writing, the "-outfile" switch is provided. The syntax
|
||||
* cjpeg [options] -outfile outputfile inputfile
|
||||
* works regardless of which command line style is used.
|
||||
*/
|
||||
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include "jversion.h" /* for version message */
|
||||
|
||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||
#ifdef __MWERKS__
|
||||
#include <SIOUX.h> /* Metrowerks needs this */
|
||||
#include <console.h> /* ... and this */
|
||||
#endif
|
||||
#ifdef THINK_C
|
||||
#include <console.h> /* Think declares it here */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Create the add-on message string table. */
|
||||
|
||||
#define JMESSAGE(code,string) string ,
|
||||
|
||||
static const char * const cdjpeg_message_table[] = {
|
||||
#include "cderror.h"
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* This routine determines what format the input file is,
|
||||
* and selects the appropriate input-reading module.
|
||||
*
|
||||
* To determine which family of input formats the file belongs to,
|
||||
* we may look only at the first byte of the file, since C does not
|
||||
* guarantee that more than one character can be pushed back with ungetc.
|
||||
* Looking at additional bytes would require one of these approaches:
|
||||
* 1) assume we can fseek() the input file (fails for piped input);
|
||||
* 2) assume we can push back more than one character (works in
|
||||
* some C implementations, but unportable);
|
||||
* 3) provide our own buffering (breaks input readers that want to use
|
||||
* stdio directly, such as the RLE library);
|
||||
* or 4) don't put back the data, and modify the input_init methods to assume
|
||||
* they start reading after the start of file (also breaks RLE library).
|
||||
* #1 is attractive for MS-DOS but is untenable on Unix.
|
||||
*
|
||||
* The most portable solution for file types that can't be identified by their
|
||||
* first byte is to make the user tell us what they are. This is also the
|
||||
* only approach for "raw" file types that contain only arbitrary values.
|
||||
* We presently apply this method for Targa files. Most of the time Targa
|
||||
* files start with 0x00, so we recognize that case. Potentially, however,
|
||||
* a Targa file could start with any byte value (byte 0 is the length of the
|
||||
* seldom-used ID field), so we provide a switch to force Targa input mode.
|
||||
*/
|
||||
|
||||
static boolean is_targa; /* records user -targa switch */
|
||||
|
||||
|
||||
LOCAL(cjpeg_source_ptr)
|
||||
select_file_type (j_compress_ptr cinfo, FILE * infile)
|
||||
{
|
||||
int c;
|
||||
|
||||
if (is_targa) {
|
||||
#ifdef TARGA_SUPPORTED
|
||||
return jinit_read_targa(cinfo);
|
||||
#else
|
||||
ERREXIT(cinfo, JERR_TGA_NOTCOMP);
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((c = getc(infile)) == EOF)
|
||||
ERREXIT(cinfo, JERR_INPUT_EMPTY);
|
||||
if (ungetc(c, infile) == EOF)
|
||||
ERREXIT(cinfo, JERR_UNGETC_FAILED);
|
||||
|
||||
switch (c) {
|
||||
#ifdef BMP_SUPPORTED
|
||||
case 'B':
|
||||
return jinit_read_bmp(cinfo);
|
||||
#endif
|
||||
#ifdef GIF_SUPPORTED
|
||||
case 'G':
|
||||
return jinit_read_gif(cinfo);
|
||||
#endif
|
||||
#ifdef PPM_SUPPORTED
|
||||
case 'P':
|
||||
return jinit_read_ppm(cinfo);
|
||||
#endif
|
||||
#ifdef RLE_SUPPORTED
|
||||
case 'R':
|
||||
return jinit_read_rle(cinfo);
|
||||
#endif
|
||||
#ifdef TARGA_SUPPORTED
|
||||
case 0x00:
|
||||
return jinit_read_targa(cinfo);
|
||||
#endif
|
||||
default:
|
||||
ERREXIT(cinfo, JERR_UNKNOWN_FORMAT);
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL; /* suppress compiler warnings */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Argument-parsing code.
|
||||
* The switch parser is designed to be useful with DOS-style command line
|
||||
* syntax, ie, intermixed switches and file names, where only the switches
|
||||
* to the left of a given file name affect processing of that file.
|
||||
* The main program in this file doesn't actually use this capability...
|
||||
*/
|
||||
|
||||
|
||||
static const char * progname; /* program name for error messages */
|
||||
static char * outfilename; /* for -outfile switch */
|
||||
|
||||
|
||||
LOCAL(void)
|
||||
usage (void)
|
||||
/* complain about bad command line */
|
||||
{
|
||||
fprintf(stderr, "usage: %s [switches] ", progname);
|
||||
#ifdef TWO_FILE_COMMANDLINE
|
||||
fprintf(stderr, "inputfile outputfile\n");
|
||||
#else
|
||||
fprintf(stderr, "[inputfile]\n");
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "Switches (names may be abbreviated):\n");
|
||||
fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n");
|
||||
fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
|
||||
#ifdef ENTROPY_OPT_SUPPORTED
|
||||
fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
|
||||
#endif
|
||||
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||
fprintf(stderr, " -progressive Create progressive JPEG file\n");
|
||||
#endif
|
||||
#ifdef DCT_SCALING_SUPPORTED
|
||||
fprintf(stderr, " -scale M/N Scale image by fraction M/N, eg, 1/2\n");
|
||||
#endif
|
||||
#ifdef TARGA_SUPPORTED
|
||||
fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n");
|
||||
#endif
|
||||
fprintf(stderr, "Switches for advanced users:\n");
|
||||
#ifdef DCT_SCALING_SUPPORTED
|
||||
fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n");
|
||||
#endif
|
||||
#ifdef DCT_ISLOW_SUPPORTED
|
||||
fprintf(stderr, " -dct int Use integer DCT method%s\n",
|
||||
(JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef DCT_IFAST_SUPPORTED
|
||||
fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
|
||||
(JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef DCT_FLOAT_SUPPORTED
|
||||
fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
|
||||
(JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
|
||||
#endif
|
||||
fprintf(stderr, " -nosmooth Don't use high-quality downsampling\n");
|
||||
fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
|
||||
#ifdef INPUT_SMOOTHING_SUPPORTED
|
||||
fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n");
|
||||
#endif
|
||||
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
||||
fprintf(stderr, " -outfile name Specify name for output file\n");
|
||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||
fprintf(stderr, "Switches for wizards:\n");
|
||||
#ifdef C_ARITH_CODING_SUPPORTED
|
||||
fprintf(stderr, " -arithmetic Use arithmetic coding\n");
|
||||
#endif
|
||||
fprintf(stderr, " -baseline Force baseline quantization tables\n");
|
||||
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
|
||||
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
|
||||
fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n");
|
||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||
fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
|
||||
#endif
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
LOCAL(int)
|
||||
parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
int last_file_arg_seen, boolean for_real)
|
||||
/* Parse optional switches.
|
||||
* Returns argv[] index of first file-name argument (== argc if none).
|
||||
* Any file names with indexes <= last_file_arg_seen are ignored;
|
||||
* they have presumably been processed in a previous iteration.
|
||||
* (Pass 0 for last_file_arg_seen on the first or only iteration.)
|
||||
* for_real is FALSE on the first (dummy) pass; we may skip any expensive
|
||||
* processing.
|
||||
*/
|
||||
{
|
||||
int argn;
|
||||
char * arg;
|
||||
boolean force_baseline;
|
||||
boolean simple_progressive;
|
||||
char * qualityarg = NULL; /* saves -quality parm if any */
|
||||
char * qtablefile = NULL; /* saves -qtables filename if any */
|
||||
char * qslotsarg = NULL; /* saves -qslots parm if any */
|
||||
char * samplearg = NULL; /* saves -sample parm if any */
|
||||
char * scansarg = NULL; /* saves -scans parm if any */
|
||||
|
||||
/* Set up default JPEG parameters. */
|
||||
|
||||
force_baseline = FALSE; /* by default, allow 16-bit quantizers */
|
||||
simple_progressive = FALSE;
|
||||
is_targa = FALSE;
|
||||
outfilename = NULL;
|
||||
cinfo->err->trace_level = 0;
|
||||
|
||||
/* Scan command line options, adjust parameters */
|
||||
|
||||
for (argn = 1; argn < argc; argn++) {
|
||||
arg = argv[argn];
|
||||
if (*arg != '-') {
|
||||
/* Not a switch, must be a file name argument */
|
||||
if (argn <= last_file_arg_seen) {
|
||||
outfilename = NULL; /* -outfile applies to just one input file */
|
||||
continue; /* ignore this name if previously processed */
|
||||
}
|
||||
break; /* else done parsing switches */
|
||||
}
|
||||
arg++; /* advance past switch marker character */
|
||||
|
||||
if (keymatch(arg, "arithmetic", 1)) {
|
||||
/* Use arithmetic coding. */
|
||||
#ifdef C_ARITH_CODING_SUPPORTED
|
||||
cinfo->arith_code = TRUE;
|
||||
#else
|
||||
fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
|
||||
progname);
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
} else if (keymatch(arg, "baseline", 2)) {
|
||||
/* Force baseline-compatible output (8-bit quantizer values). */
|
||||
force_baseline = TRUE;
|
||||
|
||||
} else if (keymatch(arg, "block", 2)) {
|
||||
/* Set DCT block size. */
|
||||
#if defined(DCT_SCALING_SUPPORTED) && defined(JPEG_LIB_VERSION_MAJOR) && \
|
||||
(JPEG_LIB_VERSION_MAJOR > 8 || (JPEG_LIB_VERSION_MAJOR == 8 && \
|
||||
defined(JPEG_LIB_VERSION_MINOR) && JPEG_LIB_VERSION_MINOR >= 3))
|
||||
int val;
|
||||
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%d", &val) != 1)
|
||||
usage();
|
||||
if (val < 1 || val > 16)
|
||||
usage();
|
||||
cinfo->block_size = val;
|
||||
#else
|
||||
fprintf(stderr, "%s: sorry, block size setting not supported\n",
|
||||
progname);
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
} else if (keymatch(arg, "dct", 2)) {
|
||||
/* Select DCT algorithm. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (keymatch(argv[argn], "int", 1)) {
|
||||
cinfo->dct_method = JDCT_ISLOW;
|
||||
} else if (keymatch(argv[argn], "fast", 2)) {
|
||||
cinfo->dct_method = JDCT_IFAST;
|
||||
} else if (keymatch(argv[argn], "float", 2)) {
|
||||
cinfo->dct_method = JDCT_FLOAT;
|
||||
} else
|
||||
usage();
|
||||
|
||||
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
||||
/* Enable debug printouts. */
|
||||
/* On first -d, print version identification */
|
||||
static boolean printed_version = FALSE;
|
||||
|
||||
if (! printed_version) {
|
||||
fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n",
|
||||
JVERSION, JCOPYRIGHT);
|
||||
printed_version = TRUE;
|
||||
}
|
||||
cinfo->err->trace_level++;
|
||||
|
||||
} else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
|
||||
/* Force a monochrome JPEG file to be generated. */
|
||||
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
|
||||
|
||||
} else if (keymatch(arg, "maxmemory", 3)) {
|
||||
/* Maximum memory in Kb (or Mb with 'm'). */
|
||||
long lval;
|
||||
char ch = 'x';
|
||||
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
||||
usage();
|
||||
if (ch == 'm' || ch == 'M')
|
||||
lval *= 1000L;
|
||||
cinfo->mem->max_memory_to_use = lval * 1000L;
|
||||
|
||||
} else if (keymatch(arg, "nosmooth", 3)) {
|
||||
/* Suppress fancy downsampling */
|
||||
cinfo->do_fancy_downsampling = FALSE;
|
||||
|
||||
} else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
|
||||
/* Enable entropy parm optimization. */
|
||||
#ifdef ENTROPY_OPT_SUPPORTED
|
||||
cinfo->optimize_coding = TRUE;
|
||||
#else
|
||||
fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
|
||||
progname);
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
} else if (keymatch(arg, "outfile", 4)) {
|
||||
/* Set output file name. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
outfilename = argv[argn]; /* save it away for later use */
|
||||
|
||||
} else if (keymatch(arg, "progressive", 1)) {
|
||||
/* Select simple progressive mode. */
|
||||
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||
simple_progressive = TRUE;
|
||||
/* We must postpone execution until num_components is known. */
|
||||
#else
|
||||
fprintf(stderr, "%s: sorry, progressive output was not compiled\n",
|
||||
progname);
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
} else if (keymatch(arg, "quality", 1)) {
|
||||
/* Quality ratings (quantization table scaling factors). */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
qualityarg = argv[argn];
|
||||
|
||||
} else if (keymatch(arg, "qslots", 2)) {
|
||||
/* Quantization table slot numbers. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
qslotsarg = argv[argn];
|
||||
/* Must delay setting qslots until after we have processed any
|
||||
* colorspace-determining switches, since jpeg_set_colorspace sets
|
||||
* default quant table numbers.
|
||||
*/
|
||||
|
||||
} else if (keymatch(arg, "qtables", 2)) {
|
||||
/* Quantization tables fetched from file. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
qtablefile = argv[argn];
|
||||
/* We postpone actually reading the file in case -quality comes later. */
|
||||
|
||||
} else if (keymatch(arg, "restart", 1)) {
|
||||
/* Restart interval in MCU rows (or in MCUs with 'b'). */
|
||||
long lval;
|
||||
char ch = 'x';
|
||||
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
||||
usage();
|
||||
if (lval < 0 || lval > 65535L)
|
||||
usage();
|
||||
if (ch == 'b' || ch == 'B') {
|
||||
cinfo->restart_interval = (unsigned int) lval;
|
||||
cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
|
||||
} else {
|
||||
cinfo->restart_in_rows = (int) lval;
|
||||
/* restart_interval will be computed during startup */
|
||||
}
|
||||
|
||||
} else if (keymatch(arg, "sample", 2)) {
|
||||
/* Set sampling factors. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
samplearg = argv[argn];
|
||||
/* Must delay setting sample factors until after we have processed any
|
||||
* colorspace-determining switches, since jpeg_set_colorspace sets
|
||||
* default sampling factors.
|
||||
*/
|
||||
|
||||
} else if (keymatch(arg, "scale", 4)) {
|
||||
/* Scale the image by a fraction M/N. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%d/%d",
|
||||
&cinfo->scale_num, &cinfo->scale_denom) != 2)
|
||||
usage();
|
||||
|
||||
} else if (keymatch(arg, "scans", 4)) {
|
||||
/* Set scan script. */
|
||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
scansarg = argv[argn];
|
||||
/* We must postpone reading the file in case -progressive appears. */
|
||||
#else
|
||||
fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
|
||||
progname);
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
||||
} else if (keymatch(arg, "smooth", 2)) {
|
||||
/* Set input smoothing factor. */
|
||||
int val;
|
||||
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%d", &val) != 1)
|
||||
usage();
|
||||
if (val < 0 || val > 100)
|
||||
usage();
|
||||
cinfo->smoothing_factor = val;
|
||||
|
||||
} else if (keymatch(arg, "targa", 1)) {
|
||||
/* Input file is Targa format. */
|
||||
is_targa = TRUE;
|
||||
|
||||
} else {
|
||||
usage(); /* bogus switch */
|
||||
}
|
||||
}
|
||||
|
||||
/* Post-switch-scanning cleanup */
|
||||
|
||||
if (for_real) {
|
||||
|
||||
/* Set quantization tables for selected quality. */
|
||||
/* Some or all may be overridden if -qtables is present. */
|
||||
if (qualityarg != NULL) /* process -quality if it was present */
|
||||
if (! set_quality_ratings(cinfo, qualityarg, force_baseline))
|
||||
usage();
|
||||
|
||||
if (qtablefile != NULL) /* process -qtables if it was present */
|
||||
if (! read_quant_tables(cinfo, qtablefile, force_baseline))
|
||||
usage();
|
||||
|
||||
if (qslotsarg != NULL) /* process -qslots if it was present */
|
||||
if (! set_quant_slots(cinfo, qslotsarg))
|
||||
usage();
|
||||
|
||||
if (samplearg != NULL) /* process -sample if it was present */
|
||||
if (! set_sample_factors(cinfo, samplearg))
|
||||
usage();
|
||||
|
||||
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||
if (simple_progressive) /* process -progressive; -scans can override */
|
||||
jpeg_simple_progression(cinfo);
|
||||
#endif
|
||||
|
||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||
if (scansarg != NULL) /* process -scans if it was present */
|
||||
if (! read_scan_script(cinfo, scansarg))
|
||||
usage();
|
||||
#endif
|
||||
}
|
||||
|
||||
return argn; /* return index of next arg (file name) */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The main program.
|
||||
*/
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct jpeg_compress_struct cinfo;
|
||||
struct jpeg_error_mgr jerr;
|
||||
#ifdef PROGRESS_REPORT
|
||||
struct cdjpeg_progress_mgr progress;
|
||||
#endif
|
||||
int file_index;
|
||||
cjpeg_source_ptr src_mgr;
|
||||
FILE * input_file;
|
||||
FILE * output_file;
|
||||
JDIMENSION num_scanlines;
|
||||
|
||||
/* On Mac, fetch a command line. */
|
||||
#ifdef USE_CCOMMAND
|
||||
argc = ccommand(&argv);
|
||||
#endif
|
||||
|
||||
progname = argv[0];
|
||||
if (progname == NULL || progname[0] == 0)
|
||||
progname = "cjpeg"; /* in case C library doesn't provide it */
|
||||
|
||||
/* Initialize the JPEG compression object with default error handling. */
|
||||
cinfo.err = jpeg_std_error(&jerr);
|
||||
jpeg_create_compress(&cinfo);
|
||||
/* Add some application-specific error messages (from cderror.h) */
|
||||
jerr.addon_message_table = cdjpeg_message_table;
|
||||
jerr.first_addon_message = JMSG_FIRSTADDONCODE;
|
||||
jerr.last_addon_message = JMSG_LASTADDONCODE;
|
||||
|
||||
/* Now safe to enable signal catcher. */
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
enable_signal_catcher((j_common_ptr) &cinfo);
|
||||
#endif
|
||||
|
||||
/* Initialize JPEG parameters.
|
||||
* Much of this may be overridden later.
|
||||
* In particular, we don't yet know the input file's color space,
|
||||
* but we need to provide some value for jpeg_set_defaults() to work.
|
||||
*/
|
||||
|
||||
cinfo.in_color_space = JCS_RGB; /* arbitrary guess */
|
||||
jpeg_set_defaults(&cinfo);
|
||||
|
||||
/* Scan command line to find file names.
|
||||
* It is convenient to use just one switch-parsing routine, but the switch
|
||||
* values read here are ignored; we will rescan the switches after opening
|
||||
* the input file.
|
||||
*/
|
||||
|
||||
file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
|
||||
|
||||
#ifdef TWO_FILE_COMMANDLINE
|
||||
/* Must have either -outfile switch or explicit output file name */
|
||||
if (outfilename == NULL) {
|
||||
if (file_index != argc-2) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
}
|
||||
outfilename = argv[file_index+1];
|
||||
} else {
|
||||
if (file_index != argc-1) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* Unix style: expect zero or one file name */
|
||||
if (file_index < argc-1) {
|
||||
fprintf(stderr, "%s: only one input file\n", progname);
|
||||
usage();
|
||||
}
|
||||
#endif /* TWO_FILE_COMMANDLINE */
|
||||
|
||||
/* Open the input file. */
|
||||
if (file_index < argc) {
|
||||
if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} else {
|
||||
/* default input file is stdin */
|
||||
input_file = read_stdin();
|
||||
}
|
||||
|
||||
/* Open the output file. */
|
||||
if (outfilename != NULL) {
|
||||
if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} else {
|
||||
/* default output file is stdout */
|
||||
output_file = write_stdout();
|
||||
}
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
start_progress_monitor((j_common_ptr) &cinfo, &progress);
|
||||
#endif
|
||||
|
||||
/* Figure out the input file format, and set up to read it. */
|
||||
src_mgr = select_file_type(&cinfo, input_file);
|
||||
src_mgr->input_file = input_file;
|
||||
|
||||
/* Read the input file header to obtain file size & colorspace. */
|
||||
(*src_mgr->start_input) (&cinfo, src_mgr);
|
||||
|
||||
/* Now that we know input colorspace, fix colorspace-dependent defaults */
|
||||
jpeg_default_colorspace(&cinfo);
|
||||
|
||||
/* Adjust default compression parameters by re-parsing the options */
|
||||
file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
|
||||
|
||||
/* Specify data destination for compression */
|
||||
jpeg_stdio_dest(&cinfo, output_file);
|
||||
|
||||
/* Start compressor */
|
||||
jpeg_start_compress(&cinfo, TRUE);
|
||||
|
||||
/* Process data */
|
||||
while (cinfo.next_scanline < cinfo.image_height) {
|
||||
num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr);
|
||||
(void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines);
|
||||
}
|
||||
|
||||
/* Finish compression and release memory */
|
||||
(*src_mgr->finish_input) (&cinfo, src_mgr);
|
||||
jpeg_finish_compress(&cinfo);
|
||||
jpeg_destroy_compress(&cinfo);
|
||||
|
||||
/* Close files, if we opened them */
|
||||
if (input_file != stdin)
|
||||
fclose(input_file);
|
||||
if (output_file != stdout)
|
||||
fclose(output_file);
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
end_progress_monitor((j_common_ptr) &cinfo);
|
||||
#endif
|
||||
|
||||
/* All done. */
|
||||
exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
|
||||
return 0; /* suppress no-return-value warnings */
|
||||
}
|
402
Build/VS2010/StaticSDKs/XPlatform/jpeg/ckconfig.c
Normal file
402
Build/VS2010/StaticSDKs/XPlatform/jpeg/ckconfig.c
Normal file
@ -0,0 +1,402 @@
|
||||
/*
|
||||
* ckconfig.c
|
||||
*
|
||||
* Copyright (C) 1991-1994, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program is intended to help you determine how to configure the JPEG
|
||||
* software for installation on a particular system. The idea is to try to
|
||||
* compile and execute this program. If your compiler fails to compile the
|
||||
* program, make changes as indicated in the comments below. Once you can
|
||||
* compile the program, run it, and it will produce a "jconfig.h" file for
|
||||
* your system.
|
||||
*
|
||||
* As a general rule, each time you try to compile this program,
|
||||
* pay attention only to the *first* error message you get from the compiler.
|
||||
* Many C compilers will issue lots of spurious error messages once they
|
||||
* have gotten confused. Go to the line indicated in the first error message,
|
||||
* and read the comments preceding that line to see what to change.
|
||||
*
|
||||
* Almost all of the edits you may need to make to this program consist of
|
||||
* changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
|
||||
* or vice versa. This is called defining or undefining that symbol.
|
||||
*/
|
||||
|
||||
|
||||
/* First we must see if your system has the include files we need.
|
||||
* We start out with the assumption that your system has all the ANSI-standard
|
||||
* include files. If you get any error trying to include one of these files,
|
||||
* undefine the corresponding HAVE_xxx symbol.
|
||||
*/
|
||||
|
||||
#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */
|
||||
#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#define HAVE_STDLIB_H /* same thing for stdlib.h */
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h> /* If you ain't got this, you ain't got C. */
|
||||
|
||||
/* We have to see if your string functions are defined by
|
||||
* strings.h (old BSD convention) or string.h (everybody else).
|
||||
* We try the non-BSD convention first; define NEED_BSD_STRINGS
|
||||
* if the compiler says it can't find string.h.
|
||||
*/
|
||||
|
||||
#undef NEED_BSD_STRINGS
|
||||
|
||||
#ifdef NEED_BSD_STRINGS
|
||||
#include <strings.h>
|
||||
#else
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
/* On some systems (especially older Unix machines), type size_t is
|
||||
* defined only in the include file <sys/types.h>. If you get a failure
|
||||
* on the size_t test below, try defining NEED_SYS_TYPES_H.
|
||||
*/
|
||||
|
||||
#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */
|
||||
#ifdef NEED_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Usually type size_t is defined in one of the include files we've included
|
||||
* above. If not, you'll get an error on the "typedef size_t my_size_t;" line.
|
||||
* In that case, first try defining NEED_SYS_TYPES_H just above.
|
||||
* If that doesn't work, you'll have to search through your system library
|
||||
* to figure out which include file defines "size_t". Look for a line that
|
||||
* says "typedef something-or-other size_t;". Then, change the line below
|
||||
* that says "#include <someincludefile.h>" to instead include the file
|
||||
* you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find
|
||||
* type size_t anywhere, try replacing "#include <someincludefile.h>" with
|
||||
* "typedef unsigned int size_t;".
|
||||
*/
|
||||
|
||||
#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */
|
||||
|
||||
#ifdef NEED_SPECIAL_INCLUDE
|
||||
#include <someincludefile.h>
|
||||
#endif
|
||||
|
||||
typedef size_t my_size_t; /* The payoff: do we have size_t now? */
|
||||
|
||||
|
||||
/* The next question is whether your compiler supports ANSI-style function
|
||||
* prototypes. You need to know this in order to choose between using
|
||||
* makefile.ansi and using makefile.unix.
|
||||
* The #define line below is set to assume you have ANSI function prototypes.
|
||||
* If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
|
||||
*/
|
||||
|
||||
#define HAVE_PROTOTYPES
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
int testfunction (int arg1, int * arg2); /* check prototypes */
|
||||
|
||||
struct methods_struct { /* check method-pointer declarations */
|
||||
int (*error_exit) (char *msgtext);
|
||||
int (*trace_message) (char *msgtext);
|
||||
int (*another_method) (void);
|
||||
};
|
||||
|
||||
int testfunction (int arg1, int * arg2) /* check definitions */
|
||||
{
|
||||
return arg2[arg1];
|
||||
}
|
||||
|
||||
int test2function (void) /* check void arg list */
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Now we want to find out if your compiler knows what "unsigned char" means.
|
||||
* If you get an error on the "unsigned char un_char;" line,
|
||||
* then undefine HAVE_UNSIGNED_CHAR.
|
||||
*/
|
||||
|
||||
#define HAVE_UNSIGNED_CHAR
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
unsigned char un_char;
|
||||
#endif
|
||||
|
||||
|
||||
/* Now we want to find out if your compiler knows what "unsigned short" means.
|
||||
* If you get an error on the "unsigned short un_short;" line,
|
||||
* then undefine HAVE_UNSIGNED_SHORT.
|
||||
*/
|
||||
|
||||
#define HAVE_UNSIGNED_SHORT
|
||||
|
||||
#ifdef HAVE_UNSIGNED_SHORT
|
||||
unsigned short un_short;
|
||||
#endif
|
||||
|
||||
|
||||
/* Now we want to find out if your compiler understands type "void".
|
||||
* If you get an error anywhere in here, undefine HAVE_VOID.
|
||||
*/
|
||||
|
||||
#define HAVE_VOID
|
||||
|
||||
#ifdef HAVE_VOID
|
||||
/* Caution: a C++ compiler will insist on complete prototypes */
|
||||
typedef void * void_ptr; /* check void * */
|
||||
#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
|
||||
typedef void (*void_func) (int a, int b);
|
||||
#else
|
||||
typedef void (*void_func) ();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PROTOTYPES /* check void function result */
|
||||
void test3function (void_ptr arg1, void_func arg2)
|
||||
#else
|
||||
void test3function (arg1, arg2)
|
||||
void_ptr arg1;
|
||||
void_func arg2;
|
||||
#endif
|
||||
{
|
||||
char * locptr = (char *) arg1; /* check casting to and from void * */
|
||||
arg1 = (void *) locptr;
|
||||
(*arg2) (1, 2); /* check call of fcn returning void */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Now we want to find out if your compiler knows what "const" means.
|
||||
* If you get an error here, undefine HAVE_CONST.
|
||||
*/
|
||||
|
||||
#define HAVE_CONST
|
||||
|
||||
#ifdef HAVE_CONST
|
||||
static const int carray[3] = {1, 2, 3};
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
int test4function (const int arg1)
|
||||
#else
|
||||
int test4function (arg1)
|
||||
const int arg1;
|
||||
#endif
|
||||
{
|
||||
return carray[arg1];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* If you get an error or warning about this structure definition,
|
||||
* define INCOMPLETE_TYPES_BROKEN.
|
||||
*/
|
||||
|
||||
#undef INCOMPLETE_TYPES_BROKEN
|
||||
|
||||
#ifndef INCOMPLETE_TYPES_BROKEN
|
||||
typedef struct undefined_structure * undef_struct_ptr;
|
||||
#endif
|
||||
|
||||
|
||||
/* If you get an error about duplicate names,
|
||||
* define NEED_SHORT_EXTERNAL_NAMES.
|
||||
*/
|
||||
|
||||
#undef NEED_SHORT_EXTERNAL_NAMES
|
||||
|
||||
#ifndef NEED_SHORT_EXTERNAL_NAMES
|
||||
|
||||
int possibly_duplicate_function ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int possibly_dupli_function ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* OK, that's it. You should not have to change anything beyond this
|
||||
* point in order to compile and execute this program. (You might get
|
||||
* some warnings, but you can ignore them.)
|
||||
* When you run the program, it will make a couple more tests that it
|
||||
* can do automatically, and then it will create jconfig.h and print out
|
||||
* any additional suggestions it has.
|
||||
************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
int is_char_signed (int arg)
|
||||
#else
|
||||
int is_char_signed (arg)
|
||||
int arg;
|
||||
#endif
|
||||
{
|
||||
if (arg == 189) { /* expected result for unsigned char */
|
||||
return 0; /* type char is unsigned */
|
||||
}
|
||||
else if (arg != -67) { /* expected result for signed char */
|
||||
printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
|
||||
printf("I fear the JPEG software will not work at all.\n\n");
|
||||
}
|
||||
return 1; /* assume char is signed otherwise */
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
int is_shifting_signed (long arg)
|
||||
#else
|
||||
int is_shifting_signed (arg)
|
||||
long arg;
|
||||
#endif
|
||||
/* See whether right-shift on a long is signed or not. */
|
||||
{
|
||||
long res = arg >> 4;
|
||||
|
||||
if (res == -0x7F7E80CL) { /* expected result for signed shift */
|
||||
return 1; /* right shift is signed */
|
||||
}
|
||||
/* see if unsigned-shift hack will fix it. */
|
||||
/* we can't just test exact value since it depends on width of long... */
|
||||
res |= (~0L) << (32-4);
|
||||
if (res == -0x7F7E80CL) { /* expected result now? */
|
||||
return 0; /* right shift is unsigned */
|
||||
}
|
||||
printf("Right shift isn't acting as I expect it to.\n");
|
||||
printf("I fear the JPEG software will not work at all.\n\n");
|
||||
return 0; /* try it with unsigned anyway */
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
int main (int argc, char ** argv)
|
||||
#else
|
||||
int main (argc, argv)
|
||||
int argc;
|
||||
char ** argv;
|
||||
#endif
|
||||
{
|
||||
char signed_char_check = (char) (-67);
|
||||
FILE *outfile;
|
||||
|
||||
/* Attempt to write jconfig.h */
|
||||
if ((outfile = fopen("jconfig.h", "w")) == NULL) {
|
||||
printf("Failed to write jconfig.h\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Write out all the info */
|
||||
fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
|
||||
fprintf(outfile, "/* see jconfig.txt for explanations */\n\n");
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
fprintf(outfile, "#define HAVE_PROTOTYPES\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
|
||||
#endif
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
|
||||
#endif
|
||||
#ifdef HAVE_UNSIGNED_SHORT
|
||||
fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
|
||||
#endif
|
||||
#ifdef HAVE_VOID
|
||||
fprintf(outfile, "/* #define void char */\n");
|
||||
#else
|
||||
fprintf(outfile, "#define void char\n");
|
||||
#endif
|
||||
#ifdef HAVE_CONST
|
||||
fprintf(outfile, "/* #define const */\n");
|
||||
#else
|
||||
fprintf(outfile, "#define const\n");
|
||||
#endif
|
||||
if (is_char_signed((int) signed_char_check))
|
||||
fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
|
||||
else
|
||||
fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
|
||||
#ifdef HAVE_STDDEF_H
|
||||
fprintf(outfile, "#define HAVE_STDDEF_H\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef HAVE_STDDEF_H\n");
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
fprintf(outfile, "#define HAVE_STDLIB_H\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef HAVE_STDLIB_H\n");
|
||||
#endif
|
||||
#ifdef NEED_BSD_STRINGS
|
||||
fprintf(outfile, "#define NEED_BSD_STRINGS\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
|
||||
#endif
|
||||
#ifdef NEED_SYS_TYPES_H
|
||||
fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
|
||||
#endif
|
||||
fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
|
||||
#endif
|
||||
#ifdef INCOMPLETE_TYPES_BROKEN
|
||||
fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
|
||||
#else
|
||||
fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
|
||||
#endif
|
||||
fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
|
||||
if (is_shifting_signed(-0x7F7E80B1L))
|
||||
fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
|
||||
else
|
||||
fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
|
||||
fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
|
||||
fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
|
||||
fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n");
|
||||
fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n");
|
||||
fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n");
|
||||
fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n");
|
||||
fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n");
|
||||
fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n");
|
||||
fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n");
|
||||
fprintf(outfile, "#undef DONT_USE_B_MODE\n");
|
||||
fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n");
|
||||
fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
|
||||
|
||||
/* Close the jconfig.h file */
|
||||
fclose(outfile);
|
||||
|
||||
/* User report */
|
||||
printf("Configuration check for Independent JPEG Group's software done.\n");
|
||||
printf("\nI have written the jconfig.h file for you.\n\n");
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
printf("You should use makefile.ansi as the starting point for your Makefile.\n");
|
||||
#else
|
||||
printf("You should use makefile.unix as the starting point for your Makefile.\n");
|
||||
#endif
|
||||
|
||||
#ifdef NEED_SPECIAL_INCLUDE
|
||||
printf("\nYou'll need to change jconfig.h to include the system include file\n");
|
||||
printf("that you found type size_t in, or add a direct definition of type\n");
|
||||
printf("size_t if that's what you used. Just add it to the end.\n");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
118
Build/VS2010/StaticSDKs/XPlatform/jpeg/coderules.txt
Normal file
118
Build/VS2010/StaticSDKs/XPlatform/jpeg/coderules.txt
Normal file
@ -0,0 +1,118 @@
|
||||
IJG JPEG LIBRARY: CODING RULES
|
||||
|
||||
Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
This file is part of the Independent JPEG Group's software.
|
||||
For conditions of distribution and use, see the accompanying README file.
|
||||
|
||||
|
||||
Since numerous people will be contributing code and bug fixes, it's important
|
||||
to establish a common coding style. The goal of using similar coding styles
|
||||
is much more important than the details of just what that style is.
|
||||
|
||||
In general we follow the recommendations of "Recommended C Style and Coding
|
||||
Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
|
||||
Brader). This document is available in the IJG FTP archive (see
|
||||
jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
|
||||
|
||||
Block comments should be laid out thusly:
|
||||
|
||||
/*
|
||||
* Block comments in this style.
|
||||
*/
|
||||
|
||||
We indent statements in K&R style, e.g.,
|
||||
if (test) {
|
||||
then-part;
|
||||
} else {
|
||||
else-part;
|
||||
}
|
||||
with two spaces per indentation level. (This indentation convention is
|
||||
handled automatically by GNU Emacs and many other text editors.)
|
||||
|
||||
Multi-word names should be written in lower case with underscores, e.g.,
|
||||
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
|
||||
are similar but upper case (MULTI_WORD_NAME). Names should be unique within
|
||||
the first fifteen characters. (On some older systems, global names must be
|
||||
unique within six characters. We accommodate this without cluttering the
|
||||
source code by using macros to substitute shorter names.)
|
||||
|
||||
We use function prototypes everywhere; we rely on automatic source code
|
||||
transformation to feed prototype-less C compilers. Transformation is done
|
||||
by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
|
||||
ansi2knr is not very bright, so it imposes a format requirement on function
|
||||
declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
|
||||
should be written in the following style:
|
||||
|
||||
LOCAL(int *)
|
||||
function_name (int a, char *b)
|
||||
{
|
||||
code...
|
||||
}
|
||||
|
||||
Note that each function definition must begin with GLOBAL(type), LOCAL(type),
|
||||
or METHODDEF(type). These macros expand to "static type" or just "type" as
|
||||
appropriate. They provide a readable indication of the routine's usage and
|
||||
can readily be changed for special needs. (For instance, special linkage
|
||||
keywords can be inserted for use in Windows DLLs.)
|
||||
|
||||
ansi2knr does not transform method declarations (function pointers in
|
||||
structs). We handle these with a macro JMETHOD, defined as
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
||||
#else
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
||||
#endif
|
||||
which is used like this:
|
||||
struct function_pointers {
|
||||
JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
|
||||
JMETHOD(void, term_entropy_encoder, (void));
|
||||
};
|
||||
Note the set of parentheses surrounding the parameter list.
|
||||
|
||||
A similar solution is used for forward and external function declarations
|
||||
(see the EXTERN and JPP macros).
|
||||
|
||||
If the code is to work on non-ANSI compilers, we cannot rely on a prototype
|
||||
declaration to coerce actual parameters into the right types. Therefore, use
|
||||
explicit casts on actual parameters whenever the actual parameter type is not
|
||||
identical to the formal parameter. Beware of implicit conversions to "int".
|
||||
|
||||
It seems there are some non-ANSI compilers in which the sizeof() operator
|
||||
is defined to return int, yet size_t is defined as long. Needless to say,
|
||||
this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
|
||||
so that the result is guaranteed to be of type size_t.
|
||||
|
||||
|
||||
The JPEG library is intended to be used within larger programs. Furthermore,
|
||||
we want it to be reentrant so that it can be used by applications that process
|
||||
multiple images concurrently. The following rules support these requirements:
|
||||
|
||||
1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
|
||||
pass these through the common routines provided.
|
||||
|
||||
2. Minimize global namespace pollution. Functions should be declared static
|
||||
wherever possible. (Note that our method-based calling conventions help this
|
||||
a lot: in many modules only the initialization function will ever need to be
|
||||
called directly, so only that function need be externally visible.) All
|
||||
global function names should begin with "jpeg_", and should have an
|
||||
abbreviated name (unique in the first six characters) substituted by macro
|
||||
when NEED_SHORT_EXTERNAL_NAMES is set.
|
||||
|
||||
3. Don't use global variables; anything that must be used in another module
|
||||
should be in the common data structures.
|
||||
|
||||
4. Don't use static variables except for read-only constant tables. Variables
|
||||
that should be private to a module can be placed into private structures (see
|
||||
the system architecture document, structure.txt).
|
||||
|
||||
5. Source file names should begin with "j" for files that are part of the
|
||||
library proper; source files that are not part of the library, such as cjpeg.c
|
||||
and djpeg.c, do not begin with "j". Keep source file names to eight
|
||||
characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
|
||||
compression and decompression code in separate source files --- some
|
||||
applications may want only one half of the library.
|
||||
|
||||
Note: these rules (particularly #4) are not followed religiously in the
|
||||
modules that are used in cjpeg/djpeg but are not part of the JPEG library
|
||||
proper. Those modules are not really intended to be used in other
|
||||
applications.
|
1501
Build/VS2010/StaticSDKs/XPlatform/jpeg/config.guess
vendored
Normal file
1501
Build/VS2010/StaticSDKs/XPlatform/jpeg/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1705
Build/VS2010/StaticSDKs/XPlatform/jpeg/config.sub
vendored
Normal file
1705
Build/VS2010/StaticSDKs/XPlatform/jpeg/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15870
Build/VS2010/StaticSDKs/XPlatform/jpeg/configure
vendored
Normal file
15870
Build/VS2010/StaticSDKs/XPlatform/jpeg/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
318
Build/VS2010/StaticSDKs/XPlatform/jpeg/configure.ac
Normal file
318
Build/VS2010/StaticSDKs/XPlatform/jpeg/configure.ac
Normal file
@ -0,0 +1,318 @@
|
||||
# IJG auto-configuration source file.
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
#
|
||||
# Configure script for IJG libjpeg
|
||||
#
|
||||
|
||||
AC_INIT([libjpeg], [8.3.0])
|
||||
|
||||
# Directory where autotools helper scripts lives.
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
|
||||
# Generate configuration headers.
|
||||
AC_CONFIG_HEADERS([jconfig.h:jconfig.cfg])
|
||||
|
||||
# Hack: disable autoheader so that it doesn't overwrite our cfg template.
|
||||
AUTOHEADER="echo autoheader ignored"
|
||||
|
||||
# Check system type
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
# Initialize Automake
|
||||
# Don't require all the GNU mandated files
|
||||
AM_INIT_AUTOMAKE([-Wall -Werror ansi2knr no-dist foreign])
|
||||
|
||||
# Make --enable-silent-rules the default.
|
||||
# To get verbose build output you may configure
|
||||
# with --disable-silent-rules or use "make V=1".
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
# This is required when using the de-ANSI-fication feature.
|
||||
AM_C_PROTOTYPES
|
||||
|
||||
# Add configure option --enable-maintainer-mode which enables
|
||||
# dependency checking and generation useful to package maintainers.
|
||||
# This is made an option to avoid confusing end users.
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Check for programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_LN_S
|
||||
|
||||
# Check if LD supports linker scripts,
|
||||
# and define automake conditional HAVE_LD_VERSION_SCRIPT if so.
|
||||
AC_ARG_ENABLE([ld-version-script],
|
||||
AS_HELP_STRING([--enable-ld-version-script],
|
||||
[enable linker version script (default is enabled when possible)]),
|
||||
[have_ld_version_script=$enableval], [])
|
||||
if test -z "$have_ld_version_script"; then
|
||||
AC_MSG_CHECKING([if LD -Wl,--version-script works])
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
|
||||
cat > conftest.map <<EOF
|
||||
VERS_1 {
|
||||
global: sym;
|
||||
};
|
||||
|
||||
VERS_2 {
|
||||
global: sym;
|
||||
} VERS_1;
|
||||
EOF
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||
[have_ld_version_script=yes], [have_ld_version_script=no])
|
||||
rm -f conftest.map
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
AC_MSG_RESULT($have_ld_version_script)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||
|
||||
# See if compiler supports prototypes.
|
||||
AC_MSG_CHECKING(for function prototypes)
|
||||
AC_CACHE_VAL(ijg_cv_have_prototypes,
|
||||
[AC_TRY_COMPILE([
|
||||
int testfunction (int arg1, int * arg2); /* check prototypes */
|
||||
struct methods_struct { /* check method-pointer declarations */
|
||||
int (*error_exit) (char *msgtext);
|
||||
int (*trace_message) (char *msgtext);
|
||||
int (*another_method) (void);
|
||||
};
|
||||
int testfunction (int arg1, int * arg2) /* check definitions */
|
||||
{ return arg2[arg1]; }
|
||||
int test2function (void) /* check void arg list */
|
||||
{ return 0; }
|
||||
], [ ], ijg_cv_have_prototypes=yes, ijg_cv_have_prototypes=no)])
|
||||
AC_MSG_RESULT($ijg_cv_have_prototypes)
|
||||
if test $ijg_cv_have_prototypes = yes; then
|
||||
AC_DEFINE([HAVE_PROTOTYPES],[1],[Compiler supports function prototypes.])
|
||||
else
|
||||
echo Your compiler does not seem to know about function prototypes.
|
||||
echo Perhaps it needs a special switch to enable ANSI C mode.
|
||||
echo If so, we recommend running configure like this:
|
||||
echo " ./configure CC='cc -switch'"
|
||||
echo where -switch is the proper switch.
|
||||
fi
|
||||
|
||||
# Check header files
|
||||
AC_CHECK_HEADERS(stddef.h stdlib.h locale.h)
|
||||
AC_CHECK_HEADER(string.h, , AC_DEFINE([NEED_BSD_STRINGS],[1],[Compiler has <strings.h> rather than standard <string.h>.]))
|
||||
|
||||
# See whether type size_t is defined in any ANSI-standard places;
|
||||
# if not, perhaps it is defined in <sys/types.h>.
|
||||
AC_MSG_CHECKING(for size_t)
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#ifdef NEED_BSD_STRINGS
|
||||
#include <strings.h>
|
||||
#else
|
||||
#include <string.h>
|
||||
#endif
|
||||
typedef size_t my_size_t;
|
||||
], [ my_size_t foovar; ], ijg_size_t_ok=yes,
|
||||
[ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"])
|
||||
AC_MSG_RESULT($ijg_size_t_ok)
|
||||
if test "$ijg_size_t_ok" != yes; then
|
||||
AC_CHECK_HEADER(sys/types.h, [AC_DEFINE([NEED_SYS_TYPES_H],[1],[Need to include <sys/types.h> in order to obtain size_t.])
|
||||
AC_EGREP_CPP(size_t, [#include <sys/types.h>],
|
||||
[ijg_size_t_ok="size_t is in sys/types.h"], ijg_size_t_ok=no)],
|
||||
ijg_size_t_ok=no)
|
||||
AC_MSG_RESULT($ijg_size_t_ok)
|
||||
if test "$ijg_size_t_ok" = no; then
|
||||
echo Type size_t is not defined in any of the usual places.
|
||||
echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check compiler characteristics
|
||||
AC_MSG_CHECKING(for type unsigned char)
|
||||
AC_TRY_COMPILE(, [ unsigned char un_char; ],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_UNSIGNED_CHAR],[1],[Compiler supports 'unsigned char'.])], AC_MSG_RESULT(no))
|
||||
dnl
|
||||
AC_MSG_CHECKING(for type unsigned short)
|
||||
AC_TRY_COMPILE(, [ unsigned short un_short; ],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_UNSIGNED_SHORT],[1],[Compiler supports 'unsigned short'.])], AC_MSG_RESULT(no))
|
||||
dnl
|
||||
AC_MSG_CHECKING(for type void)
|
||||
AC_TRY_COMPILE([
|
||||
/* Caution: a C++ compiler will insist on valid prototypes */
|
||||
typedef void * void_ptr; /* check void * */
|
||||
#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
|
||||
typedef void (*void_func) (int a, int b);
|
||||
#else
|
||||
typedef void (*void_func) ();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PROTOTYPES /* check void function result */
|
||||
void test3function (void_ptr arg1, void_func arg2)
|
||||
#else
|
||||
void test3function (arg1, arg2)
|
||||
void_ptr arg1;
|
||||
void_func arg2;
|
||||
#endif
|
||||
{
|
||||
char * locptr = (char *) arg1; /* check casting to and from void * */
|
||||
arg1 = (void *) locptr;
|
||||
(*arg2) (1, 2); /* check call of fcn returning void */
|
||||
}
|
||||
], [ ], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no)
|
||||
AC_DEFINE([void],[char],[Define 'void' as 'char' for archaic compilers that don't understand it.])])
|
||||
AC_C_CONST
|
||||
|
||||
# Check for non-broken inline under various spellings
|
||||
AC_MSG_CHECKING(for inline)
|
||||
ijg_cv_inline=""
|
||||
AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; }
|
||||
int bar() { return foo();], ijg_cv_inline="__inline__",
|
||||
AC_TRY_COMPILE(, [} __inline int foo() { return 0; }
|
||||
int bar() { return foo();], ijg_cv_inline="__inline",
|
||||
AC_TRY_COMPILE(, [} inline int foo() { return 0; }
|
||||
int bar() { return foo();], ijg_cv_inline="inline")))
|
||||
AC_MSG_RESULT($ijg_cv_inline)
|
||||
AC_DEFINE_UNQUOTED([INLINE],[$ijg_cv_inline],[How to obtain function inlining.])
|
||||
|
||||
# We cannot check for bogus warnings, but at least we can check for errors
|
||||
AC_MSG_CHECKING(for broken incomplete types)
|
||||
AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], ,
|
||||
AC_MSG_RESULT(ok),
|
||||
[AC_MSG_RESULT(broken)
|
||||
AC_DEFINE([INCOMPLETE_TYPES_BROKEN],[1],[Compiler does not support pointers to unspecified structures.])])
|
||||
|
||||
# Test whether global names are unique to at least 15 chars
|
||||
AC_MSG_CHECKING(for short external names)
|
||||
AC_TRY_LINK([
|
||||
int possibly_duplicate_function () { return 0; }
|
||||
int possibly_dupli_function () { return 1; }
|
||||
], [ ], AC_MSG_RESULT(ok), [AC_MSG_RESULT(short)
|
||||
AC_DEFINE([NEED_SHORT_EXTERNAL_NAMES],[1],[Linker requires that global names be unique in first 15 characters.])])
|
||||
|
||||
# Run-time checks
|
||||
AC_MSG_CHECKING(to see if char is signed)
|
||||
AC_TRY_RUN([
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
int is_char_signed (int arg)
|
||||
#else
|
||||
int is_char_signed (arg)
|
||||
int arg;
|
||||
#endif
|
||||
{
|
||||
if (arg == 189) { /* expected result for unsigned char */
|
||||
return 0; /* type char is unsigned */
|
||||
}
|
||||
else if (arg != -67) { /* expected result for signed char */
|
||||
printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
|
||||
printf("I fear the JPEG software will not work at all.\n\n");
|
||||
}
|
||||
return 1; /* assume char is signed otherwise */
|
||||
}
|
||||
char signed_char_check = (char) (-67);
|
||||
int main() {
|
||||
exit(is_char_signed((int) signed_char_check));
|
||||
}], [AC_MSG_RESULT(no)
|
||||
AC_DEFINE([CHAR_IS_UNSIGNED],[1],[Characters are unsigned])], AC_MSG_RESULT(yes),
|
||||
[echo Assuming that char is signed on target machine.
|
||||
echo If it is unsigned, this will be a little bit inefficient.
|
||||
])
|
||||
dnl
|
||||
AC_MSG_CHECKING(to see if right shift is signed)
|
||||
AC_TRY_RUN([
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
int is_shifting_signed (long arg)
|
||||
#else
|
||||
int is_shifting_signed (arg)
|
||||
long arg;
|
||||
#endif
|
||||
/* See whether right-shift on a long is signed or not. */
|
||||
{
|
||||
long res = arg >> 4;
|
||||
|
||||
if (res == -0x7F7E80CL) { /* expected result for signed shift */
|
||||
return 1; /* right shift is signed */
|
||||
}
|
||||
/* see if unsigned-shift hack will fix it. */
|
||||
/* we can't just test exact value since it depends on width of long... */
|
||||
res |= (~0L) << (32-4);
|
||||
if (res == -0x7F7E80CL) { /* expected result now? */
|
||||
return 0; /* right shift is unsigned */
|
||||
}
|
||||
printf("Right shift isn't acting as I expect it to.\n");
|
||||
printf("I fear the JPEG software will not work at all.\n\n");
|
||||
return 0; /* try it with unsigned anyway */
|
||||
}
|
||||
int main() {
|
||||
exit(is_shifting_signed(-0x7F7E80B1L));
|
||||
}], [AC_MSG_RESULT(no)
|
||||
AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED],[1],[Broken compiler shifts signed values as an unsigned shift.])], AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(Assuming that right shift is signed on target machine.))
|
||||
dnl
|
||||
AC_MSG_CHECKING(to see if fopen accepts b spec)
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
if (fopen("conftestdata", "wb") != NULL)
|
||||
exit(0);
|
||||
exit(1);
|
||||
}], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no)
|
||||
AC_DEFINE([DONT_USE_B_MODE],[1],[Don't open files in binary mode.])],
|
||||
AC_MSG_RESULT(Assuming that it does.))
|
||||
|
||||
# Configure libtool
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# Select memory manager depending on user input.
|
||||
# If no "-enable-maxmem", use jmemnobs
|
||||
MEMORYMGR='jmemnobs'
|
||||
MAXMEM="no"
|
||||
AC_ARG_ENABLE(maxmem,
|
||||
[ --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB],
|
||||
MAXMEM="$enableval")
|
||||
dnl [# support --with-maxmem for backwards compatibility with IJG V5.]
|
||||
dnl AC_ARG_WITH(maxmem, , MAXMEM="$withval")
|
||||
if test "x$MAXMEM" = xyes; then
|
||||
MAXMEM=1
|
||||
fi
|
||||
if test "x$MAXMEM" != xno; then
|
||||
if test -n "`echo $MAXMEM | sed 's/[[0-9]]//g'`"; then
|
||||
AC_MSG_ERROR(non-numeric argument to --enable-maxmem)
|
||||
fi
|
||||
DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
|
||||
AC_DEFINE_UNQUOTED([DEFAULT_MAX_MEM], [${DEFAULTMAXMEM}], [Maximum data space library will allocate.])
|
||||
AC_MSG_CHECKING([for 'tmpfile()'])
|
||||
AC_TRY_LINK([#include <stdio.h>], [ FILE * tfile = tmpfile(); ],
|
||||
[AC_MSG_RESULT(yes)
|
||||
MEMORYMGR='jmemansi'],
|
||||
[AC_MSG_RESULT(no)
|
||||
dnl if tmpfile is not present, must use jmemname.
|
||||
MEMORYMGR='jmemname'
|
||||
|
||||
# Test for the need to remove temporary files using a signal handler (for cjpeg/djpeg)
|
||||
AC_DEFINE([NEED_SIGNAL_CATCHER],[1],[Need signal handler to clean up temporary files.])
|
||||
AC_MSG_CHECKING([for 'mktemp()'])
|
||||
AC_TRY_LINK(, [ char fname[80]; mktemp(fname); ], AC_MSG_RESULT(yes),
|
||||
[AC_MSG_RESULT(no)
|
||||
AC_DEFINE([NO_MKTEMP],[1],[The mktemp() function is not available.])])])
|
||||
fi
|
||||
AC_SUBST(MEMORYMGR)
|
||||
|
||||
# Extract the library version IDs from jpeglib.h.
|
||||
AC_MSG_CHECKING([libjpeg version number])
|
||||
[JPEG_LIB_VERSION_MAJOR=`sed -e '/^#define JPEG_LIB_VERSION_MAJOR/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`]
|
||||
[JPEG_LIB_VERSION_MINOR=`sed -e '/^#define JPEG_LIB_VERSION_MINOR/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`]
|
||||
[JPEG_LIB_VERSION="`expr $JPEG_LIB_VERSION_MAJOR + $JPEG_LIB_VERSION_MINOR`:0:$JPEG_LIB_VERSION_MINOR"]
|
||||
AC_MSG_RESULT([$JPEG_LIB_VERSION])
|
||||
AC_SUBST([JPEG_LIB_VERSION])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
630
Build/VS2010/StaticSDKs/XPlatform/jpeg/depcomp
Normal file
630
Build/VS2010/StaticSDKs/XPlatform/jpeg/depcomp
Normal file
@ -0,0 +1,630 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||
# Software Foundation, 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; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
252
Build/VS2010/StaticSDKs/XPlatform/jpeg/djpeg.1
Normal file
252
Build/VS2010/StaticSDKs/XPlatform/jpeg/djpeg.1
Normal file
@ -0,0 +1,252 @@
|
||||
.TH DJPEG 1 "3 October 2009"
|
||||
.SH NAME
|
||||
djpeg \- decompress a JPEG file to an image file
|
||||
.SH SYNOPSIS
|
||||
.B djpeg
|
||||
[
|
||||
.I options
|
||||
]
|
||||
[
|
||||
.I filename
|
||||
]
|
||||
.LP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
.B djpeg
|
||||
decompresses the named JPEG file, or the standard input if no file is named,
|
||||
and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP,
|
||||
GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
|
||||
(RLE is supported only if the URT library is available.)
|
||||
.SH OPTIONS
|
||||
All switch names may be abbreviated; for example,
|
||||
.B \-grayscale
|
||||
may be written
|
||||
.B \-gray
|
||||
or
|
||||
.BR \-gr .
|
||||
Most of the "basic" switches can be abbreviated to as little as one letter.
|
||||
Upper and lower case are equivalent (thus
|
||||
.B \-BMP
|
||||
is the same as
|
||||
.BR \-bmp ).
|
||||
British spellings are also accepted (e.g.,
|
||||
.BR \-greyscale ),
|
||||
though for brevity these are not mentioned below.
|
||||
.PP
|
||||
The basic switches are:
|
||||
.TP
|
||||
.BI \-colors " N"
|
||||
Reduce image to at most N colors. This reduces the number of colors used in
|
||||
the output image, so that it can be displayed on a colormapped display or
|
||||
stored in a colormapped file format. For example, if you have an 8-bit
|
||||
display, you'd need to reduce to 256 or fewer colors.
|
||||
.TP
|
||||
.BI \-quantize " N"
|
||||
Same as
|
||||
.BR \-colors .
|
||||
.B \-colors
|
||||
is the recommended name,
|
||||
.B \-quantize
|
||||
is provided only for backwards compatibility.
|
||||
.TP
|
||||
.B \-fast
|
||||
Select recommended processing options for fast, low quality output. (The
|
||||
default options are chosen for highest quality output.) Currently, this is
|
||||
equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
|
||||
.TP
|
||||
.B \-grayscale
|
||||
Force gray-scale output even if JPEG file is color. Useful for viewing on
|
||||
monochrome displays; also,
|
||||
.B djpeg
|
||||
runs noticeably faster in this mode.
|
||||
.TP
|
||||
.BI \-scale " M/N"
|
||||
Scale the output image by a factor M/N. Currently supported scale factors are
|
||||
M/N with all M from 1 to 16, where N is the source DCT size, which is 8 for
|
||||
baseline JPEG. If the /N part is omitted, then M specifies the DCT scaled
|
||||
size to be applied on the given input. For baseline JPEG this is equivalent
|
||||
to M/8 scaling, since the source DCT size for baseline JPEG is 8.
|
||||
Scaling is handy if the image is larger than your screen; also,
|
||||
.B djpeg
|
||||
runs much faster when scaling down the output.
|
||||
.TP
|
||||
.B \-bmp
|
||||
Select BMP output format (Windows flavor). 8-bit colormapped format is
|
||||
emitted if
|
||||
.B \-colors
|
||||
or
|
||||
.B \-grayscale
|
||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
||||
format is emitted.
|
||||
.TP
|
||||
.B \-gif
|
||||
Select GIF output format. Since GIF does not support more than 256 colors,
|
||||
.B \-colors 256
|
||||
is assumed (unless you specify a smaller number of colors).
|
||||
.TP
|
||||
.B \-os2
|
||||
Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is
|
||||
emitted if
|
||||
.B \-colors
|
||||
or
|
||||
.B \-grayscale
|
||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
||||
format is emitted.
|
||||
.TP
|
||||
.B \-pnm
|
||||
Select PBMPLUS (PPM/PGM) output format (this is the default format).
|
||||
PGM is emitted if the JPEG file is gray-scale or if
|
||||
.B \-grayscale
|
||||
is specified; otherwise PPM is emitted.
|
||||
.TP
|
||||
.B \-rle
|
||||
Select RLE output format. (Requires URT library.)
|
||||
.TP
|
||||
.B \-targa
|
||||
Select Targa output format. Gray-scale format is emitted if the JPEG file is
|
||||
gray-scale or if
|
||||
.B \-grayscale
|
||||
is specified; otherwise, colormapped format is emitted if
|
||||
.B \-colors
|
||||
is specified; otherwise, 24-bit full-color format is emitted.
|
||||
.PP
|
||||
Switches for advanced users:
|
||||
.TP
|
||||
.B \-dct int
|
||||
Use integer DCT method (default).
|
||||
.TP
|
||||
.B \-dct fast
|
||||
Use fast integer DCT (less accurate).
|
||||
.TP
|
||||
.B \-dct float
|
||||
Use floating-point DCT method.
|
||||
The float method is very slightly more accurate than the int method, but is
|
||||
much slower unless your machine has very fast floating-point hardware. Also
|
||||
note that results of the floating-point method may vary slightly across
|
||||
machines, while the integer methods should give the same results everywhere.
|
||||
The fast integer method is much less accurate than the other two.
|
||||
.TP
|
||||
.B \-dither fs
|
||||
Use Floyd-Steinberg dithering in color quantization.
|
||||
.TP
|
||||
.B \-dither ordered
|
||||
Use ordered dithering in color quantization.
|
||||
.TP
|
||||
.B \-dither none
|
||||
Do not use dithering in color quantization.
|
||||
By default, Floyd-Steinberg dithering is applied when quantizing colors; this
|
||||
is slow but usually produces the best results. Ordered dither is a compromise
|
||||
between speed and quality; no dithering is fast but usually looks awful. Note
|
||||
that these switches have no effect unless color quantization is being done.
|
||||
Ordered dither is only available in
|
||||
.B \-onepass
|
||||
mode.
|
||||
.TP
|
||||
.BI \-map " file"
|
||||
Quantize to the colors used in the specified image file. This is useful for
|
||||
producing multiple files with identical color maps, or for forcing a
|
||||
predefined set of colors to be used. The
|
||||
.I file
|
||||
must be a GIF or PPM file. This option overrides
|
||||
.B \-colors
|
||||
and
|
||||
.BR \-onepass .
|
||||
.TP
|
||||
.B \-nosmooth
|
||||
Don't use high-quality upsampling.
|
||||
.TP
|
||||
.B \-onepass
|
||||
Use one-pass instead of two-pass color quantization. The one-pass method is
|
||||
faster and needs less memory, but it produces a lower-quality image.
|
||||
.B \-onepass
|
||||
is ignored unless you also say
|
||||
.B \-colors
|
||||
.IR N .
|
||||
Also, the one-pass method is always used for gray-scale output (the two-pass
|
||||
method is no improvement then).
|
||||
.TP
|
||||
.BI \-maxmemory " N"
|
||||
Set limit for amount of memory to use in processing large images. Value is
|
||||
in thousands of bytes, or millions of bytes if "M" is attached to the
|
||||
number. For example,
|
||||
.B \-max 4m
|
||||
selects 4000000 bytes. If more space is needed, temporary files will be used.
|
||||
.TP
|
||||
.BI \-outfile " name"
|
||||
Send output image to the named file, not to standard output.
|
||||
.TP
|
||||
.B \-verbose
|
||||
Enable debug printout. More
|
||||
.BR \-v 's
|
||||
give more output. Also, version information is printed at startup.
|
||||
.TP
|
||||
.B \-debug
|
||||
Same as
|
||||
.BR \-verbose .
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
This example decompresses the JPEG file foo.jpg, quantizes it to
|
||||
256 colors, and saves the output in 8-bit BMP format in foo.bmp:
|
||||
.IP
|
||||
.B djpeg \-colors 256 \-bmp
|
||||
.I foo.jpg
|
||||
.B >
|
||||
.I foo.bmp
|
||||
.SH HINTS
|
||||
To get a quick preview of an image, use the
|
||||
.B \-grayscale
|
||||
and/or
|
||||
.B \-scale
|
||||
switches.
|
||||
.B \-grayscale \-scale 1/8
|
||||
is the fastest case.
|
||||
.PP
|
||||
Several options are available that trade off image quality to gain speed.
|
||||
.B \-fast
|
||||
turns on the recommended settings.
|
||||
.PP
|
||||
.B \-dct fast
|
||||
and/or
|
||||
.B \-nosmooth
|
||||
gain speed at a small sacrifice in quality.
|
||||
When producing a color-quantized image,
|
||||
.B \-onepass \-dither ordered
|
||||
is fast but much lower quality than the default behavior.
|
||||
.B \-dither none
|
||||
may give acceptable results in two-pass mode, but is seldom tolerable in
|
||||
one-pass mode.
|
||||
.PP
|
||||
If you are fortunate enough to have very fast floating point hardware,
|
||||
\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most
|
||||
machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
|
||||
not worth using, because its theoretical accuracy advantage is too small to be
|
||||
significant in practice.
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B JPEGMEM
|
||||
If this environment variable is set, its value is the default memory limit.
|
||||
The value is specified as described for the
|
||||
.B \-maxmemory
|
||||
switch.
|
||||
.B JPEGMEM
|
||||
overrides the default value specified when the program was compiled, and
|
||||
itself is overridden by an explicit
|
||||
.BR \-maxmemory .
|
||||
.SH SEE ALSO
|
||||
.BR cjpeg (1),
|
||||
.BR jpegtran (1),
|
||||
.BR rdjpgcom (1),
|
||||
.BR wrjpgcom (1)
|
||||
.br
|
||||
.BR ppm (5),
|
||||
.BR pgm (5)
|
||||
.br
|
||||
Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
|
||||
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
|
||||
.SH AUTHOR
|
||||
Independent JPEG Group
|
||||
.SH BUGS
|
||||
To avoid the Unisys LZW patent,
|
||||
.B djpeg
|
||||
produces uncompressed GIF files. These are larger than they should be, but
|
||||
are readable by standard GIF decoders.
|
617
Build/VS2010/StaticSDKs/XPlatform/jpeg/djpeg.c
Normal file
617
Build/VS2010/StaticSDKs/XPlatform/jpeg/djpeg.c
Normal file
@ -0,0 +1,617 @@
|
||||
/*
|
||||
* djpeg.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains a command-line user interface for the JPEG decompressor.
|
||||
* It should work on any system with Unix- or MS-DOS-style command lines.
|
||||
*
|
||||
* Two different command line styles are permitted, depending on the
|
||||
* compile-time switch TWO_FILE_COMMANDLINE:
|
||||
* djpeg [options] inputfile outputfile
|
||||
* djpeg [options] [inputfile]
|
||||
* In the second style, output is always to standard output, which you'd
|
||||
* normally redirect to a file or pipe to some other program. Input is
|
||||
* either from a named file or from standard input (typically redirected).
|
||||
* The second style is convenient on Unix but is unhelpful on systems that
|
||||
* don't support pipes. Also, you MUST use the first style if your system
|
||||
* doesn't do binary I/O to stdin/stdout.
|
||||
* To simplify script writing, the "-outfile" switch is provided. The syntax
|
||||
* djpeg [options] -outfile outputfile inputfile
|
||||
* works regardless of which command line style is used.
|
||||
*/
|
||||
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include "jversion.h" /* for version message */
|
||||
|
||||
#include <ctype.h> /* to declare isprint() */
|
||||
|
||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||
#ifdef __MWERKS__
|
||||
#include <SIOUX.h> /* Metrowerks needs this */
|
||||
#include <console.h> /* ... and this */
|
||||
#endif
|
||||
#ifdef THINK_C
|
||||
#include <console.h> /* Think declares it here */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Create the add-on message string table. */
|
||||
|
||||
#define JMESSAGE(code,string) string ,
|
||||
|
||||
static const char * const cdjpeg_message_table[] = {
|
||||
#include "cderror.h"
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* This list defines the known output image formats
|
||||
* (not all of which need be supported by a given version).
|
||||
* You can change the default output format by defining DEFAULT_FMT;
|
||||
* indeed, you had better do so if you undefine PPM_SUPPORTED.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
FMT_BMP, /* BMP format (Windows flavor) */
|
||||
FMT_GIF, /* GIF format */
|
||||
FMT_OS2, /* BMP format (OS/2 flavor) */
|
||||
FMT_PPM, /* PPM/PGM (PBMPLUS formats) */
|
||||
FMT_RLE, /* RLE format */
|
||||
FMT_TARGA, /* Targa format */
|
||||
FMT_TIFF /* TIFF format */
|
||||
} IMAGE_FORMATS;
|
||||
|
||||
#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */
|
||||
#define DEFAULT_FMT FMT_PPM
|
||||
#endif
|
||||
|
||||
static IMAGE_FORMATS requested_fmt;
|
||||
|
||||
|
||||
/*
|
||||
* Argument-parsing code.
|
||||
* The switch parser is designed to be useful with DOS-style command line
|
||||
* syntax, ie, intermixed switches and file names, where only the switches
|
||||
* to the left of a given file name affect processing of that file.
|
||||
* The main program in this file doesn't actually use this capability...
|
||||
*/
|
||||
|
||||
|
||||
static const char * progname; /* program name for error messages */
|
||||
static char * outfilename; /* for -outfile switch */
|
||||
|
||||
|
||||
LOCAL(void)
|
||||
usage (void)
|
||||
/* complain about bad command line */
|
||||
{
|
||||
fprintf(stderr, "usage: %s [switches] ", progname);
|
||||
#ifdef TWO_FILE_COMMANDLINE
|
||||
fprintf(stderr, "inputfile outputfile\n");
|
||||
#else
|
||||
fprintf(stderr, "[inputfile]\n");
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "Switches (names may be abbreviated):\n");
|
||||
fprintf(stderr, " -colors N Reduce image to no more than N colors\n");
|
||||
fprintf(stderr, " -fast Fast, low-quality processing\n");
|
||||
fprintf(stderr, " -grayscale Force grayscale output\n");
|
||||
#ifdef IDCT_SCALING_SUPPORTED
|
||||
fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
|
||||
#endif
|
||||
#ifdef BMP_SUPPORTED
|
||||
fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n",
|
||||
(DEFAULT_FMT == FMT_BMP ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef GIF_SUPPORTED
|
||||
fprintf(stderr, " -gif Select GIF output format%s\n",
|
||||
(DEFAULT_FMT == FMT_GIF ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef BMP_SUPPORTED
|
||||
fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n",
|
||||
(DEFAULT_FMT == FMT_OS2 ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef PPM_SUPPORTED
|
||||
fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n",
|
||||
(DEFAULT_FMT == FMT_PPM ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef RLE_SUPPORTED
|
||||
fprintf(stderr, " -rle Select Utah RLE output format%s\n",
|
||||
(DEFAULT_FMT == FMT_RLE ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef TARGA_SUPPORTED
|
||||
fprintf(stderr, " -targa Select Targa output format%s\n",
|
||||
(DEFAULT_FMT == FMT_TARGA ? " (default)" : ""));
|
||||
#endif
|
||||
fprintf(stderr, "Switches for advanced users:\n");
|
||||
#ifdef DCT_ISLOW_SUPPORTED
|
||||
fprintf(stderr, " -dct int Use integer DCT method%s\n",
|
||||
(JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef DCT_IFAST_SUPPORTED
|
||||
fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
|
||||
(JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
|
||||
#endif
|
||||
#ifdef DCT_FLOAT_SUPPORTED
|
||||
fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
|
||||
(JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
|
||||
#endif
|
||||
fprintf(stderr, " -dither fs Use F-S dithering (default)\n");
|
||||
fprintf(stderr, " -dither none Don't use dithering in quantization\n");
|
||||
fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n");
|
||||
#ifdef QUANT_2PASS_SUPPORTED
|
||||
fprintf(stderr, " -map FILE Map to colors used in named image file\n");
|
||||
#endif
|
||||
fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n");
|
||||
#ifdef QUANT_1PASS_SUPPORTED
|
||||
fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n");
|
||||
#endif
|
||||
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
||||
fprintf(stderr, " -outfile name Specify name for output file\n");
|
||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
LOCAL(int)
|
||||
parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
int last_file_arg_seen, boolean for_real)
|
||||
/* Parse optional switches.
|
||||
* Returns argv[] index of first file-name argument (== argc if none).
|
||||
* Any file names with indexes <= last_file_arg_seen are ignored;
|
||||
* they have presumably been processed in a previous iteration.
|
||||
* (Pass 0 for last_file_arg_seen on the first or only iteration.)
|
||||
* for_real is FALSE on the first (dummy) pass; we may skip any expensive
|
||||
* processing.
|
||||
*/
|
||||
{
|
||||
int argn;
|
||||
char * arg;
|
||||
|
||||
/* Set up default JPEG parameters. */
|
||||
requested_fmt = DEFAULT_FMT; /* set default output file format */
|
||||
outfilename = NULL;
|
||||
cinfo->err->trace_level = 0;
|
||||
|
||||
/* Scan command line options, adjust parameters */
|
||||
|
||||
for (argn = 1; argn < argc; argn++) {
|
||||
arg = argv[argn];
|
||||
if (*arg != '-') {
|
||||
/* Not a switch, must be a file name argument */
|
||||
if (argn <= last_file_arg_seen) {
|
||||
outfilename = NULL; /* -outfile applies to just one input file */
|
||||
continue; /* ignore this name if previously processed */
|
||||
}
|
||||
break; /* else done parsing switches */
|
||||
}
|
||||
arg++; /* advance past switch marker character */
|
||||
|
||||
if (keymatch(arg, "bmp", 1)) {
|
||||
/* BMP output format. */
|
||||
requested_fmt = FMT_BMP;
|
||||
|
||||
} else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) ||
|
||||
keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) {
|
||||
/* Do color quantization. */
|
||||
int val;
|
||||
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%d", &val) != 1)
|
||||
usage();
|
||||
cinfo->desired_number_of_colors = val;
|
||||
cinfo->quantize_colors = TRUE;
|
||||
|
||||
} else if (keymatch(arg, "dct", 2)) {
|
||||
/* Select IDCT algorithm. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (keymatch(argv[argn], "int", 1)) {
|
||||
cinfo->dct_method = JDCT_ISLOW;
|
||||
} else if (keymatch(argv[argn], "fast", 2)) {
|
||||
cinfo->dct_method = JDCT_IFAST;
|
||||
} else if (keymatch(argv[argn], "float", 2)) {
|
||||
cinfo->dct_method = JDCT_FLOAT;
|
||||
} else
|
||||
usage();
|
||||
|
||||
} else if (keymatch(arg, "dither", 2)) {
|
||||
/* Select dithering algorithm. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (keymatch(argv[argn], "fs", 2)) {
|
||||
cinfo->dither_mode = JDITHER_FS;
|
||||
} else if (keymatch(argv[argn], "none", 2)) {
|
||||
cinfo->dither_mode = JDITHER_NONE;
|
||||
} else if (keymatch(argv[argn], "ordered", 2)) {
|
||||
cinfo->dither_mode = JDITHER_ORDERED;
|
||||
} else
|
||||
usage();
|
||||
|
||||
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
||||
/* Enable debug printouts. */
|
||||
/* On first -d, print version identification */
|
||||
static boolean printed_version = FALSE;
|
||||
|
||||
if (! printed_version) {
|
||||
fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n",
|
||||
JVERSION, JCOPYRIGHT);
|
||||
printed_version = TRUE;
|
||||
}
|
||||
cinfo->err->trace_level++;
|
||||
|
||||
} else if (keymatch(arg, "fast", 1)) {
|
||||
/* Select recommended processing options for quick-and-dirty output. */
|
||||
cinfo->two_pass_quantize = FALSE;
|
||||
cinfo->dither_mode = JDITHER_ORDERED;
|
||||
if (! cinfo->quantize_colors) /* don't override an earlier -colors */
|
||||
cinfo->desired_number_of_colors = 216;
|
||||
cinfo->dct_method = JDCT_FASTEST;
|
||||
cinfo->do_fancy_upsampling = FALSE;
|
||||
|
||||
} else if (keymatch(arg, "gif", 1)) {
|
||||
/* GIF output format. */
|
||||
requested_fmt = FMT_GIF;
|
||||
|
||||
} else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
|
||||
/* Force monochrome output. */
|
||||
cinfo->out_color_space = JCS_GRAYSCALE;
|
||||
|
||||
} else if (keymatch(arg, "map", 3)) {
|
||||
/* Quantize to a color map taken from an input file. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (for_real) { /* too expensive to do twice! */
|
||||
#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */
|
||||
FILE * mapfile;
|
||||
|
||||
if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
read_color_map(cinfo, mapfile);
|
||||
fclose(mapfile);
|
||||
cinfo->quantize_colors = TRUE;
|
||||
#else
|
||||
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
||||
#endif
|
||||
}
|
||||
|
||||
} else if (keymatch(arg, "maxmemory", 3)) {
|
||||
/* Maximum memory in Kb (or Mb with 'm'). */
|
||||
long lval;
|
||||
char ch = 'x';
|
||||
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
||||
usage();
|
||||
if (ch == 'm' || ch == 'M')
|
||||
lval *= 1000L;
|
||||
cinfo->mem->max_memory_to_use = lval * 1000L;
|
||||
|
||||
} else if (keymatch(arg, "nosmooth", 3)) {
|
||||
/* Suppress fancy upsampling */
|
||||
cinfo->do_fancy_upsampling = FALSE;
|
||||
|
||||
} else if (keymatch(arg, "onepass", 3)) {
|
||||
/* Use fast one-pass quantization. */
|
||||
cinfo->two_pass_quantize = FALSE;
|
||||
|
||||
} else if (keymatch(arg, "os2", 3)) {
|
||||
/* BMP output format (OS/2 flavor). */
|
||||
requested_fmt = FMT_OS2;
|
||||
|
||||
} else if (keymatch(arg, "outfile", 4)) {
|
||||
/* Set output file name. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
outfilename = argv[argn]; /* save it away for later use */
|
||||
|
||||
} else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) {
|
||||
/* PPM/PGM output format. */
|
||||
requested_fmt = FMT_PPM;
|
||||
|
||||
} else if (keymatch(arg, "rle", 1)) {
|
||||
/* RLE output format. */
|
||||
requested_fmt = FMT_RLE;
|
||||
|
||||
} else if (keymatch(arg, "scale", 1)) {
|
||||
/* Scale the output image by a fraction M/N. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%d/%d",
|
||||
&cinfo->scale_num, &cinfo->scale_denom) < 1)
|
||||
usage();
|
||||
|
||||
} else if (keymatch(arg, "targa", 1)) {
|
||||
/* Targa output format. */
|
||||
requested_fmt = FMT_TARGA;
|
||||
|
||||
} else {
|
||||
usage(); /* bogus switch */
|
||||
}
|
||||
}
|
||||
|
||||
return argn; /* return index of next arg (file name) */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Marker processor for COM and interesting APPn markers.
|
||||
* This replaces the library's built-in processor, which just skips the marker.
|
||||
* We want to print out the marker as text, to the extent possible.
|
||||
* Note this code relies on a non-suspending data source.
|
||||
*/
|
||||
|
||||
LOCAL(unsigned int)
|
||||
jpeg_getc (j_decompress_ptr cinfo)
|
||||
/* Read next byte */
|
||||
{
|
||||
struct jpeg_source_mgr * datasrc = cinfo->src;
|
||||
|
||||
if (datasrc->bytes_in_buffer == 0) {
|
||||
if (! (*datasrc->fill_input_buffer) (cinfo))
|
||||
ERREXIT(cinfo, JERR_CANT_SUSPEND);
|
||||
}
|
||||
datasrc->bytes_in_buffer--;
|
||||
return GETJOCTET(*datasrc->next_input_byte++);
|
||||
}
|
||||
|
||||
|
||||
METHODDEF(boolean)
|
||||
print_text_marker (j_decompress_ptr cinfo)
|
||||
{
|
||||
boolean traceit = (cinfo->err->trace_level >= 1);
|
||||
INT32 length;
|
||||
unsigned int ch;
|
||||
unsigned int lastch = 0;
|
||||
|
||||
length = jpeg_getc(cinfo) << 8;
|
||||
length += jpeg_getc(cinfo);
|
||||
length -= 2; /* discount the length word itself */
|
||||
|
||||
if (traceit) {
|
||||
if (cinfo->unread_marker == JPEG_COM)
|
||||
fprintf(stderr, "Comment, length %ld:\n", (long) length);
|
||||
else /* assume it is an APPn otherwise */
|
||||
fprintf(stderr, "APP%d, length %ld:\n",
|
||||
cinfo->unread_marker - JPEG_APP0, (long) length);
|
||||
}
|
||||
|
||||
while (--length >= 0) {
|
||||
ch = jpeg_getc(cinfo);
|
||||
if (traceit) {
|
||||
/* Emit the character in a readable form.
|
||||
* Nonprintables are converted to \nnn form,
|
||||
* while \ is converted to \\.
|
||||
* Newlines in CR, CR/LF, or LF form will be printed as one newline.
|
||||
*/
|
||||
if (ch == '\r') {
|
||||
fprintf(stderr, "\n");
|
||||
} else if (ch == '\n') {
|
||||
if (lastch != '\r')
|
||||
fprintf(stderr, "\n");
|
||||
} else if (ch == '\\') {
|
||||
fprintf(stderr, "\\\\");
|
||||
} else if (isprint(ch)) {
|
||||
putc(ch, stderr);
|
||||
} else {
|
||||
fprintf(stderr, "\\%03o", ch);
|
||||
}
|
||||
lastch = ch;
|
||||
}
|
||||
}
|
||||
|
||||
if (traceit)
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The main program.
|
||||
*/
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct jpeg_error_mgr jerr;
|
||||
#ifdef PROGRESS_REPORT
|
||||
struct cdjpeg_progress_mgr progress;
|
||||
#endif
|
||||
int file_index;
|
||||
djpeg_dest_ptr dest_mgr = NULL;
|
||||
FILE * input_file;
|
||||
FILE * output_file;
|
||||
JDIMENSION num_scanlines;
|
||||
|
||||
/* On Mac, fetch a command line. */
|
||||
#ifdef USE_CCOMMAND
|
||||
argc = ccommand(&argv);
|
||||
#endif
|
||||
|
||||
progname = argv[0];
|
||||
if (progname == NULL || progname[0] == 0)
|
||||
progname = "djpeg"; /* in case C library doesn't provide it */
|
||||
|
||||
/* Initialize the JPEG decompression object with default error handling. */
|
||||
cinfo.err = jpeg_std_error(&jerr);
|
||||
jpeg_create_decompress(&cinfo);
|
||||
/* Add some application-specific error messages (from cderror.h) */
|
||||
jerr.addon_message_table = cdjpeg_message_table;
|
||||
jerr.first_addon_message = JMSG_FIRSTADDONCODE;
|
||||
jerr.last_addon_message = JMSG_LASTADDONCODE;
|
||||
|
||||
/* Insert custom marker processor for COM and APP12.
|
||||
* APP12 is used by some digital camera makers for textual info,
|
||||
* so we provide the ability to display it as text.
|
||||
* If you like, additional APPn marker types can be selected for display,
|
||||
* but don't try to override APP0 or APP14 this way (see libjpeg.doc).
|
||||
*/
|
||||
jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
|
||||
jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
|
||||
|
||||
/* Now safe to enable signal catcher. */
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
enable_signal_catcher((j_common_ptr) &cinfo);
|
||||
#endif
|
||||
|
||||
/* Scan command line to find file names. */
|
||||
/* It is convenient to use just one switch-parsing routine, but the switch
|
||||
* values read here are ignored; we will rescan the switches after opening
|
||||
* the input file.
|
||||
* (Exception: tracing level set here controls verbosity for COM markers
|
||||
* found during jpeg_read_header...)
|
||||
*/
|
||||
|
||||
file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
|
||||
|
||||
#ifdef TWO_FILE_COMMANDLINE
|
||||
/* Must have either -outfile switch or explicit output file name */
|
||||
if (outfilename == NULL) {
|
||||
if (file_index != argc-2) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
}
|
||||
outfilename = argv[file_index+1];
|
||||
} else {
|
||||
if (file_index != argc-1) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* Unix style: expect zero or one file name */
|
||||
if (file_index < argc-1) {
|
||||
fprintf(stderr, "%s: only one input file\n", progname);
|
||||
usage();
|
||||
}
|
||||
#endif /* TWO_FILE_COMMANDLINE */
|
||||
|
||||
/* Open the input file. */
|
||||
if (file_index < argc) {
|
||||
if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} else {
|
||||
/* default input file is stdin */
|
||||
input_file = read_stdin();
|
||||
}
|
||||
|
||||
/* Open the output file. */
|
||||
if (outfilename != NULL) {
|
||||
if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} else {
|
||||
/* default output file is stdout */
|
||||
output_file = write_stdout();
|
||||
}
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
start_progress_monitor((j_common_ptr) &cinfo, &progress);
|
||||
#endif
|
||||
|
||||
/* Specify data source for decompression */
|
||||
jpeg_stdio_src(&cinfo, input_file);
|
||||
|
||||
/* Read file header, set default decompression parameters */
|
||||
(void) jpeg_read_header(&cinfo, TRUE);
|
||||
|
||||
/* Adjust default decompression parameters by re-parsing the options */
|
||||
file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
|
||||
|
||||
/* Initialize the output module now to let it override any crucial
|
||||
* option settings (for instance, GIF wants to force color quantization).
|
||||
*/
|
||||
switch (requested_fmt) {
|
||||
#ifdef BMP_SUPPORTED
|
||||
case FMT_BMP:
|
||||
dest_mgr = jinit_write_bmp(&cinfo, FALSE);
|
||||
break;
|
||||
case FMT_OS2:
|
||||
dest_mgr = jinit_write_bmp(&cinfo, TRUE);
|
||||
break;
|
||||
#endif
|
||||
#ifdef GIF_SUPPORTED
|
||||
case FMT_GIF:
|
||||
dest_mgr = jinit_write_gif(&cinfo);
|
||||
break;
|
||||
#endif
|
||||
#ifdef PPM_SUPPORTED
|
||||
case FMT_PPM:
|
||||
dest_mgr = jinit_write_ppm(&cinfo);
|
||||
break;
|
||||
#endif
|
||||
#ifdef RLE_SUPPORTED
|
||||
case FMT_RLE:
|
||||
dest_mgr = jinit_write_rle(&cinfo);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TARGA_SUPPORTED
|
||||
case FMT_TARGA:
|
||||
dest_mgr = jinit_write_targa(&cinfo);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT);
|
||||
break;
|
||||
}
|
||||
dest_mgr->output_file = output_file;
|
||||
|
||||
/* Start decompressor */
|
||||
(void) jpeg_start_decompress(&cinfo);
|
||||
|
||||
/* Write output file header */
|
||||
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||
|
||||
/* Process data */
|
||||
while (cinfo.output_scanline < cinfo.output_height) {
|
||||
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||
dest_mgr->buffer_height);
|
||||
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||
}
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
/* Hack: count final pass as done in case finish_output does an extra pass.
|
||||
* The library won't have updated completed_passes.
|
||||
*/
|
||||
progress.pub.completed_passes = progress.pub.total_passes;
|
||||
#endif
|
||||
|
||||
/* Finish decompression and release memory.
|
||||
* I must do it in this order because output module has allocated memory
|
||||
* of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
|
||||
*/
|
||||
(*dest_mgr->finish_output) (&cinfo, dest_mgr);
|
||||
(void) jpeg_finish_decompress(&cinfo);
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
|
||||
/* Close files, if we opened them */
|
||||
if (input_file != stdin)
|
||||
fclose(input_file);
|
||||
if (output_file != stdout)
|
||||
fclose(output_file);
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
end_progress_monitor((j_common_ptr) &cinfo);
|
||||
#endif
|
||||
|
||||
/* All done. */
|
||||
exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
|
||||
return 0; /* suppress no-return-value warnings */
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user