From ab5739f571b65bf246d1ed2b3aadbd1ca38db325 Mon Sep 17 00:00:00 2001 From: hybrid Date: Sun, 18 Jul 2010 21:25:27 +0000 Subject: [PATCH] Merged from trunk, revisions 3300-3365. Another large bugfix merge. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@3369 dfc29bdd-3216-0410-991c-e03cc46cb475 --- changes.txt | 165 +- examples/01.HelloWorld/HelloWorld.cbp | 1 + examples/01.HelloWorld/Makefile | 3 +- examples/02.Quake3Map/Makefile | 2 +- examples/02.Quake3Map/Quake3Map.cbp | 1 + .../03.CustomSceneNode/CustomSceneNode.cbp | 1 + examples/03.CustomSceneNode/Makefile | 2 +- examples/04.Movement/Makefile | 2 +- examples/04.Movement/Movement.cbp | 1 + examples/05.UserInterface/Makefile | 4 +- examples/05.UserInterface/UserInterface.cbp | 1 + examples/06.2DGraphics/2DGraphics.cbp | 1 + examples/06.2DGraphics/Makefile | 2 +- examples/07.Collision/Collision.cbp | 1 + examples/07.Collision/Makefile | 2 +- examples/07.Collision/main.cpp | 48 +- examples/08.SpecialFX/Makefile | 2 +- examples/08.SpecialFX/SpecialFX.cbp | 1 + examples/08.SpecialFX/main.cpp | 2 +- examples/09.Meshviewer/Makefile | 2 +- examples/09.Meshviewer/Meshviewer.cbp | 1 + examples/09.Meshviewer/Meshviewer_vc9.vcproj | 2 +- examples/09.Meshviewer/main.cpp | 63 +- examples/10.Shaders/Makefile | 2 +- examples/10.Shaders/Shaders.cbp | 1 + examples/11.PerPixelLighting/Makefile | 2 +- .../11.PerPixelLighting/PerPixelLighting.cbp | 3 + examples/11.PerPixelLighting/main.cpp | 88 +- examples/12.TerrainRendering/Makefile | 2 +- .../12.TerrainRendering/TerrainRendering.cbp | 1 + examples/13.RenderToTexture/Makefile | 2 +- .../13.RenderToTexture/RenderToTexture.cbp | 1 + examples/14.Win32Window/Makefile | 2 +- examples/15.LoadIrrFile/LoadIrrFile.cbp | 1 + examples/15.LoadIrrFile/Makefile | 2 +- examples/16.Quake3MapShader/Makefile | 2 +- .../16.Quake3MapShader/Quake3MapShader.cbp | 1 + ...loWorld for Windows Mobile on PC_v9.vcproj | 4 +- examples/18.SplitScreen/Makefile | 2 +- examples/18.SplitScreen/SplitScreen.cbp | 1 + examples/18.SplitScreen/SplitScreen.sln | 10 +- examples/18.SplitScreen/SplitScreen.vcproj | 2 +- .../18.SplitScreen/SplitScreen_vc8.vcproj | 5 +- examples/18.SplitScreen/main.cpp | 2 +- examples/19.MouseAndJoystick/Makefile | 2 +- .../19.MouseAndJoystick/MouseAndJoystick.cbp | 1 + .../19.MouseAndJoystick/MouseAndJoystick.sln | 10 +- .../MouseAndJoystick.vcproj | 2 +- .../MouseAndJoystick_vc8.vcproj | 2 +- examples/20.ManagedLights/Makefile | 2 +- examples/20.ManagedLights/ManagedLights.cbp | 1 + examples/20.ManagedLights/ManagedLights.sln | 6 +- .../20.ManagedLights/ManagedLights.vcproj | 2 +- examples/21.Quake3Explorer/Makefile | 2 +- examples/21.Quake3Explorer/Quake3Explorer.cbp | 1 + examples/21.Quake3Explorer/main.cpp | 4 +- examples/22.MaterialViewer/Makefile | 2 +- examples/22.MaterialViewer/MaterialViewer.cbp | 1 + examples/22.MaterialViewer/MaterialViewer.sln | 10 +- .../22.MaterialViewer/MaterialViewer.vcproj | 196 +- .../MaterialViewer_vc8.vcproj | 4 +- examples/23.SMeshHandling/Makefile | 2 +- examples/23.SMeshHandling/SMeshHandling.sln | 10 +- .../23.SMeshHandling/SMeshHandling.vcproj | 2 +- .../23.SMeshHandling/SMeshHandling_vc8.vcproj | 4 +- .../23.SMeshHandling/SMeshHandling_vc9.vcproj | 4 +- examples/24.CursorControl/CursorControl.cbp | 60 + examples/24.CursorControl/CursorControl.sln | 21 + .../24.CursorControl/CursorControl.vcproj | 132 + .../24.CursorControl/CursorControl_vc8.vcproj | 190 + .../24.CursorControl/CursorControl_vc9.sln | 18 + .../24.CursorControl/CursorControl_vc9.vcproj | 185 + examples/24.CursorControl/Makefile | 66 + examples/24.CursorControl/main.cpp | 563 ++ examples/BuildAllExamples_v7.sln | 16 +- examples/BuildAllExamples_v8.sln | 28 +- examples/BuildAllExamples_v9.sln | 10 +- examples/Demo/CDemo.cpp | 2 +- examples/Demo/CMainMenu.cpp | 2 +- examples/Demo/Makefile | 4 +- examples/Demo/demo.cbp | 69 + include/IAnimatedMesh.h | 94 + include/ICursorControl.h | 86 + include/IEventReceiver.h | 6 +- include/IFileArchive.h | 3 + include/IFileList.h | 9 +- include/IGUIColorSelectDialog.h | 2 +- include/IGUIEditBox.h | 7 + include/IGUIElement.h | 21 + include/IGUITreeView.h | 98 +- include/IImage.h | 44 - include/ILogger.h | 17 +- include/ISceneCollisionManager.h | 2 +- include/ISceneNodeAnimatorCollisionResponse.h | 2 +- include/IrrCompileConfig.h | 19 +- include/SColor.h | 115 + include/SIrrCreationParameters.h | 6 + include/SLight.h | 2 +- include/SMesh.h | 10 + include/coreutil.h | 33 + include/dimension2d.h | 19 +- include/driverChoice.h | 2 +- include/irrMath.h | 8 +- include/irrString.h | 24 +- include/matrix4.h | 29 +- include/triangle3d.h | 2 +- include/vector2d.h | 8 +- media/fontlucida.png | Bin 17284 -> 19727 bytes media/icon_crosshairs16x16bw1.png | Bin 0 -> 203 bytes media/icon_crosshairs16x16bw2.png | Bin 0 -> 192 bytes media/icon_crosshairs16x16bw3.png | Bin 0 -> 208 bytes media/icon_crosshairs16x16col.png | Bin 0 -> 560 bytes media/iconlist.png | Bin 18198 -> 30951 bytes media/particlegreen.jpg | Bin 0 -> 21777 bytes media/yodan mdl - readme.txt | 36 + media/yodan.mdl | Bin 0 -> 364704 bytes source/Irrlicht/CAnimatedMeshHalfLife.cpp | 1764 +++++ source/Irrlicht/CAnimatedMeshHalfLife.h | 536 ++ source/Irrlicht/CAnimatedMeshSceneNode.cpp | 23 +- source/Irrlicht/CAnimatedMeshSceneNode.h | 1 - .../CBurningShader_Raster_Reference.cpp | 10 +- source/Irrlicht/CColladaFileLoader.cpp | 18 +- source/Irrlicht/CColladaFileLoader.h | 2 +- source/Irrlicht/CColorConverter.cpp | 87 + source/Irrlicht/CColorConverter.h | 6 + source/Irrlicht/CCubeSceneNode.cpp | 1 - source/Irrlicht/CD3D8Driver.cpp | 63 +- source/Irrlicht/CD3D8Driver.h | 4 +- source/Irrlicht/CD3D9Driver.cpp | 45 +- source/Irrlicht/CD3D9Driver.h | 4 +- source/Irrlicht/CD3D9Texture.cpp | 4 +- source/Irrlicht/CDepthBuffer.cpp | 69 + source/Irrlicht/CDepthBuffer.h | 52 +- source/Irrlicht/CFileList.cpp | 11 +- source/Irrlicht/CFileList.h | 9 +- source/Irrlicht/CFileSystem.cpp | 18 +- source/Irrlicht/CGUIColorSelectDialog.cpp | 2 +- source/Irrlicht/CGUIComboBox.cpp | 31 +- source/Irrlicht/CGUIEditBox.cpp | 11 + source/Irrlicht/CGUIEditBox.h | 7 + source/Irrlicht/CGUIEnvironment.cpp | 1 + source/Irrlicht/CGUIModalScreen.cpp | 4 +- source/Irrlicht/CGUIScrollBar.cpp | 29 +- source/Irrlicht/CGUIScrollBar.h | 1 + source/Irrlicht/CGUISkin.cpp | 7 +- source/Irrlicht/CGUISpinBox.cpp | 48 +- source/Irrlicht/CGUISpinBox.h | 2 + source/Irrlicht/CGUIStaticText.cpp | 15 +- source/Irrlicht/CGUIStaticText.h | 1 + source/Irrlicht/CGUITabControl.cpp | 33 +- source/Irrlicht/CGUITabControl.h | 9 +- source/Irrlicht/CGUITable.cpp | 22 +- source/Irrlicht/CGUITable.h | 4 +- source/Irrlicht/CGUITreeView.cpp | 57 +- source/Irrlicht/CGUITreeView.h | 120 +- source/Irrlicht/CGUIWindow.cpp | 57 +- source/Irrlicht/CGUIWindow.h | 2 + source/Irrlicht/CImageLoaderDDS.cpp | 741 ++ source/Irrlicht/CImageLoaderDDS.h | 324 + source/Irrlicht/CImageLoaderPNG.cpp | 4 + source/Irrlicht/CImageLoaderWAL.cpp | 299 + source/Irrlicht/CImageLoaderWAL.h | 75 + source/Irrlicht/CIrrDeviceConsole.cpp | 2 +- source/Irrlicht/CIrrDeviceFB.cpp | 2 +- source/Irrlicht/CIrrDeviceLinux.cpp | 307 +- source/Irrlicht/CIrrDeviceLinux.h | 91 +- source/Irrlicht/CIrrDeviceSDL.cpp | 10 +- source/Irrlicht/CIrrDeviceStub.h | 5 +- source/Irrlicht/CIrrDeviceWin32.cpp | 235 +- source/Irrlicht/CIrrDeviceWin32.h | 66 +- source/Irrlicht/CIrrDeviceWinCE.cpp | 12 +- source/Irrlicht/CLightSceneNode.cpp | 3 +- source/Irrlicht/CMD2MeshFileLoader.cpp | 4 + source/Irrlicht/CMY3DMeshFileLoader.cpp | 3 +- source/Irrlicht/CMountPointReader.cpp | 4 +- source/Irrlicht/CNPKReader.cpp | 12 +- source/Irrlicht/CNPKReader.h | 3 - source/Irrlicht/CNullDriver.cpp | 19 + source/Irrlicht/COpenGLDriver.cpp | 4 +- source/Irrlicht/CPakReader.cpp | 13 +- source/Irrlicht/CPakReader.h | 2 - .../CParticleAnimatedMeshSceneNodeEmitter.cpp | 10 +- .../Irrlicht/CParticleAttractionAffector.cpp | 22 + source/Irrlicht/CParticleAttractionAffector.h | 6 + source/Irrlicht/CParticleBoxEmitter.cpp | 9 + source/Irrlicht/CParticleCylinderEmitter.cpp | 62 + source/Irrlicht/CParticleCylinderEmitter.h | 6 + source/Irrlicht/CParticleMeshEmitter.cpp | 6 + source/Irrlicht/CParticlePointEmitter.cpp | 10 +- source/Irrlicht/CParticleRingEmitter.cpp | 57 + source/Irrlicht/CParticleRingEmitter.h | 6 + source/Irrlicht/CParticleRotationAffector.cpp | 14 + source/Irrlicht/CParticleRotationAffector.h | 6 + source/Irrlicht/CParticleSphereEmitter.cpp | 55 + source/Irrlicht/CParticleSphereEmitter.h | 6 + source/Irrlicht/CParticleSystemSceneNode.cpp | 21 + source/Irrlicht/CParticleSystemSceneNode.h | 6 +- source/Irrlicht/CSceneCollisionManager.cpp | 2 +- source/Irrlicht/CSceneManager.cpp | 7 + source/Irrlicht/CSceneNodeAnimatorCameraFPS.h | 7 +- source/Irrlicht/CShadowVolumeSceneNode.cpp | 5 +- source/Irrlicht/CSoftwareDriver2.cpp | 787 ++- source/Irrlicht/CSoftwareDriver2.h | 11 +- source/Irrlicht/CSoftwareTexture2.cpp | 4 + source/Irrlicht/CSoftwareTexture2.h | 4 +- source/Irrlicht/CTRGouraud2.cpp | 15 +- source/Irrlicht/CTRGouraudAlpha2.cpp | 10 +- source/Irrlicht/CTRGouraudAlphaNoZ2.cpp | 15 +- source/Irrlicht/CTRNormalMap.cpp | 848 +++ source/Irrlicht/CTRStencilShadow.cpp | 936 +++ source/Irrlicht/CTRTextureBlend.cpp | 22 +- source/Irrlicht/CTRTextureDetailMap2.cpp | 12 +- source/Irrlicht/CTRTextureGouraud2.cpp | 10 +- source/Irrlicht/CTRTextureGouraudAdd2.cpp | 10 +- source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp | 22 +- source/Irrlicht/CTRTextureGouraudAlpha.cpp | 14 +- source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp | 14 +- source/Irrlicht/CTRTextureGouraudNoZ2.cpp | 10 +- .../CTRTextureGouraudVertexAlpha2.cpp | 10 +- source/Irrlicht/CTRTextureLightMap2_Add.cpp | 10 +- source/Irrlicht/CTRTextureLightMap2_M1.cpp | 10 +- source/Irrlicht/CTRTextureLightMap2_M2.cpp | 10 +- source/Irrlicht/CTRTextureLightMap2_M4.cpp | 200 +- .../CTRTextureLightMapGouraud2_M4.cpp | 10 +- source/Irrlicht/CTRTextureWire2.cpp | 10 +- source/Irrlicht/CTarReader.cpp | 10 +- source/Irrlicht/CTarReader.h | 3 - source/Irrlicht/CTextSceneNode.cpp | 12 + source/Irrlicht/CWADReader.cpp | 263 + source/Irrlicht/CWADReader.h | 188 + source/Irrlicht/CXMLReaderImpl.h | 14 +- source/Irrlicht/CZipReader.cpp | 4 +- source/Irrlicht/IBurningShader.cpp | 16 +- source/Irrlicht/IBurningShader.h | 68 +- source/Irrlicht/IDepthBuffer.h | 31 + source/Irrlicht/Irrlicht-gcc.cbp | 9 + source/Irrlicht/Irrlicht8.0.vcproj | 48 +- source/Irrlicht/Irrlicht9.0.vcproj | 39 +- source/Irrlicht/Makefile | 8 +- source/Irrlicht/Octree.h | 2 +- source/Irrlicht/S4DVertex.h | 123 +- .../Irrlicht/SoftwareDriver2_compile_config.h | 2 +- source/Irrlicht/SoftwareDriver2_helper.h | 75 +- source/Irrlicht/jpeglib/Makefile.am | 13 +- source/Irrlicht/jpeglib/Makefile.in | 16 +- source/Irrlicht/jpeglib/README | 54 +- source/Irrlicht/jpeglib/aclocal.m4 | 20 +- source/Irrlicht/jpeglib/cderror.h | 2 + source/Irrlicht/jpeglib/change.log | 45 + source/Irrlicht/jpeglib/cjpeg.1 | 6 +- source/Irrlicht/jpeglib/config.guess | 196 +- source/Irrlicht/jpeglib/config.sub | 43 +- source/Irrlicht/jpeglib/configure | 6261 ++++++----------- source/Irrlicht/jpeglib/configure.ac | 4 +- source/Irrlicht/jpeglib/djpeg.1 | 9 +- source/Irrlicht/jpeglib/filelist.txt | 4 +- source/Irrlicht/jpeglib/install.txt | 79 +- source/Irrlicht/jpeglib/jaricom.c | 237 +- source/Irrlicht/jpeglib/jcapimin.c | 6 + source/Irrlicht/jpeglib/jcarith.c | 107 +- source/Irrlicht/jpeglib/jchuff.c | 244 +- source/Irrlicht/jpeglib/jcmarker.c | 85 +- source/Irrlicht/jpeglib/jcmaster.c | 118 +- source/Irrlicht/jpeglib/jconfig.cfg | 8 + source/Irrlicht/jpeglib/jconfig.mc6 | 2 +- source/Irrlicht/jpeglib/jconfig.txt | 9 + source/Irrlicht/jpeglib/jctrans.c | 13 +- source/Irrlicht/jpeglib/jdapimin.c | 4 +- source/Irrlicht/jpeglib/jdarith.c | 82 +- source/Irrlicht/jpeglib/jdatadst.c | 122 +- source/Irrlicht/jpeglib/jdatasrc.c | 80 +- source/Irrlicht/jpeglib/jddctmgr.c | 4 +- source/Irrlicht/jpeglib/jdhuff.c | 310 +- source/Irrlicht/jpeglib/jdinput.c | 371 +- source/Irrlicht/jpeglib/jdmarker.c | 74 +- source/Irrlicht/jpeglib/jdmaster.c | 152 +- source/Irrlicht/jpeglib/jdtrans.c | 4 + source/Irrlicht/jpeglib/jidctflt.c | 53 +- source/Irrlicht/jpeglib/jmorecfg.h | 2 + source/Irrlicht/jpeglib/jpegint.h | 20 +- source/Irrlicht/jpeglib/jpeglib.h | 29 +- source/Irrlicht/jpeglib/jpegtran.1 | 17 +- source/Irrlicht/jpeglib/jpegtran.c | 40 +- source/Irrlicht/jpeglib/jutils.c | 52 + source/Irrlicht/jpeglib/jversion.h | 6 +- source/Irrlicht/jpeglib/libjpeg.map | 2 +- source/Irrlicht/jpeglib/libjpeg.txt | 49 +- source/Irrlicht/jpeglib/ltconfig | 1512 ---- source/Irrlicht/jpeglib/ltmain.sh | 16 +- source/Irrlicht/jpeglib/makeasln.v10 | 33 + source/Irrlicht/jpeglib/makeasln.vc9 | 33 - source/Irrlicht/jpeglib/makecfil.v10 | 69 + source/Irrlicht/jpeglib/makecvcp.vc9 | 186 - source/Irrlicht/jpeglib/makecvcx.v10 | 76 + source/Irrlicht/jpeglib/makedfil.v10 | 69 + source/Irrlicht/jpeglib/makedvcx.v10 | 76 + source/Irrlicht/jpeglib/makefile.ansi | 11 +- source/Irrlicht/jpeglib/makefile.bcc | 11 +- source/Irrlicht/jpeglib/makefile.dj | 11 +- source/Irrlicht/jpeglib/makefile.manx | 11 +- source/Irrlicht/jpeglib/makefile.mc6 | 11 +- source/Irrlicht/jpeglib/makefile.mms | 11 +- source/Irrlicht/jpeglib/makefile.sas | 11 +- source/Irrlicht/jpeglib/makefile.unix | 11 +- source/Irrlicht/jpeglib/makefile.vc | 70 +- source/Irrlicht/jpeglib/makefile.wat | 11 +- source/Irrlicht/jpeglib/makejfil.v10 | 186 + .../jpeglib/{makejsln.vc9 => makejsln.v10} | 10 +- source/Irrlicht/jpeglib/makejvcp.vc9 | 328 - source/Irrlicht/jpeglib/makejvcx.v10 | 112 + source/Irrlicht/jpeglib/makerfil.v10 | 30 + source/Irrlicht/jpeglib/makervcp.vc9 | 133 - source/Irrlicht/jpeglib/makervcx.v10 | 62 + source/Irrlicht/jpeglib/maketfil.v10 | 63 + source/Irrlicht/jpeglib/maketvcp.vc9 | 178 - source/Irrlicht/jpeglib/maketvcx.v10 | 74 + source/Irrlicht/jpeglib/makewfil.v10 | 30 + source/Irrlicht/jpeglib/makewvcp.vc9 | 133 - source/Irrlicht/jpeglib/makewvcx.v10 | 62 + source/Irrlicht/jpeglib/rdbmp.c | 57 +- source/Irrlicht/jpeglib/transupp.c | 164 +- source/Irrlicht/jpeglib/transupp.h | 19 +- source/Irrlicht/jpeglib/usage.txt | 32 +- source/Irrlicht/libpng/ANNOUNCE | 63 +- source/Irrlicht/libpng/CHANGES | 1284 ++-- source/Irrlicht/libpng/CMakeLists.txt | 282 + source/Irrlicht/libpng/INSTALL | 114 +- source/Irrlicht/libpng/KNOWNBUG | 22 - source/Irrlicht/libpng/LICENSE | 6 +- source/Irrlicht/libpng/README | 96 +- source/Irrlicht/libpng/TODO | 10 +- source/Irrlicht/libpng/Y2KINFO | 55 - source/Irrlicht/libpng/configure | 4 +- .../libpng/contrib/gregbook/Makefile.sgi | 6 +- .../libpng/contrib/gregbook/Makefile.unx | 8 +- .../libpng/contrib/gregbook/readpng.c | 2 +- .../libpng/contrib/gregbook/readpng2.c | 183 +- .../libpng/contrib/gregbook/readpng2.h | 5 - .../libpng/contrib/gregbook/rpng2-win.c | 20 +- .../libpng/contrib/gregbook/rpng2-x.c | 22 +- .../libpng/contrib/pngminim/decoder/gather.sh | 4 +- .../libpng/contrib/pngminim/decoder/makefile | 4 +- .../libpng/contrib/pngminim/decoder/pngusr.h | 15 +- .../contrib/pngminim/encoder/dummy_inflate.c | 27 - .../libpng/contrib/pngminim/encoder/gather.sh | 4 +- .../libpng/contrib/pngminim/encoder/makefile | 7 +- .../libpng/contrib/pngminim/encoder/pngusr.h | 11 +- .../libpng/contrib/pngminim/preader/gather.sh | 4 +- .../libpng/contrib/pngminim/preader/makefile | 4 +- .../libpng/contrib/pngminim/preader/pngusr.h | 12 +- .../libpng/contrib/pngminus/png2pnm.c | 4 +- .../libpng/contrib/pngsuite/ftbbn1g04.png | Bin 0 -> 429 bytes .../libpng/contrib/pngsuite/ftbbn2c16.png | Bin 0 -> 2041 bytes .../libpng/contrib/pngsuite/ftbbn3p08.png | Bin 0 -> 1499 bytes .../libpng/contrib/pngsuite/ftbgn2c16.png | Bin 0 -> 2041 bytes .../libpng/contrib/pngsuite/ftbgn3p08.png | Bin 0 -> 1499 bytes .../libpng/contrib/pngsuite/ftbrn2c08.png | Bin 0 -> 1633 bytes .../libpng/contrib/pngsuite/ftbwn1g16.png | Bin 0 -> 1313 bytes .../libpng/contrib/pngsuite/ftbwn3p08.png | Bin 0 -> 1496 bytes .../libpng/contrib/pngsuite/ftbyn3p08.png | Bin 0 -> 1499 bytes .../libpng/contrib/pngsuite/ftp0n1g08.png | Bin 0 -> 719 bytes .../libpng/contrib/pngsuite/ftp0n2c08.png | Bin 0 -> 1594 bytes .../libpng/contrib/pngsuite/ftp0n3p08.png | Bin 0 -> 1476 bytes .../libpng/contrib/pngsuite/ftp1n3p08.png | Bin 0 -> 1483 bytes .../Irrlicht/libpng/contrib/visupng/PngFile.c | 10 +- .../Irrlicht/libpng/contrib/visupng/PngFile.h | 2 +- source/Irrlicht/libpng/example.c | 71 +- .../{libpng-1.2.39.txt => libpng-1.4.3.txt} | 504 +- .../libpng/{scripts => }/libpng-config.in | 2 +- source/Irrlicht/libpng/libpng.3 | 793 ++- .../libpng.pc-configure.in => libpng.pc.in} | 2 +- source/Irrlicht/libpng/libpngpf.3 | 76 +- source/Irrlicht/libpng/new_push_process_row.c | 204 + source/Irrlicht/libpng/png.5 | 6 +- source/Irrlicht/libpng/png.c | 438 +- source/Irrlicht/libpng/png.h | 2383 ++----- source/Irrlicht/libpng/pngconf.h | 945 +-- source/Irrlicht/libpng/pngerror.c | 100 +- source/Irrlicht/libpng/pnggccrd.c | 103 - source/Irrlicht/libpng/pngget.c | 270 +- source/Irrlicht/libpng/pngmem.c | 95 +- source/Irrlicht/libpng/pngpread.c | 372 +- source/Irrlicht/libpng/pngpriv.h | 956 +++ source/Irrlicht/libpng/pngread.c | 778 +- source/Irrlicht/libpng/pngrio.c | 40 +- source/Irrlicht/libpng/pngrtran.c | 842 +-- source/Irrlicht/libpng/pngrutil.c | 767 +- source/Irrlicht/libpng/pngset.c | 416 +- source/Irrlicht/libpng/pngtest.c | 302 +- source/Irrlicht/libpng/pngtest.png | Bin 8574 -> 8608 bytes source/Irrlicht/libpng/pngtrans.c | 52 +- source/Irrlicht/libpng/pngvcrd.c | 1 - source/Irrlicht/libpng/pngwio.c | 46 +- source/Irrlicht/libpng/pngwrite.c | 514 +- source/Irrlicht/libpng/pngwtran.c | 61 +- source/Irrlicht/libpng/pngwutil.c | 296 +- .../libpng/projects/beos/x86-shared.proj | Bin 17031 -> 0 bytes .../libpng/projects/beos/x86-shared.txt | 22 - .../libpng/projects/beos/x86-static.proj | Bin 16706 -> 0 bytes .../libpng/projects/beos/x86-static.txt | 22 - .../libpng/projects/cbuilder5/libpng.bpf | 22 - .../libpng/projects/cbuilder5/libpng.bpg | 25 - .../libpng/projects/cbuilder5/libpng.bpr | 157 - .../libpng/projects/cbuilder5/libpng.cpp | 29 - .../projects/cbuilder5/libpng.readme.txt | 25 - .../libpng/projects/cbuilder5/libpngstat.bpf | 22 - .../libpng/projects/cbuilder5/libpngstat.bpr | 109 - .../libpng/projects/cbuilder5/zlib.readme.txt | 14 - source/Irrlicht/libpng/projects/netware.txt | 6 - .../libpng/projects/visualc6/README.txt | 14 +- .../libpng/projects/visualc71/PRJ0041.mak | 2 +- .../libpng/projects/visualc71/README.txt | 15 +- .../libpng/projects/visualc71/README_zlib.txt | 8 +- .../libpng/projects/visualc71/libpng.sln | 28 - .../libpng/projects/visualc71/libpng.vcproj | 303 +- .../libpng/projects/visualc71/pngtest.vcproj | 204 +- .../libpng/projects/visualc71/zlib.vcproj | 296 +- .../libpng/projects/vstudio/readme.txt | 93 + .../libpng/projects/vstudio/vstudio.sln | 49 + .../libpng/projects/vstudio/zlib.props | 43 + source/Irrlicht/libpng/projects/wince.txt | 6 - .../Irrlicht/libpng/projects/xcode/Info.plist | 26 + .../Irrlicht/libpng/projects/xcode/README.txt | 9 + .../xcode/libpng.xcodeproj/project.pbxproj | 353 + source/Irrlicht/libpng/scripts/CMakeLists.txt | 212 - source/Irrlicht/libpng/scripts/README.txt | 67 + source/Irrlicht/libpng/scripts/descrip.mms | 30 +- .../libpng/scripts/libpng-config-head.in | 2 +- source/Irrlicht/libpng/scripts/libpng.icc | 47 - source/Irrlicht/libpng/scripts/libpng.pc.in | 6 +- .../Irrlicht/libpng/scripts/makefile.32sunu | 80 +- .../Irrlicht/libpng/scripts/makefile.64sunu | 82 +- source/Irrlicht/libpng/scripts/makefile.aix | 42 +- source/Irrlicht/libpng/scripts/makefile.amiga | 2 +- source/Irrlicht/libpng/scripts/makefile.atari | 4 +- source/Irrlicht/libpng/scripts/makefile.bc32 | 30 +- source/Irrlicht/libpng/scripts/makefile.beos | 86 +- source/Irrlicht/libpng/scripts/makefile.bor | 32 +- source/Irrlicht/libpng/scripts/makefile.cegcc | 113 + .../Irrlicht/libpng/scripts/makefile.cygwin | 63 +- .../Irrlicht/libpng/scripts/makefile.darwin | 91 +- source/Irrlicht/libpng/scripts/makefile.dec | 87 +- source/Irrlicht/libpng/scripts/makefile.dj2 | 32 +- source/Irrlicht/libpng/scripts/makefile.elf | 98 +- .../Irrlicht/libpng/scripts/makefile.freebsd | 9 +- source/Irrlicht/libpng/scripts/makefile.gcc | 32 +- source/Irrlicht/libpng/scripts/makefile.gcmmx | 274 - source/Irrlicht/libpng/scripts/makefile.hp64 | 83 +- source/Irrlicht/libpng/scripts/makefile.hpgcc | 85 +- source/Irrlicht/libpng/scripts/makefile.hpux | 85 +- source/Irrlicht/libpng/scripts/makefile.ibmc | 34 +- source/Irrlicht/libpng/scripts/makefile.intel | 36 +- source/Irrlicht/libpng/scripts/makefile.knr | 34 +- source/Irrlicht/libpng/scripts/makefile.linux | 94 +- source/Irrlicht/libpng/scripts/makefile.mingw | 67 +- source/Irrlicht/libpng/scripts/makefile.mips | 32 +- source/Irrlicht/libpng/scripts/makefile.msc | 34 +- .../Irrlicht/libpng/scripts/makefile.ne12bsd | 11 +- .../Irrlicht/libpng/scripts/makefile.netbsd | 13 +- source/Irrlicht/libpng/scripts/makefile.nommx | 255 - .../Irrlicht/libpng/scripts/makefile.openbsd | 12 +- source/Irrlicht/libpng/scripts/makefile.os2 | 32 +- source/Irrlicht/libpng/scripts/makefile.sco | 87 +- source/Irrlicht/libpng/scripts/makefile.sggcc | 91 +- source/Irrlicht/libpng/scripts/makefile.sgi | 93 +- source/Irrlicht/libpng/scripts/makefile.so9 | 83 +- .../Irrlicht/libpng/scripts/makefile.solaris | 89 +- .../libpng/scripts/makefile.solaris-x86 | 83 +- source/Irrlicht/libpng/scripts/makefile.std | 32 +- source/Irrlicht/libpng/scripts/makefile.sunos | 32 +- source/Irrlicht/libpng/scripts/makefile.tc3 | 30 +- .../Irrlicht/libpng/scripts/makefile.vcawin32 | 104 - .../Irrlicht/libpng/scripts/makefile.vcwin32 | 37 +- .../Irrlicht/libpng/scripts/makefile.watcom | 32 +- source/Irrlicht/libpng/scripts/makevms.com | 30 +- .../scripts/{pngw32.def => png32ce.def} | 98 +- source/Irrlicht/libpng/scripts/pngos2.def | 44 +- source/Irrlicht/libpng/scripts/pngwin.def | 216 + .../libpng/scripts/{pngw32.rc => pngwin.rc} | 2 +- source/Irrlicht/libpng/scripts/smakefile.ppc | 2 +- source/Irrlicht/zlib/ChangeLog | 2063 +++--- source/Irrlicht/zlib/FAQ | 705 +- source/Irrlicht/zlib/INDEX | 116 +- source/Irrlicht/zlib/README | 240 +- source/Irrlicht/zlib/adler32.c | 38 +- source/Irrlicht/zlib/algorithm.txt | 418 +- source/Irrlicht/zlib/compress.c | 5 +- source/Irrlicht/zlib/crc32.c | 35 +- source/Irrlicht/zlib/deflate.c | 268 +- source/Irrlicht/zlib/deflate.h | 35 +- source/Irrlicht/zlib/gzclose.c | 25 + source/Irrlicht/zlib/gzguts.h | 132 + source/Irrlicht/zlib/gzio.c | 1026 --- source/Irrlicht/zlib/gzlib.c | 537 ++ source/Irrlicht/zlib/gzread.c | 653 ++ source/Irrlicht/zlib/gzwrite.c | 531 ++ source/Irrlicht/zlib/infback.c | 93 +- source/Irrlicht/zlib/inffast.c | 80 +- source/Irrlicht/zlib/inffast.h | 4 +- source/Irrlicht/zlib/inflate.c | 282 +- source/Irrlicht/zlib/inflate.h | 31 +- source/Irrlicht/zlib/inftrees.c | 63 +- source/Irrlicht/zlib/inftrees.h | 27 +- source/Irrlicht/zlib/trees.c | 93 +- source/Irrlicht/zlib/trees.h | 4 +- source/Irrlicht/zlib/uncompr.c | 4 +- source/Irrlicht/zlib/zconf.h | 206 +- source/Irrlicht/zlib/zlib.3 | 310 +- source/Irrlicht/zlib/zlib.h | 1152 +-- source/Irrlicht/zlib/zutil.c | 32 +- source/Irrlicht/zlib/zutil.h | 63 +- tests/Makefile | 3 +- tests/archiveReader.cpp | 7 + tests/color.cpp | 2 +- tests/filesystem.cpp | 4 + tests/flyCircleAnimator.cpp | 24 +- tests/main.cpp | 6 +- tests/matrixOps.cpp | 8 +- tests/media/Burning's Video-drawPixel.png | Bin 24449 -> 27977 bytes .../Burning's Video-flyCircleAnimator.png | Bin 2591 -> 2244 bytes tests/media/Burning's Video-lightType.png | Bin 3072 -> 921 bytes tests/media/Burning's Video-orthoCam.png | Bin 5326 -> 2846 bytes ...Burning's Video-planeMatrix-scaledClip.png | Bin 33500 -> 37744 bytes .../Burning's Video-testGeometryCreator.png | Bin 6793 -> 7733 bytes .../media/Direct3D 9.0-stencilSelfShadow.png | Bin 14550 -> 14567 bytes tests/media/Direct3D 9.0-stencilShadow.png | Bin 5648 -> 5671 bytes tests/media/attributes.xml | 4 + tests/media/cdata.xml | 14 + tests/meshTransform.cpp | 2 + tests/serializeAttributes.cpp | 4 +- tests/softwareDevice.cpp | 4 - tests/testGeometryCreator.cpp | 34 +- tests/testXML.cpp | 134 +- tests/tests-last-passed-at.txt | 4 +- tests/timer.cpp | 2 + tests/writeImageToFile.cpp | 8 +- 536 files changed, 31041 insertions(+), 23158 deletions(-) create mode 100644 examples/24.CursorControl/CursorControl.cbp create mode 100644 examples/24.CursorControl/CursorControl.sln create mode 100644 examples/24.CursorControl/CursorControl.vcproj create mode 100644 examples/24.CursorControl/CursorControl_vc8.vcproj create mode 100644 examples/24.CursorControl/CursorControl_vc9.sln create mode 100644 examples/24.CursorControl/CursorControl_vc9.vcproj create mode 100644 examples/24.CursorControl/Makefile create mode 100644 examples/24.CursorControl/main.cpp create mode 100644 examples/Demo/demo.cbp create mode 100644 media/icon_crosshairs16x16bw1.png create mode 100644 media/icon_crosshairs16x16bw2.png create mode 100644 media/icon_crosshairs16x16bw3.png create mode 100644 media/icon_crosshairs16x16col.png create mode 100644 media/particlegreen.jpg create mode 100644 media/yodan mdl - readme.txt create mode 100644 media/yodan.mdl create mode 100644 source/Irrlicht/CAnimatedMeshHalfLife.cpp create mode 100644 source/Irrlicht/CAnimatedMeshHalfLife.h create mode 100644 source/Irrlicht/CImageLoaderDDS.cpp create mode 100644 source/Irrlicht/CImageLoaderDDS.h create mode 100644 source/Irrlicht/CTRNormalMap.cpp create mode 100644 source/Irrlicht/CTRStencilShadow.cpp create mode 100644 source/Irrlicht/CWADReader.cpp create mode 100644 source/Irrlicht/CWADReader.h delete mode 100644 source/Irrlicht/jpeglib/ltconfig create mode 100644 source/Irrlicht/jpeglib/makeasln.v10 delete mode 100644 source/Irrlicht/jpeglib/makeasln.vc9 create mode 100644 source/Irrlicht/jpeglib/makecfil.v10 delete mode 100644 source/Irrlicht/jpeglib/makecvcp.vc9 create mode 100644 source/Irrlicht/jpeglib/makecvcx.v10 create mode 100644 source/Irrlicht/jpeglib/makedfil.v10 create mode 100644 source/Irrlicht/jpeglib/makedvcx.v10 create mode 100644 source/Irrlicht/jpeglib/makejfil.v10 rename source/Irrlicht/jpeglib/{makejsln.vc9 => makejsln.v10} (59%) delete mode 100644 source/Irrlicht/jpeglib/makejvcp.vc9 create mode 100644 source/Irrlicht/jpeglib/makejvcx.v10 create mode 100644 source/Irrlicht/jpeglib/makerfil.v10 delete mode 100644 source/Irrlicht/jpeglib/makervcp.vc9 create mode 100644 source/Irrlicht/jpeglib/makervcx.v10 create mode 100644 source/Irrlicht/jpeglib/maketfil.v10 delete mode 100644 source/Irrlicht/jpeglib/maketvcp.vc9 create mode 100644 source/Irrlicht/jpeglib/maketvcx.v10 create mode 100644 source/Irrlicht/jpeglib/makewfil.v10 delete mode 100644 source/Irrlicht/jpeglib/makewvcp.vc9 create mode 100644 source/Irrlicht/jpeglib/makewvcx.v10 create mode 100644 source/Irrlicht/libpng/CMakeLists.txt delete mode 100644 source/Irrlicht/libpng/KNOWNBUG delete mode 100644 source/Irrlicht/libpng/Y2KINFO delete mode 100644 source/Irrlicht/libpng/contrib/pngminim/encoder/dummy_inflate.c create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbbn1g04.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbbn2c16.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbbn3p08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbgn2c16.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbgn3p08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbrn2c08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbwn1g16.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbwn3p08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftbyn3p08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftp0n1g08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftp0n2c08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftp0n3p08.png create mode 100644 source/Irrlicht/libpng/contrib/pngsuite/ftp1n3p08.png rename source/Irrlicht/libpng/{libpng-1.2.39.txt => libpng-1.4.3.txt} (87%) rename source/Irrlicht/libpng/{scripts => }/libpng-config.in (93%) mode change 100755 => 100644 rename source/Irrlicht/libpng/{scripts/libpng.pc-configure.in => libpng.pc.in} (84%) create mode 100644 source/Irrlicht/libpng/new_push_process_row.c delete mode 100644 source/Irrlicht/libpng/pnggccrd.c create mode 100644 source/Irrlicht/libpng/pngpriv.h delete mode 100644 source/Irrlicht/libpng/pngvcrd.c delete mode 100644 source/Irrlicht/libpng/projects/beos/x86-shared.proj delete mode 100644 source/Irrlicht/libpng/projects/beos/x86-shared.txt delete mode 100644 source/Irrlicht/libpng/projects/beos/x86-static.proj delete mode 100644 source/Irrlicht/libpng/projects/beos/x86-static.txt delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/libpng.bpf delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/libpng.bpg delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/libpng.bpr delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/libpng.cpp delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/libpng.readme.txt delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpf delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpr delete mode 100644 source/Irrlicht/libpng/projects/cbuilder5/zlib.readme.txt delete mode 100644 source/Irrlicht/libpng/projects/netware.txt create mode 100644 source/Irrlicht/libpng/projects/vstudio/readme.txt create mode 100644 source/Irrlicht/libpng/projects/vstudio/vstudio.sln create mode 100644 source/Irrlicht/libpng/projects/vstudio/zlib.props delete mode 100644 source/Irrlicht/libpng/projects/wince.txt create mode 100644 source/Irrlicht/libpng/projects/xcode/Info.plist create mode 100644 source/Irrlicht/libpng/projects/xcode/README.txt create mode 100644 source/Irrlicht/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj delete mode 100644 source/Irrlicht/libpng/scripts/CMakeLists.txt create mode 100644 source/Irrlicht/libpng/scripts/README.txt delete mode 100644 source/Irrlicht/libpng/scripts/libpng.icc create mode 100644 source/Irrlicht/libpng/scripts/makefile.cegcc delete mode 100644 source/Irrlicht/libpng/scripts/makefile.gcmmx delete mode 100644 source/Irrlicht/libpng/scripts/makefile.nommx delete mode 100644 source/Irrlicht/libpng/scripts/makefile.vcawin32 rename source/Irrlicht/libpng/scripts/{pngw32.def => png32ce.def} (75%) create mode 100644 source/Irrlicht/libpng/scripts/pngwin.def rename source/Irrlicht/libpng/scripts/{pngw32.rc => pngwin.rc} (95%) create mode 100644 source/Irrlicht/zlib/gzclose.c create mode 100644 source/Irrlicht/zlib/gzguts.h delete mode 100644 source/Irrlicht/zlib/gzio.c create mode 100644 source/Irrlicht/zlib/gzlib.c create mode 100644 source/Irrlicht/zlib/gzread.c create mode 100644 source/Irrlicht/zlib/gzwrite.c create mode 100644 tests/media/attributes.xml create mode 100644 tests/media/cdata.xml diff --git a/changes.txt b/changes.txt index ea18481b..e3fbe355 100644 --- a/changes.txt +++ b/changes.txt @@ -1,3 +1,153 @@ +Changes in 1.8 (??.0?.2010) + + - Add IGUIElement::bringToBack (patch written by DtD, although I'm to blame for the function-name) + + - BurningVideo + - add Normalmap Rendering (one light only), pushed Burningvideo to 0.46 + - add Stencil Shadow Rendering (one color only and 32 bit only), + pushed Burningvideo to 0.47 + - internal vertexformat changed + - changed fixpoint from 9 to 10 bit fract resolution + - renamed createBurningVideoDriver to createBurningVideoDriver and uses SIrrlichtCreationParameters like opengl + - internal interfaces for the trianglerenders unified. + + - Example 11, changed the light billboards to use the light color. + allow to disable the bump/parallax on the earth like in the room ( with transparency ) + + - added DDS Image files, DXT2, DXT3, DXT4, DXT5, based on code from nvidia and Randy Reddig + + - added Halflife 1 Model Loader (based on code by Fabio Concas) + Halflife 1.1.0.8, Counter-Strike 1.6 working + -> Load all Textures ( can even optimize it to texture atlas ), all bone animation, all submodels. + -> But to make use of the values (named animation, mouth animation) + the Interface for IAnimatedMeshSceneNode has to be redone. + + TODO: + ->can handle float frames numbers, the interface for getMesh should be reworked + This is my idea of a new getMesh interface for IAnimatedMesh + + //! Returns the IMesh interface for a frame. + /** \param frameA: Frame number as zero based index. + The Blend Factor is in the fractional part of frameA + The Mesh will be calculated as + frame = integer(frameA) * (1-fractional(frameA )) + frameB * fractional(frameA) + FrameNr KeyFrameA KeyFrameB + 40.0 1 0 + 40.1 0.9 0.1 + 40.5 0.5 0.5 + 40.9 0.1 0.9 + 41.0 0 1 + \param frameB: Frame number as zero based index. The other KeyFrame which is blended with FrameA. + \param userParam: for Example Level of detail, or something else + */ + virtual IMesh* getMesh(f32 frameA, s32 frameB = 0,s32 param = 0) = 0; + + For now i used the (unused, always 255) detail level parameter and set a blend percentage as + s32 frameNr = (s32) getFrameNr(); + s32 frameBlend = (s32) (core::fract ( getFrameNr() ) * 1000.f); + return Mesh->getMesh(frameNr, frameBlend, StartFrame, EndFrame); + + So no interface is affected. + + -> TODO: Quaternion Rotation is done private hand made and should be done with irrlicht quaternions + + - Included 357kb Yodan.mdl mesh and copyright info file from Doug Hillyer + to the media directory, used in example 7. collision as 4th model. + + - added Halflife 1 Texture Loader + Valve uses WAL archive types like quake2. textures are inside model files + I reworked the existing ImageloaderWAL and added named Halflife textures to wal2 ( they have no extension ) + and an LMP (palette/texture) loader into the same file (all using 32bit now) + + - added WAD Archive Loader (Quake2 (WAL2) and Halflife (WAL3) are supported) + + - CFileList + added Offset Parameter to SFileListEntry and removed the private array from the archive loaders. + CFileList::addItem now uses automatic incremental id if id = 0 + + - added void splitFilename, splits a path into components + + - added parameter make_lower to substring ( copy just lower case ) + string subString(u32 begin, s32 length, bool make_lower = false ) const + + - ColorConverter added + //! converts a 8 bit palettized or non palettized image (A8) into R8G8B8 + static void convert8BitTo24Bit(const u8* in, s16* out, s32 width, s32 height, const s32* palette, s32 linepad = 0, bool flip=false); + //! converts a 8 bit palettized or non palettized image (A8) into A8R8G8B8 + static void convert8BitTo32Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad = 0, bool flip=false); + +- In IGUITreeView "clearChilds" and "hasChilds" deprecated for "clearChildren" and "hasChildren" (thx @Greenya for noticing) + +- add dimension2d::operator- + +- add CGUIEditBox::getOverrideColor and CGUIEditBox::isOverrideColorEnabled + +- Add logging level ELL_DEBUG + +- Add parameter DisplayAdapter to creation params to allow selecting the card when more than one card is in the system. + +- Add parameter to line2d::intersectWith to allow getting intersections outside the segments (thx Yoran). + +- Added support for custom cursors + +- Avoid argument lookup ambiguity in swap when used in combination with stl. Using same trick as boost now and use 2 different template parameters in it. + +- Fixed bug causing memory access violation in string::replace found and patched by Nalin. + +- WM_SYSCOMMAND - SC_KEYMENU message is now ignored (F10 and ALT in Win32 windowed mode) + +----------------------------- +Changes in 1.7.2 (??.??.2010) + + - Fix crashes when taking Screenhots for DirectX in Windowed mode (thx to agamemnus for reporting) + + - StaticText does now serialize the background color + + - Fix gui-elements which didn't care when skin-colors changed. That made it impossible to make the gui slowly transparent (thx to PI for reporting). + Note that it couldn't be completely fixed for the SpinBox without breaking the interface, so for that element you have to enforce this by calling for example element->setValue(element->getValue()) once. + + - Fix CXMLReaderImpl::getAttributeValueAsInt which returned wrong values with large integers (thx to squisher for finding) + + - Add EGET_TREEVIEW_NODE_COLLAPSE and deprecate EGET_TREEVIEW_NODE_COLLAPS (found by greenya) + + - Fix compile problem in swap when using irrlicht in combination with stl (backport from trunk r3281) + + - Fix serialization in CParticleSystemSceneNode (found by B@z) + + - Prevent crash in BillboardTextSceneNode when a custom font is used. Found and fixed by Nalin (bugtracker id: 3020487) + + - Fix problem in animation system that currentFrame got messed up after long pauses (especially when not starting at frame 0). + See forum thread (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?p=210537#210537) and bug id 2898876. + Also remove BeginFrameTime in CAnimatedMeshSceneNode as it hasn't been used anymore since some time. + + - Add framerate and current frame information for animations in example 09 and do some minor cleanup. + + - Added another test for xml-reader. + + - Fix serialization in several particle emitters and affectors (thx to Ion Dune for reporting). + + - Fix compile-error on VS for vector2d::getAngleTrig when used with integers. (thx to greenya for reporting) + + - Fix bug in dimension2d::getInterpolated that caused wrong results when used with integers as template parameter. (thx to Greenya for noticing a warning which made me look over this code). + + - Remove 2 minor memory leaks in meshloaders (found by tool cppcheck-1.43) + + - reduce file dependencies for IGUIEventReceiver.h (thx ngc92) + + - Initialize GUIEvent.Element in several places (found by greenya) + + - Add EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH and deprecated EGDS_MESSAGE_BOX_MAX_TEST_WIDTH (thx to greenya for reporting). + + - Fix several places where "used" in core::string was used wrongly preventing some memory corruption + + - Remove additional slash in pathnames in X-Loader + + - Fix crash in CGUIListBox when environment was cleared on events + + - Bugfix: Clear up depth-textures which could not be attached in OpenGL to prevent crashes. + + - Fix arrowMesh boundingbox. + ----------------------------- Changes in 1.7.1 (17.02.2010) @@ -46,6 +196,7 @@ Changes in 1.7.1 (17.02.2010) - mem leak in OBJ loader fixed - Removed some default parameters to reduce ambigious situations + --------------------------- Changes in 1.7 (03.02.2010) @@ -166,12 +317,12 @@ Changes in 1.7 (03.02.2010) - Let maya-cam animator react on a setTarget call to the camera which happened outside it's own control - New contextmenue features: - automatic checking for checked flag. - close handling now customizable - serialization can handle incomplete xml's - setEventParent now in public interface - New function findItemWithCommandId - New function insertItem + automatic checking for checked flag. + close handling now customizable + serialization can handle incomplete xml's + setEventParent now in public interface + New function findItemWithCommandId + New function insertItem - new vector3d::getSphericalCoordinateAngles method. @@ -537,7 +688,7 @@ Changes in 1.6 (23.09.2009) There exists a known list of ArchiveLoaders, which know how to produce a Archive. The Loaders and the Archives can be attached/detached on runtime. - The FileNames are now stored as core::string. where c16 is toggled between char/wchar + The FileNames are now stored as io::path. where c16 is toggled between char/wchar with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off) Replaced most (const c8* filename) to string references. diff --git a/examples/01.HelloWorld/HelloWorld.cbp b/examples/01.HelloWorld/HelloWorld.cbp index b2793338..829e1894 100644 --- a/examples/01.HelloWorld/HelloWorld.cbp +++ b/examples/01.HelloWorld/HelloWorld.cbp @@ -18,6 +18,7 @@ + diff --git a/examples/01.HelloWorld/Makefile b/examples/01.HelloWorld/Makefile index 91f93771..ea4b2b5d 100644 --- a/examples/01.HelloWorld/Makefile +++ b/examples/01.HelloWorld/Makefile @@ -33,7 +33,8 @@ all: all_linux OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht +all_linux: LDFLAGS += $(OGLESLIBS) -L/usr/X11R6/lib$(LIBSELECT) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe diff --git a/examples/02.Quake3Map/Makefile b/examples/02.Quake3Map/Makefile index 9a5c60c4..5ae4c61e 100644 --- a/examples/02.Quake3Map/Makefile +++ b/examples/02.Quake3Map/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm diff --git a/examples/02.Quake3Map/Quake3Map.cbp b/examples/02.Quake3Map/Quake3Map.cbp index dec1d81c..172ead1f 100644 --- a/examples/02.Quake3Map/Quake3Map.cbp +++ b/examples/02.Quake3Map/Quake3Map.cbp @@ -18,6 +18,7 @@ + diff --git a/examples/03.CustomSceneNode/CustomSceneNode.cbp b/examples/03.CustomSceneNode/CustomSceneNode.cbp index d3e3288c..fa71ac1e 100644 --- a/examples/03.CustomSceneNode/CustomSceneNode.cbp +++ b/examples/03.CustomSceneNode/CustomSceneNode.cbp @@ -19,6 +19,7 @@ + diff --git a/examples/03.CustomSceneNode/Makefile b/examples/03.CustomSceneNode/Makefile index 516ffdef..51de069c 100644 --- a/examples/03.CustomSceneNode/Makefile +++ b/examples/03.CustomSceneNode/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/04.Movement/Makefile b/examples/04.Movement/Makefile index 1f7203e6..15cf5c9f 100644 --- a/examples/04.Movement/Makefile +++ b/examples/04.Movement/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL diff --git a/examples/04.Movement/Movement.cbp b/examples/04.Movement/Movement.cbp index 4d3a5179..7f5a2ebf 100644 --- a/examples/04.Movement/Movement.cbp +++ b/examples/04.Movement/Movement.cbp @@ -31,6 +31,7 @@ + diff --git a/examples/05.UserInterface/Makefile b/examples/05.UserInterface/Makefile index a61e5849..f59cfa64 100644 --- a/examples/05.UserInterface/Makefile +++ b/examples/05.UserInterface/Makefile @@ -16,10 +16,10 @@ ifeq ($(HOSTTYPE), x86_64) LIBSELECT=64 endif -# target specific settings OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM + # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/05.UserInterface/UserInterface.cbp b/examples/05.UserInterface/UserInterface.cbp index ff43f423..8c998310 100644 --- a/examples/05.UserInterface/UserInterface.cbp +++ b/examples/05.UserInterface/UserInterface.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/06.2DGraphics/2DGraphics.cbp b/examples/06.2DGraphics/2DGraphics.cbp index efc3e057..336b89ca 100644 --- a/examples/06.2DGraphics/2DGraphics.cbp +++ b/examples/06.2DGraphics/2DGraphics.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/06.2DGraphics/Makefile b/examples/06.2DGraphics/Makefile index 8f4e2f8d..cfbb5d95 100644 --- a/examples/06.2DGraphics/Makefile +++ b/examples/06.2DGraphics/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/07.Collision/Collision.cbp b/examples/07.Collision/Collision.cbp index e1b0a9e3..ac70e400 100644 --- a/examples/07.Collision/Collision.cbp +++ b/examples/07.Collision/Collision.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/07.Collision/Makefile b/examples/07.Collision/Makefile index 08ca6d65..7a8f6d81 100644 --- a/examples/07.Collision/Makefile +++ b/examples/07.Collision/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/07.Collision/main.cpp b/examples/07.Collision/main.cpp index 4c59e38a..e13a8e84 100644 --- a/examples/07.Collision/main.cpp +++ b/examples/07.Collision/main.cpp @@ -164,14 +164,15 @@ int main() selection is being performed. */ scene::IAnimatedMeshSceneNode* node = 0; + video::SMaterial material; + // Add an MD2 node, which uses vertex-based animation. node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/faerie.md2"), 0, IDFlag_IsPickable | IDFlag_IsHighlightable); - node->setPosition(core::vector3df(-70,-15,-120)); // Put its feet on the floor. - node->setScale(core::vector3df(2, 2, 2)); // Make it appear realistically scaled + node->setPosition(core::vector3df(-90,-15,-140)); // Put its feet on the floor. + node->setScale(core::vector3df(1.6f)); // Make it appear realistically scaled node->setMD2Animation(scene::EMAT_POINT); node->setAnimationSpeed(20.f); - video::SMaterial material; material.setTexture(0, driver->getTexture("../../media/faerie2.bmp")); material.Lighting = true; material.NormalizeNormals = true; @@ -183,24 +184,40 @@ int main() node->setTriangleSelector(selector); selector->drop(); // We're done with this selector, so drop it now. - // This X files uses skeletal animation, but without skinning. - node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/dwarf.x"), + // And this B3D file uses skinned skeletal animation. + node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"), 0, IDFlag_IsPickable | IDFlag_IsHighlightable); - node->setPosition(core::vector3df(-70,-66,0)); // Put its feet on the floor. - node->setRotation(core::vector3df(0,-90,0)); // And turn it towards the camera. - node->setAnimationSpeed(20.f); + node->setScale(core::vector3df(10)); + node->setPosition(core::vector3df(-75,-66,-80)); + node->setRotation(core::vector3df(0,90,0)); + node->setAnimationSpeed(8.f); + node->getMaterial(0).NormalizeNormals = true; + node->getMaterial(0).Lighting = true; + // Just do the same as we did above. selector = smgr->createTriangleSelector(node); node->setTriangleSelector(selector); selector->drop(); - // And this B3D file uses skinned skeletal animation. - node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"), + // This X files uses skeletal animation, but without skinning. + node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/dwarf.x"), 0, IDFlag_IsPickable | IDFlag_IsHighlightable); - node->setScale(core::vector3df(10, 10, 10)); - node->setPosition(core::vector3df(-70,-66,-60)); - node->setRotation(core::vector3df(0,90,0)); - node->setAnimationSpeed(10.f); - node->getMaterial(0).NormalizeNormals = true; + node->setPosition(core::vector3df(-70,-66,-30)); // Put its feet on the floor. + node->setRotation(core::vector3df(0,-90,0)); // And turn it towards the camera. + node->setAnimationSpeed(20.f); + node->getMaterial(0).Lighting = true; + selector = smgr->createTriangleSelector(node); + node->setTriangleSelector(selector); + selector->drop(); + + + // And this mdl file uses skinned skeletal animation. + node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/yodan.mdl"), + 0, IDFlag_IsPickable | IDFlag_IsHighlightable); + node->setPosition(core::vector3df(-90,-25,20)); + node->setScale(core::vector3df(0.8f)); + node->getMaterial(0).Lighting = true; + node->setAnimationSpeed(20.f); + // Just do the same as we did above. selector = smgr->createTriangleSelector(node); node->setTriangleSelector(selector); @@ -310,3 +327,4 @@ int main() /* **/ + diff --git a/examples/08.SpecialFX/Makefile b/examples/08.SpecialFX/Makefile index e1a587d3..93e28bf7 100644 --- a/examples/08.SpecialFX/Makefile +++ b/examples/08.SpecialFX/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/08.SpecialFX/SpecialFX.cbp b/examples/08.SpecialFX/SpecialFX.cbp index 06c8883b..89c0157d 100644 --- a/examples/08.SpecialFX/SpecialFX.cbp +++ b/examples/08.SpecialFX/SpecialFX.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/08.SpecialFX/main.cpp b/examples/08.SpecialFX/main.cpp index 7dd55c87..379a1c69 100644 --- a/examples/08.SpecialFX/main.cpp +++ b/examples/08.SpecialFX/main.cpp @@ -25,7 +25,6 @@ using namespace irr; int main() { // ask if user would like shadows - char i; printf("Please press 'y' if you want to use realtime shadows.\n"); @@ -38,6 +37,7 @@ int main() if (driverType==video::EDT_COUNT) return 1; + /* Create device and exit if creation failed. We make the stencil flag optional to avoid slow screen modes for runs without shadows. diff --git a/examples/09.Meshviewer/Makefile b/examples/09.Meshviewer/Makefile index 3c95507c..efa494a1 100644 --- a/examples/09.Meshviewer/Makefile +++ b/examples/09.Meshviewer/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/09.Meshviewer/Meshviewer.cbp b/examples/09.Meshviewer/Meshviewer.cbp index d2cdba31..9587130a 100644 --- a/examples/09.Meshviewer/Meshviewer.cbp +++ b/examples/09.Meshviewer/Meshviewer.cbp @@ -31,6 +31,7 @@ + diff --git a/examples/09.Meshviewer/Meshviewer_vc9.vcproj b/examples/09.Meshviewer/Meshviewer_vc9.vcproj index 21206975..f6a80386 100644 --- a/examples/09.Meshviewer/Meshviewer_vc9.vcproj +++ b/examples/09.Meshviewer/Meshviewer_vc9.vcproj @@ -1,7 +1,7 @@ getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true); if (!toolboxWnd) @@ -252,7 +254,7 @@ void loadModel(const c8* fn) if (menu) for(int item = 1; item < 6; ++item) menu->setItemChecked(item, false); - UpdateScaleInfo(Model); + updateScaleInfo(Model); } @@ -285,7 +287,7 @@ void createToolBox() core::rect(10,20,60,45), false, false, t1); env->addStaticText(L"X:", core::rect(22,48,40,66), false, false, t1); env->addEditBox(L"1.0", core::rect(40,46,130,66), true, t1, GUI_ID_X_SCALE); - env->addStaticText(L"Y:", core::rect(22,82,40,GUI_ID_OPEN_MODEL), false, false, t1); + env->addStaticText(L"Y:", core::rect(22,82,40,96), false, false, t1); env->addEditBox(L"1.0", core::rect(40,76,130,96), true, t1, GUI_ID_Y_SCALE); env->addStaticText(L"Z:", core::rect(22,108,40,126), false, false, t1); env->addEditBox(L"1.0", core::rect(40,106,130,126), true, t1, GUI_ID_Z_SCALE); @@ -296,7 +298,7 @@ void createToolBox() env->addButton(core::rect(65,20,95,40), t1, GUI_ID_BUTTON_SCALE_MUL10, L"* 10"); env->addButton(core::rect(100,20,130,40), t1, GUI_ID_BUTTON_SCALE_DIV10, L"* 0.1"); - UpdateScaleInfo(Model); + updateScaleInfo(Model); // add transparency control env->addStaticText(L"GUI Transparency Control:", @@ -307,17 +309,43 @@ void createToolBox() scrollbar->setPos(255); // add framerate control + env->addStaticText(L":", core::rect(10,240,150,265), true, false, t1); env->addStaticText(L"Framerate:", - core::rect(10,240,150,265), true, false, t1); + core::rect(12,240,75,265), false, false, t1); + env->addStaticText(L"", core::rect(75,240,200,265), false, false, t1, + GUI_ID_ANIMATION_INFO); scrollbar = env->addScrollBar(true, core::rect(10,265,150,280), t1, GUI_ID_SKIN_ANIMATION_FPS); scrollbar->setMax(MAX_FRAMERATE); scrollbar->setMin(-MAX_FRAMERATE); scrollbar->setPos(DEFAULT_FRAMERATE); + scrollbar->setSmallStep(1); +} - // bring irrlicht engine logo to front, because it - // now may be below the newly created toolbox - root->bringToFront(root->getElementFromId(666, true)); +void updateToolBox() +{ + IGUIEnvironment* env = Device->getGUIEnvironment(); + IGUIElement* root = env->getRootGUIElement(); + IGUIElement* dlg = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true); + if (!dlg ) + return; + + // update the info we have about the animation of the model + IGUIStaticText * aniInfo = (IGUIStaticText *)(dlg->getElementFromId(GUI_ID_ANIMATION_INFO, true)); + if (aniInfo) + { + if ( Model && scene::ESNT_ANIMATED_MESH == Model->getType() ) + { + scene::IAnimatedMeshSceneNode* animatedModel = (scene::IAnimatedMeshSceneNode*)Model; + + core::stringw str( (s32)core::round_(animatedModel->getAnimationSpeed()) ); + str += L" Frame: "; + str += core::stringw((s32)animatedModel->getFrameNr()); + aniInfo->setText(str.c_str()); + } + else + aniInfo->setText(L""); + } } /* @@ -366,7 +394,7 @@ public: if (id == GUI_ID_SKIN_TRANSPARENCY) { const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos(); - SetSkinTransparency(pos, env->getSkin()); + setSkinTransparency(pos, env->getSkin()); } // control animation speed else if (id == GUI_ID_SKIN_ANIMATION_FPS) @@ -406,18 +434,18 @@ public: if (Model) Model->setScale(scale); - UpdateScaleInfo(Model); + updateScaleInfo(Model); } break; case GUI_ID_BUTTON_SCALE_MUL10: if (Model) Model->setScale(Model->getScale()*10.f); - UpdateScaleInfo(Model); + updateScaleInfo(Model); break; case GUI_ID_BUTTON_SCALE_DIV10: if (Model) Model->setScale(Model->getScale()*0.1f); - UpdateScaleInfo(Model); + updateScaleInfo(Model); break; case GUI_ID_BUTTON_OPEN_MODEL: env->addFileOpenDialog(L"Please select a model file to open"); @@ -810,7 +838,7 @@ int main(int argc, char* argv[]) image = driver->getTexture("help.png"); bar->addButton(GUI_ID_BUTTON_SHOW_ABOUT, 0, L"Open Help", image, 0, false, true); - // create a combobox with some senseless texts + // create a combobox for texture filters gui::IGUIComboBox* box = env->addComboBox(core::rect(250,4,350,23), bar, GUI_ID_TEXTUREFILTER); box->addItem(L"No filtering"); @@ -914,12 +942,14 @@ int main(int argc, char* argv[]) driver->endScene(); + // update information about current frame-rate core::stringw str(L"FPS: "); str.append(core::stringw(driver->getFPS())); str += L" Tris: "; str.append(core::stringw(driver->getPrimitiveCountDrawn())); fpstext->setText(str.c_str()); + // update information about the active camera scene::ICameraSceneNode* cam = Device->getSceneManager()->getActiveCamera(); str = L"Pos: "; str.append(core::stringw(cam->getPosition().X)); @@ -934,6 +964,9 @@ int main(int argc, char* argv[]) str += L" "; str.append(core::stringw(cam->getTarget().Z)); postext->setText(str.c_str()); + + // update the tool dialog + updateToolBox(); } else Device->yield(); diff --git a/examples/10.Shaders/Makefile b/examples/10.Shaders/Makefile index 5ef553c6..bf863b39 100644 --- a/examples/10.Shaders/Makefile +++ b/examples/10.Shaders/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/10.Shaders/Shaders.cbp b/examples/10.Shaders/Shaders.cbp index 5736e81c..e8da8d87 100644 --- a/examples/10.Shaders/Shaders.cbp +++ b/examples/10.Shaders/Shaders.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/11.PerPixelLighting/Makefile b/examples/11.PerPixelLighting/Makefile index 57909df2..6105da4f 100644 --- a/examples/11.PerPixelLighting/Makefile +++ b/examples/11.PerPixelLighting/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/11.PerPixelLighting/PerPixelLighting.cbp b/examples/11.PerPixelLighting/PerPixelLighting.cbp index 29c18f47..ca1338a2 100644 --- a/examples/11.PerPixelLighting/PerPixelLighting.cbp +++ b/examples/11.PerPixelLighting/PerPixelLighting.cbp @@ -31,6 +31,9 @@ + + + diff --git a/examples/11.PerPixelLighting/main.cpp b/examples/11.PerPixelLighting/main.cpp index 0806b415..90400b62 100644 --- a/examples/11.PerPixelLighting/main.cpp +++ b/examples/11.PerPixelLighting/main.cpp @@ -28,11 +28,12 @@ class MyEventReceiver : public IEventReceiver { public: - MyEventReceiver(scene::ISceneNode* room, + MyEventReceiver(scene::ISceneNode* room,scene::ISceneNode* earth, gui::IGUIEnvironment* env, video::IVideoDriver* driver) { // store pointer to room so we can change its drawing mode Room = room; + Earth = earth; Driver = driver; // set a nicer font @@ -120,6 +121,19 @@ private: Room->setMaterialType(type); + // change material setting + switch(ListBox->getSelected()) + { + case 0: type = video::EMT_TRANSPARENT_VERTEX_ALPHA; + break; + case 1: type = video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA; + break; + case 2: type = video::EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA; + break; + } + + Earth->setMaterialType(type); + /* We need to add a warning if the materials will not be able to be displayed 100% correctly. This is no problem, they will be @@ -137,6 +151,10 @@ private: ProblemText->setVisible(true); else ProblemText->setVisible(false); + + + + } private: @@ -145,6 +163,7 @@ private: gui::IGUIListBox* ListBox; scene::ISceneNode* Room; + scene::ISceneNode* Earth; video::IVideoDriver* Driver; }; @@ -155,27 +174,9 @@ Now for the real fun. We create an Irrlicht Device and start to setup the scene. int main() { // let user select driver type - - video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9; - - printf("Please select the driver you want for this example:\n"\ - " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\ - " (d) Software Renderer\n (e) Burning's Software Renderer\n"\ - " (f) NullDevice\n (otherKey) exit\n\n"); - - char i; - std::cin >> i; - - switch(i) - { - case 'a': driverType = video::EDT_DIRECT3D9;break; - case 'b': driverType = video::EDT_DIRECT3D8;break; - case 'c': driverType = video::EDT_OPENGL; break; - case 'd': driverType = video::EDT_OGLES1; break; - case 'e': driverType = video::EDT_BURNINGSVIDEO;break; - case 'f': driverType = video::EDT_NULL; break; - default: return 0; - } + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; // create device @@ -203,7 +204,7 @@ int main() driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); // add irrlicht logo - env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"), + env->addImage(driver->getTexture("../../media/irrlichtlogo3.png"), core::position2d(10,10)); // add camera @@ -236,9 +237,14 @@ int main() scene::IAnimatedMesh* roomMesh = smgr->getMesh( "../../media/room.3ds"); scene::ISceneNode* room = 0; + scene::ISceneNode* earth = 0; if (roomMesh) { + /* + The Room Mesh doesn't have proper Texture Mapping on the floor, + so we can recreate them on runtime + */ smgr->getMeshManipulator()->makePlanarTextureMapping( roomMesh->getMesh(0), 0.003f); @@ -263,7 +269,11 @@ int main() if (normalMap) driver->makeNormalMapTexture(normalMap, 9.0f); - +/* + // The Normal Map and the displacement map/height map in the alpha channel + video::ITexture* normalMap = + driver->getTexture("../../media/rockwall_NRM.tga"); +*/ /* But just setting color and normal map is not everything. The material we want to use needs some additional informations per @@ -285,12 +295,14 @@ int main() driver->getTexture("../../media/rockwall.jpg")); room->setMaterialTexture(1, normalMap); + // Stones don't glitter.. room->getMaterial(0).SpecularColor.set(0,0,0,0); + room->getMaterial(0).Shininess = 0.f; room->setMaterialFlag(video::EMF_FOG_ENABLE, true); room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID); // adjust height for parallax effect - room->getMaterial(0).MaterialTypeParam = 0.035f; + room->getMaterial(0).MaterialTypeParam = 1.f / 64.f; // drop mesh because we created it with a create.. call. tangentMesh->drop(); @@ -326,26 +338,26 @@ int main() m.setScale ( core::vector3df(50,50,50) ); manipulator->transformMesh( tangentSphereMesh, m ); - scene::ISceneNode *sphere = smgr->addMeshSceneNode(tangentSphereMesh); + earth = smgr->addMeshSceneNode(tangentSphereMesh); - sphere->setPosition(core::vector3df(-70,130,45)); + earth->setPosition(core::vector3df(-70,130,45)); // load heightmap, create normal map from it and set it video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.jpg"); if (earthNormalMap) { driver->makeNormalMapTexture(earthNormalMap, 20.0f); - sphere->setMaterialTexture(1, earthNormalMap); - sphere->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA); + earth->setMaterialTexture(1, earthNormalMap); + earth->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA); } // adjust material settings - sphere->setMaterialFlag(video::EMF_FOG_ENABLE, true); + earth->setMaterialFlag(video::EMF_FOG_ENABLE, true); // add rotation animator scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(core::vector3df(0,0.1f,0)); - sphere->addAnimator(anim); + earth->addAnimator(anim); anim->drop(); // drop mesh because we created it with a create.. call. @@ -360,7 +372,7 @@ int main() attached. */ - // add light 1 (nearly red) + // add light 1 (more green) scene::ILightSceneNode* light1 = smgr->addLightSceneNode(0, core::vector3df(0,0,0), video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f); @@ -381,7 +393,7 @@ int main() bill->setMaterialFlag(video::EMF_LIGHTING, false); bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); - bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp")); + bill->setMaterialTexture(0, driver->getTexture("../../media/particlegreen.jpg")); /* Now the same again, with the second light. The difference is that we @@ -395,8 +407,8 @@ int main() walls. But of course, this will change in future versions of Irrlicht where higher versions of pixel/vertex shaders will be implemented too. */ - - // add light 2 (gray) +#if 0 + // add light 2 (red) scene::ISceneNode* light2 = smgr->addLightSceneNode(0, core::vector3df(0,0,0), video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f); @@ -412,7 +424,7 @@ int main() bill->setMaterialFlag(video::EMF_LIGHTING, false); bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); - bill->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp")); + bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp")); // add particle system scene::IParticleSystemSceneNode* ps = @@ -441,9 +453,9 @@ int main() ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp")); ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA); +#endif - - MyEventReceiver receiver(room, env, driver); + MyEventReceiver receiver(room, earth, env, driver); device->setEventReceiver(&receiver); /* diff --git a/examples/12.TerrainRendering/Makefile b/examples/12.TerrainRendering/Makefile index 00fed199..f37a8c54 100644 --- a/examples/12.TerrainRendering/Makefile +++ b/examples/12.TerrainRendering/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/12.TerrainRendering/TerrainRendering.cbp b/examples/12.TerrainRendering/TerrainRendering.cbp index 199c12ff..823f67ef 100644 --- a/examples/12.TerrainRendering/TerrainRendering.cbp +++ b/examples/12.TerrainRendering/TerrainRendering.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/13.RenderToTexture/Makefile b/examples/13.RenderToTexture/Makefile index 769734ce..1d58e8c6 100644 --- a/examples/13.RenderToTexture/Makefile +++ b/examples/13.RenderToTexture/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/13.RenderToTexture/RenderToTexture.cbp b/examples/13.RenderToTexture/RenderToTexture.cbp index e4685be3..84032711 100644 --- a/examples/13.RenderToTexture/RenderToTexture.cbp +++ b/examples/13.RenderToTexture/RenderToTexture.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/14.Win32Window/Makefile b/examples/14.Win32Window/Makefile index 5f821146..a8896f2b 100644 --- a/examples/14.Win32Window/Makefile +++ b/examples/14.Win32Window/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/15.LoadIrrFile/LoadIrrFile.cbp b/examples/15.LoadIrrFile/LoadIrrFile.cbp index d4570eb1..c5156dd2 100644 --- a/examples/15.LoadIrrFile/LoadIrrFile.cbp +++ b/examples/15.LoadIrrFile/LoadIrrFile.cbp @@ -33,6 +33,7 @@ + diff --git a/examples/15.LoadIrrFile/Makefile b/examples/15.LoadIrrFile/Makefile index 6c211787..8b0daa8e 100644 --- a/examples/15.LoadIrrFile/Makefile +++ b/examples/15.LoadIrrFile/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/16.Quake3MapShader/Makefile b/examples/16.Quake3MapShader/Makefile index eb4d6cda..88f93cb8 100644 --- a/examples/16.Quake3MapShader/Makefile +++ b/examples/16.Quake3MapShader/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/16.Quake3MapShader/Quake3MapShader.cbp b/examples/16.Quake3MapShader/Quake3MapShader.cbp index 83807060..20c7b068 100644 --- a/examples/16.Quake3MapShader/Quake3MapShader.cbp +++ b/examples/16.Quake3MapShader/Quake3MapShader.cbp @@ -31,6 +31,7 @@ + diff --git a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj index f73a5d49..acdc249d 100644 --- a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj +++ b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj @@ -2,7 +2,7 @@ + diff --git a/examples/18.SplitScreen/SplitScreen.sln b/examples/18.SplitScreen/SplitScreen.sln index 7b6b8855..d577d3ae 100644 --- a/examples/18.SplitScreen/SplitScreen.sln +++ b/examples/18.SplitScreen/SplitScreen.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "SplitScreen.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "SplitScreen.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -9,10 +9,10 @@ Global Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.ActiveCfg = Debug|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.Build.0 = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/examples/18.SplitScreen/SplitScreen.vcproj b/examples/18.SplitScreen/SplitScreen.vcproj index 8efc546c..46cb6b78 100644 --- a/examples/18.SplitScreen/SplitScreen.vcproj +++ b/examples/18.SplitScreen/SplitScreen.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="7.10" Name="18.SplitScreen" - ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}" + ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" Keyword="Win32Proj"> @@ -129,7 +129,6 @@ WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="0" - CallingConvention="1" /> + diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick.sln b/examples/19.MouseAndJoystick/MouseAndJoystick.sln index f6ad13de..7807a0d3 100644 --- a/examples/19.MouseAndJoystick/MouseAndJoystick.sln +++ b/examples/19.MouseAndJoystick/MouseAndJoystick.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MouseAndJoystick", "MouseAndJoystick.vcproj", "{1A16BBE1-A49B-4406-8883-681E6EA8702C}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MouseAndJoystick", "MouseAndJoystick.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -9,10 +9,10 @@ Global Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Debug.ActiveCfg = Debug|Win32 - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Debug.Build.0 = Debug|Win32 - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Release.ActiveCfg = Release|Win32 - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Release.Build.0 = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.Build.0 = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj b/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj index b9ccad40..434b39ed 100644 --- a/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj +++ b/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="7.10" Name="19.MouseAndJoystick" - ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectGUID="{FE853A36-E0D1-4AC5-A792-B643E70D2953}" SccProjectName="" SccLocalPath=""> diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj b/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj index 90af8e5f..51b7facd 100644 --- a/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj +++ b/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="8.00" Name="19.MouseAndJoystick_vc8" - ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectGUID="{FE853A36-E0D1-4AC5-A792-B643E70D2953}" RootNamespace="MouseAndJoystick_vc8" > diff --git a/examples/20.ManagedLights/Makefile b/examples/20.ManagedLights/Makefile index 681c1d82..73a06cbf 100644 --- a/examples/20.ManagedLights/Makefile +++ b/examples/20.ManagedLights/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL diff --git a/examples/20.ManagedLights/ManagedLights.cbp b/examples/20.ManagedLights/ManagedLights.cbp index 73a144b8..8b8083b8 100644 --- a/examples/20.ManagedLights/ManagedLights.cbp +++ b/examples/20.ManagedLights/ManagedLights.cbp @@ -33,6 +33,7 @@ + diff --git a/examples/20.ManagedLights/ManagedLights.sln b/examples/20.ManagedLights/ManagedLights.sln index 5d5424a4..09e27763 100644 --- a/examples/20.ManagedLights/ManagedLights.sln +++ b/examples/20.ManagedLights/ManagedLights.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "ManagedLights.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "ManagedLights.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -8,8 +8,8 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/20.ManagedLights/ManagedLights.vcproj b/examples/20.ManagedLights/ManagedLights.vcproj index 586c49e6..850a8d27 100644 --- a/examples/20.ManagedLights/ManagedLights.vcproj +++ b/examples/20.ManagedLights/ManagedLights.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="7.10" Name="20.ManagedLights" - ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectGUID="{16007FE2-142B-47F8-93E1-519BA3F39E71}" SccProjectName="" SccLocalPath=""> diff --git a/examples/21.Quake3Explorer/Makefile b/examples/21.Quake3Explorer/Makefile index 7a5cc4c1..3bdcf05d 100644 --- a/examples/21.Quake3Explorer/Makefile +++ b/examples/21.Quake3Explorer/Makefile @@ -18,7 +18,7 @@ endif OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/21.Quake3Explorer/Quake3Explorer.cbp b/examples/21.Quake3Explorer/Quake3Explorer.cbp index af25af7a..34ef5960 100644 --- a/examples/21.Quake3Explorer/Quake3Explorer.cbp +++ b/examples/21.Quake3Explorer/Quake3Explorer.cbp @@ -18,6 +18,7 @@ + diff --git a/examples/21.Quake3Explorer/main.cpp b/examples/21.Quake3Explorer/main.cpp index ff420a94..2bc3c4ee 100644 --- a/examples/21.Quake3Explorer/main.cpp +++ b/examples/21.Quake3Explorer/main.cpp @@ -805,7 +805,7 @@ void CQuake3EventHandler::CreateGUI() gui.SceneTree = env->addTreeView( rect( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ), gui.Window, -1, true, true, false ); gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" ); - gui.SceneTree->getRoot()->clearChilds(); + gui.SceneTree->getRoot()->clearChildren(); addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() ); @@ -1288,7 +1288,7 @@ void CQuake3EventHandler::SetGUIActive( s32 command) gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree ) { - gui.SceneTree->getRoot()->clearChilds(); + gui.SceneTree->getRoot()->clearChildren(); addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() ); } diff --git a/examples/22.MaterialViewer/Makefile b/examples/22.MaterialViewer/Makefile index c12e6608..80169885 100644 --- a/examples/22.MaterialViewer/Makefile +++ b/examples/22.MaterialViewer/Makefile @@ -17,7 +17,7 @@ LIBSELECT=64 endif # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/22.MaterialViewer/MaterialViewer.cbp b/examples/22.MaterialViewer/MaterialViewer.cbp index 84e85473..13deb9bd 100644 --- a/examples/22.MaterialViewer/MaterialViewer.cbp +++ b/examples/22.MaterialViewer/MaterialViewer.cbp @@ -32,6 +32,7 @@ + diff --git a/examples/22.MaterialViewer/MaterialViewer.sln b/examples/22.MaterialViewer/MaterialViewer.sln index f8c0b6bf..c4fc6f43 100644 --- a/examples/22.MaterialViewer/MaterialViewer.sln +++ b/examples/22.MaterialViewer/MaterialViewer.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaterialViewer", "MaterialViewer.vcproj", "{C4F5BB37-D873-4DE2-B7D0-A60A936798E1}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaterialViewer", "MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -9,10 +9,10 @@ Global Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Debug.ActiveCfg = Debug|Win32 - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Debug.Build.0 = Debug|Win32 - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Release.ActiveCfg = Release|Win32 - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Release.Build.0 = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.ActiveCfg = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.Build.0 = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.ActiveCfg = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/examples/22.MaterialViewer/MaterialViewer.vcproj b/examples/22.MaterialViewer/MaterialViewer.vcproj index 4e3cfbea..8373d8d2 100644 --- a/examples/22.MaterialViewer/MaterialViewer.vcproj +++ b/examples/22.MaterialViewer/MaterialViewer.vcproj @@ -1,160 +1,226 @@ + ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" + TargetFrameworkVersion="131072" + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> - - - + Name="VCPostBuildEventTool" + /> + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + + + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> - - - + Name="VCPostBuildEventTool" + /> + RelativePath="main.cpp" + > + Name="Release|Win32" + > + PreprocessorDefinitions="" + /> + Name="Debug|Win32" + > + BasicRuntimeChecks="3" + /> diff --git a/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj b/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj index d3e9a129..1e7c0db3 100644 --- a/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj +++ b/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj @@ -1,9 +1,9 @@ diff --git a/examples/23.SMeshHandling/Makefile b/examples/23.SMeshHandling/Makefile index 7a37a7a8..eab50600 100644 --- a/examples/23.SMeshHandling/Makefile +++ b/examples/23.SMeshHandling/Makefile @@ -17,7 +17,7 @@ LIBSELECT=64 endif # target specific settings -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm all_win32 clean_win32: SYSTEM=Win32-gcc diff --git a/examples/23.SMeshHandling/SMeshHandling.sln b/examples/23.SMeshHandling/SMeshHandling.sln index 30c047f6..710c1e1c 100644 --- a/examples/23.SMeshHandling/SMeshHandling.sln +++ b/examples/23.SMeshHandling/SMeshHandling.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.SMeshHandling", "SMeshHandling.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.SMeshHandling", "SMeshHandling.vcproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -9,10 +9,10 @@ Global Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.ActiveCfg = Debug|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.ActiveCfg = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.Build.0 = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.ActiveCfg = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/examples/23.SMeshHandling/SMeshHandling.vcproj b/examples/23.SMeshHandling/SMeshHandling.vcproj index b85cba8b..a63d583b 100644 --- a/examples/23.SMeshHandling/SMeshHandling.vcproj +++ b/examples/23.SMeshHandling/SMeshHandling.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="7.10" Name="23.SMeshHandling" - ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}" + ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" Keyword="Win32Proj"> diff --git a/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj b/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj index 242e00f8..b1b921ef 100644 --- a/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj +++ b/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj @@ -4,7 +4,7 @@ Version="9,00" Name="23.SMeshHandling_vc9" ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" - RootNamespace="19.SMeshHandling_vc9" + RootNamespace="23.SMeshHandling_vc9" Keyword="Win32Proj" TargetFrameworkVersion="131072" > @@ -140,7 +140,7 @@ /> + + + + + diff --git a/examples/24.CursorControl/CursorControl.sln b/examples/24.CursorControl/CursorControl.sln new file mode 100644 index 00000000..6830c554 --- /dev/null +++ b/examples/24.CursorControl/CursorControl.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "CursorControl.vcproj", "{02B67A37-50E1-49db-BECF-905BC029C2FE}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {02B67A37-50E1-49db-BECF-905BC029C2FE}.Debug.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49db-BECF-905BC029C2FE}.Debug.Build.0 = Debug|Win32 + {02B67A37-50E1-49db-BECF-905BC029C2FE}.Release.ActiveCfg = Release|Win32 + {02B67A37-50E1-49db-BECF-905BC029C2FE}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/examples/24.CursorControl/CursorControl.vcproj b/examples/24.CursorControl/CursorControl.vcproj new file mode 100644 index 00000000..1bc2f531 --- /dev/null +++ b/examples/24.CursorControl/CursorControl.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/24.CursorControl/CursorControl_vc8.vcproj b/examples/24.CursorControl/CursorControl_vc8.vcproj new file mode 100644 index 00000000..61489427 --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc8.vcproj @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/24.CursorControl/CursorControl_vc9.sln b/examples/24.CursorControl/CursorControl_vc9.sln new file mode 100644 index 00000000..044f45d4 --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc9.sln @@ -0,0 +1,18 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/24.CursorControl/CursorControl_vc9.vcproj b/examples/24.CursorControl/CursorControl_vc9.vcproj new file mode 100644 index 00000000..90ebf1fd --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc9.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/24.CursorControl/Makefile b/examples/24.CursorControl/Makefile new file mode 100644 index 00000000..bc2a1372 --- /dev/null +++ b/examples/24.CursorControl/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler + +# Name of the executable created (.exe will be added automatically if necessary) +Target := 24.CursorControl +# List of source files, separated by spaces +Sources := main.cpp +# Path to Irrlicht directory, should contain include/ and lib/ +IrrlichtHome := ../.. +# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems +BinPath = ../../bin/$(SYSTEM) + +# general compiler settings (might need to be set when compiling the lib, too) +# preprocessor flags, e.g. defines and include paths +USERCPPFLAGS = +# compiler flags such as optimization flags +USERCXXFLAGS = -O3 -ffast-math +#USERCXXFLAGS = -g -Wall +# linker flags such as additional libraries and link paths +USERLDFLAGS = + +#### +#no changes necessary below this line +#### + +CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS) +CXXFLAGS = $(USERCXXFLAGS) +LDFLAGS = $(USERLDFLAGS) + +#default target is Linux +all: all_linux + +# target specific settings +all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht +all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc +all_win32 clean_win32 static_win32: SUF=.exe +static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ +all_win32: LDFLAGS += -lopengl32 -lm +static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = $(BinPath)/$(Target)$(SUF) + +all_linux all_win32 static_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 static_win32 clean clean_linux clean_win32 + +#multilib handling +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif +#solaris real-time features +ifeq ($(HOSTTYPE), sun4) +LDFLAGS += -lrt +endif + diff --git a/examples/24.CursorControl/main.cpp b/examples/24.CursorControl/main.cpp new file mode 100644 index 00000000..8808a885 --- /dev/null +++ b/examples/24.CursorControl/main.cpp @@ -0,0 +1,563 @@ +/** Example 024 Cursor Control + +Show how to modify cursors and offer some useful tool-functions for creating cursors. +It can also be used for experiments with the mouse in general. +*/ + +#include +#include "driverChoice.h" + +using namespace irr; +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +#ifdef _IRR_WINDOWS_ +#pragma comment(lib, "Irrlicht.lib") +#endif + +const int DELAY_TIME = 3000; + +enum ETimerAction +{ + ETA_MOUSE_VISIBLE, + ETA_MOUSE_INVISIBLE, +}; + +/* + Structure to allow delayed execution of some actions. +*/ +struct TimerAction +{ + u32 TargetTime; + ETimerAction Action; +}; + +/* +*/ +struct SAppContext +{ + SAppContext() + : Device(0), InfoStatic(0), EventBox(0), CursorBox(0), SpriteBox(0) + , ButtonSetVisible(0), ButtonSetInvisible(0), ButtonSimulateBadFps(0) + , ButtonChangeIcon(0) + , SimulateBadFps(false) + { + } + + void update() + { + if (!Device) + return; + u32 timeNow = Device->getTimer()->getTime(); + for ( u32 i=0; i < TimerActions.size(); ++i ) + { + if ( timeNow >= TimerActions[i].TargetTime ) + { + runTimerAction(TimerActions[i]); + TimerActions.erase(i); + } + else + { + ++i; + } + } + } + + void runTimerAction(const TimerAction& action) + { + if (ETA_MOUSE_VISIBLE == action.Action) + { + Device->getCursorControl()->setVisible(true); + ButtonSetVisible->setEnabled(true); + } + else if ( ETA_MOUSE_INVISIBLE == action.Action) + { + Device->getCursorControl()->setVisible(false); + ButtonSetInvisible->setEnabled(true); + } + } + + /* + Add another icon which the user can click and select as cursor later on. + */ + void addIcon(const stringw& name, const SCursorSprite &sprite, bool addCursor=true) + { + // Sprites are just icons - not yet cursors. They can be displayed by Irrlicht sprite functions and be used to create cursors. + SpriteBox->addItem(name.c_str(), sprite.SpriteId); + Sprites.push_back(sprite); + + // create the cursor together with the icon? + if ( addCursor ) + { + /* Here we create a hardware cursor from a sprite */ + Device->getCursorControl()->addIcon(sprite); + + // ... and add it to the cursors selection listbox to the other system cursors. + CursorBox->addItem(name.c_str()); + } + } + + IrrlichtDevice * Device; + gui::IGUIStaticText * InfoStatic; + gui::IGUIListBox * EventBox; + gui::IGUIListBox * CursorBox; + gui::IGUIListBox * SpriteBox; + gui::IGUIButton * ButtonSetVisible; + gui::IGUIButton * ButtonSetInvisible; + gui::IGUIButton * ButtonSimulateBadFps; + gui::IGUIButton * ButtonChangeIcon; + array TimerActions; + bool SimulateBadFps; + array Sprites; +}; + +/* + Helper function to print mouse event names into a stringw +*/ +void PrintMouseEventName(const SEvent& event, stringw &result) +{ + switch ( event.MouseInput.Event ) + { + case EMIE_LMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_LMOUSE_PRESSED_DOWN"); break; + case EMIE_RMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_RMOUSE_PRESSED_DOWN"); break; + case EMIE_MMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_MMOUSE_PRESSED_DOWN"); break; + case EMIE_LMOUSE_LEFT_UP: result += stringw(L"EMIE_LMOUSE_LEFT_UP"); break; + case EMIE_RMOUSE_LEFT_UP: result += stringw(L"EMIE_RMOUSE_LEFT_UP"); break; + case EMIE_MMOUSE_LEFT_UP: result += stringw(L"EMIE_MMOUSE_LEFT_UP"); break; + case EMIE_MOUSE_MOVED: result += stringw(L"EMIE_MOUSE_MOVED"); break; + case EMIE_MOUSE_WHEEL: result += stringw(L"EMIE_MOUSE_WHEEL"); break; + case EMIE_LMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_LMOUSE_DOUBLE_CLICK"); break; + case EMIE_RMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_RMOUSE_DOUBLE_CLICK"); break; + case EMIE_MMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_MMOUSE_DOUBLE_CLICK"); break; + case EMIE_LMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_LMOUSE_TRIPLE_CLICK"); break; + case EMIE_RMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_RMOUSE_TRIPLE_CLICK"); break; + case EMIE_MMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_MMOUSE_TRIPLE_CLICK"); break; + default: + break; + } +} + +/* + Helper function to print all the state information which get from a mouse-event into a stringw +*/ +void PrintMouseState(const SEvent& event, stringw &result) +{ + result += stringw(L"X: "); + result += stringw(event.MouseInput.X); + result += stringw(L"\n"); + + result += stringw(L"Y: "); + result += stringw(event.MouseInput.Y); + result += stringw(L"\n"); + + + result += stringw(L"Wheel: "); + result += stringw(event.MouseInput.Wheel); + result += stringw(L"\n"); + + result += stringw(L"Shift: "); + if ( event.MouseInput.Shift ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"Control: "); + if ( event.MouseInput.Control ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"ButtonStates: "); + result += stringw(event.MouseInput.ButtonStates); + result += stringw(L"\n"); + + result += stringw(L"isLeftPressed: "); + if ( event.MouseInput.isLeftPressed() ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"isRightPressed: "); + if ( event.MouseInput.isRightPressed() ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"isMiddlePressed: "); + if ( event.MouseInput.isMiddlePressed() ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"Event: "); + + PrintMouseEventName(event, result); + + result += stringw(L"\n"); +} + +/* + A typical event receiver. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + MyEventReceiver(SAppContext & context) : Context(context) { } + + virtual bool OnEvent(const SEvent& event) + { + if (event.EventType == EET_GUI_EVENT ) + { + switch ( event.GUIEvent.EventType ) + { + case EGET_BUTTON_CLICKED: + { + u32 timeNow = Context.Device->getTimer()->getTime(); + TimerAction action; + action.TargetTime = timeNow + DELAY_TIME; + if ( event.GUIEvent.Caller == Context.ButtonSetVisible ) + { + action.Action = ETA_MOUSE_VISIBLE; + Context.TimerActions.push_back(action); + Context.ButtonSetVisible->setEnabled(false); + } + else if ( event.GUIEvent.Caller == Context.ButtonSetInvisible ) + { + action.Action = ETA_MOUSE_INVISIBLE; + Context.TimerActions.push_back(action); + Context.ButtonSetInvisible->setEnabled(false); + } + else if ( event.GUIEvent.Caller == Context.ButtonSimulateBadFps ) + { + Context.SimulateBadFps = Context.ButtonSimulateBadFps->isPressed(); + } + else if ( event.GUIEvent.Caller == Context.ButtonChangeIcon ) + { + /* + Replace an existing cursor icon by another icon. + The user has to select both - the icon which should be replaced and the icon which will replace it. + */ + s32 selectedCursor = Context.CursorBox->getSelected(); + s32 selectedSprite = Context.SpriteBox->getSelected(); + if ( selectedCursor >= 0 && selectedSprite >= 0 ) + { + /* + This does replace the icon. + */ + Context.Device->getCursorControl()->changeIcon((ECURSOR_ICON)selectedCursor, Context.Sprites[selectedSprite] ); + + /* + Do also show the new icon. + */ + Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selectedCursor) ); + } + } + } + break; + case EGET_LISTBOX_CHANGED: + case EGET_LISTBOX_SELECTED_AGAIN: + { + if ( event.GUIEvent.Caller == Context.CursorBox ) + { + /* + Find out which cursor the user selected + */ + s32 selected = Context.CursorBox->getSelected(); + if ( selected >= 0 ) + { + /* + Here we set the new cursor icon which will now be used within our window. + */ + Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selected) ); + } + } + } + break; + default: + break; + } + } + + if (event.EventType == EET_MOUSE_INPUT_EVENT) + { + stringw infoText; + PrintMouseState(event, infoText); + Context.InfoStatic->setText(infoText.c_str()); + if ( event.MouseInput.Event != EMIE_MOUSE_MOVED && event.MouseInput.Event != EMIE_MOUSE_WHEEL ) // no spam + { + infoText = L""; + PrintMouseEventName(event, infoText); + Context.EventBox->insertItem(0, infoText.c_str(), -1); + } + } + + return false; + } + +private: + SAppContext & Context; +}; + +/* + Use several imagefiles as animation frames for a sprite which can be used as cursor icon. + The images in those files all need to have the same size. + Return sprite index on success or -1 on failure +*/ +s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const array< io::path >& files, u32 frameTime ) +{ + if ( !spriteBank || !driver || !files.size() ) + return -1; + + video::ITexture * tex = driver->getTexture( files[0] ); + if ( tex ) + { + array< rect >& spritePositions = spriteBank->getPositions(); + u32 idxRect = spritePositions.size(); + spritePositions.push_back( rect(0,0, tex->getSize().Width, tex->getSize().Height) ); + + SGUISprite sprite; + sprite.frameTime = frameTime; + + array< SGUISprite >& sprites = spriteBank->getSprites(); + u32 startIdx = spriteBank->getTextureCount(); + for ( u32 f=0; f < files.size(); ++f ) + { + tex = driver->getTexture( files[f] ); + if ( tex ) + { + spriteBank->addTexture( driver->getTexture(files[f]) ); + gui::SGUISpriteFrame frame; + frame.rectNumber = idxRect; + frame.textureNumber = startIdx+f; + sprite.Frames.push_back( frame ); + } + } + + sprites.push_back( sprite ); + return sprites.size()-1; + } + + return -1; +} + +/* + Use several images within one imagefile as animation frames for a sprite which can be used as cursor icon + The sizes of the icons within that file all need to have the same size + Return sprite index on success or -1 on failure +*/ +s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const array< rect >& rects, u32 frameTime ) +{ + if ( !spriteBank || !driver || !rects.size() ) + return -1; + + video::ITexture * tex = driver->getTexture( file ); + if ( tex ) + { + array< rect >& spritePositions = spriteBank->getPositions(); + u32 idxRect = spritePositions.size(); + u32 idxTex = spriteBank->getTextureCount(); + spriteBank->addTexture( tex ); + + SGUISprite sprite; + sprite.frameTime = frameTime; + + array< SGUISprite >& sprites = spriteBank->getSprites(); + for ( u32 i=0; i < rects.size(); ++i ) + { + spritePositions.push_back( rects[i] ); + + gui::SGUISpriteFrame frame; + frame.rectNumber = idxRect+i; + frame.textureNumber = idxTex; + sprite.Frames.push_back( frame ); + } + + sprites.push_back( sprite ); + return sprites.size()-1; + } + + return -1; +} + +/* + Create a non-animated icon from the given file and position and put it into the spritebank. + We can use this icon later on in a cursor. +*/ +s32 AddIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const core::rect& rect ) +{ + if ( !spriteBank || !driver ) + return -1; + + video::ITexture * tex = driver->getTexture( file ); + if ( tex ) + { + core::array< core::rect >& spritePositions = spriteBank->getPositions(); + spritePositions.push_back( rect ); + array< SGUISprite >& sprites = spriteBank->getSprites(); + spriteBank->addTexture( tex ); + + gui::SGUISpriteFrame frame; + frame.rectNumber = spritePositions.size()-1; + frame.textureNumber = spriteBank->getTextureCount()-1; + + SGUISprite sprite; + sprite.frameTime = 0; + sprite.Frames.push_back( frame ); + + sprites.push_back( sprite ); + + return sprites.size()-1; + } + + return -1; +} + +int main() +{ + video::E_DRIVER_TYPE driverType = driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + IrrlichtDevice * device = createDevice(driverType, dimension2d(640, 480)); + if (device == 0) + return 1; // could not create selected driver. + + // It's sometimes of interest to know how the mouse behaves after a resize + device->setResizable(true); + + device->setWindowCaption(L"Cursor control - Irrlicht engine tutorial"); + video::IVideoDriver* driver = device->getVideoDriver(); + IGUIEnvironment* env = device->getGUIEnvironment(); + + gui::IGUISpriteBank * SpriteBankIcons; + + SAppContext context; + context.Device = device; + + rect< s32 > rectInfoStatic(10,10, 200, 200); + env->addStaticText (L"Cursor state information", rectInfoStatic, true, true); + rectInfoStatic.UpperLeftCorner += dimension2di(0, 15); + context.InfoStatic = env->addStaticText (L"", rectInfoStatic, true, true); + rect< s32 > rectEventBox(10,210, 200, 400); + env->addStaticText (L"click events (new on top)", rectEventBox, true, true); + rectEventBox.UpperLeftCorner += dimension2di(0, 15); + context.EventBox = env->addListBox(rectEventBox); + rect< s32 > rectCursorBox(210,10, 400, 250); + env->addStaticText (L"cursors, click to set the active one", rectCursorBox, true, true); + rectCursorBox.UpperLeftCorner += dimension2di(0, 15); + context.CursorBox = env->addListBox(rectCursorBox); + rect< s32 > rectSpriteBox(210,260, 400, 400); + env->addStaticText (L"sprites", rectSpriteBox, true, true); + rectSpriteBox.UpperLeftCorner += dimension2di(0, 15); + context.SpriteBox = env->addListBox(rectSpriteBox); + + context.ButtonSetVisible = env->addButton( rect( 410, 20, 560, 40 ), 0, -1, L"set visible (delayed)" ); + context.ButtonSetInvisible = env->addButton( rect( 410, 50, 560, 70 ), 0, -1, L"set invisible (delayed)" ); + context.ButtonSimulateBadFps = env->addButton( rect( 410, 80, 560, 100 ), 0, -1, L"simulate bad FPS" ); + context.ButtonSimulateBadFps->setIsPushButton(true); + context.ButtonChangeIcon = env->addButton( rect( 410, 140, 560, 160 ), 0, -1, L"replace cursor icon\n(cursor+sprite must be selected)" ); + + // set the names for alll the system cursors + for ( int i=0; i < (int)gui::ECI_COUNT; ++i ) + { + context.CursorBox->addItem(stringw( GUICursorIconNames[i] ).c_str()); + } + + /* + Create sprites which then can be used as cursor icons. + */ + SpriteBankIcons = env->addEmptySpriteBank(io::path("cursor_icons")); + context.SpriteBox->setSpriteBank(SpriteBankIcons); + + // create one animated icon from several files + array< io::path > files; + files.push_back( io::path("../../media/icon_crosshairs16x16bw1.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") ); + SCursorSprite spriteBw; // the sprite + some additional information needed for cursors + spriteBw.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, files, 200 ); + spriteBw.SpriteBank = SpriteBankIcons; + spriteBw.HotSpot = position2d(7,7); + context.addIcon(L"crosshair_bw", spriteBw); + + // create one animated icon from one file + array< rect > iconRects; + iconRects.push_back( rect(0,0, 16, 16) ); + iconRects.push_back( rect(16,0, 32, 16) ); + iconRects.push_back( rect(0,16, 16, 32) ); + iconRects.push_back( rect(0,16, 16, 32) ); + iconRects.push_back( rect(16,0, 32, 16) ); + SCursorSprite spriteCol; // the sprite + some additional information needed for cursors + spriteCol.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), iconRects, 200 ); + spriteCol.HotSpot = position2d(7,7); + spriteCol.SpriteBank = SpriteBankIcons; + context.addIcon(L"crosshair_colored", spriteCol); + + // Create some non-animated icons + rect rectIcon; + SCursorSprite spriteNonAnimated(SpriteBankIcons, 0, position2d(7,7)); + + rectIcon = rect(0,0, 16, 16); + spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon ); + context.addIcon(L"crosshair_col1", spriteNonAnimated, false); + + rectIcon = rect(16,0, 32, 16); + spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon ); + context.addIcon(L"crosshair_col2", spriteNonAnimated, false); + + rectIcon = rect(0,16, 16, 32); + spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon ); + context.addIcon(L"crosshair_col3", spriteNonAnimated, false); + + + MyEventReceiver receiver(context); + device->setEventReceiver(&receiver); + + while(device->run() && driver) + { + // if (device->isWindowActive()) + { + u32 realTimeNow = device->getTimer()->getRealTime(); + + context.update(); + + driver->beginScene(true, true, SColor(0,200,200,200)); + + env->drawAll(); + + // draw custom sprite with Irrlicht functions for comparison. It should usually look the same as the cursors. + if ( context.SpriteBox ) + { + s32 selectedSprite = context.SpriteBox->getSelected(); + if ( selectedSprite >= 0 && context.Sprites[selectedSprite].SpriteId >= 0 ) + { + SpriteBankIcons->draw2DSprite(u32(context.Sprites[selectedSprite].SpriteId), position2di(580, 140), 0, video::SColor(255, 255, 255, 255), 0, realTimeNow); + } + } + + driver->endScene(); + } + + // By simulating bad fps we can find out if hardware-support for cusors works or not. If it works the cursor will move as usual,while it otherwise will just update with 2 fps now. + if ( context.SimulateBadFps ) + { + device->sleep(500); // 2 fps + } + else + { + device->sleep(10); + } + } + + device->drop(); + + return 0; +} + +/* +**/ diff --git a/examples/BuildAllExamples_v7.sln b/examples/BuildAllExamples_v7.sln index 839aaa70..3d50c58c 100644 --- a/examples/BuildAllExamples_v7.sln +++ b/examples/BuildAllExamples_v7.sln @@ -74,7 +74,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Qu ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -83,7 +83,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Qua {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -165,16 +165,16 @@ Global {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32 {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32 {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.ActiveCfg = Release|Win32 {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug.ActiveCfg = Debug|Win32 {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug.Build.0 = Debug|Win32 {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release.ActiveCfg = Release|Win32 {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release.Build.0 = Release|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.Build.0 = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.Build.0 = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug.ActiveCfg = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug.Build.0 = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release.ActiveCfg = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/examples/BuildAllExamples_v8.sln b/examples/BuildAllExamples_v8.sln index 845f9b50..0ca5b530 100644 --- a/examples/BuildAllExamples_v8.sln +++ b/examples/BuildAllExamples_v8.sln @@ -52,7 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc8", "Demo\Demo_vc8.v EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc8", "16.Quake3MapShader\Quake3MapShader_vc8.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc8", "19.MouseAndJoystick\MouseAndJoystick_vc8.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc8", "19.MouseAndJoystick\MouseAndJoystick_vc8.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc8", "20.ManagedLights\ManagedLights_vc8.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" ProjectSection(ProjectDependencies) = postProject @@ -66,6 +66,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc8", "21 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v8.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer_vc8", "22.MaterialViewer\MaterialViewer_vc8.vcproj", "{2856AB41-9BC5-4716-9B35-762A65F6F5D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc8", "23.SMeshHandling\SMeshHandling_vc8.vcproj", "{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc8", "24.CursorControl\CursorControl_vc8.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -144,10 +150,10 @@ Global {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32 {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32 {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32 {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32 {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 @@ -160,6 +166,18 @@ Global {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32 {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32 {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.Build.0 = Debug|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.ActiveCfg = Release|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.Build.0 = Release|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.Build.0 = Debug|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.ActiveCfg = Release|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.Build.0 = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/BuildAllExamples_v9.sln b/examples/BuildAllExamples_v9.sln index 40ecd0c2..372cbb77 100644 --- a/examples/BuildAllExamples_v9.sln +++ b/examples/BuildAllExamples_v9.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc9", "01.HelloWorld\HelloWorld_vc9.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} @@ -118,7 +118,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc9", "23. {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile_v9", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection @@ -138,6 +138,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mesh Converter", "..\tools\ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "24.CursorControl\CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -256,6 +258,10 @@ Global {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32 {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32 {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/Demo/CDemo.cpp b/examples/Demo/CDemo.cpp index eddee011..489d89d0 100644 --- a/examples/Demo/CDemo.cpp +++ b/examples/Demo/CDemo.cpp @@ -359,7 +359,7 @@ void CDemo::loadSceneData() core::matrix4 m; m.setTranslation(core::vector3df(-1300,-70,-1249)); - for ( i = 0; i!= scene::quake3::E_Q3_MESH_SIZE; ++i ) + for ( i = 0; i != scene::quake3::E_Q3_MESH_SIZE; ++i ) sm->getMeshManipulator()->transform(quakeLevelMesh->getMesh(i), m); quakeLevelNode = sm->addOctreeSceneNode( diff --git a/examples/Demo/CMainMenu.cpp b/examples/Demo/CMainMenu.cpp index 81b7312a..0c700928 100644 --- a/examples/Demo/CMainMenu.cpp +++ b/examples/Demo/CMainMenu.cpp @@ -63,7 +63,7 @@ bool CMainMenu::run(bool& outFullscreen, bool& outMusic, bool& outShadows, box->addItem(L"OpenGL 1.5"); box->addItem(L"Direct3D 8.1"); box->addItem(L"Direct3D 9.0c"); - box->addItem(L"Burning's Video 0.44"); + box->addItem(L"Burning's Video 0.47"); box->addItem(L"Irrlicht Software Renderer 1.0"); box->setSelected(selected); diff --git a/examples/Demo/Makefile b/examples/Demo/Makefile index 2b5f206c..c96f49ec 100644 --- a/examples/Demo/Makefile +++ b/examples/Demo/Makefile @@ -11,10 +11,10 @@ endif all: all_linux +OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM # target specific settings all_linux: SYSTEM=Linux -OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor all_win32 clean_win32: SYSTEM=Win32-gcc all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm diff --git a/examples/Demo/demo.cbp b/examples/Demo/demo.cbp new file mode 100644 index 00000000..91e25df3 --- /dev/null +++ b/examples/Demo/demo.cbp @@ -0,0 +1,69 @@ + + + + + + diff --git a/include/IAnimatedMesh.h b/include/IAnimatedMesh.h index dc607002..791c0ca8 100644 --- a/include/IAnimatedMesh.h +++ b/include/IAnimatedMesh.h @@ -47,10 +47,104 @@ namespace scene can be loaded directly by Irrlicht */ EAMT_OCT, + //! Halflife MDL model file + EAMT_MDL_HALFLIFE, + //! generic skinned mesh EAMT_SKINNED }; + + //! Possible types of Animation Type + enum E_ANIMATION_TYPE + { + //! No Animation + EAMT_STILL, + //! From Start to End, then Stop ( Limited Line ) + EAMT_WAYPOINT, + //! Linear Cycling Animation ( Sawtooth ) + EAMT_LOOPING, + //! Linear bobbing ( Triangle ) + EAMT_PINGPONG + }; + + //! Names for Animation Type + const c8* const MeshAnimationTypeNames[] = + { + "still", + "waypoint", + "looping", + "pingpong", + 0 + }; + + + //! Data for holding named Animation Info + struct KeyFrameInterpolation + { + core::stringc Name; // Name of the current Animation/Bone + E_ANIMATION_TYPE AnimationType; // Type of Animation ( looping, usw..) + + f32 CurrentFrame; // Current Frame + s32 NextFrame; // Frame which will be used next. For blending + + s32 StartFrame; // Absolute Frame where the current animation start + s32 Frames; // Relative Frames how much Frames this animation have + s32 LoopingFrames; // How much of Frames sould be looped + s32 EndFrame; // Absolute Frame where the current animation ends End = start + frames - 1 + + f32 FramesPerSecond; // Speed in Frames/Seconds the animation is played + f32 RelativeSpeed; // Factor Original fps is modified + + u32 BeginTime; // Animation started at this thime + u32 EndTime; // Animation end at this time + u32 LastTime; // Last Keyframe was done at this time + + KeyFrameInterpolation ( const c8 * name = "", s32 start = 0, s32 frames = 0, s32 loopingframes = 0, + f32 fps = 0.f, f32 relativefps = 1.f ) + : Name ( name ), AnimationType ( loopingframes ? EAMT_LOOPING : EAMT_WAYPOINT), + CurrentFrame ( (f32) start ), NextFrame ( start ), StartFrame ( start ), + Frames ( frames ), LoopingFrames ( loopingframes ), EndFrame ( start + frames - 1 ), + FramesPerSecond ( fps ), RelativeSpeed ( relativefps ), + BeginTime ( 0 ), EndTime ( 0 ), LastTime ( 0 ) + { + } + + // linear search + bool operator == ( const KeyFrameInterpolation & other ) const + { + return Name.equals_ignore_case ( other.Name ); + } + + }; + + + //! a List holding named Animations + typedef core::array < KeyFrameInterpolation > IAnimationList; + + //! a List holding named Skins + typedef core::array < core::stringc > ISkinList; + + + // Current Model per Body + struct SubModel + { + core::stringc name; + u32 startBuffer; + u32 endBuffer; + u32 state; + }; + + struct BodyPart + { + core::stringc name; + u32 defaultModel; + core::array < SubModel > model; + }; + //! a List holding named Models and SubModels + typedef core::array < BodyPart > IBodyList; + + //! Interface for an animated mesh. /** There are already simple implementations of this interface available so you don't have to implement this interface on your own if you need to: diff --git a/include/ICursorControl.h b/include/ICursorControl.h index 93bacea0..31675622 100644 --- a/include/ICursorControl.h +++ b/include/ICursorControl.h @@ -14,6 +14,70 @@ namespace irr namespace gui { + class IGUISpriteBank; + + //! Default icons for cursors + enum ECURSOR_ICON + { + // Following cursors might be system specific, or might use an Irrlicht icon-set. No guarantees so far. + ECI_NORMAL, // arrow + ECI_CROSS, // Crosshair + ECI_HAND, // Hand + ECI_HELP, // Arrow and question mark + ECI_IBEAM, // typical text-selection cursor + ECI_NO, // should not click icon + ECI_WAIT, // hourclass + ECI_SIZEALL, // arrow in all directions + ECI_SIZENESW, // resizes in direction north-east or south-west + ECI_SIZENWSE, // resizes in direction north-west or south-east + ECI_SIZENS, // resizes in direction north or south + ECI_SIZEWE, // resizes in direction west or east + ECI_UP, // up-arrow + + // Implementer note: Should we add system specific cursors, which use guaranteed the system icons, + // then I would recommend using a naming scheme like ECI_W32_CROSS, ECI_X11_CROSSHAIR and adding those + // additionally. + + ECI_COUNT // maximal of defined cursors. Note that higher values can be created at runtime + }; + + //! Names for ECURSOR_ICON + const c8* const GUICursorIconNames[ECI_COUNT+1] = + { + "normal", + "cross", + "hand", + "help", + "ibeam", + "no", + "wait", + "sizeall", + "sizenesw", + "sizenwse", + "sizens", + "sizewe", + "sizeup", + 0 + }; + + //! structure used to set sprites as cursors. + struct SCursorSprite + { + SCursorSprite() + : SpriteBank(0), SpriteId(-1) + { + } + + SCursorSprite( gui::IGUISpriteBank * spriteBank, s32 spriteId, const core::position2d &hotspot=core::position2d(0,0) ) + : SpriteBank(spriteBank), SpriteId(spriteId), HotSpot(hotspot) + { + } + + gui::IGUISpriteBank * SpriteBank; + s32 SpriteId; + core::position2d HotSpot; + }; + //! Interface to manipulate the mouse cursor. class ICursorControl : public virtual IReferenceCounted { @@ -73,6 +137,28 @@ namespace gui for example in an editor. \param rect: A pointer to an reference rectangle or 0 to disable the reference rectangle.*/ virtual void setReferenceRect(core::rect* rect=0) = 0; + + + //! Sets the active cursor icon + /** Setting cursor icons is so far only supported on Win32 and Linux */ + virtual void setActiveIcon(ECURSOR_ICON iconId) {} + + //! Gets the currently active icon + virtual ECURSOR_ICON getActiveIcon() const { return gui::ECI_NORMAL; } + + //! Add a custom sprite as cursor icon. + /** \return Identification for the icon */ + virtual ECURSOR_ICON addIcon(const gui::SCursorSprite& icon) { return gui::ECI_NORMAL; } + + //! replace a cursor icon. + /** Changing cursor icons is so far only supported on Win32 and Linux + Note that this only changes the icons within your application, system cursors outside your + application will not be affected. + */ + virtual void changeIcon(ECURSOR_ICON iconId, const gui::SCursorSprite& sprite) {} + + //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. + virtual core::dimension2di getSupportedIconSize() const { return core::dimension2di(0,0); } }; diff --git a/include/IEventReceiver.h b/include/IEventReceiver.h index c365c1d2..4532c42d 100644 --- a/include/IEventReceiver.h +++ b/include/IEventReceiver.h @@ -6,7 +6,6 @@ #define __I_EVENT_RECEIVER_H_INCLUDED__ #include "ILogger.h" -#include "position2d.h" #include "Keycodes.h" #include "irrString.h" @@ -246,9 +245,12 @@ namespace irr //! A tree view node was expanded. See IGUITreeView::getLastEventNode(). EGET_TREEVIEW_NODE_EXPAND, - //! A tree view node was collapsed. See IGUITreeView::getLastEventNode(). + //! deprecated - use EGET_TREEVIEW_NODE_COLLAPSE instead EGET_TREEVIEW_NODE_COLLAPS, + //! A tree view node was collapsed. See IGUITreeView::getLastEventNode(). + EGET_TREEVIEW_NODE_COLLAPSE = EGET_TREEVIEW_NODE_COLLAPS, + //! No real event. Just for convenience to get number of events EGET_COUNT }; diff --git a/include/IFileArchive.h b/include/IFileArchive.h index 673486d7..eabd4552 100644 --- a/include/IFileArchive.h +++ b/include/IFileArchive.h @@ -42,6 +42,9 @@ enum E_FILE_ARCHIVE_TYPE //! A Tape ARchive EFAT_TAR = MAKE_IRR_ID('T','A','R', 0), + //! A wad Archive, Quake2, Halflife + EFAT_WAD = MAKE_IRR_ID('W','A','D', 0), + //! The type of this archive is unknown EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n') }; diff --git a/include/IFileList.h b/include/IFileList.h index 376d2e62..e5830478 100644 --- a/include/IFileList.h +++ b/include/IFileList.h @@ -42,6 +42,12 @@ public: \return The size of the file in bytes. */ virtual u32 getFileSize(u32 index) const = 0; + //! Returns the file offset of a file in the file list, based on an index. + /** \param index is the zero based index of the file which should be returned. + The index must be less than the amount getFileCount() returns. + \return The size of the file in bytes. */ + virtual u32 getFileOffset(u32 index) const = 0; + //! Returns the ID of a file in the file list, based on an index. /** This optional ID can be used to link the file list entry to information held elsewhere. For example this could be an index in an IFileArchive, linking the entry @@ -71,9 +77,10 @@ public: //! Add as a file or folder to the list /** \param fullPath The file name including path, from the root of the file list. \param isDirectory True if this is a directory rather than a file. + \param offset, The file offset inside an archive \param size The size of the file in bytes. \param id The ID of the file in the archive which owns it */ - virtual u32 addItem(const io::path& fullPath, u32 size, bool isDirectory, u32 id=0) = 0; + virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0) = 0; //! Sorts the file list. You should call this after adding any items to the file list virtual void sort() = 0; diff --git a/include/IGUIColorSelectDialog.h b/include/IGUIColorSelectDialog.h index 342e584f..331aed4f 100644 --- a/include/IGUIColorSelectDialog.h +++ b/include/IGUIColorSelectDialog.h @@ -12,7 +12,7 @@ namespace irr namespace gui { - //! Standard file chooser dialog. + //! Standard color chooser dialog. class IGUIColorSelectDialog : public IGUIElement { public: diff --git a/include/IGUIEditBox.h b/include/IGUIEditBox.h index 5666b873..b90aaa38 100644 --- a/include/IGUIEditBox.h +++ b/include/IGUIEditBox.h @@ -38,12 +38,19 @@ namespace gui \param color: New color of the text. */ virtual void setOverrideColor(video::SColor color) = 0; + //! Gets the override color + virtual video::SColor const & getOverrideColor() const = 0; + //! Sets if the text should use the override color or the color in the gui skin. /** \param enable: If set to true, the override color, which can be set with IGUIEditBox::setOverrideColor is used, otherwise the EGDC_BUTTON_TEXT color of the skin. */ virtual void enableOverrideColor(bool enable) = 0; + //! Checks if an override color is enabled + /** \return true if the override color is enabled, false otherwise */ + virtual bool isOverrideColorEnabled(void) const = 0; + //! Turns the border on or off /** \param border: true if you want the border to be drawn, false if not */ virtual void setDrawBorder(bool border) = 0; diff --git a/include/IGUIElement.h b/include/IGUIElement.h index cfdcf185..123e52bc 100644 --- a/include/IGUIElement.h +++ b/include/IGUIElement.h @@ -538,6 +538,27 @@ public: } + //! Moves a child to the back, so it's siblings are drawn on top of it + /** \return True if successful, false if not. */ + virtual bool bringToBack(IGUIElement* child) + { + core::list::Iterator it = Children.begin(); + if (child == (*it)) // already there + return true; + for (; it != Children.end(); ++it) + { + if (child == (*it)) + { + Children.erase(it); + Children.push_front(child); + return true; + } + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + //! Returns list with children of this element virtual const core::list& getChildren() const { diff --git a/include/IGUITreeView.h b/include/IGUITreeView.h index 931d3545..7e7192f4 100644 --- a/include/IGUITreeView.h +++ b/include/IGUITreeView.h @@ -22,56 +22,70 @@ namespace gui public: //! returns the owner (tree view) of this node virtual IGUITreeView* getOwner() const = 0; - + //! Returns the parent node of this node. /** For the root node this will return 0. */ virtual IGUITreeViewNode* getParent() const = 0; - + //! returns the text of the node virtual const wchar_t* getText() const = 0; //! sets the text of the node virtual void setText( const wchar_t* text ) = 0; - //! returns the icon text of the node + //! returns the icon text of the node virtual const wchar_t* getIcon() const = 0; - + //! sets the icon text of the node virtual void setIcon( const wchar_t* icon ) = 0; - - //! returns the image index of the node + + //! returns the image index of the node virtual u32 getImageIndex() const = 0; - + //! sets the image index of the node virtual void setImageIndex( u32 imageIndex ) = 0; - - //! returns the image index of the node + + //! returns the image index of the node virtual u32 getSelectedImageIndex() const = 0; - + //! sets the image index of the node virtual void setSelectedImageIndex( u32 imageIndex ) = 0; - + //! returns the user data (void*) of this node virtual void* getData() const = 0; - + //! sets the user data (void*) of this node virtual void setData( void* data ) = 0; - + //! returns the user data2 (IReferenceCounted) of this node virtual IReferenceCounted* getData2() const = 0; - + //! sets the user data2 (IReferenceCounted) of this node virtual void setData2( IReferenceCounted* data ) = 0; - + //! returns the child item count - virtual u32 getChildCount() const = 0; - - //! removes all childs (recursive) from this node - virtual void clearChilds() = 0; - + virtual u32 getChildCount() const = 0; + + //! removes all children (recursive) from this node + virtual void clearChildren() = 0; + + //! removes all children (recursive) from this node + /** \deprecated Deprecated in 1.8, use clearChildren() instead. */ + _IRR_DEPRECATED_ void clearChilds() + { + return clearChildren(); + } + //! returns true if this node has child nodes - virtual bool hasChilds() const = 0; - + virtual bool hasChildren() const = 0; + + //! returns true if this node has child nodes + /** \deprecated Deprecated in 1.8, use hasChildren() instead. */ + _IRR_DEPRECATED_ bool hasChilds() const + { + return hasChildren(); + } + //! Adds a new node behind the last child node. /** \param text text of the new node \param icon icon text of the new node @@ -133,13 +147,13 @@ namespace gui const wchar_t* text, const wchar_t* icon = 0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void* data=0, IReferenceCounted* data2=0) = 0; - + //! Return the first child node from this node. - /** \return The first child node or 0 if this node has no childs. */ + /** \return The first child node or 0 if this node has no children. */ virtual IGUITreeViewNode* getFirstChild() const = 0; //! Return the last child node from this node. - /** \return The last child node or 0 if this node has no childs. */ + /** \return The last child node or 0 if this node has no children. */ virtual IGUITreeViewNode* getLastChild() const = 0; //! Returns the previous sibling node from this node. @@ -162,7 +176,7 @@ namespace gui //! Deletes a child node. /** \return Returns true if the node was found as a child and is deleted. */ virtual bool deleteChild( IGUITreeViewNode* child ) = 0; - + //! Moves a child node one position up. /** \return True if the node was found as achild node and was not already the first child. */ virtual bool moveChildUp( IGUITreeViewNode* child ) = 0; @@ -171,30 +185,30 @@ namespace gui /** \return True if the node was found as achild node and was not already the last child. */ virtual bool moveChildDown( IGUITreeViewNode* child ) = 0; - //! Returns true if the node is expanded (childs are visible). + //! Returns true if the node is expanded (children are visible). virtual bool getExpanded() const = 0; - + //! Sets if the node is expanded. virtual void setExpanded( bool expanded ) = 0; - + //! Returns true if the node is currently selected. virtual bool getSelected() const = 0; - + //! Sets this node as selected. virtual void setSelected( bool selected ) = 0; - + //! Returns true if this node is the root node. virtual bool isRoot() const = 0; - + //! Returns the level of this node. - /** The root node has level 0. Direct childs of the root has level 1 ... */ + /** The root node has level 0. Direct children of the root has level 1 ... */ virtual s32 getLevel() const = 0; - + //! Returns true if this node is visible (all parents are expanded). virtual bool isVisible() const = 0; }; - - + + //! Default tree view GUI element. /** Displays a windows like tree buttons to expand/collaps the child nodes of an node and optional tree lines. Each node consits of an @@ -215,7 +229,7 @@ namespace gui //! returns true if the tree lines are visible virtual bool getLinesVisible() const = 0; - + //! sets if the tree lines are visible /** \param visible true for visible, false for invisible */ virtual void setLinesVisible( bool visible ) = 0; @@ -228,20 +242,20 @@ namespace gui strings defined in GUIIcons.h can be used. */ virtual void setIconFont( IGUIFont* font ) = 0; - + //! Sets the image list which should be used for the image and selected image of every node. /** The default is 0 (no images). */ virtual void setImageList( IGUIImageList* imageList ) = 0; - + //! Returns the image list which is used for the nodes. virtual IGUIImageList* getImageList() const = 0; - + //! Sets if the image is left of the icon. Default is true. virtual void setImageLeftOfIcon( bool bLeftOf ) = 0; - + //! Returns if the Image is left of the icon. Default is true. virtual bool getImageLeftOfIcon() const = 0; - + //! Returns the node which is associated to the last event. /** This pointer is only valid inside the OnEvent call! */ virtual IGUITreeViewNode* getLastEventNode() const = 0; diff --git a/include/IImage.h b/include/IImage.h index 74bddc99..308bb286 100644 --- a/include/IImage.h +++ b/include/IImage.h @@ -15,50 +15,6 @@ namespace irr namespace video { -//! An enum for the color format of textures used by the Irrlicht Engine. -/** A color format specifies how color information is stored. */ -enum ECOLOR_FORMAT -{ - //! 16 bit color format used by the software driver. - /** It is thus preferred by all other irrlicht engine video drivers. - There are 5 bits for every color component, and a single bit is left - for alpha information. */ - ECF_A1R5G5B5 = 0, - - //! Standard 16 bit color format. - ECF_R5G6B5, - - //! 24 bit color, no alpha channel, but 8 bit for red, green and blue. - ECF_R8G8B8, - - //! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha. - ECF_A8R8G8B8, - - /** Floating Point formats. The following formats may only be used for render target textures. */ - - //! 16 bit floating point format using 16 bits for the red channel. - ECF_R16F, - - //! 32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel. - ECF_G16R16F, - - //! 64 bit floating point format 16 bits are used for the red, green, blue and alpha channels. - ECF_A16B16G16R16F, - - //! 32 bit floating point format using 32 bits for the red channel. - ECF_R32F, - - //! 64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel. - ECF_G32R32F, - - //! 128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels. - ECF_A32B32G32R32F, - - //! Unknown color format: - ECF_UNKNOWN -}; - - //! Interface for software image data. /** Image loaders create these images from files. IVideoDrivers convert these images into their (hardware) textures. diff --git a/include/ILogger.h b/include/ILogger.h index fabdacbc..a07256b8 100644 --- a/include/ILogger.h +++ b/include/ILogger.h @@ -11,18 +11,25 @@ namespace irr { //! Possible log levels. +//! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing. +//! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE +//! messages are never filtered and always printed. enum ELOG_LEVEL { - //! High log level, warnings, errors and important information texts are printed out. - ELL_INFORMATION = 0, + //! Used for printing information helpful in debugging + ELL_DEBUG, - //! Default log level, warnings and errors are printed out + //! Useful information to print. For example hardware infos or something started/stopped. + ELL_INFORMATION, + + //! Warnings that something isn't as expected and can cause oddities ELL_WARNING, - //! Low log level, only errors are printed into the log + //! Something did go wrong. ELL_ERROR, - //! Nothing is printed out to the log + //! Logs with ELL_NONE will never be filtered. + //! And used as filter it will remove all logging except ELL_NONE messages. ELL_NONE }; diff --git a/include/ISceneCollisionManager.h b/include/ISceneCollisionManager.h index 9b750a5b..066140ae 100644 --- a/include/ISceneCollisionManager.h +++ b/include/ISceneCollisionManager.h @@ -164,7 +164,7 @@ namespace scene parameters) the position of the collision, and the triangle that was hit. All scene nodes in the hierarchy tree under the specified node are checked. Only - notes that are visible, with an ID that matches at least one bit in the supplied + nodes that are visible, with an ID that matches at least one bit in the supplied bitmask, and which have a triangle selector are considered as candidates for being hit. You do not have to build a meta triangle selector; the individual triangle selectors of each candidate scene node are used automatically. diff --git a/include/ISceneNodeAnimatorCollisionResponse.h b/include/ISceneNodeAnimatorCollisionResponse.h index f946dd44..41b137a4 100644 --- a/include/ISceneNodeAnimatorCollisionResponse.h +++ b/include/ISceneNodeAnimatorCollisionResponse.h @@ -145,7 +145,7 @@ namespace scene //! Returns the last triangle that caused a collision virtual const core::triangle3df & getCollisionTriangle() const = 0; - //! Returns the position that the target node will be moved to, unless the collision is consumed in a callback). + //! Returns the position that the target node will be moved to, unless the collision is consumed in a callback. /** If you have a collision callback registered, and it consumes the collision, then the node will ignore the collision and will not stop at this position. Instead, it will diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h index 9c51356c..3fe5a254 100644 --- a/include/IrrCompileConfig.h +++ b/include/IrrCompileConfig.h @@ -127,7 +127,7 @@ headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one. #if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK)) //! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004 -//#define _IRR_COMPILE_WITH_DIRECT3D_8_ +// #define _IRR_COMPILE_WITH_DIRECT3D_8_ #define _IRR_COMPILE_WITH_DIRECT3D_9_ #endif @@ -183,9 +183,11 @@ define out. */ //! On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags //! to remove the dependencies such that Irrlicht will compile on those systems, too. +//! If you don't need colored cursors you can also disable the Xcursor extension #if defined(_IRR_LINUX_PLATFORM_) && defined(_IRR_COMPILE_WITH_X11_) #define _IRR_LINUX_X11_VIDMODE_ //#define _IRR_LINUX_X11_RANDR_ +#define _IRR_LINUX_XCURSOR_ #endif //! Define _IRR_COMPILE_WITH_GUI_ to compile the engine with the built-in GUI @@ -290,12 +292,12 @@ B3D, MS3D or X meshes */ //! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files #define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ - +//! Define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ if you want to load Halflife animated files +#define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ //! Define _IRR_COMPILE_WITH_MD2_LOADER_ if you want to load Quake 2 animated files #define _IRR_COMPILE_WITH_MD2_LOADER_ //! Define _IRR_COMPILE_WITH_MD3_LOADER_ if you want to load Quake 3 animated files #define _IRR_COMPILE_WITH_MD3_LOADER_ - //! Define _IRR_COMPILE_WITH_3DS_LOADER_ if you want to load 3D Studio Max files #define _IRR_COMPILE_WITH_3DS_LOADER_ //! Define _IRR_COMPILE_WITH_COLLADA_LOADER_ if you want to load Collada files @@ -345,10 +347,19 @@ B3D, MS3D or X meshes */ #define _IRR_COMPILE_WITH_PPM_LOADER_ //! Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files #define _IRR_COMPILE_WITH_PSD_LOADER_ +//! Define _IRR_COMPILE_WITH_DDS_LOADER_ if you want to load .dds files +// Outcommented because +// a) it doesn't compile on 64-bit currently +// b) anyone enabling it should be aware that S3TC compression algorithm which might be used in that loader +// is patented in the US by S3 and they do collect license fees when it's used in applications. +// So if you are unfortunate enough to develop applications for US market and their broken patent system be careful. +// #define _IRR_COMPILE_WITH_DDS_LOADER_ //! Define _IRR_COMPILE_WITH_TGA_LOADER_ if you want to load .tga files #define _IRR_COMPILE_WITH_TGA_LOADER_ //! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files #define _IRR_COMPILE_WITH_WAL_LOADER_ +//! Define _IRR_COMPILE_WITH_LMP_LOADER_ if you want to load .lmp files +#define _IRR_COMPILE_WITH_LMP_LOADER_ //! Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files #define _IRR_COMPILE_WITH_RGB_LOADER_ @@ -407,6 +418,8 @@ currently only supports zip archives, though. */ #define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ //! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives #define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +//! Define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ if you want to open WAD archives +#define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ //! Set FPU settings /** Irrlicht should use approximate float and integer fpu techniques diff --git a/include/SColor.h b/include/SColor.h index 8b046619..fec4fe16 100644 --- a/include/SColor.h +++ b/include/SColor.h @@ -12,6 +12,50 @@ namespace irr { namespace video { + //! An enum for the color format of textures used by the Irrlicht Engine. + /** A color format specifies how color information is stored. */ + enum ECOLOR_FORMAT + { + //! 16 bit color format used by the software driver. + /** It is thus preferred by all other irrlicht engine video drivers. + There are 5 bits for every color component, and a single bit is left + for alpha information. */ + ECF_A1R5G5B5 = 0, + + //! Standard 16 bit color format. + ECF_R5G6B5, + + //! 24 bit color, no alpha channel, but 8 bit for red, green and blue. + ECF_R8G8B8, + + //! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha. + ECF_A8R8G8B8, + + /** Floating Point formats. The following formats may only be used for render target textures. */ + + //! 16 bit floating point format using 16 bits for the red channel. + ECF_R16F, + + //! 32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel. + ECF_G16R16F, + + //! 64 bit floating point format 16 bits are used for the red, green, blue and alpha channels. + ECF_A16B16G16R16F, + + //! 32 bit floating point format using 32 bits for the red channel. + ECF_R32F, + + //! 64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel. + ECF_G32R32F, + + //! 128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels. + ECF_A32B32G32R32F, + + //! Unknown color format: + ECF_UNKNOWN + }; + + //! Creates a 16 bit A1R5G5B5 color inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a=0xFF) { @@ -327,6 +371,77 @@ namespace video getBlue() * mul0 + c1.getBlue() * mul1 + c2.getBlue() * mul2 ), 0, 255 )); } + //! set the color by expecting data in the given format + /** \param data: must point to valid memory containing color information in the given format + \param format: tells the format in which data is available + */ + void setData(const void *data, ECOLOR_FORMAT format) + { + switch (format) + { + case ECF_A1R5G5B5: + color = A1R5G5B5toA8R8G8B8(*(u16*)data); + break; + case ECF_R5G6B5: + color = R5G6B5toA8R8G8B8(*(u16*)data); + break; + case ECF_A8R8G8B8: + color = *(u32*)data; + break; + case ECF_R8G8B8: + { + u8* p = (u8*)data; + set(255, p[0],p[1],p[2]); + } + break; + default: + break; + } + } + + //! Write the color to data in the defined format + /** \param data: target to write the color. Must contain sufficiently large memory to receive the number of bytes neede for format + \param format: tells the format used to write the color into data + */ + void getData(void *data, ECOLOR_FORMAT format) + { + switch(format) + { + case ECF_A1R5G5B5: + { + u16 * dest = (u16*)data; + *dest = video::A8R8G8B8toA1R5G5B5( color ); + } + break; + + case ECF_R5G6B5: + { + u16 * dest = (u16*)data; + *dest = video::A8R8G8B8toR5G6B5( color ); + } + break; + + case ECF_R8G8B8: + { + u8* dest = (u8*)data; + dest[0] = (u8)getRed(); + dest[1] = (u8)getGreen(); + dest[2] = (u8)getBlue(); + } + break; + + case ECF_A8R8G8B8: + { + u32 * dest = (u32*)data; + *dest = color; + } + break; + + default: + break; + } + } + //! color in A8R8G8B8 Format u32 color; }; diff --git a/include/SIrrCreationParameters.h b/include/SIrrCreationParameters.h index b7bdd0fe..8b9943a0 100644 --- a/include/SIrrCreationParameters.h +++ b/include/SIrrCreationParameters.h @@ -37,6 +37,7 @@ namespace irr EventReceiver(0), WindowId(0), LoggingLevel(ELL_INFORMATION), + DisplayAdapter(0), SDK_version_do_not_use(IRRLICHT_SDK_VERSION) { } @@ -64,6 +65,7 @@ namespace irr EventReceiver = other.EventReceiver; WindowId = other.WindowId; LoggingLevel = other.LoggingLevel; + DisplayAdapter = other.DisplayAdapter; return *this; } @@ -239,6 +241,10 @@ namespace irr */ ELOG_LEVEL LoggingLevel; + //! Allows to select which graphic card is used for rendering when more than one card is in the system. + /** So far only supported on D3D */ + u32 DisplayAdapter; + //! Don't use or change this parameter. /** Always set it to IRRLICHT_SDK_VERSION, which is done by default. This is needed for sdk version checks. */ diff --git a/include/SLight.h b/include/SLight.h index e5b1dfe1..c30312ed 100644 --- a/include/SLight.h +++ b/include/SLight.h @@ -78,7 +78,7 @@ struct SLight /** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */ core::vector3df Direction; - //! Read-ONLY! Radius of light. Everything within this radius be be lighted. + //! Read-ONLY! Radius of light. Everything within this radius will be lighted. f32 Radius; //! Read-ONLY! Type of the light. Default: ELT_POINT diff --git a/include/SMesh.h b/include/SMesh.h index 760fa48d..a5804d3f 100644 --- a/include/SMesh.h +++ b/include/SMesh.h @@ -33,6 +33,16 @@ namespace scene MeshBuffers[i]->drop(); } + //! clean mesh + virtual void clear() + { + for (u32 i=0; idrop(); + MeshBuffers.clear(); + BoundingBox.reset ( 0.f, 0.f, 0.f ); + } + + //! returns amount of mesh buffers. virtual u32 getMeshBufferCount() const { diff --git a/include/coreutil.h b/include/coreutil.h index b75f75fc..5231418f 100644 --- a/include/coreutil.h +++ b/include/coreutil.h @@ -138,6 +138,39 @@ inline s32 isInSameDirectory ( const io::path& path, const io::path& file ) return subB - subA; } +// splits a path into components +static inline void splitFilename( const io::path &name, io::path *path,io::path* filename, io::path* extension,bool make_lower = false ) +{ + s32 i = name.size(); + s32 extpos = i; + + // search for path separator or beginning + while ( i >= 0 ) + { + if ( name[i] == '.' ) + { + extpos = i; + if ( extension ) + *extension = name.subString ( extpos + 1, name.size() - (extpos + 1), make_lower ); + } + else + if ( name[i] == '/' || name[i] == '\\' ) + { + if ( filename ) + *filename = name.subString ( i + 1, extpos - (i + 1), make_lower ); + if ( path ) + { + *path = name.subString ( 0, i + 1, make_lower ); + path->replace ( '\\', '/' ); + } + return; + } + i -= 1; + } + if ( filename ) + *filename = name.subString ( 0, extpos, make_lower ); +} + //! some standard function ( to remove dependencies ) #undef isdigit diff --git a/include/dimension2d.h b/include/dimension2d.h index 98f0ae0b..2448554a 100644 --- a/include/dimension2d.h +++ b/include/dimension2d.h @@ -35,7 +35,7 @@ namespace core template dimension2d& operator=(const dimension2d& other) - { + { Width = (T) other.Width; Height = (T) other.Height; return *this; @@ -106,6 +106,12 @@ namespace core return *this; } + //! Add two dimensions + dimension2d operator+(const dimension2d& other) const + { + return dimension2d(Width+other.Width, Height+other.Height); + } + //! Subtract a dimension from this one dimension2d& operator-=(const dimension2d& other) { @@ -114,11 +120,10 @@ namespace core return *this; } - - //! Add two dimensions - dimension2d operator+(const dimension2d& other) const + //! Subtract one dimension from another + dimension2d operator-(const dimension2d& other) const { - return dimension2d(Width+other.Width, Height+other.Height); + return dimension2d(Width-other.Width, Height-other.Height); } //! Get area @@ -190,8 +195,8 @@ namespace core \return Interpolated dimension. */ dimension2d getInterpolated(const dimension2d& other, f32 d) const { - T inv = (T) (1.0f - d); - return dimension2d(other.Width*inv + Width*d, other.Height*inv + Height*d); + f32 inv = (1.0f - d); + return dimension2d( (T)(other.Width*inv + Width*d), (T)(other.Height*inv + Height*d)); } diff --git a/include/driverChoice.h b/include/driverChoice.h index c3827e1c..785e4120 100644 --- a/include/driverChoice.h +++ b/include/driverChoice.h @@ -14,7 +14,7 @@ namespace irr //! ask user for driver static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=true) { - const char* const names[] = {"NullDriver","Software Renderer","Burning's Video","Direct3D 8.1","Direct3D 9.0c","OpenGL 1.x/2.x/3.x"}; + const char* const names[] = {"NullDriver","Software Renderer","Burning's Video","Direct3D 8.1","Direct3D 9.0c","OpenGL 1.x/2.x/3.x","OpenGL-ES 1.x"}; printf("Please select the driver you want:\n"); irr::u32 i=0; for (i=irr::video::EDT_COUNT; i>0; --i) diff --git a/include/irrMath.h b/include/irrMath.h index 73ab68bd..0a5c8774 100644 --- a/include/irrMath.h +++ b/include/irrMath.h @@ -162,10 +162,10 @@ namespace core } //! swaps the content of the passed parameters - // Note: We use the same trick as boost and use two template arguments to - // avoid ambiguity when swapping objectsof an Irrlicht type that has not - // it's own swap overload. Otherwise we get conflicts with some compilers - // in combination with stl. + // Note: We use the same trick as boost and use two template arguments to + // avoid ambiguity when swapping objects of an Irrlicht type that has not + // it's own swap overload. Otherwise we get conflicts with some compilers + // in combination with stl. template inline void swap(T1& a, T2& b) { diff --git a/include/irrString.h b/include/irrString.h index 1cf27ab1..24e2ba33 100644 --- a/include/irrString.h +++ b/include/irrString.h @@ -884,25 +884,35 @@ public: //! Returns a substring /** \param begin: Start of substring. - \param length: Length of substring. */ - string subString(u32 begin, s32 length) const + \param length: Length of substring. + \param make_lower, copy only lower case */ + string subString(u32 begin, s32 length, bool make_lower = false ) const { // if start after string // or no proper substring length if ((length <= 0) || (begin>=size())) - return string(""); + return string(""); // clamp length to maximal value if ((length+begin) > size()) length = size()-begin; - string o; + string o; o.reserve(length+1); - for (s32 i=0; i + inline void CMatrix4::transformVec3(T *out, const T * in) const + { + out[0] = in[0]*M[0] + in[1]*M[4] + in[2]*M[8] + M[12]; + out[1] = in[0]*M[1] + in[1]*M[5] + in[2]*M[9] + M[13]; + out[2] = in[0]*M[2] + in[1]*M[6] + in[2]*M[10] + M[14]; + } + //! Transforms a plane by this matrix template diff --git a/include/triangle3d.h b/include/triangle3d.h index 09a690bb..1d40cbde 100644 --- a/include/triangle3d.h +++ b/include/triangle3d.h @@ -204,7 +204,7 @@ namespace core //! Get the area of the triangle T getArea() const { - return (pointB - pointA).crossProduct(pointC - pointA).getLength() * 0.5; + return (pointB - pointA).crossProduct(pointC - pointA).getLength() * 0.5f; } diff --git a/include/vector2d.h b/include/vector2d.h index 47afaf30..c25a65a6 100644 --- a/include/vector2d.h +++ b/include/vector2d.h @@ -192,14 +192,14 @@ public: if ( Y > 0) if (X > 0) - return atan(Y/X) * RADTODEG64; + return atan((irr::f64)Y/(irr::f64)X) * RADTODEG64; else - return 180.0-atan(Y/-X) * RADTODEG64; + return 180.0-atan((irr::f64)Y/-(irr::f64)X) * RADTODEG64; else if (X > 0) - return 360.0-atan(-Y/X) * RADTODEG64; + return 360.0-atan(-(irr::f64)Y/(irr::f64)X) * RADTODEG64; else - return 180.0+atan(-Y/-X) * RADTODEG64; + return 180.0+atan(-(irr::f64)Y/-(irr::f64)X) * RADTODEG64; } //! Calculates the angle of this vector in degrees in the counter trigonometric sense. diff --git a/media/fontlucida.png b/media/fontlucida.png index c63fa02b7ab511b4241f224123f4739eab333f5e..b81ec9f39e3c34714154e1d7400cc5aaeb3545c6 100644 GIT binary patch delta 17103 zcmcJ$byOTp^fuT)fWZmw8eBtw;O?%$HE4j~EN7!$-ZbY{MK^MgKL zUPKqKrXQUGnd1f5cNqd+eJtEMB*>a2XRz_s{rgU7#w3I0Kt;rk?(Mm;W&e?On~}>b z@8z`HN)U>R3juKHpzk3NiAQJekzGF#tNeuXbf%JJ4Wa}xln2mm zJW&DM5jLiteF2+^V`E@@>Ua#HVus+CI8XsfPtOzNOq^g~v*peyq?O1bvBJ z6D0Fg+GkpTnC14E4KmT3&NLm;rw4pPF(-f?0z`2N%KlRXk|qKah$lPY4Gj^YHRK4! z7&OQ|lEC?;4=?F}ZNftVz)i<-$a#22r&JxOq^mYOE9p1m#z&29?Kum-M~NXD6waD7 zCdO7Twk^`Q9i>kA+Vm)JF#AD#0a#@O79I?NK7jq*(|%UxFBf%esCsEa6<_c(VhkoB9zabf6+!DEx(nnB zF?nI$O(%@gGr~W%AW`5f1Z^JDd43DvAbfv2*sZ?C2Rtn?j@qMOSZ8@vel8Zmy9Bxr zxnn1(YtrZx0{(tU7Y&2en35~X+s}~gfZsVOsEVS&aJWiA%v))XzF4vDojR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SSV)g){K5YLk932dT=N^@m~F2k!yE z-MC3LDFg26%8Ed5b8K$SVYcttjYEvYWCkC!v9?3hH4B19@kdTf{~N13T~XUzEfZwg zk3;J8vw^|tojd~xzbj42hg{bzaA7Wd;FhHjD*Y>}@?Use4FpHe{ZmKtPJK42tq)!9 zn^n^2_0Pd_^1OY4ZHoVLy#5Q!0{@H5{uj;v|FrtQg0=q-6#@S-`hPHFKB(}2bNW9Z z{XgsQ|Dpo^m%jdg!|Y!(_22{P|G#d){{qC!Zhgr1ysWhYybcN diff --git a/media/icon_crosshairs16x16bw1.png b/media/icon_crosshairs16x16bw1.png new file mode 100644 index 0000000000000000000000000000000000000000..314bb0f76db2f898e44004c0e3dcb94058a16712 GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`lRRA_LP@!_Tua&hl>K1;pD z7c@`zoambTH)SQ^ZoQlK-#qgFU#m;Xw@(cF=W)MrU3Z_I`J^$>bqt=aelF{r5}E+< Cc zcFn<-gw zPgiTzb(e3JoM>>z`Qw{cljfW~TlzLH-AcjIISaL{DYiJEA}-mf6TVz?vA4~i%TZ~oy6ej>gTe~DWM4fCx}cy literal 0 HcmV?d00001 diff --git a/media/icon_crosshairs16x16bw3.png b/media/icon_crosshairs16x16bw3.png new file mode 100644 index 0000000000000000000000000000000000000000..0f82a883825e6c7d6c27d08090c313d4ea2ee789 GIT binary patch literal 208 zcmV;>05AWEP)06O*JZ_5qT}c%Z_g$H6-ZqnyFn`{2EmYTFkPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igV% z4mJe)ypMPQ000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004tNkl>!=mDmH~hQyuk;s+C~4PY;|d*#6r z#qBG?yX`6Q&dQF-%m>Qk3KdeX5K!d-QjsfTK0kF>se{KRvL_t(|+U&h|m}FI%KmIv4)vcVXbIy}YaFSB^K|^ZTQ!p&2F-*46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K&m(*^0GvP- z_;fx$A!A7d`_BgH@v-xxLjOkv7BE%vxf? zynf|Z=eZU6r|%>f8R>%aRjhT6r$S_doW#GkMwo};8DrpQr~zgYVsYQOWudr|%Z)w{|4HjzeO$=)gdHJPr*x4Mj|Vr1{M3Y(aA| z9yhm+CP5{v2m56beJXqNF;HHRLvJfc@$;;fM@9 zkYp?NM`m*E*jtq0L>Q_W*T>II9%V!<8M_4<@SWhrA&epS3zeUk`bJJm-S;ZPEV23O z!-Ap&2J+}j(1yfp9rK8rsbtR1`fUCpd5Pe6B=%w;vGGqb&EG_<$WJ<8U0vTwOSy)w zs+QN?+t^0VHUf`Y+ue2&56$kckC%l+MQ^lUeuo;cTw9e2gmR6vMUrxcvK0)d(xc&w zgu_5XptjeD_1;HMK|;G0w`E3!{*B2uJe}SX$k01D8Y~g`@7v_4p)v9eJ!t)8BmDl{ zpQ6wV#mcZW8&zG0!PYwIoQOA-;b5^-z-KMb+~0d*HP@i)vdZmAJo!HbVYk(XPm9i1 zMmbj2n}nScP!KOa|MZK(LOd(@^-!wKqN-+8x8l~yFNgitZP8^9Qy^XN?rB%M9
z6_x#qJra&DeY39d;?h?5Rfu#c9NUYV1@bdQR8&=&jGsSX0U0un>*XHYw?cO}bTzBO zP64;kTF!Ts)zyP8Eh|@BOG`^sS__!_l|$S#&=mxfMkva(v2eq>sp+U#=7l?FD7NF} zYn~6)JHOQN8rfG|z0vDE#^>-s&o~2Kae(p_UID44C@{h_K(mk#P}Tk4#161&Vg5fa iLjG@Ek4^5N$bfavj7xZ^ap=n;15^~>Dpbo^hW!uU0ZB^$ diff --git a/media/particlegreen.jpg b/media/particlegreen.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b39f171c570535c1e9e437e40b5b878d7507b66f GIT binary patch literal 21777 zcmeHPcU)7~9zS7^fGicU0tUnt$R>jTl_gOkG8D8{3*iF6Kw=VRK~Molom4<^;ci)4 zMXeM1R8*{kA-E?>9ayn|yw*1F+?xOaZC~?wegEb1Ilr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mdl - readme.txt b/media/yodan mdl - readme.txt new file mode 100644 index 00000000..d88d75cd --- /dev/null +++ b/media/yodan mdl - readme.txt @@ -0,0 +1,36 @@ +Boba Fett Model for Half-Life +Copyright © 1999 Doug Hillyer + +Author: Doug "CHaoSMaN" Hillyer--All modeling and textures +E-Mail: dhillyer@bigfoot.com +ICQ: 707847 (Don't contact through ICQ without a good reason) +Webpage: http:// *UNDER CONSTRUCTION* E-mail me if you'll host my page. + +Model Name: Boba Fett +Version: 1.0 +Relaese Date: 3/24/99 +Total Size: 448KB +Polygons: 700 +Vertices: 379 +Texture Size: 159KB (I'll take it down under 150KB in the next release) +Team Colors: No. Maybe in a future release if I figure out how to change the palette. +Animations: Standard DM Player Animations--I'm too lazy to make my own +Build Time: 30+ Hours? +Programs Used: 3D Studio MAX R2.5, Character Studio R2, Surface Suite 1.1, Photoshop 5 + +Knows bugs: +Top of jet pack goes though his head in some animations. Not much I can do about it. No chrome texture. If anyone knows how to do this, let me know and I'll add it. Multiplayer BMP thinks it has team colors and doesn't display correctly. + +Description: +Here is one less model on the Cold Fusion Wish List (http://www.planethalflife.com/coldfusion/)! After more that 30 hours of modeling and texturing it's finaly done. Each and every polygon hand-built by me, except for the arms, which belong to the gordon model. I saw no reason to remodel something that was already made. All textures made to match the latest version of Boba Fett. The modifier stack in 3DSMAX had at least 40 modifiers and froze my computer numerous time. It's a little bit bulky at 700 polygons, but I can't do it with much less and still have all of the details that I want. I hope that everyone likes it. Please send me any comments or suggestions you may have. + +If there is something wronge with the design or model, then let me know so that I can fix it in an upcoming release. + +I'm also taking requests or suggestions for models. + +Remember, this model is Copyrighted by me, Doug Hillyer. If you want to use this model or need one custom built for a MOD, then contact me. + +Enjoy! + +Installation: +Put all files (bobafett.mdl, bobafett.bmp) in half-life\valve\models\player\bobafett directory \ No newline at end of file diff --git a/media/yodan.mdl b/media/yodan.mdl new file mode 100644 index 0000000000000000000000000000000000000000..543c1596ff783c74bf4000152e5604f396793771 GIT binary patch literal 364704 z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-x^vy#+3rklXYKeCazWf%{A_3DGrg5v zo!L7o^>TMUlkM#WK`&p<6>Giar;EBhx3H$~>h9>yWwQD1d@)z7^j4nBP>E%yX^4VN>xz<~gWvOd=Q7*LS7T0w9^upTN z#e44kgUX@e^pVQkv(smOx>BCb$%Uc0#Y&*db4>=lxm?TF7{DCgt!T#3mWvGIv|c;A zaQcnK?Y)^@#rsP8w>>e_Yuf%|dp?`Xcu(hZ`R17%(~@m&%7{x@gM(s?a#iwJ)iOX z-J|>R2d9ePY|rI;y1()4^vvwg@skrj_~8rBC9^*`vwGmb1DOo+>FDmhD-3sJvzbh$ z698w=E6>fzJ$s4|Kb+sX^?`|r%IxgS$&<%U9CyFFI?d28y%YS1qF8EzrUs*SUB|gtFI4TXn*PKi%*^NE5{hhh;%O}0l3kTn5%M(+3W)GB-lj7y% z_^aQ2?)9gBcXs5#hqvByfA{AWruvewbov>u{K(dcq1`8EpZHe!QzJX?%VoPK`!^k{ z&{ b) { + for (i = 0; i < 4; i++) { + q[i] = -q[i]; + } + } + + cosom = p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3]; + + if ((1.f + cosom) > 0.00000001) { + if ((1.f - cosom) > 0.00000001) { + omega = acos( cosom ); + sinom = sin( omega ); + sclp = sin( (1.f - t)*omega) / sinom; + sclq = sin( t*omega ) / sinom; + } + else { + sclp = 1.f - t; + sclq = t; + } + for (i = 0; i < 4; i++) { + qt[i] = sclp * p[i] + sclq * q[i]; + } + } + else { + qt[0] = -p[1]; + qt[1] = p[0]; + qt[2] = -p[3]; + qt[3] = p[2]; + sclp = sin( (1.f - t) * 0.5f * core::PI); + sclq = sin( t * 0.5f * core::PI); + for (i = 0; i < 3; i++) { + qt[i] = sclp * p[i] + sclq * qt[i]; + } + } + } + + void R_ConcatTransforms (const f32 in1[3][4], const f32 in2[3][4], f32 out[3][4]) + { + out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + in1[0][2] * in2[2][0]; + out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] + in1[0][2] * in2[2][1]; + out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] + in1[0][2] * in2[2][2]; + out[0][3] = in1[0][0] * in2[0][3] + in1[0][1] * in2[1][3] + in1[0][2] * in2[2][3] + in1[0][3]; + out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] + in1[1][2] * in2[2][0]; + out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] + in1[1][2] * in2[2][1]; + out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] + in1[1][2] * in2[2][2]; + out[1][3] = in1[1][0] * in2[0][3] + in1[1][1] * in2[1][3] + in1[1][2] * in2[2][3] + in1[1][3]; + out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] + in1[2][2] * in2[2][0]; + out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] + in1[2][2] * in2[2][1]; + out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] + in1[2][2] * in2[2][2]; + out[2][3] = in1[2][0] * in2[0][3] + in1[2][1] * in2[1][3] + in1[2][2] * in2[2][3] + in1[2][3]; + } + + #define EQUAL_EPSILON 0.001 + s32 VectorCompare (vec3_hl v1, vec3_hl v2) + { + s32 i; + + for (i=0 ; i<3 ; i++) + if (fabs(v1[i]-v2[i]) > EQUAL_EPSILON) + return false; + + return true; + } + + + #define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) + + + inline void VectorTransform (const vec3_hl in1, const f32 in2[3][4], vec3_hl out) + { + out[0] = DotProduct(in1, in2[0]) + in2[0][3]; + out[1] = DotProduct(in1, in2[1]) + in2[1][3]; + out[2] = DotProduct(in1, in2[2]) + in2[2][3]; + } + + inline void VectorTransform2 (core::vector3df &out, const vec3_hl in1, const f32 in2[3][4]) + { + out.X = DotProduct(in1, in2[0]) + in2[0][3]; + out.Z = DotProduct(in1, in2[1]) + in2[1][3]; + out.Y = DotProduct(in1, in2[2]) + in2[2][3]; + } + + + static f32 BoneTransform[MAXSTUDIOBONES][3][4]; // bone transformation matrix + + + void getBoneVector ( core::vector3df &out, u32 index ) + { + out.X = BoneTransform[index][0][3]; + out.Z = BoneTransform[index][1][3]; + out.Y = BoneTransform[index][2][3]; + } + + void getBoneBox ( core::aabbox3df &box, u32 index, f32 size = 0.5f ) + { + box.MinEdge.X = BoneTransform[index][0][3] - size; + box.MinEdge.Z = BoneTransform[index][1][3] - size; + box.MinEdge.Y = BoneTransform[index][2][3] - size; + + size *= 2.f; + box.MaxEdge.X = box.MinEdge.X + size; + box.MaxEdge.Y = box.MinEdge.Y + size; + box.MaxEdge.Z = box.MinEdge.Z + size; + } + + void getTransformedBoneVector ( core::vector3df &out, u32 index, const vec3_hl in) + { + out.X = DotProduct(in, BoneTransform[index][0]) + BoneTransform[index][0][3]; + out.Z = DotProduct(in, BoneTransform[index][1]) + BoneTransform[index][1][3]; + out.Y = DotProduct(in, BoneTransform[index][2]) + BoneTransform[index][2][3]; + + } + + +//! Constructor +CHalflifeMDLMeshFileLoader::CHalflifeMDLMeshFileLoader( scene::ISceneManager* smgr ) +{ +#ifdef _DEBUG + setDebugName("CHalflifeMDLMeshFileLoader"); +#endif + SceneManager = smgr; +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CHalflifeMDLMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "mdl" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CHalflifeMDLMeshFileLoader::createMesh(io::IReadFile* file) +{ + CAnimatedMeshHalfLife* msh = new CAnimatedMeshHalfLife(); + if (msh) + { + if ( msh->loadModelFile ( file, SceneManager ) ) + return msh; + + msh->drop(); + } + + return 0; +} + +//! Constructor +CAnimatedMeshHalfLife::CAnimatedMeshHalfLife() +{ +#ifdef _DEBUG + setDebugName("CAnimatedMeshHalfLife"); +#endif + + initData (); +} + +/*! + loads a complete model +*/ +bool CAnimatedMeshHalfLife::loadModelFile( io::IReadFile* file,ISceneManager * smgr ) +{ + if (!file) + return false; + + bool r = false; + + SceneManager = smgr; + + if ( loadModel ( file, file->getFileName() ) ) + { + if ( postLoadModel ( file->getFileName() ) ) + { + initModel (); + //dumpModelInfo ( 1 ); + r = true; + } + } + return r; +} + + + +//! Destructor +CAnimatedMeshHalfLife::~CAnimatedMeshHalfLife() +{ + freeModel (); +} + + +//! Returns the amount of frames in milliseconds. If the amount is 1, it is a static (=non animated) mesh. +u32 CAnimatedMeshHalfLife::getFrameCount() const +{ + return FrameCount; +} + + +//! set the hardware mapping hint, for driver +void CAnimatedMeshHalfLife::setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint,E_BUFFER_TYPE buffer) +{ +} + + +//! flags the meshbuffer as changed, reloads hardware buffers +void CAnimatedMeshHalfLife::setDirty(E_BUFFER_TYPE buffer) +{ +} + + + + +static vec3_hl TransformedVerts[MAXSTUDIOVERTS]; // transformed vertices +static vec3_hl TransformedNormals[MAXSTUDIOVERTS]; // light surface normals + + +/*! +*/ +void CAnimatedMeshHalfLife::initModel () +{ + // init Sequences to Animation + KeyFrameInterpolation ipol; + ipol.Name.reserve ( 64 ); + u32 i; + + AnimList.clear(); + FrameCount = 0; + + SHalflifeSequence *seq = (SHalflifeSequence*) ((u8*) Header + Header->seqindex); + for ( i = 0; i < Header->numseq; i++) + { + ipol.Name = seq[i].label; + ipol.StartFrame = FrameCount; + ipol.Frames = core::max_ ( 1, seq[i].numframes - 1 ); + ipol.EndFrame = ipol.StartFrame + ipol.Frames - 1; + ipol.FramesPerSecond = seq[i].fps; + ipol.AnimationType = seq[i].flags & STUDIO_LOOPING ? EAMT_LOOPING : EAMT_WAYPOINT; + AnimList.push_back ( ipol ); + + FrameCount += ipol.Frames; + } + + // initBoneControllers +/* + SHalflifeBoneController *bonecontroller = (SHalflifeBoneController *)((u8*) Header + Header->bonecontrollerindex); + for ( i = 0; i < Header->numbonecontrollers; i++) + { + printf ( "BoneController%d index:%d%s range:%f - %f\n", + i, + bonecontroller[i].index, bonecontroller[i].index == MOUTH_CONTROLLER ? " (Mouth)": "", + bonecontroller[i].start,bonecontroller[i].end + ); + } + + // initSkins + for (i = 0; i < TextureHeader->numskinfamilies; i++) + { + printf ( "Skin%d\n", i + 1); + } +*/ + + // initBodyparts + u32 meshBuffer = 0; + BodyList.clear(); + SHalflifeBody *body = (SHalflifeBody *) ((u8*) Header + Header->bodypartindex); + for ( i = 0; i < Header->numbodyparts; ++i) + { + BodyPart part; + part.name = body[i].name; + part.defaultModel = core::max_ ( 0, (s32) body[i].base - 1 ); + + SHalflifeModel * model = (SHalflifeModel *)((u8*) Header + body[i].modelindex); + for ( u32 g = 0; g < body[i].nummodels; ++g) + { + SubModel sub; + sub.name = model[g].name; + sub.startBuffer = meshBuffer; + sub.endBuffer = sub.startBuffer + model[g].nummesh; + sub.state = g == part.defaultModel; + part.model.push_back ( sub ); + meshBuffer += model[g].nummesh; + } + BodyList.push_back ( part ); + } + + SequenceIndex = 0; + CurrentFrame = 0.f; + + SetController (0, 0.f); + SetController (1, 0.f); + SetController (2, 0.f); + SetController (3, 0.f); + SetController (MOUTH_CONTROLLER, 0.f); + + SetSkin (0); + + // init Meshbuffers + io::path store; + + const SHalflifeTexture *tex = (SHalflifeTexture *) ((u8*) TextureHeader + TextureHeader->textureindex); + const u16 *skinref = (u16 *)((u8*)TextureHeader + TextureHeader->skinindex); + if (SkinGroupSelection != 0 && SkinGroupSelection < TextureHeader->numskinfamilies) + skinref += (SkinGroupSelection * TextureHeader->numskinref); + + io::path fname; + io::path ext; + + + core::vector2df tex_scale; + core::vector2di tex_trans ( 0, 0 ); + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.getScale ( tex_scale ); +#endif + + for ( u32 bodypart=0 ; bodypart < Header->numbodyparts ; ++bodypart) + { + const SHalflifeBody *body = (SHalflifeBody *)((u8*) Header + Header->bodypartindex) + bodypart; + + for ( u32 modelnr = 0; modelnr < body->nummodels; ++modelnr ) + { + const SHalflifeModel *model = (SHalflifeModel *)((u8*) Header + body->modelindex) + modelnr; +#if 0 + const vec3_hl *studioverts = (vec3_hl *)((u8*)Header + model->vertindex); + const vec3_hl *studionorms = (vec3_hl *)((u8*)Header + model->normindex); +#endif + for (i = 0; i < model->nummesh; ++i) + { + const SHalflifeMesh *mesh = (SHalflifeMesh *)((u8*)Header + model->meshindex) + i; + const SHalflifeTexture *currentex = &tex[skinref[mesh->skinref]]; + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.getTranslation ( currentex->name, tex_trans ); +#else + tex_scale.X = 1.f/(f32)currentex->width; + tex_scale.Y = 1.f/(f32)currentex->height; +#endif + + SMeshBuffer * buffer = new SMeshBuffer(); + + // count index vertex size indexcount = mesh->numtris * 3 + u32 indexCount = 0; + u32 vertexCount = 0; + + const s16 *tricmd = (s16*)((u8*)Header + mesh->triindex); + s32 c; + while ( (c = *(tricmd++)) ) + { + if (c < 0) + c = -c; + + indexCount += ( c - 2 ) * 3; + vertexCount += c; + tricmd += ( 4 * c ); + } + + // indices + buffer->Indices.set_used ( indexCount ); + buffer->Vertices.set_used ( vertexCount ); + + // fill in static indices and vertex + u16 *index = buffer->Indices.pointer(); + video::S3DVertex * v = buffer->Vertices.pointer(); + + // blow up gl_triangle_fan/gl_triangle_strip to indexed triangle list + E_PRIMITIVE_TYPE type; + vertexCount = 0; + indexCount = 0; + tricmd = (s16*)((u8*)Header + mesh->triindex); + while ( (c = *(tricmd++)) ) + { + if (c < 0) + { + // triangle fan + c = -c; + type = EPT_TRIANGLE_FAN; + } + else + { + type = EPT_TRIANGLE_STRIP; + } + + for ( s32 g = 0; g < c; ++g, v += 1, tricmd += 4 ) + { + // fill vertex + #if 0 + const f32 *av = studioverts[tricmd[0]]; + v->Pos.X = av[0]; + v->Pos.Z = av[1]; + v->Pos.Y = av[2]; + + av = studionorms[tricmd[1]]; + v->Normal.X = av[0]; + v->Normal.Z = av[1]; + v->Normal.Y = av[2]; + + #endif + v->Normal.X = 0.f; + v->Normal.Z = 0.f; + v->Normal.Y = 1.f; + + v->TCoords.X = (tex_trans.X + tricmd[2])*tex_scale.X; + v->TCoords.Y = (tex_trans.Y + tricmd[3])*tex_scale.Y; + + v->Color.color = 0xFFFFFFFF; + + // fill index + if ( g < c - 2 ) + { + if ( type == EPT_TRIANGLE_FAN ) + { + index[indexCount+0] = vertexCount; + index[indexCount+1] = vertexCount+g+1; + index[indexCount+2] = vertexCount+g+2; + } + else + { + if ( g & 1 ) + { + index[indexCount+0] = vertexCount+g+1; + index[indexCount+1] = vertexCount+g+0; + index[indexCount+2] = vertexCount+g+2; + } + else + { + index[indexCount+0] = vertexCount+g+0; + index[indexCount+1] = vertexCount+g+1; + index[indexCount+2] = vertexCount+g+2; + } + } + + indexCount += 3; + } + } + + vertexCount += c; + } + + // material + video::SMaterial &m = buffer->getMaterial(); + + m.MaterialType = video::EMT_SOLID; + m.BackfaceCulling = true; + + if ( currentex->flags & STUDIO_NF_CHROME ) + { + // don't know what to do with chrome here + } + +#ifdef HL_TEXTURE_ATLAS + store = TextureBaseName + "atlas"; +#else + core::splitFilename ( currentex->name, 0, &fname, &ext ); + store = TextureBaseName + fname; +#endif + m.TextureLayer[0].Texture = SceneManager->getVideoDriver()->getTexture ( store ); + m.Lighting = false; + + MeshIPol.addMeshBuffer ( buffer ); + buffer->drop (); + } // mesh + } // model + } // body part + +} + + +/*! +*/ +void CAnimatedMeshHalfLife::buildVertices () +{ +/* + const u16 *skinref = (u16 *)((u8*)TextureHeader + TextureHeader->skinindex); + if (SkinGroupSelection != 0 && SkinGroupSelection < TextureHeader->numskinfamilies) + skinref += (SkinGroupSelection * TextureHeader->numskinref); +*/ + u32 i; + s32 c,g; + const s16 *tricmd; + + u32 meshBufferNr = 0; + for ( u32 bodypart = 0 ; bodypart < Header->numbodyparts; ++bodypart) + { + const SHalflifeBody *body = (SHalflifeBody *)((u8*) Header + Header->bodypartindex) + bodypart; + + for ( u32 modelnr = 0; modelnr < body->nummodels; ++modelnr ) + { + const SHalflifeModel *model = (SHalflifeModel *)((u8*) Header + body->modelindex) + modelnr; + + const u8 *vertbone = ((u8*)Header + model->vertinfoindex); + const u8 *normbone = ((u8*)Header + model->norminfoindex); + + const vec3_hl *studioverts = (vec3_hl *)((u8*)Header + model->vertindex); + const vec3_hl *studionorms = (vec3_hl *)((u8*)Header + model->normindex); + + for ( i = 0; i < model->numverts; i++) + { + VectorTransform ( studioverts[i], BoneTransform[vertbone[i]], TransformedVerts[i] ); + } + /* + for ( i = 0; i < model->numnorms; i++) + { + VectorTransform ( studionorms[i], BoneTransform[normbone[i]], TransformedNormals[i] ); + } + */ + for (i = 0; i < model->nummesh; i++) + { + const SHalflifeMesh *mesh = (SHalflifeMesh *)((u8*)Header + model->meshindex) + i; + + IMeshBuffer * buffer = MeshIPol.getMeshBuffer ( meshBufferNr++ ); + video::S3DVertex* v = (video::S3DVertex* ) buffer->getVertices(); + + tricmd = (s16*)((u8*)Header + mesh->triindex); + while ( (c = *(tricmd++)) ) + { + if (c < 0) + c = -c; + + for ( g = 0; g < c; ++g, v += 1, tricmd += 4 ) + { + // fill vertex + const f32 *av = TransformedVerts[tricmd[0]]; + v->Pos.X = av[0]; + v->Pos.Z = av[1]; + v->Pos.Y = av[2]; + /* + av = TransformedNormals[tricmd[1]]; + v->Normal.X = av[0]; + v->Normal.Z = av[1]; + v->Normal.Y = av[2]; + //v->Normal.normalize(); + */ + } + } // tricmd + } // nummesh + } // model + } // bodypart +} + + + +/*! + render Bones +*/ +void CAnimatedMeshHalfLife::renderModel ( u32 param, IVideoDriver * driver, const core::matrix4 &absoluteTransformation) +{ + SHalflifeBone *bone = (SHalflifeBone *) ((u8 *) Header + Header->boneindex); + + video::SColor blue ( 0xFF000080 ); + video::SColor red ( 0xFF800000 ); + video::SColor yellow ( 0xFF808000 ); + video::SColor cyan ( 0xFF008080 ); + + core::aabbox3df box; + + u32 i; + for ( i = 0; i < Header->numbones; i++) + { + if (bone[i].parent >= 0) + { + getBoneVector ( box.MinEdge, bone[i].parent ); + getBoneVector ( box.MaxEdge, i ); + driver->draw3DLine ( box.MinEdge, box.MaxEdge, blue ); + + // draw parent bone node + if (bone[bone[i].parent].parent >=0 ) + { + getBoneBox ( box, bone[i].parent ); + driver->draw3DBox ( box, blue ); + } + getBoneBox ( box, i ); + driver->draw3DBox ( box, blue ); + } + else + { + // draw parent bone node + getBoneBox ( box, i, 1.f ); + driver->draw3DBox ( box , red ); + } + } + + // attachements + SHalfelifeAttachment *attach = (SHalfelifeAttachment *) ((u8*) Header + Header->attachmentindex); + core::vector3df v[8]; + for ( i = 0; i < Header->numattachments; i++) + { + getTransformedBoneVector ( v[0],attach[i].bone,attach[i].org ); + getTransformedBoneVector ( v[1],attach[i].bone,attach[i].vectors[0] ); + getTransformedBoneVector ( v[2],attach[i].bone,attach[i].vectors[1] ); + getTransformedBoneVector ( v[3],attach[i].bone,attach[i].vectors[2] ); + driver->draw3DLine ( v[0], v[1], cyan ); + driver->draw3DLine ( v[0], v[2], cyan ); + driver->draw3DLine ( v[0], v[3], cyan ); + } + + // hit boxes + SHalflifeBBox *hitbox = (SHalflifeBBox *) ((u8*) Header + Header->hitboxindex); + f32 *bbmin,*bbmax; + vec3_hl v2[8]; + for (i = 0; i < Header->numhitboxes; i++) + { + bbmin = hitbox[i].bbmin; + bbmax = hitbox[i].bbmax; + + v2[0][0] = bbmin[0]; + v2[0][1] = bbmax[1]; + v2[0][2] = bbmin[2]; + + v2[1][0] = bbmin[0]; + v2[1][1] = bbmin[1]; + v2[1][2] = bbmin[2]; + + v2[2][0] = bbmax[0]; + v2[2][1] = bbmax[1]; + v2[2][2] = bbmin[2]; + + v2[3][0] = bbmax[0]; + v2[3][1] = bbmin[1]; + v2[3][2] = bbmin[2]; + + v2[4][0] = bbmax[0]; + v2[4][1] = bbmax[1]; + v2[4][2] = bbmax[2]; + + v2[5][0] = bbmax[0]; + v2[5][1] = bbmin[1]; + v2[5][2] = bbmax[2]; + + v2[6][0] = bbmin[0]; + v2[6][1] = bbmax[1]; + v2[6][2] = bbmax[2]; + + v2[7][0] = bbmin[0]; + v2[7][1] = bbmin[1]; + v2[7][2] = bbmax[2]; + + + for ( u32 g = 0; g < 8; ++g ) + getTransformedBoneVector ( v[g],hitbox[i].bone,v2[g] ); + + driver->draw3DLine(v[0], v[1], yellow); + driver->draw3DLine(v[1], v[3], yellow); + driver->draw3DLine(v[3], v[2], yellow); + driver->draw3DLine(v[2], v[0], yellow); + + driver->draw3DLine(v[4], v[5], yellow); + driver->draw3DLine(v[5], v[7], yellow); + driver->draw3DLine(v[7], v[6], yellow); + driver->draw3DLine(v[6], v[4], yellow); + + driver->draw3DLine(v[0], v[6], yellow); + driver->draw3DLine(v[1], v[7], yellow); + driver->draw3DLine(v[3], v[5], yellow); + driver->draw3DLine(v[2], v[4], yellow); + } +} + +//! Returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. +IMesh* CAnimatedMeshHalfLife::getMesh(s32 frameInt, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) +{ + f32 frame = frameInt + (detailLevel * 0.001f); + u32 frameA = core::floor32 ( frame ); + f32 blend = core::fract ( frame ); + + u32 i; + + SHalflifeSequence *seq = (SHalflifeSequence*) ((u8*) Header + Header->seqindex); + + // find SequenceIndex from summed list + u32 frameCount = 0; + for ( i = 0; i < Header->numseq; i++) + { + u32 val = core::max_ ( 1, seq[i].numframes - 1 ); + if ( frameCount + val > frameA ) + { + SequenceIndex = i; + CurrentFrame = frame - frameCount; + break; + } + frameCount += val; + } + + seq += SequenceIndex; + + //SetBodyPart ( 1, 1 ); + setUpBones (); + buildVertices(); + + MeshIPol.BoundingBox.MinEdge.X = seq->bbmin[0]; + MeshIPol.BoundingBox.MinEdge.Z = seq->bbmin[1]; + MeshIPol.BoundingBox.MinEdge.Y = seq->bbmin[2]; + + MeshIPol.BoundingBox.MaxEdge.X = seq->bbmax[0]; + MeshIPol.BoundingBox.MaxEdge.Z = seq->bbmax[1]; + MeshIPol.BoundingBox.MaxEdge.Y = seq->bbmax[2]; + + return &MeshIPol; +} + +/*! +*/ +void CAnimatedMeshHalfLife::initData () +{ + u32 i; + + Header = 0; + TextureHeader = 0; + OwnTexModel = false; + + for ( i = 0; i < 32; ++i ) + AnimationHeader[i] = 0; + + SequenceIndex = 0; + CurrentFrame = 0.f; + + for ( i = 0; i < 5; ++i ) + BoneController[i] = 0; + + for ( i = 0; i < 2; ++i ) + Blending[i] = 0; + + SkinGroupSelection = 0; + + AnimList.clear(); + FrameCount = 0; + + MeshIPol.clear(); + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.release(); +#endif +} + +/*! +*/ +void CAnimatedMeshHalfLife::freeModel () +{ + delete [] (u8*) Header; + if (OwnTexModel ) + delete [] (u8*) TextureHeader; + + for ( u32 i = 0; i < 32; ++i ) + delete [] (u8*) AnimationHeader[i]; +} + + + +/*! +*/ +void STextureAtlas::release () +{ + for (u32 i = 0; i < atlas.size(); i++) + { + if ( atlas[i].image ) + { + atlas[i].image->drop (); + atlas[i].image = 0; + } + } + Master = 0; +} + +/*! +*/ +void STextureAtlas::addSource ( const c8 * name, video::IImage * image ) +{ + TextureAtlasEntry entry; + entry.name = name; + entry.image = image; + entry.width = image->getDimension().Width; + entry.height = image->getDimension().Height; + entry.pos.X = 0; + entry.pos.Y = 0; + atlas.push_back ( entry ); +} + +/*! +*/ +void STextureAtlas::getScale ( core::vector2df & scale ) +{ + for ( u32 i = atlas.size() - 1; i >= 0; --i) + { + if ( atlas[i].name == "_merged_" ) + { + scale.X = 1.f / atlas[i].width; + scale.Y = 1.f / atlas[i].height; + return; + } + } + scale.X = 1.f; + scale.Y = 1.f; +} + +/*! +*/ +void STextureAtlas::getTranslation ( const c8 * name, core::vector2di &pos ) +{ + u32 i = 0; + + for ( u32 i = 0; i < atlas.size(); ++i) + { + if ( atlas[i].name == name ) + { + pos = atlas[i].pos; + return; + } + } +} + +/*! +*/ +void STextureAtlas::create ( u32 border, E_TEXTURE_CLAMP texmode) +{ + u32 i = 0; + u32 w = 0; + u32 w2; + u32 h2; + u32 h; + u32 wsum; + u32 hsum = 0; + ECOLOR_FORMAT format = ECF_R8G8B8; + + const s32 frame = core::s32_max ( 0, (border - 1 ) / 2 ); + + // sort for biggest coming first + atlas.sort(); + + // split size + wsum = frame; + for (i = 0; i < atlas.size(); i++) + { + // make space + w2 = atlas[i].width + border; + + // align + w2 = (w2 + 1) & ~1; + wsum += w2; + } + u32 splitsize = 256; + if ( wsum > 512 ) + splitsize = 512; + + wsum = frame; + hsum = frame; + w = frame; + h = 0; + for (i = 0; i < atlas.size(); i++) + { + if ( atlas[i].image->getColorFormat() == ECF_A8R8G8B8 ) + { + format = ECF_A8R8G8B8; + } + + // make space + w2 = atlas[i].width + border; + h2 = atlas[i].height + border; + + // align + w2 = (w2 + 1) & ~1; + h2 = (h2 + 1) & ~1; + + h = core::s32_max ( h, h2 ); + + if ( w + w2 >= splitsize ) + { + hsum += h; + wsum = core::s32_max ( wsum, w ); + h = h2; + w = frame; + } + + atlas[i].pos.X = w; + atlas[i].pos.Y = hsum; + + w += w2; + + } + hsum += h; + wsum = core::s32_max ( wsum, w ); + + // build image + core::dimension2d dim = core::dimension2d( wsum, hsum ).getOptimalSize(); + IImage* master = new CImage( format, dim ); + master->fill ( 0 ); + + + video::SColor col[2]; + + static const u8 wrap[][4] = + { + {1, 0 }, // ETC_REPEAT + {0, 1 }, // ETC_CLAMP + {0, 1 }, // ETC_CLAMP_TO_EDGE + {0, 1 } // ETC_MIRROR + }; + + s32 a,b; + for (i = 0; i < atlas.size(); i++) + { + atlas[i].image->copyTo ( master, atlas[i].pos ); + + // clamp/wrap ( copy edges, filtering needs it ) + + for ( b = 0; b < frame; ++b ) + { + for ( a = 0 - b; a <= (s32) atlas[i].width + b; ++a ) + { + col[0] = atlas[i].image->getPixel ( core::s32_clamp ( a, 0, atlas[i].width - 1 ), 0 ); + col[1] = atlas[i].image->getPixel ( core::s32_clamp ( a, 0, atlas[i].width - 1 ), atlas[i].height - 1 ); + + master->setPixel ( atlas[i].pos.X + a, atlas[i].pos.Y + ( b + 1 ) * -1, col[wrap[texmode][0]] ); + master->setPixel ( atlas[i].pos.X + a, atlas[i].pos.Y + atlas[i].height - 1 + ( b + 1 ) * 1, col[wrap[texmode][1]] ); + } + + for ( a = -1 - b; a <= (s32) atlas[i].height + b; ++a ) + { + col[0] = atlas[i].image->getPixel ( 0, core::s32_clamp ( a, 0, atlas[i].height - 1 ) ); + col[1] = atlas[i].image->getPixel ( atlas[i].width - 1, core::s32_clamp ( a, 0, atlas[i].height - 1 ) ); + + master->setPixel ( atlas[i].pos.X + ( b + 1 ) * -1, atlas[i].pos.Y + a, col[wrap[texmode][0]] ); + master->setPixel ( atlas[i].pos.X + atlas[i].width + b, atlas[i].pos.Y + a, col[wrap[texmode][1]] ); + } + } + + } + + addSource ( "_merged_", master ); + Master = master; +} + + +/*! +*/ +SHalflifeHeader * CAnimatedMeshHalfLife::loadModel( io::IReadFile* file, const io::path &filename ) +{ + bool closefile = false; + + if ( 0 == file ) + { + file = SceneManager->getFileSystem()->createAndOpenFile ( filename ); + closefile = true; + } + + if ( 0 == file ) + return 0; + + u8 * pin = new u8 [ file->getSize() ]; + file->read ( pin, file->getSize() ); + + SHalflifeHeader * header = (SHalflifeHeader*) pin; + + const bool idst = 0 == strncmp ( header->id, "IDST", 4); + const bool idsq = 0 == strncmp ( header->id, "IDSQ", 4); + + if ( (!idst && !idsq) || (idsq && !Header) ) + { + os::Printer::log("MDL Halflife Loader: Wrong file header", file->getFileName(), ELL_WARNING); + if ( closefile ) + { + file->drop(); + file = 0; + } + delete [] pin; + return false; + } + + // don't know the real header.. idsg might be different + if (header->textureindex && idst ) + { + io::path fname; + io::path ext; + io::path path; + io::path store; + + core::splitFilename ( file->getFileName(), &path, &fname, &ext ); + TextureBaseName = path + fname + "_"; + + SHalflifeTexture *tex = (SHalflifeTexture *)(pin + header->textureindex); + u32 i; + + u32 *palette = new u32[256]; + for (i = 0; i < header->numtextures; i++) + { + const u8 *src = pin + tex[i].index; + + // convert rgb to argb palette + { + const u8 *pal = src + tex[i].width * tex[i].height; + for( u32 g=0; g<256; ++g ) + { + palette[g] = 0xFF000000 | pal[0] << 16 | pal[1] << 8 | pal[2]; + pal += 3; + } + } + + IImage* image = new CImage( ECF_R8G8B8, core::dimension2d ( tex[i].width, tex[i].height ) ); + + CColorConverter::convert8BitTo24Bit(src, (u8*)image->lock(), tex[i].width, tex[i].height, (u8*) palette, 0, false); + image->unlock(); + + +#if 0 + core::splitFilename ( tex[i].name, 0, &fname, 0 ); + io::path store = io::path ( "c:/h2/convert/" ) + fname + ".bmp"; + SceneManager->getVideoDriver()->writeImageToFile ( image, store ); +#endif + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.addSource ( tex[i].name, image ); +#else + core::splitFilename ( tex[i].name, 0, &fname, &ext ); + store = TextureBaseName + fname; + + SceneManager->getVideoDriver()->addTexture ( store, image ); + image->drop(); +#endif + } + delete [] palette; + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.create ( 2 * 2 + 1, ETC_CLAMP ); + + store = TextureBaseName + "atlas"; + SceneManager->getVideoDriver()->addTexture ( store, TextureAtlas.Master ); + + #if 0 + core::splitFilename ( store, 0, &fname, 0 ); + store = io::path ( "c:/h2/convert/" ) + fname + ".bmp"; + SceneManager->getVideoDriver()->writeImageToFile ( TextureAtlas.Master, store ); + #endif + TextureAtlas.release (); +#endif + } + + if (!Header) + Header = header; + + if ( closefile ) + { + file->drop(); + file = 0; + } + + return header; +} + + + + +/*! +*/ +f32 CAnimatedMeshHalfLife::SetController( s32 controllerIndex, f32 value ) +{ + if (!Header) + return 0.f; + + SHalflifeBoneController *bonecontroller = (SHalflifeBoneController *)((u8*) Header + Header->bonecontrollerindex); + + // find first controller that matches the index + u32 i; + for (i = 0; i < Header->numbonecontrollers; i++, bonecontroller++) + { + if (bonecontroller->index == controllerIndex) + break; + } + if (i >= Header->numbonecontrollers) + return value; + + // wrap 0..360 if it's a rotational controller + if (bonecontroller->type & (STUDIO_XR | STUDIO_YR | STUDIO_ZR)) + { + // ugly hack, invert value if end < start + if (bonecontroller->end < bonecontroller->start) + value = -value; + + // does the controller not wrap? + if (bonecontroller->start + 359.f >= bonecontroller->end) + { + if (value > ((bonecontroller->start + bonecontroller->end) / 2.f) + 180.f) + value = value - 360.f; + if (value < ((bonecontroller->start + bonecontroller->end) / 2.f) - 180.f) + value = value + 360.f; + } + else + { + if (value > 360.f) + value = value - (s32)(value / 360.f) * 360.f; + else if (value < 0.f) + value = value + (s32)((value / -360.f) + 1) * 360.f; + } + } + + s32 range = controllerIndex == MOUTH_CONTROLLER ? 64 : 255; + + s32 setting = (s32) ( (f32) range * (value - bonecontroller->start) / (bonecontroller->end - bonecontroller->start)); + + if (setting < 0) setting = 0; + if (setting > range) setting = range; + + BoneController[controllerIndex] = setting; + + return setting * (1.f / (f32) range ) * (bonecontroller->end - bonecontroller->start) + bonecontroller->start; +} + + + +/*! +*/ +u32 CAnimatedMeshHalfLife::SetSkin( u32 value ) +{ + if (value < Header->numskinfamilies) + SkinGroupSelection = value; + + return SkinGroupSelection; +} + +/*! +*/ +bool CAnimatedMeshHalfLife::postLoadModel( const io::path &filename ) +{ + io::path path; + io::path texname; + io::path submodel; + + core::splitFilename ( filename ,&path, &texname, 0 ); + + // preload textures + if (Header->numtextures == 0) + { + submodel = path + texname + "T.mdl"; + TextureHeader = loadModel( 0, submodel ); + if (!TextureHeader) + return false; + OwnTexModel = true; + } + else + { + TextureHeader = Header; + OwnTexModel = false; + } + + u32 i; + + // preload animations + if (Header->numseqgroups > 1) + { + c8 seq[8]; + for ( i = 1; i < Header->numseqgroups; i++) + { + snprintf( seq, 8, "%02d.mdl", i ); + submodel = path + texname + seq; + + AnimationHeader[i] = loadModel( 0, submodel ); + if (!AnimationHeader[i]) + return false; + } + } + + return true; +} + + + +/*! +*/ +void CAnimatedMeshHalfLife::dumpModelInfo ( u32 level ) +{ + u8 *phdr = (u8*) Header; + SHalflifeHeader * hdr = Header; + u32 i; + + if ( level == 0 ) + { + printf ( + "Bones: %d\n" + "Bone Controllers: %d\n" + "Hit Boxes: %d\n" + "Sequences: %d\n" + "Sequence Groups: %d\n", + hdr->numbones, + hdr->numbonecontrollers, + hdr->numhitboxes, + hdr->numseq, + hdr->numseqgroups + ); + printf ( + "Textures: %d\n" + "Skin Families: %d\n" + "Bodyparts: %d\n" + "Attachments: %d\n" + "Transitions: %d\n", + hdr->numtextures, + hdr->numskinfamilies, + hdr->numbodyparts, + hdr->numattachments, + hdr->numtransitions); + return; + } + + + printf("id: %c%c%c%c\n", phdr[0], phdr[1], phdr[2], phdr[3]); + printf("version: %d\n", hdr->version); + printf("name: \"%s\"\n", hdr->name); + printf("length: %d\n\n", hdr->length); + + printf("eyeposition: %f %f %f\n", hdr->eyeposition[0], hdr->eyeposition[1], hdr->eyeposition[2]); + printf("min: %f %f %f\n", hdr->min[0], hdr->min[1], hdr->min[2]); + printf("max: %f %f %f\n", hdr->max[0], hdr->max[1], hdr->max[2]); + printf("bbmin: %f %f %f\n", hdr->bbmin[0], hdr->bbmin[1], hdr->bbmin[2]); + printf("bbmax: %f %f %f\n", hdr->bbmax[0], hdr->bbmax[1], hdr->bbmax[2]); + + printf("flags: %d\n\n", hdr->flags); + + printf("numbones: %d\n", hdr->numbones); + for (i = 0; i < hdr->numbones; i++) + { + SHalflifeBone *bone = (SHalflifeBone *) (phdr + hdr->boneindex); + printf("bone %d.name: \"%s\"\n", i + 1, bone[i].name); + printf("bone %d.parent: %d\n", i + 1, bone[i].parent); + printf("bone %d.flags: %d\n", i + 1, bone[i].flags); + printf("bone %d.bonecontroller: %d %d %d %d %d %d\n", i + 1, bone[i].bonecontroller[0], bone[i].bonecontroller[1], bone[i].bonecontroller[2], bone[i].bonecontroller[3], bone[i].bonecontroller[4], bone[i].bonecontroller[5]); + printf("bone %d.value: %f %f %f %f %f %f\n", i + 1, bone[i].value[0], bone[i].value[1], bone[i].value[2], bone[i].value[3], bone[i].value[4], bone[i].value[5]); + printf("bone %d.scale: %f %f %f %f %f %f\n", i + 1, bone[i].scale[0], bone[i].scale[1], bone[i].scale[2], bone[i].scale[3], bone[i].scale[4], bone[i].scale[5]); + } + + printf("\nnumbonecontrollers: %d\n", hdr->numbonecontrollers); + SHalflifeBoneController *bonecontrollers = (SHalflifeBoneController *) (phdr + hdr->bonecontrollerindex); + for (i = 0; i < hdr->numbonecontrollers; i++) + { + printf("bonecontroller %d.bone: %d\n", i + 1, bonecontrollers[i].bone); + printf("bonecontroller %d.type: %d\n", i + 1, bonecontrollers[i].type); + printf("bonecontroller %d.start: %f\n", i + 1, bonecontrollers[i].start); + printf("bonecontroller %d.end: %f\n", i + 1, bonecontrollers[i].end); + printf("bonecontroller %d.rest: %d\n", i + 1, bonecontrollers[i].rest); + printf("bonecontroller %d.index: %d\n", i + 1, bonecontrollers[i].index); + } + + printf("\nnumhitboxes: %d\n", hdr->numhitboxes); + SHalflifeBBox *box = (SHalflifeBBox *) (phdr + hdr->hitboxindex); + for (i = 0; i < hdr->numhitboxes; i++) + { + printf("hitbox %d.bone: %d\n", i + 1, box[i].bone); + printf("hitbox %d.group: %d\n", i + 1, box[i].group); + printf("hitbox %d.bbmin: %f %f %f\n", i + 1, box[i].bbmin[0], box[i].bbmin[1], box[i].bbmin[2]); + printf("hitbox %d.bbmax: %f %f %f\n", i + 1, box[i].bbmax[0], box[i].bbmax[1], box[i].bbmax[2]); + } + + printf("\nnumseq: %d\n", hdr->numseq); + SHalflifeSequence *seq = (SHalflifeSequence *) (phdr + hdr->seqindex); + for (i = 0; i < hdr->numseq; i++) + { + printf("seqdesc %d.label: \"%s\"\n", i + 1, seq[i].label); + printf("seqdesc %d.fps: %f\n", i + 1, seq[i].fps); + printf("seqdesc %d.flags: %d\n", i + 1, seq[i].flags); + printf("<...>\n"); + } + + printf("\nnumseqgroups: %d\n", hdr->numseqgroups); + for (i = 0; i < hdr->numseqgroups; i++) + { + SHalflifeSequenceGroup *group = (SHalflifeSequenceGroup *) (phdr + hdr->seqgroupindex); + printf("\nseqgroup %d.label: \"%s\"\n", i + 1, group[i].label); + printf("\nseqgroup %d.namel: \"%s\"\n", i + 1, group[i].name); + printf("\nseqgroup %d.data: %d\n", i + 1, group[i].data); + } + + printf("\nnumskinref: %d\n", hdr->numskinref); + printf("numskinfamilies: %d\n", hdr->numskinfamilies); + + printf("\nnumbodyparts: %d\n", hdr->numbodyparts); + SHalflifeBody *pbodyparts = (SHalflifeBody*) ((u8*) hdr + hdr->bodypartindex); + for (i = 0; i < hdr->numbodyparts; i++) + { + printf("bodypart %d.name: \"%s\"\n", i + 1, pbodyparts[i].name); + printf("bodypart %d.nummodels: %d\n", i + 1, pbodyparts[i].nummodels); + printf("bodypart %d.base: %d\n", i + 1, pbodyparts[i].base); + printf("bodypart %d.modelindex: %d\n", i + 1, pbodyparts[i].modelindex); + } + + printf("\nnumattachments: %d\n", hdr->numattachments); + for (i = 0; i < hdr->numattachments; i++) + { + SHalfelifeAttachment *attach = (SHalfelifeAttachment *) ((u8*) hdr + hdr->attachmentindex); + printf("attachment %d.name: \"%s\"\n", i + 1, attach[i].name); + } + + hdr = TextureHeader; + printf("\nnumtextures: %d\n", hdr->numtextures); + printf("textureindex: %d\n", hdr->textureindex); + printf("texturedataindex: %d\n", hdr->texturedataindex); + SHalflifeTexture *ptextures = (SHalflifeTexture *) ((u8*) hdr + hdr->textureindex); + for (i = 0; i < hdr->numtextures; i++) + { + printf("texture %d.name: \"%s\"\n", i + 1, ptextures[i].name); + printf("texture %d.flags: %d\n", i + 1, ptextures[i].flags); + printf("texture %d.width: %d\n", i + 1, ptextures[i].width); + printf("texture %d.height: %d\n", i + 1, ptextures[i].height); + printf("texture %d.index: %d\n", i + 1, ptextures[i].index); + } +} + +/*! +*/ +void CAnimatedMeshHalfLife::ExtractBbox( s32 sequence, core::aabbox3df &box ) +{ + SHalflifeSequence *seq = (SHalflifeSequence *)((u8*)Header + Header->seqindex) + sequence; + + box.MinEdge.X = seq[0].bbmin[0]; + box.MinEdge.Y = seq[0].bbmin[1]; + box.MinEdge.Z = seq[0].bbmin[2]; + + box.MaxEdge.X = seq[0].bbmax[0]; + box.MaxEdge.Y = seq[0].bbmax[1]; + box.MaxEdge.Z = seq[0].bbmax[2]; +} + + + +/*! +*/ +void CAnimatedMeshHalfLife::calcBoneAdj() +{ + u32 j; + s32 i; + f32 value; + SHalflifeBoneController *bonecontroller; + + bonecontroller = (SHalflifeBoneController *)((u8*) Header + Header->bonecontrollerindex); + + for (j = 0; j < Header->numbonecontrollers; j++) + { + i = bonecontroller[j].index; + f32 range = i <= 3 ? 255.f : 64.f; + // check for 360% wrapping + if (bonecontroller[j].type & STUDIO_RLOOP) + { + value = BoneController[i] * (360.f/256.f) + bonecontroller[j].start; + } + else + { + value = BoneController[i] / range; + if (value < 0.f) value = 0.f; + if (value > 1.f) value = 1.f; + value = (1.f - value) * bonecontroller[j].start + value * bonecontroller[j].end; + } + + switch(bonecontroller[j].type & STUDIO_TYPES) + { + case STUDIO_XR: + case STUDIO_YR: + case STUDIO_ZR: + BoneAdj[j] = value * (core::PI / 180.f); + break; + case STUDIO_X: + case STUDIO_Y: + case STUDIO_Z: + BoneAdj[j] = value; + break; + } + } +} + +/*! +*/ +void CAnimatedMeshHalfLife::calcBoneQuaternion( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *q ) const +{ + s32 j, k; + vec4_hl q1, q2; + vec3_hl angle1, angle2; + SHalfelifeAnimationFrame *animvalue; + + for (j = 0; j < 3; j++) + { + if (anim->offset[j+3] == 0) + { + angle2[j] = angle1[j] = bone->value[j+3]; // default; + } + else + { + animvalue = (SHalfelifeAnimationFrame *)((u8*)anim + anim->offset[j+3]); + k = frame; + while (animvalue->num.total <= k) + { + k -= animvalue->num.total; + animvalue += animvalue->num.valid + 1; + } + // Bah, missing blend! + if (animvalue->num.valid > k) + { + angle1[j] = animvalue[k+1].value; + + if (animvalue->num.valid > k + 1) + { + angle2[j] = animvalue[k+2].value; + } + else + { + if (animvalue->num.total > k + 1) + angle2[j] = angle1[j]; + else + angle2[j] = animvalue[animvalue->num.valid+2].value; + } + } + else + { + angle1[j] = animvalue[animvalue->num.valid].value; + if (animvalue->num.total > k + 1) + { + angle2[j] = angle1[j]; + } + else + { + angle2[j] = animvalue[animvalue->num.valid + 2].value; + } + } + angle1[j] = bone->value[j+3] + angle1[j] * bone->scale[j+3]; + angle2[j] = bone->value[j+3] + angle2[j] * bone->scale[j+3]; + } + + if (bone->bonecontroller[j+3] != -1) + { + angle1[j] += BoneAdj[bone->bonecontroller[j+3]]; + angle2[j] += BoneAdj[bone->bonecontroller[j+3]]; + } + } + + if (!VectorCompare( angle1, angle2 )) + { + AngleQuaternion( angle1, q1 ); + AngleQuaternion( angle2, q2 ); + QuaternionSlerp( q1, q2, s, q ); + } + else + { + AngleQuaternion( angle1, q ); + } +} + + +/*! +*/ +void CAnimatedMeshHalfLife::calcBonePosition( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *pos ) const +{ + s32 j, k; + SHalfelifeAnimationFrame *animvalue; + + for (j = 0; j < 3; j++) + { + pos[j] = bone->value[j]; // default; + if (anim->offset[j] != 0) + { + animvalue = (SHalfelifeAnimationFrame *)((u8*)anim + anim->offset[j]); + + k = frame; + // find span of values that includes the frame we want + while (animvalue->num.total <= k) + { + k -= animvalue->num.total; + animvalue += animvalue->num.valid + 1; + } + // if we're inside the span + if (animvalue->num.valid > k) + { + // and there's more data in the span + if (animvalue->num.valid > k + 1) + { + pos[j] += (animvalue[k+1].value * (1.f - s) + s * animvalue[k+2].value) * bone->scale[j]; + } + else + { + pos[j] += animvalue[k+1].value * bone->scale[j]; + } + } + else + { + // are we at the end of the repeating values section and there's another section with data? + if (animvalue->num.total <= k + 1) + { + pos[j] += (animvalue[animvalue->num.valid].value * (1.f - s) + s * animvalue[animvalue->num.valid + 2].value) * bone->scale[j]; + } + else + { + pos[j] += animvalue[animvalue->num.valid].value * bone->scale[j]; + } + } + } + if (bone->bonecontroller[j] != -1) + { + pos[j] += BoneAdj[bone->bonecontroller[j]]; + } + } +} + +/*! +*/ +void CAnimatedMeshHalfLife::calcRotations ( vec3_hl *pos, vec4_hl *q, SHalflifeSequence *seq, SHalflifeAnimOffset *anim, f32 f ) +{ + s32 frame; + SHalflifeBone *bone; + f32 s; + + frame = (s32)f; + s = (f - frame); + + // add in programatic controllers + calcBoneAdj( ); + + bone = (SHalflifeBone *)((u8 *)Header + Header->boneindex); + for ( u32 i = 0; i < Header->numbones; i++, bone++, anim++) + { + calcBoneQuaternion( frame, s, bone, anim, q[i] ); + calcBonePosition( frame, s, bone, anim, pos[i] ); + } + + if (seq->motiontype & STUDIO_X) + pos[seq->motionbone][0] = 0.f; + if (seq->motiontype & STUDIO_Y) + pos[seq->motionbone][1] = 0.f; + if (seq->motiontype & STUDIO_Z) + pos[seq->motionbone][2] = 0.f; +} + +/*! +*/ +SHalflifeAnimOffset * CAnimatedMeshHalfLife::getAnim( SHalflifeSequence *seq ) +{ + SHalflifeSequenceGroup *seqgroup; + seqgroup = (SHalflifeSequenceGroup *)((u8*)Header + Header->seqgroupindex) + seq->seqgroup; + + if (seq->seqgroup == 0) + { + return (SHalflifeAnimOffset *)((u8*)Header + seqgroup->data + seq->animindex); + } + + return (SHalflifeAnimOffset *)((u8*)AnimationHeader[seq->seqgroup] + seq->animindex); +} + + +/*! +*/ +void CAnimatedMeshHalfLife::slerpBones( vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s ) +{ + vec4_hl q3; + f32 s1; + + if (s < 0) s = 0; + else if (s > 1.f) s = 1.f; + + s1 = 1.f - s; + + for ( u32 i = 0; i < Header->numbones; i++) + { + QuaternionSlerp( q1[i], q2[i], s, q3 ); + q1[i][0] = q3[0]; + q1[i][1] = q3[1]; + q1[i][2] = q3[2]; + q1[i][3] = q3[3]; + pos1[i][0] = pos1[i][0] * s1 + pos2[i][0] * s; + pos1[i][1] = pos1[i][1] * s1 + pos2[i][1] * s; + pos1[i][2] = pos1[i][2] * s1 + pos2[i][2] * s; + } +} + +/*! +*/ +void CAnimatedMeshHalfLife::setUpBones () +{ + SHalflifeBone *bone; + SHalflifeSequence *seq; + SHalflifeAnimOffset *anim; + + static vec3_hl pos[MAXSTUDIOBONES]; + f32 bonematrix[3][4]; + static vec4_hl q[MAXSTUDIOBONES]; + + static vec3_hl pos2[MAXSTUDIOBONES]; + static vec4_hl q2[MAXSTUDIOBONES]; + static vec3_hl pos3[MAXSTUDIOBONES]; + static vec4_hl q3[MAXSTUDIOBONES]; + static vec3_hl pos4[MAXSTUDIOBONES]; + static vec4_hl q4[MAXSTUDIOBONES]; + + if (SequenceIndex >= Header->numseq) + SequenceIndex = 0; + + seq = (SHalflifeSequence *)((u8*) Header + Header->seqindex) + SequenceIndex; + + anim = getAnim( seq ); + calcRotations( pos, q, seq, anim, CurrentFrame ); + + if (seq->numblends > 1) + { + f32 s; + + anim += Header->numbones; + calcRotations( pos2, q2, seq, anim, CurrentFrame ); + s = Blending[0] / 255.f; + + slerpBones( q, pos, q2, pos2, s ); + + if (seq->numblends == 4) + { + anim += Header->numbones; + calcRotations( pos3, q3, seq, anim, CurrentFrame ); + + anim += Header->numbones; + calcRotations( pos4, q4, seq, anim, CurrentFrame ); + + s = Blending[0] / 255.f; + slerpBones( q3, pos3, q4, pos4, s ); + + s = Blending[1] / 255.f; + slerpBones( q, pos, q3, pos3, s ); + } + } + + bone = (SHalflifeBone *)((u8*) Header + Header->boneindex); + + for (u32 i = 0; i < Header->numbones; i++) + { + QuaternionMatrix( q[i], bonematrix ); + + bonematrix[0][3] = pos[i][0]; + bonematrix[1][3] = pos[i][1]; + bonematrix[2][3] = pos[i][2]; + + if (bone[i].parent == -1) { + memcpy(BoneTransform[i], bonematrix, sizeof(f32) * 12); + } + else { + R_ConcatTransforms (BoneTransform[bone[i].parent], bonematrix, BoneTransform[i]); + } + } +} + + + +//! Returns an axis aligned bounding box +const core::aabbox3d& CAnimatedMeshHalfLife::getBoundingBox() const +{ + return MeshIPol.BoundingBox; +} + + +//! Returns the type of the animated mesh. +E_ANIMATED_MESH_TYPE CAnimatedMeshHalfLife::getMeshType() const +{ + return EAMT_MDL_HALFLIFE; +} + + +//! returns amount of mesh buffers. +u32 CAnimatedMeshHalfLife::getMeshBufferCount() const +{ + return MeshIPol.getMeshBufferCount(); +} + +//! returns pointer to a mesh buffer +IMeshBuffer* CAnimatedMeshHalfLife::getMeshBuffer(u32 nr) const +{ + return MeshIPol.getMeshBuffer ( nr ); +} + + +//! Returns pointer to a mesh buffer which fits a material +/** \param material: material to search for +\return Returns the pointer to the mesh buffer or +NULL if there is no such mesh buffer. */ +IMeshBuffer* CAnimatedMeshHalfLife::getMeshBuffer( const video::SMaterial &material) const +{ + return MeshIPol.getMeshBuffer ( material ); +} + +void CAnimatedMeshHalfLife::setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) +{ + MeshIPol.setMaterialFlag ( flag, newvalue ); +} + +//! set user axis aligned bounding box +void CAnimatedMeshHalfLife::setBoundingBox(const core::aabbox3df& box) +{ + return; +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_MD3_LOADER_ + diff --git a/source/Irrlicht/CAnimatedMeshHalfLife.h b/source/Irrlicht/CAnimatedMeshHalfLife.h new file mode 100644 index 00000000..4ef7b45c --- /dev/null +++ b/source/Irrlicht/CAnimatedMeshHalfLife.h @@ -0,0 +1,536 @@ +// Copyright (C) 2002-2010 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_ANIMATED_MESH_HALFLIFE_H_INCLUDED__ +#define __C_ANIMATED_MESH_HALFLIFE_H_INCLUDED__ + +#include "IAnimatedMesh.h" +#include "ISceneManager.h" +#include "irrArray.h" +#include "irrString.h" +#include "IMeshLoader.h" +#include "SMesh.h" +#include "IReadFile.h" + +namespace irr +{ +namespace scene +{ + + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( push, packing ) +# pragma pack( 1 ) +# define PACK_STRUCT +#elif defined( __GNUC__ ) +# define PACK_STRUCT __attribute__((packed)) +#else +# error compiler not supported +#endif + + // STUDIO MODELS, Copyright (c) 1998, Valve LLC. All rights reserved. + #define MAXSTUDIOTRIANGLES 20000 // TODO: tune this + #define MAXSTUDIOVERTS 2048 // TODO: tune this + #define MAXSTUDIOSEQUENCES 256 // total animation sequences + #define MAXSTUDIOSKINS 100 // total textures + #define MAXSTUDIOSRCBONES 512 // bones allowed at source movement + #define MAXSTUDIOBONES 128 // total bones actually used + #define MAXSTUDIOMODELS 32 // sub-models per model + #define MAXSTUDIOBODYPARTS 32 + #define MAXSTUDIOGROUPS 4 + #define MAXSTUDIOANIMATIONS 512 // per sequence + #define MAXSTUDIOMESHES 256 + #define MAXSTUDIOEVENTS 1024 + #define MAXSTUDIOPIVOTS 256 + #define MAXSTUDIOCONTROLLERS 8 + + typedef f32 vec3_hl[3]; // x,y,z + typedef f32 vec4_hl[4]; // x,y,z,w + + struct SHalflifeHeader + { + c8 id[4]; + s32 version; + + c8 name[64]; + s32 length; + + vec3_hl eyeposition; // ideal eye position + vec3_hl min; // ideal movement hull size + vec3_hl max; + + vec3_hl bbmin; // clipping bounding box + vec3_hl bbmax; + + s32 flags; + + u32 numbones; // bones + u32 boneindex; + + u32 numbonecontrollers; // bone controllers + u32 bonecontrollerindex; + + u32 numhitboxes; // complex bounding boxes + u32 hitboxindex; + + u32 numseq; // animation sequences + u32 seqindex; + + u32 numseqgroups; // demand loaded sequences + u32 seqgroupindex; + + u32 numtextures; // raw textures + u32 textureindex; + u32 texturedataindex; + + u32 numskinref; // replaceable textures + u32 numskinfamilies; + u32 skinindex; + + u32 numbodyparts; + u32 bodypartindex; + + u32 numattachments; // queryable attachable points + u32 attachmentindex; + + s32 soundtable; + s32 soundindex; + s32 soundgroups; + s32 soundgroupindex; + + s32 numtransitions; // animation node to animation node transition graph + s32 transitionindex; + }; + + // header for demand loaded sequence group data + typedef struct + { + s32 id; + s32 version; + + c8 name[64]; + s32 length; + } studioseqhdr_t; + + // bones + struct SHalflifeBone + { + c8 name[32]; // bone name for symbolic links + s32 parent; // parent bone + s32 flags; // ?? + s32 bonecontroller[6]; // bone controller index, -1 == none + f32 value[6]; // default DoF values + f32 scale[6]; // scale for delta DoF values + }; + + + // bone controllers + struct SHalflifeBoneController + { + s32 bone; // -1 == 0 + s32 type; // X, Y, Z, XR, YR, ZR, M + f32 start; + f32 end; + s32 rest; // byte index value at rest + s32 index; // 0-3 user set controller, 4 mouth + }; + + // intersection boxes + struct SHalflifeBBox + { + s32 bone; + s32 group; // intersection group + vec3_hl bbmin; // bounding box + vec3_hl bbmax; + }; + +#ifndef ZONE_H + typedef void *cache_user_t; +#endif + + // demand loaded sequence groups + struct SHalflifeSequenceGroup + { + c8 label[32]; // textual name + c8 name[64]; // file name + cache_user_t cache; // cache index pointer + s32 data; // hack for group 0 + }; + + // sequence descriptions + struct SHalflifeSequence + { + c8 label[32]; // sequence label + + f32 fps; // frames per second + s32 flags; // looping/non-looping flags + + s32 activity; + s32 actweight; + + s32 numevents; + s32 eventindex; + + s32 numframes; // number of frames per sequence + + u32 numpivots; // number of foot pivots + u32 pivotindex; + + s32 motiontype; + s32 motionbone; + vec3_hl linearmovement; + s32 automoveposindex; + s32 automoveangleindex; + + vec3_hl bbmin; // per sequence bounding box + vec3_hl bbmax; + + s32 numblends; + s32 animindex; // SHalflifeAnimOffset pointer relative to start of sequence group data + // [blend][bone][X, Y, Z, XR, YR, ZR] + + s32 blendtype[2]; // X, Y, Z, XR, YR, ZR + f32 blendstart[2]; // starting value + f32 blendend[2]; // ending value + s32 blendparent; + + s32 seqgroup; // sequence group for demand loading + + s32 entrynode; // transition node at entry + s32 exitnode; // transition node at exit + s32 nodeflags; // transition rules + + s32 nextseq; // auto advancing sequences + }; + + // events + typedef struct + { + s32 frame; + s32 event; + s32 type; + c8 options[64]; + } mstudioevent_t; + + + // pivots + typedef struct + { + vec3_hl org; // pivot point + s32 start; + s32 end; + } mstudiopivot_t; + + // attachment + struct SHalfelifeAttachment + { + c8 name[32]; + s32 type; + s32 bone; + vec3_hl org; // attachment point + vec3_hl vectors[3]; + }; + + struct SHalflifeAnimOffset + { + u16 offset[6]; + }; + + // animation frames + union SHalfelifeAnimationFrame + { + struct { + u8 valid; + u8 total; + } num; + s16 value; + }; + + + // body part index + struct SHalflifeBody + { + c8 name[64]; + u32 nummodels; + u32 base; + u32 modelindex; // index into models array + }; + + + // skin info + struct SHalflifeTexture + { + c8 name[64]; + s32 flags; + s32 width; + s32 height; + s32 index; + }; + + + // skin families + // short index[skinfamilies][skinref] + + // studio models + struct SHalflifeModel + { + c8 name[64]; + s32 type; + + f32 boundingradius; + + u32 nummesh; + u32 meshindex; + + u32 numverts; // number of unique vertices + u32 vertinfoindex; // vertex bone info + u32 vertindex; // vertex vec3_hl + u32 numnorms; // number of unique surface normals + u32 norminfoindex; // normal bone info + u32 normindex; // normal vec3_hl + + u32 numgroups; // deformation groups + u32 groupindex; + }; + + + // meshes + typedef struct + { + u32 numtris; + u32 triindex; + u32 skinref; + u32 numnorms; // per mesh normals + u32 normindex; // normal vec3_hl + } SHalflifeMesh; + + // lighting options + #define STUDIO_NF_FLATSHADE 0x0001 + #define STUDIO_NF_CHROME 0x0002 + #define STUDIO_NF_FULLBRIGHT 0x0004 + + // motion flags + #define STUDIO_X 0x0001 + #define STUDIO_Y 0x0002 + #define STUDIO_Z 0x0004 + #define STUDIO_XR 0x0008 + #define STUDIO_YR 0x0010 + #define STUDIO_ZR 0x0020 + #define STUDIO_LX 0x0040 + #define STUDIO_LY 0x0080 + #define STUDIO_LZ 0x0100 + #define STUDIO_AX 0x0200 + #define STUDIO_AY 0x0400 + #define STUDIO_AZ 0x0800 + #define STUDIO_AXR 0x1000 + #define STUDIO_AYR 0x2000 + #define STUDIO_AZR 0x4000 + #define STUDIO_TYPES 0x7FFF + #define STUDIO_RLOOP 0x8000 // controller that wraps shortest distance + + // sequence flags + #define STUDIO_LOOPING 0x0001 + + // bone flags + #define STUDIO_HAS_NORMALS 0x0001 + #define STUDIO_HAS_VERTICES 0x0002 + #define STUDIO_HAS_BBOX 0x0004 + #define STUDIO_HAS_CHROME 0x0008 // if any of the textures have chrome on them + + #define RAD_TO_STUDIO (32768.0/M_PI) + #define STUDIO_TO_RAD (M_PI/32768.0) + + // Default alignment +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( pop, packing ) +#endif +#undef PACK_STRUCT + + /*! + Textureatlas + Combine Source Images with arbitrary size and bithdepth to an Image with 2^n size + borders from the source images are copied around for allowing filtering ( bilinear, mipmap ) + */ + struct STextureAtlas + { + STextureAtlas () + { + release(); + } + + virtual ~STextureAtlas () + { + release (); + } + + void release (); + void addSource ( const c8 * name, video::IImage * image ); + void create ( u32 pixelborder, video::E_TEXTURE_CLAMP texmode ); + void getScale ( core::vector2df &scale ); + void getTranslation ( const c8 * name, core::vector2di &pos ); + + struct TextureAtlasEntry + { + io::path name; + u32 width; + u32 height; + + core::vector2di pos; + + video::IImage * image; + + bool operator < ( const TextureAtlasEntry & other ) + { + return height > other.height; + } + }; + + + core::array < TextureAtlasEntry > atlas; + video::IImage * Master; + }; + + + class CAnimatedMeshHalfLife : public IAnimatedMesh + { + public: + + //! constructor + CAnimatedMeshHalfLife( ); + + //! destructor + virtual ~CAnimatedMeshHalfLife(); + + //! loads a Halflife mdl file + virtual bool loadModelFile( io::IReadFile* file, ISceneManager * smgr ); + + //IAnimatedMesh + virtual u32 getFrameCount() const; + virtual IMesh* getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop); + virtual const core::aabbox3d& getBoundingBox() const; + virtual E_ANIMATED_MESH_TYPE getMeshType() const; + virtual void renderModel ( u32 param, video::IVideoDriver * driver, const core::matrix4 &absoluteTransformation); + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const; + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const; + //! Returns pointer to a mesh buffer which fits a material + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const; + + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue); + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! set user axis aligned bounding box + virtual void setBoundingBox(const core::aabbox3df& box); + + //! Get the Animation List + virtual IAnimationList* getAnimList () { return &AnimList; } + + //! Return the named Body List of this Animated Mesh + virtual IBodyList *getBodyList() { return &BodyList; } + + private: + + // KeyFrame Animation List + IAnimationList AnimList; + // Sum of all sequences + u32 FrameCount; + + // Named meshes of the Body + IBodyList BodyList; + + //! return a Mesh per frame + SMesh MeshIPol; + + + ISceneManager *SceneManager; + + SHalflifeHeader *Header; + SHalflifeHeader *TextureHeader; + bool OwnTexModel; // do we have a modelT.mdl ? + SHalflifeHeader *AnimationHeader[32]; // sequences named model01.mdl, model02.mdl + + void initData (); + void freeModel (); + SHalflifeHeader * loadModel( io::IReadFile* file, const io::path &filename ); + bool postLoadModel( const io::path &filename ); + + u32 SequenceIndex; // sequence index + f32 CurrentFrame; // Current Frame + + #define MOUTH_CONTROLLER 4 + u8 BoneController[4 + 1 ]; // bone controllers + mouth position + u8 Blending[2]; // animation blending + + f32 SetController( s32 controllerIndex, f32 value ); + + + u32 SkinGroupSelection; // skin group selection + u32 SetSkin( u32 value ); + + void initModel (); + void dumpModelInfo ( u32 level); + + void ExtractBbox( s32 sequence, core::aabbox3df &box ); + + + void setUpBones (); + SHalflifeAnimOffset * getAnim( SHalflifeSequence *seq ); + void slerpBones( vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s ); + void calcRotations ( vec3_hl *pos, vec4_hl *q, SHalflifeSequence *seq, SHalflifeAnimOffset *anim, f32 f ); + + vec4_hl BoneAdj; + void calcBoneAdj(); + void calcBoneQuaternion( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *q ) const; + void calcBonePosition( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *pos ) const; + + void buildVertices (); + + io::path TextureBaseName; + +#define HL_TEXTURE_ATLAS + + +#ifdef HL_TEXTURE_ATLAS + STextureAtlas TextureAtlas; + video::ITexture *TextureMaster; +#endif + + }; + + + //! Meshloader capable of loading HalfLife Model files + class CHalflifeMDLMeshFileLoader : public IMeshLoader + { + public: + + //! Constructor + CHalflifeMDLMeshFileLoader( scene::ISceneManager* smgr ); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + + private: + scene::ISceneManager* SceneManager; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/source/Irrlicht/CAnimatedMeshSceneNode.cpp b/source/Irrlicht/CAnimatedMeshSceneNode.cpp index 61d4fd70..d033c444 100644 --- a/source/Irrlicht/CAnimatedMeshSceneNode.cpp +++ b/source/Irrlicht/CAnimatedMeshSceneNode.cpp @@ -32,7 +32,7 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, const core::vector3df& rotation, const core::vector3df& scale) : IAnimatedMeshSceneNode(parent, mgr, id, position, rotation, scale), Mesh(0), - BeginFrameTime(0), StartFrame(0), EndFrame(0), FramesPerSecond(0.f), + StartFrame(0), EndFrame(0), FramesPerSecond(0.f), CurrentFrameNr(0.f), LastTimeMs(0), TransitionTime(0), Transiting(0.f), TransitingBlend(0.f), JointMode(EJUOR_NONE), JointsUsed(false), @@ -44,7 +44,6 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, setDebugName("CAnimatedMeshSceneNode"); #endif - BeginFrameTime = os::Timer::getTime(); FramesPerSecond = 25.f/1000.f; setMesh(mesh); @@ -78,12 +77,6 @@ void CAnimatedMeshSceneNode::setCurrentFrame(f32 frame) // if you pass an out of range value, we just clamp it CurrentFrameNr = core::clamp ( frame, (f32)StartFrame, (f32)EndFrame ); - BeginFrameTime = os::Timer::getTime(); - if (FramesPerSecond > 0) - BeginFrameTime += (s32)((CurrentFrameNr - StartFrame) / FramesPerSecond); - else if (FramesPerSecond < 0) - BeginFrameTime += (s32)((CurrentFrameNr - EndFrame) / -FramesPerSecond); - beginTransition(); //transit to this frame if enabled } @@ -115,15 +108,18 @@ void CAnimatedMeshSceneNode::buildFrameNr(u32 timeMs) { // play animation looped CurrentFrameNr += timeMs * FramesPerSecond; + + // We have no interpolation between EndFrame and StartFrame, + // the last frame must be identical to first one with our current solution. if (FramesPerSecond > 0.f) //forwards... { if (CurrentFrameNr > EndFrame) - CurrentFrameNr -= (EndFrame-StartFrame); + CurrentFrameNr = StartFrame + fmod(CurrentFrameNr - StartFrame, (f32)(EndFrame-StartFrame)); } else //backwards... { if (CurrentFrameNr < StartFrame) - CurrentFrameNr += (EndFrame-StartFrame); + CurrentFrameNr = EndFrame - fmod(EndFrame - CurrentFrameNr, (f32)(EndFrame-StartFrame)); } } else @@ -199,7 +195,9 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame() { if(Mesh->getMeshType() != EAMT_SKINNED) { - return Mesh->getMesh((s32)getFrameNr(), 255, StartFrame, EndFrame); + s32 frameNr = (s32) getFrameNr(); + s32 frameBlend = (s32) (core::fract ( getFrameNr() ) * 1000.f); + return Mesh->getMesh(frameNr, frameBlend, StartFrame, EndFrame); } else { @@ -596,7 +594,7 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) if (number == -1) { - os::Printer::log("Joint with specified name not found in skinned mesh.", jointName, ELL_WARNING); + os::Printer::log("Joint with specified name not found in skinned mesh.", jointName, ELL_DEBUG); return 0; } @@ -1074,7 +1072,6 @@ ISceneNode* CAnimatedMeshSceneNode::clone(ISceneNode* newParent, ISceneManager* newNode->Materials = Materials; newNode->Box = Box; newNode->Mesh = Mesh; - newNode->BeginFrameTime = BeginFrameTime; newNode->StartFrame = StartFrame; newNode->EndFrame = EndFrame; newNode->FramesPerSecond = FramesPerSecond; diff --git a/source/Irrlicht/CAnimatedMeshSceneNode.h b/source/Irrlicht/CAnimatedMeshSceneNode.h index c9f2e7c6..34050d17 100644 --- a/source/Irrlicht/CAnimatedMeshSceneNode.h +++ b/source/Irrlicht/CAnimatedMeshSceneNode.h @@ -175,7 +175,6 @@ namespace scene core::aabbox3d Box; IAnimatedMesh* Mesh; - u32 BeginFrameTime; s32 StartFrame; s32 EndFrame; f32 FramesPerSecond; diff --git a/source/Irrlicht/CBurningShader_Raster_Reference.cpp b/source/Irrlicht/CBurningShader_Raster_Reference.cpp index a336d8b9..8b50b4ee 100644 --- a/source/Irrlicht/CBurningShader_Raster_Reference.cpp +++ b/source/Irrlicht/CBurningShader_Raster_Reference.cpp @@ -509,7 +509,7 @@ class CBurningShader_Raster_Reference : public IBurningShader public: //! constructor - CBurningShader_Raster_Reference(IDepthBuffer* depthBuffer); + CBurningShader_Raster_Reference(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -536,8 +536,8 @@ private: }; //! constructor -CBurningShader_Raster_Reference::CBurningShader_Raster_Reference(IDepthBuffer* depthBuffer) -: IBurningShader(depthBuffer) +CBurningShader_Raster_Reference::CBurningShader_Raster_Reference(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CBurningShader_Raster_Reference"); @@ -1129,9 +1129,9 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTriangleRendererReference(IDepthBuffer* depthBuffer) +IBurningShader* createTriangleRendererReference(CBurningVideoDriver* driver) { - return new CBurningShader_Raster_Reference(depthBuffer); + return new CBurningShader_Raster_Reference(driver); } diff --git a/source/Irrlicht/CColladaFileLoader.cpp b/source/Irrlicht/CColladaFileLoader.cpp index 1bf7058b..d1fb19de 100644 --- a/source/Irrlicht/CColladaFileLoader.cpp +++ b/source/Irrlicht/CColladaFileLoader.cpp @@ -260,7 +260,7 @@ namespace //! prefab for a container scene node //! Collects other prefabs and instantiates them upon instantiation - //! Uses a dummy scene node to return the childs as one scene node + //! Uses a dummy scene node to return the children as one scene node class CScenePrefab : public CPrefab { public: @@ -279,7 +279,7 @@ namespace os::Printer::log("COLLADA: Constructing scene instance", Id.c_str()); #endif - if (Childs.size()==0) + if (Children.size()==0) return 0; scene::IDummyTransformationSceneNode* s = mgr->addDummyTransformationSceneNode(parent); @@ -295,14 +295,14 @@ namespace } os::Printer::log("COLLADA: Transformation", t.c_str()); - for (u32 i=0; iaddInstance(s, mgr); + for (u32 i=0; iaddInstance(s, mgr); } return s; } - core::array Childs; + core::array Children; core::matrix4 Transformation; }; @@ -737,7 +737,7 @@ void CColladaFileLoader::readNodeSection(io::IXMLReaderUTF8* reader, scene::ISce if (p) { nodeprefab = new CScenePrefab(readId(reader)); - p->Childs.push_back(nodeprefab); + p->Children.push_back(nodeprefab); Prefabs.push_back(nodeprefab); // in order to delete them later on } @@ -1132,7 +1132,7 @@ void CColladaFileLoader::instantiateNode(scene::ISceneNode* parent, if (url == "" || url == Prefabs[i]->getId()) { if (p) - p->Childs.push_back(Prefabs[i]); + p->Children.push_back(Prefabs[i]); else if (CreateInstances) { @@ -1153,7 +1153,7 @@ void CColladaFileLoader::instantiateNode(scene::ISceneNode* parent, if (instanceGeometryName==type) { Prefabs.push_back(new CGeometryPrefab(url)); - p->Childs.push_back(Prefabs.getLast()); + p->Children.push_back(Prefabs.getLast()); } } } @@ -1661,7 +1661,7 @@ void CColladaFileLoader::readGeometry(io::IXMLReaderUTF8* reader) core::array sources; bool okToReadArray = false; - // handles geometry node and the mesh childs in this loop + // handles geometry node and the mesh children in this loop // read sources with arrays and accessor for each mesh if (!reader->isEmptyElement()) while(reader->read()) diff --git a/source/Irrlicht/CColladaFileLoader.h b/source/Irrlicht/CColladaFileLoader.h index a5b644d2..d38f13ed 100644 --- a/source/Irrlicht/CColladaFileLoader.h +++ b/source/Irrlicht/CColladaFileLoader.h @@ -214,7 +214,7 @@ private: void readAssetSection(io::IXMLReaderUTF8* reader); //! reads a section and its content - //! if a prefab pointer is passed the nodes are created as scene prefabs childs of that prefab + //! if a prefab pointer is passed the nodes are created as scene prefabs children of that prefab void readNodeSection(io::IXMLReaderUTF8* reader, scene::ISceneNode* parent, CScenePrefab* p=0); //! reads a element and its content and creates a matrix from it diff --git a/source/Irrlicht/CColorConverter.cpp b/source/Irrlicht/CColorConverter.cpp index 0ea5dce7..3435d77c 100644 --- a/source/Irrlicht/CColorConverter.cpp +++ b/source/Irrlicht/CColorConverter.cpp @@ -112,6 +112,93 @@ void CColorConverter::convert8BitTo16Bit(const u8* in, s16* out, s32 width, s32 } } +//! converts a 8 bit palettized or non palettized image (A8) into R8G8B8 +void CColorConverter::convert8BitTo24Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad, bool flip) +{ + if (!in || !out ) + return; + + const s32 lineWidth = 3 * width; + if (flip) + out += lineWidth * height; + + for (s32 y=0; ysetTransform(video::ETS_WORLD, AbsoluteTransformation); // for debug purposes only: - bool renderMeshes = true; video::SMaterial mat = Mesh->getMeshBuffer(0)->getMaterial(); // overwrite half transparency diff --git a/source/Irrlicht/CD3D8Driver.cpp b/source/Irrlicht/CD3D8Driver.cpp index edf3de01..c2770107 100644 --- a/source/Irrlicht/CD3D8Driver.cpp +++ b/source/Irrlicht/CD3D8Driver.cpp @@ -34,7 +34,7 @@ CD3D8Driver::CD3D8Driver(const core::dimension2d& screenSize, HWND window, WindowId(0), SceneSourceRect(0), LastVertexType((video::E_VERTEX_TYPE)-1), MaxTextureUnits(0), MaxUserClipPlanes(0), MaxLightDistance(0), LastSetLight(-1), DeviceLost(false), - DriverWasReset(true) + DriverWasReset(true), DisplayAdapter(0) { #ifdef _DEBUG setDebugName("CD3D8Driver"); @@ -143,10 +143,11 @@ void CD3D8Driver::createMaterialRenderers() //! initialises the Direct3D API bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, HWND hwnd, u32 bits, bool fullScreen, bool pureSoftware, - bool highPrecisionFPU, bool vsync, u8 antiAlias) + bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter) { HRESULT hr; typedef IDirect3D8 * (__stdcall *D3DCREATETYPE)(UINT); + DisplayAdapter = displayAdapter; #if defined( _IRR_XBOX_PLATFORM_) D3DCREATETYPE d3dCreate = (D3DCREATETYPE) &Direct3DCreate8; @@ -179,7 +180,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, // print device information D3DADAPTER_IDENTIFIER8 dai; - if (!FAILED(pID3D->GetAdapterIdentifier(D3DADAPTER_DEFAULT, D3DENUM_NO_WHQL_LEVEL, &dai))) + if (!FAILED(pID3D->GetAdapterIdentifier(DisplayAdapter, D3DENUM_NO_WHQL_LEVEL, &dai))) { char tmp[512]; @@ -194,7 +195,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, } D3DDISPLAYMODE d3ddm; - hr = pID3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm); + hr = pID3D->GetAdapterDisplayMode(DisplayAdapter, &d3ddm); if (FAILED(hr)) { os::Printer::log("Error: Could not get Adapter Display mode.", ELL_ERROR); @@ -236,7 +237,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, while(antiAlias > 0) { - if(!FAILED(pID3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, + if(!FAILED(pID3D->CheckDeviceMultiSampleType(DisplayAdapter, devtype , present.BackBufferFormat, !fullScreen, (D3DMULTISAMPLE_TYPE)antiAlias))) { @@ -255,18 +256,18 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, if (StencilBuffer) { present.AutoDepthStencilFormat = D3DFMT_D24S8; - if(FAILED(pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDeviceFormat(DisplayAdapter, devtype, present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) { #if !defined( _IRR_XBOX_PLATFORM_) present.AutoDepthStencilFormat = D3DFMT_D24X4S4; - if(FAILED(pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDeviceFormat(DisplayAdapter, devtype, present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) { present.AutoDepthStencilFormat = D3DFMT_D15S1; - if(FAILED(pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDeviceFormat(DisplayAdapter, devtype, present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) { @@ -277,7 +278,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, #endif } else - if(FAILED(pID3D->CheckDepthStencilMatch(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDepthStencilMatch(DisplayAdapter, devtype, present.BackBufferFormat, present.BackBufferFormat, present.AutoDepthStencilFormat))) { os::Printer::log("Depth-stencil format is not compatible with display format, disabling stencil buffer.", ELL_WARNING); @@ -289,17 +290,17 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, { #if !defined( _IRR_XBOX_PLATFORM_) present.AutoDepthStencilFormat = D3DFMT_D32; - if(FAILED(pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDeviceFormat(DisplayAdapter, devtype, present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) { present.AutoDepthStencilFormat = D3DFMT_D24X8; - if(FAILED(pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDeviceFormat(DisplayAdapter, devtype, present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) { present.AutoDepthStencilFormat = D3DFMT_D16; - if(FAILED(pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDeviceFormat(DisplayAdapter, devtype, present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) { @@ -310,7 +311,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, } #else present.AutoDepthStencilFormat = D3DFMT_D16; - if(FAILED(pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, devtype, + if(FAILED(pID3D->CheckDeviceFormat(DisplayAdapter, devtype, present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) { @@ -328,7 +329,7 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, #endif if (pureSoftware) { - hr = pID3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hwnd, + hr = pID3D->CreateDevice(DisplayAdapter, D3DDEVTYPE_REF, hwnd, fpuPrecision | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present, &pID3DDevice); if (FAILED(hr)) @@ -336,14 +337,14 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, } else { - hr = pID3D->CreateDevice(D3DADAPTER_DEFAULT, devtype, hwnd, + hr = pID3D->CreateDevice(DisplayAdapter, devtype, hwnd, fpuPrecision | D3DCREATE_HARDWARE_VERTEXPROCESSING, &present, &pID3DDevice); if(FAILED(hr)) - hr = pID3D->CreateDevice(D3DADAPTER_DEFAULT, devtype, hwnd, + hr = pID3D->CreateDevice(DisplayAdapter, devtype, hwnd, fpuPrecision | D3DCREATE_MIXED_VERTEXPROCESSING , &present, &pID3DDevice); if(FAILED(hr)) - hr = pID3D->CreateDevice(D3DADAPTER_DEFAULT, devtype, hwnd, + hr = pID3D->CreateDevice(DisplayAdapter, devtype, hwnd, fpuPrecision | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present, &pID3DDevice); if (FAILED(hr)) os::Printer::log("Was not able to create Direct3D8 device.", ELL_ERROR); @@ -2222,6 +2223,12 @@ IImage* CD3D8Driver::createScreenShot() clientRect.top = clientPoint.y; clientRect.right = clientRect.left + ScreenSize.Width; clientRect.bottom = clientRect.top + ScreenSize.Height; + + // window can be off-screen partly, we can't take screenshots from that + clientRect.left = core::max_(clientRect.left, 0l); + clientRect.top = core::max_(clientRect.top, 0l); + clientRect.right = core::min_(clientRect.right, (long)displayMode.Width); + clientRect.bottom = core::min_(clientRect.bottom, (long)displayMode.Height ); } // lock our area of the surface @@ -2232,8 +2239,12 @@ IImage* CD3D8Driver::createScreenShot() return 0; } + irr::core::dimension2d shotSize; + shotSize.Width = core::min_( ScreenSize.Width, (u32)(clientRect.right-clientRect.left) ); + shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) ); + // this could throw, but we aren't going to worry about that case very much - IImage* newImage = new CImage(ECF_A8R8G8B8, ScreenSize); + IImage* newImage = new CImage(ECF_A8R8G8B8, shotSize); // d3d pads the image, so we need to copy the correct number of bytes u32* dP = (u32*)newImage->lock(); @@ -2244,26 +2255,26 @@ IImage* CD3D8Driver::createScreenShot() // set each pixel alpha value to 255. if(D3DFMT_X8R8G8B8 == displayMode.Format && (0xFF000000 != (*dP & 0xFF000000))) { - for (u32 y = 0; y < ScreenSize.Height; ++y) + for (u32 y = 0; y < shotSize.Height; ++y) { - for(u32 x = 0; x < ScreenSize.Width; ++x) + for(u32 x = 0; x < shotSize.Width; ++x) { *dP = *((u32*)sP) | 0xFF000000; dP++; sP += 4; } - sP += lockedRect.Pitch - (4 * ScreenSize.Width); + sP += lockedRect.Pitch - (4 * shotSize.Width); } } else { - for (u32 y = 0; y < ScreenSize.Height; ++y) + for (u32 y = 0; y < shotSize.Height; ++y) { - memcpy(dP, sP, ScreenSize.Width * 4); + memcpy(dP, sP, shotSize.Width * 4); sP += lockedRect.Pitch; - dP += ScreenSize.Width; + dP += shotSize.Width; } } @@ -2347,13 +2358,13 @@ namespace video IVideoDriver* createDirectX8Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, bool pureSoftware, bool highPrecisionFPU, - bool vsync, u8 antiAlias) + bool vsync, u8 antiAlias, u32 displayAdapter) { CD3D8Driver* dx8 = new CD3D8Driver(screenSize, window, fullscreen, stencilbuffer, io, pureSoftware); if (!dx8->initDriver(screenSize, window, bits, fullscreen, - pureSoftware, highPrecisionFPU, vsync, antiAlias)) + pureSoftware, highPrecisionFPU, vsync, antiAlias, displayAdapter)) { dx8->drop(); dx8 = 0; diff --git a/source/Irrlicht/CD3D8Driver.h b/source/Irrlicht/CD3D8Driver.h index 7394d57e..84be6cf9 100644 --- a/source/Irrlicht/CD3D8Driver.h +++ b/source/Irrlicht/CD3D8Driver.h @@ -108,7 +108,7 @@ namespace video //! initialises the Direct3D API bool initDriver(const core::dimension2d& screenSize, HWND hwnd, u32 bits, bool fullScreen, bool pureSoftware, - bool highPrecisionFPU, bool vsync, u8 antiAlias); + bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter); //! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 //! driver, it would return "Direct3D8.1". @@ -319,6 +319,8 @@ namespace video bool DriverWasReset; SColorf AmbientLight; + + u32 DisplayAdapter; }; } // end namespace video diff --git a/source/Irrlicht/CD3D9Driver.cpp b/source/Irrlicht/CD3D9Driver.cpp index 1d839390..4304539a 100644 --- a/source/Irrlicht/CD3D9Driver.cpp +++ b/source/Irrlicht/CD3D9Driver.cpp @@ -36,7 +36,7 @@ CD3D9Driver::CD3D9Driver(const core::dimension2d& screenSize, HWND window, MaxLightDistance(0.f), LastSetLight(-1), Cached2DModeSignature(0), ColorFormat(ECF_A8R8G8B8), DeviceLost(false), Fullscreen(fullscreen), DriverWasReset(true), OcclusionQuerySupport(false), - AlphaToCoverageSupport(false) + AlphaToCoverageSupport(false), DisplayAdapter(0) { #ifdef _DEBUG setDebugName("CD3D9Driver"); @@ -160,11 +160,12 @@ void CD3D9Driver::createMaterialRenderers() //! initialises the Direct3D API bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, HWND hwnd, u32 bits, bool fullScreen, bool pureSoftware, - bool highPrecisionFPU, bool vsync, u8 antiAlias) + bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter) { HRESULT hr; Fullscreen = fullScreen; CurrentDepthBufferSize = screenSize; + DisplayAdapter = displayAdapter; if (!pID3D) { @@ -197,7 +198,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, // print device information D3DADAPTER_IDENTIFIER9 dai; - if (!FAILED(pID3D->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &dai))) + if (!FAILED(pID3D->GetAdapterIdentifier(DisplayAdapter, 0, &dai))) { char tmp[512]; @@ -225,7 +226,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, } D3DDISPLAYMODE d3ddm; - hr = pID3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm); + hr = pID3D->GetAdapterDisplayMode(DisplayAdapter, &d3ddm); if (FAILED(hr)) { os::Printer::log("Error: Could not get Adapter Display mode.", ELL_ERROR); @@ -261,7 +262,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, present.Windowed = TRUE; } - UINT adapter = D3DADAPTER_DEFAULT; + UINT adapter = DisplayAdapter; D3DDEVTYPE devtype = D3DDEVTYPE_HAL; #ifndef _IRR_D3D_NO_SHADER_DEBUGGING devtype = D3DDEVTYPE_REF; @@ -369,7 +370,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, DWORD fpuPrecision = highPrecisionFPU ? D3DCREATE_FPU_PRESERVE : 0; if (pureSoftware) { - hr = pID3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hwnd, + hr = pID3D->CreateDevice(DisplayAdapter, D3DDEVTYPE_REF, hwnd, fpuPrecision | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present, &pID3DDevice); if (FAILED(hr)) @@ -432,13 +433,13 @@ bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, OcclusionQuerySupport=(pID3DDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, NULL) == S_OK); if (VendorID==0x10DE)//NVidia - AlphaToCoverageSupport = (pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + AlphaToCoverageSupport = (pID3D->CheckDeviceFormat(DisplayAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0,D3DRTYPE_SURFACE, (D3DFORMAT)MAKEFOURCC('A', 'T', 'O', 'C')) == S_OK); else if (VendorID==0x1002)//ATI AlphaToCoverageSupport = true; // TODO: Check unknown #if 0 - AlphaToCoverageSupport = (pID3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + AlphaToCoverageSupport = (pID3D->CheckDeviceFormat(DisplayAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0,D3DRTYPE_SURFACE, (D3DFORMAT)MAKEFOURCC('A','2','M','1')) == S_OK); #endif @@ -3135,6 +3136,12 @@ IImage* CD3D9Driver::createScreenShot() clientRect.top = clientPoint.y; clientRect.right = clientRect.left + ScreenSize.Width; clientRect.bottom = clientRect.top + ScreenSize.Height; + + // window can be off-screen partly, we can't take screenshots from that + clientRect.left = core::max_(clientRect.left, 0l); + clientRect.top = core::max_(clientRect.top, 0l); + clientRect.right = core::min_(clientRect.right, (long)displayMode.Width); + clientRect.bottom = core::min_(clientRect.bottom, (long)displayMode.Height ); } // lock our area of the surface @@ -3145,8 +3152,12 @@ IImage* CD3D9Driver::createScreenShot() return 0; } + irr::core::dimension2d shotSize; + shotSize.Width = core::min_( ScreenSize.Width, (u32)(clientRect.right-clientRect.left) ); + shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) ); + // this could throw, but we aren't going to worry about that case very much - IImage* newImage = new CImage(ECF_A8R8G8B8, ScreenSize); + IImage* newImage = new CImage(ECF_A8R8G8B8, shotSize); // d3d pads the image, so we need to copy the correct number of bytes u32* dP = (u32*)newImage->lock(); @@ -3157,26 +3168,26 @@ IImage* CD3D9Driver::createScreenShot() // set each pixel alpha value to 255. if(D3DFMT_X8R8G8B8 == displayMode.Format && (0xFF000000 != (*dP & 0xFF000000))) { - for (u32 y = 0; y < ScreenSize.Height; ++y) + for (u32 y = 0; y < shotSize.Height; ++y) { - for(u32 x = 0; x < ScreenSize.Width; ++x) + for(u32 x = 0; x < shotSize.Width; ++x) { *dP = *((u32*)sP) | 0xFF000000; dP++; sP += 4; } - sP += lockedRect.Pitch - (4 * ScreenSize.Width); + sP += lockedRect.Pitch - (4 * shotSize.Width); } } else { - for (u32 y = 0; y < ScreenSize.Height; ++y) + for (u32 y = 0; y < shotSize.Height; ++y) { - memcpy(dP, sP, ScreenSize.Width * 4); + memcpy(dP, sP, shotSize.Width * 4); sP += lockedRect.Pitch; - dP += ScreenSize.Width; + dP += shotSize.Width; } } @@ -3412,10 +3423,10 @@ namespace video IVideoDriver* createDirectX9Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, bool pureSoftware, bool highPrecisionFPU, - bool vsync, u8 antiAlias) + bool vsync, u8 antiAlias, u32 displayAdapter) { CD3D9Driver* dx9 = new CD3D9Driver(screenSize, window, fullscreen, stencilbuffer, io, pureSoftware); - if (!dx9->initDriver(screenSize, window, bits, fullscreen, pureSoftware, highPrecisionFPU, vsync, antiAlias)) + if (!dx9->initDriver(screenSize, window, bits, fullscreen, pureSoftware, highPrecisionFPU, vsync, antiAlias, displayAdapter)) { dx9->drop(); dx9 = 0; diff --git a/source/Irrlicht/CD3D9Driver.h b/source/Irrlicht/CD3D9Driver.h index 82b2936f..4845cc96 100644 --- a/source/Irrlicht/CD3D9Driver.h +++ b/source/Irrlicht/CD3D9Driver.h @@ -193,7 +193,7 @@ namespace video //! initialises the Direct3D API bool initDriver(const core::dimension2d& screenSize, HWND hwnd, u32 bits, bool fullScreen, bool pureSoftware, - bool highPrecisionFPU, bool vsync, u8 antiAlias); + bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter); //! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 //! driver, it would return "Direct3D8.1". @@ -461,6 +461,8 @@ namespace video bool DriverWasReset; bool OcclusionQuerySupport; bool AlphaToCoverageSupport; + + u32 DisplayAdapter; }; diff --git a/source/Irrlicht/CD3D9Texture.cpp b/source/Irrlicht/CD3D9Texture.cpp index d05ee62d..ec72c34b 100644 --- a/source/Irrlicht/CD3D9Texture.cpp +++ b/source/Irrlicht/CD3D9Texture.cpp @@ -312,9 +312,9 @@ bool CD3D9Texture::createTexture(u32 flags, IImage * image) { LPDIRECT3D9 intf = Driver->getExposedVideoData().D3D9.D3D9; D3DDISPLAYMODE d3ddm; - intf->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm); + intf->GetAdapterDisplayMode(Driver->DisplayAdapter, &d3ddm); - if (D3D_OK==intf->CheckDeviceFormat(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,d3ddm.Format,D3DUSAGE_AUTOGENMIPMAP,D3DRTYPE_TEXTURE,format)) + if (D3D_OK==intf->CheckDeviceFormat(Driver->DisplayAdapter,D3DDEVTYPE_HAL,d3ddm.Format,D3DUSAGE_AUTOGENMIPMAP,D3DRTYPE_TEXTURE,format)) { usage = D3DUSAGE_AUTOGENMIPMAP; HardwareMipMaps = true; diff --git a/source/Irrlicht/CDepthBuffer.cpp b/source/Irrlicht/CDepthBuffer.cpp index 78d86137..994401ab 100644 --- a/source/Irrlicht/CDepthBuffer.cpp +++ b/source/Irrlicht/CDepthBuffer.cpp @@ -68,6 +68,7 @@ void CDepthBuffer::setSize(const core::dimension2d& size) Pitch = size.Width * sizeof ( fp24 ); TotalSize = Pitch * size.Height; Buffer = new u8[TotalSize]; + clear (); } @@ -78,6 +79,63 @@ const core::dimension2d& CDepthBuffer::getSize() const return Size; } +// ----------------------------------------------------------------- + +//! constructor +CStencilBuffer::CStencilBuffer(const core::dimension2d& size) +: Buffer(0), Size(0,0) +{ + #ifdef _DEBUG + setDebugName("CDepthBuffer"); + #endif + + setSize(size); +} + + + +//! destructor +CStencilBuffer::~CStencilBuffer() +{ + if (Buffer) + delete [] Buffer; +} + + + +//! clears the zbuffer +void CStencilBuffer::clear() +{ + memset32 ( Buffer, 0, TotalSize ); +} + + + +//! sets the new size of the zbuffer +void CStencilBuffer::setSize(const core::dimension2d& size) +{ + if (size == Size) + return; + + Size = size; + + if (Buffer) + delete [] Buffer; + + Pitch = size.Width * sizeof ( u32 ); + TotalSize = Pitch * size.Height; + Buffer = new u8[TotalSize]; + clear (); +} + + + +//! returns the size of the zbuffer +const core::dimension2d& CStencilBuffer::getSize() const +{ + return Size; +} + } // end namespace video @@ -100,6 +158,17 @@ IDepthBuffer* createDepthBuffer(const core::dimension2d& size) #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ } + +//! creates a ZBuffer +IStencilBuffer* createStencilBuffer(const core::dimension2d& size) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CStencilBuffer(size); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + } // end namespace video } // end namespace irr diff --git a/source/Irrlicht/CDepthBuffer.h b/source/Irrlicht/CDepthBuffer.h index 258a61c2..2db2c842 100644 --- a/source/Irrlicht/CDepthBuffer.h +++ b/source/Irrlicht/CDepthBuffer.h @@ -32,21 +32,51 @@ namespace video virtual const core::dimension2d& getSize() const; //! locks the zbuffer - virtual void* lock() - { - return (void*) Buffer; - } + virtual void* lock() { return (void*) Buffer; } //! unlocks the zbuffer - virtual void unlock() - { - } + virtual void unlock() {} //! returns pitch of depthbuffer (in bytes) - virtual u32 getPitch() const - { - return Pitch; - } + virtual u32 getPitch() const { return Pitch; } + + + private: + + u8* Buffer; + core::dimension2d Size; + u32 TotalSize; + u32 Pitch; + }; + + + class CStencilBuffer : public IStencilBuffer + { + public: + + //! constructor + CStencilBuffer(const core::dimension2d& size); + + //! destructor + virtual ~CStencilBuffer(); + + //! clears the zbuffer + virtual void clear(); + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d& size); + + //! returns the size of the zbuffer + virtual const core::dimension2d& getSize() const; + + //! locks the zbuffer + virtual void* lock() { return (void*) Buffer; } + + //! unlocks the zbuffer + virtual void unlock() {} + + //! returns pitch of depthbuffer (in bytes) + virtual u32 getPitch() const { return Pitch; } private: diff --git a/source/Irrlicht/CFileList.cpp b/source/Irrlicht/CFileList.cpp index 4f6be729..b82dda96 100644 --- a/source/Irrlicht/CFileList.cpp +++ b/source/Irrlicht/CFileList.cpp @@ -60,11 +60,12 @@ const io::path& CFileList::getFullFileName(u32 index) const } //! adds a file or folder -u32 CFileList::addItem(const io::path& fullPath, u32 size, bool isDirectory, u32 id) +u32 CFileList::addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id) { SFileListEntry entry; + entry.ID = id ? id : Files.size(); + entry.Offset = offset; entry.Size = size; - entry.ID = id; entry.Name = fullPath; entry.Name.replace('\\', '/'); entry.IsDirectory = isDirectory; @@ -116,6 +117,12 @@ u32 CFileList::getFileSize(u32 index) const return index < Files.size() ? Files[index].Size : 0; } +//! Returns the size of a file +u32 CFileList::getFileOffset(u32 index) const +{ + return index < Files.size() ? Files[index].Offset : 0; +} + //! Searches for a file or folder within the list, returns the index s32 CFileList::findFile(const io::path& filename, bool isDirectory = false) const diff --git a/source/Irrlicht/CFileList.h b/source/Irrlicht/CFileList.h index 97467de0..ef6e6027 100644 --- a/source/Irrlicht/CFileList.h +++ b/source/Irrlicht/CFileList.h @@ -36,6 +36,9 @@ struct SFileListEntry file in an archive, which can hold things like data offset and CRC. */ u32 ID; + //! FileOffset inside an archive + u32 Offset; + //! True if this is a folder, false if not. bool IsDirectory; @@ -76,9 +79,10 @@ public: //! Add as a file or folder to the list /** \param fullPath The file name including path, up to the root of the file list. \param isDirectory True if this is a directory rather than a file. + \param offset The offset where the file is stored in an archive \param size The size of the file in bytes. \param id The ID of the file in the archive which owns it */ - virtual u32 addItem(const io::path& fullPath, u32 size, bool isDirectory, u32 id=0); + virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0); //! Sorts the file list. You should call this after adding any items to the file list virtual void sort(); @@ -101,6 +105,9 @@ public: //! Returns the size of a file virtual u32 getFileSize(u32 index) const; + //! Returns the offest of a file + virtual u32 getFileOffset(u32 index) const; + //! Searches for a file or folder within the list, returns the index virtual s32 findFile(const io::path& filename, bool isFolder) const; diff --git a/source/Irrlicht/CFileSystem.cpp b/source/Irrlicht/CFileSystem.cpp index 423bbb24..42d759dd 100644 --- a/source/Irrlicht/CFileSystem.cpp +++ b/source/Irrlicht/CFileSystem.cpp @@ -12,6 +12,7 @@ #include "CPakReader.h" #include "CNPKReader.h" #include "CTarReader.h" +#include "CWADReader.h" #include "CFileList.h" #include "CXMLReader.h" #include "CXMLWriter.h" @@ -75,6 +76,11 @@ CFileSystem::CFileSystem() #ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ ArchiveLoader.push_back(new CArchiveLoaderTAR(this)); #endif + +#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + ArchiveLoader.push_back(new CArchiveLoaderWAD(this)); +#endif + } @@ -617,7 +623,7 @@ IFileList* CFileSystem::createFileList() { do { - r->addItem(Path + c_file.name, c_file.size, (_A_SUBDIR & c_file.attrib) != 0, 0); + r->addItem(Path + c_file.name, 0, c_file.size, (_A_SUBDIR & c_file.attrib) != 0, 0); } while( _tfindnext( hFile, &c_file ) == 0 ); @@ -638,7 +644,7 @@ IFileList* CFileSystem::createFileList() r = new CFileList(Path, false, false); - r->addItem(Path + "..", 0, true, 0); + r->addItem(Path + "..", 0, 0, true, 0); //! We use the POSIX compliant methods instead of scandir DIR* dirHandle=opendir(Path.c_str()); @@ -669,7 +675,7 @@ IFileList* CFileSystem::createFileList() } #endif - r->addItem(Path + dirEntry->d_name, size, isDirectory, 0); + r->addItem(Path + dirEntry->d_name, 0, size, isDirectory, 0); } closedir(dirHandle); } @@ -685,10 +691,10 @@ IFileList* CFileSystem::createFileList() SFileListEntry e3; //! PWD - r->addItem(Path + ".", 0, true, 0); + r->addItem(Path + ".", 0, 0, true, 0); //! parent - r->addItem(Path + "..", 0, true, 0); + r->addItem(Path + "..", 0, 0, true, 0); //! merge archives for (u32 i=0; i < FileArchives.size(); ++i) @@ -699,7 +705,7 @@ IFileList* CFileSystem::createFileList() { if (core::isInSameDirectory(Path, merge->getFullFileName(j)) == 0) { - r->addItem(merge->getFullFileName(j), merge->getFileSize(j), merge->isDirectory(j), 0); + r->addItem(merge->getFullFileName(j), merge->getFileOffset(j), merge->getFileSize(j), merge->isDirectory(j), 0); } } } diff --git a/source/Irrlicht/CGUIColorSelectDialog.cpp b/source/Irrlicht/CGUIColorSelectDialog.cpp index bfd2ce91..2306d57a 100644 --- a/source/Irrlicht/CGUIColorSelectDialog.cpp +++ b/source/Irrlicht/CGUIColorSelectDialog.cpp @@ -302,7 +302,7 @@ void CGUIColorSelectDialog::buildColorRing( const core::dimension2d & dim, bool generateMipLevels = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); driver->setTextureCreationFlag( video::ETCF_CREATE_MIP_MAPS, false); - ColorRing.Texture = driver->addTexture ( L"#colorring", RawTexture); + ColorRing.Texture = driver->addTexture ( "#colorring", RawTexture); RawTexture->drop(); driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, generateMipLevels); diff --git a/source/Irrlicht/CGUIComboBox.cpp b/source/Irrlicht/CGUIComboBox.cpp index c8dd1fdb..6e113066 100644 --- a/source/Irrlicht/CGUIComboBox.cpp +++ b/source/Irrlicht/CGUIComboBox.cpp @@ -64,7 +64,7 @@ CGUIComboBox::CGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, SelectedText->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); SelectedText->setTextAlignment(EGUIA_UPPERLEFT, EGUIA_CENTER); if (skin) - SelectedText->setOverrideColor(skin->getColor(EGDC_BUTTON_TEXT)); + SelectedText->setOverrideColor(skin->getColor(EGDC_BUTTON_TEXT)); SelectedText->enableOverrideColor(true); // this element can be tabbed to @@ -363,21 +363,24 @@ void CGUIComboBox::draw() { HasFocus = currentFocus == this || isMyChild(currentFocus); LastFocus = currentFocus; - - SelectedText->setBackgroundColor(skin->getColor(EGDC_HIGH_LIGHT)); - - if(isEnabled()) - { - SelectedText->setDrawBackground(HasFocus); - SelectedText->setOverrideColor(skin->getColor(HasFocus ? EGDC_HIGH_LIGHT_TEXT : EGDC_BUTTON_TEXT)); - } - else - { - SelectedText->setDrawBackground(false); - SelectedText->setOverrideColor(skin->getColor(EGDC_GRAY_TEXT)); - } } + // set colors each time as skin-colors can be changed + SelectedText->setBackgroundColor(skin->getColor(EGDC_HIGH_LIGHT)); + if(isEnabled()) + { + SelectedText->setDrawBackground(HasFocus); + SelectedText->setOverrideColor(skin->getColor(HasFocus ? EGDC_HIGH_LIGHT_TEXT : EGDC_BUTTON_TEXT)); + } + else + { + SelectedText->setDrawBackground(false); + SelectedText->setOverrideColor(skin->getColor(EGDC_GRAY_TEXT)); + } + ListButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); + ListButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); + + core::rect frameRect(AbsoluteRect); // draw the border diff --git a/source/Irrlicht/CGUIEditBox.cpp b/source/Irrlicht/CGUIEditBox.cpp index c96700bf..f5b81b2b 100644 --- a/source/Irrlicht/CGUIEditBox.cpp +++ b/source/Irrlicht/CGUIEditBox.cpp @@ -109,6 +109,12 @@ void CGUIEditBox::setOverrideColor(video::SColor color) } +video::SColor const& CGUIEditBox::getOverrideColor() const +{ + return OverrideColor; +} + + //! Turns the border on or off void CGUIEditBox::setDrawBorder(bool border) { @@ -122,6 +128,11 @@ void CGUIEditBox::enableOverrideColor(bool enable) OverrideColorEnabled = enable; } +bool CGUIEditBox::isOverrideColorEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return OverrideColorEnabled; +} //! Enables or disables word wrap void CGUIEditBox::setWordWrap(bool enable) diff --git a/source/Irrlicht/CGUIEditBox.h b/source/Irrlicht/CGUIEditBox.h index cd558efb..2a400f8e 100644 --- a/source/Irrlicht/CGUIEditBox.h +++ b/source/Irrlicht/CGUIEditBox.h @@ -33,10 +33,17 @@ namespace gui //! Sets another color for the text. virtual void setOverrideColor(video::SColor color); + //! Gets the override color + virtual video::SColor const & getOverrideColor() const; + //! Sets if the text should use the overide color or the //! color in the gui skin. virtual void enableOverrideColor(bool enable); + //! Checks if an override color is enabled + /** \return true if the override color is enabled, false otherwise */ + virtual bool isOverrideColorEnabled(void) const; + //! Turns the border on or off virtual void setDrawBorder(bool border); diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp index 551c5c20..af7f0701 100644 --- a/source/Irrlicht/CGUIEnvironment.cpp +++ b/source/Irrlicht/CGUIEnvironment.cpp @@ -498,6 +498,7 @@ void CGUIEnvironment::updateHoveredElement(core::position2d mousePos) if (lastHovered) { event.GUIEvent.Caller = lastHovered; + event.GUIEvent.Element = 0; event.GUIEvent.EventType = EGET_ELEMENT_LEFT; lastHovered->OnEvent(event); } diff --git a/source/Irrlicht/CGUIModalScreen.cpp b/source/Irrlicht/CGUIModalScreen.cpp index 1e93df8d..bcdf6452 100644 --- a/source/Irrlicht/CGUIModalScreen.cpp +++ b/source/Irrlicht/CGUIModalScreen.cpp @@ -32,9 +32,9 @@ CGUIModalScreen::CGUIModalScreen(IGUIEnvironment* environment, IGUIElement* pare bool CGUIModalScreen::canTakeFocus(IGUIElement* target) const { return (target && ((const IGUIElement*)target == this // this element can take it - || isMyChild(target) // own childs also + || isMyChild(target) // own children also || (target->getType() == EGUIET_MODAL_SCREEN )// other modals also fine - || (target->getParent() && target->getParent()->getType() == EGUIET_MODAL_SCREEN ))) // childs of other modals will do + || (target->getParent() && target->getParent()->getType() == EGUIET_MODAL_SCREEN ))) // children of other modals will do ; } diff --git a/source/Irrlicht/CGUIScrollBar.cpp b/source/Irrlicht/CGUIScrollBar.cpp index 50110f75..b2986cea 100644 --- a/source/Irrlicht/CGUIScrollBar.cpp +++ b/source/Irrlicht/CGUIScrollBar.cpp @@ -280,6 +280,13 @@ void CGUIScrollBar::draw() return; + video::SColor iconColor = skin->getColor(EGDC_WINDOW_SYMBOL); + if ( iconColor != CurrentIconColor ) + { + refreshControls(); + } + + SliderRect = AbsoluteRect; // draws the background @@ -436,7 +443,7 @@ s32 CGUIScrollBar::getPos() const //! refreshes the position and text on child buttons void CGUIScrollBar::refreshControls() { - video::SColor color(255,255,255,255); + CurrentIconColor = video::SColor(255,255,255,255); IGUISkin* skin = Environment->getSkin(); IGUISpriteBank* sprites = 0; @@ -444,7 +451,7 @@ void CGUIScrollBar::refreshControls() if (skin) { sprites = skin->getSpriteBank(); - color = skin->getColor(EGDC_WINDOW_SYMBOL); + CurrentIconColor = skin->getColor(EGDC_WINDOW_SYMBOL); } if (Horizontal) @@ -459,8 +466,8 @@ void CGUIScrollBar::refreshControls() if (sprites) { UpButton->setSpriteBank(sprites); - UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_LEFT), color); - UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_LEFT), color); + UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_LEFT), CurrentIconColor); + UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_LEFT), CurrentIconColor); } UpButton->setRelativePosition(core::rect(0,0, h, h)); UpButton->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); @@ -473,8 +480,8 @@ void CGUIScrollBar::refreshControls() if (sprites) { DownButton->setSpriteBank(sprites); - DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_RIGHT), color); - DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_RIGHT), color); + DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_RIGHT), CurrentIconColor); + DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_RIGHT), CurrentIconColor); } DownButton->setRelativePosition(core::rect(RelativeRect.getWidth()-h, 0, RelativeRect.getWidth(), h)); DownButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); @@ -491,8 +498,8 @@ void CGUIScrollBar::refreshControls() if (sprites) { UpButton->setSpriteBank(sprites); - UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_UP), color); - UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_UP), color); + UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_UP), CurrentIconColor); + UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_UP), CurrentIconColor); } UpButton->setRelativePosition(core::rect(0,0, w, w)); UpButton->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); @@ -505,8 +512,8 @@ void CGUIScrollBar::refreshControls() if (sprites) { DownButton->setSpriteBank(sprites); - DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), color); - DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), color); + DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), CurrentIconColor); + DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), CurrentIconColor); } DownButton->setRelativePosition(core::rect(0,RelativeRect.getHeight()-w, w, RelativeRect.getHeight())); DownButton->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); @@ -525,6 +532,7 @@ void CGUIScrollBar::serializeAttributes(io::IAttributes* out, io::SAttributeRead out->addInt ("Max", Max); out->addInt ("SmallStep", SmallStep); out->addInt ("LargeStep", LargeStep); + // CurrentIconColor - not serialized as continuiously updated } @@ -539,6 +547,7 @@ void CGUIScrollBar::deserializeAttributes(io::IAttributes* in, io::SAttributeRea setPos(in->getAttributeAsInt("Value")); setSmallStep(in->getAttributeAsInt("SmallStep")); setLargeStep(in->getAttributeAsInt("LargeStep")); + // CurrentIconColor - not serialized as continuiously updated refreshControls(); } diff --git a/source/Irrlicht/CGUIScrollBar.h b/source/Irrlicht/CGUIScrollBar.h index 2e656959..26a4b6f1 100644 --- a/source/Irrlicht/CGUIScrollBar.h +++ b/source/Irrlicht/CGUIScrollBar.h @@ -99,6 +99,7 @@ namespace gui s32 LargeStep; s32 DesiredPos; u32 LastChange; + video::SColor CurrentIconColor; f32 range () const { return (f32) ( Max - Min ); } }; diff --git a/source/Irrlicht/CGUISkin.cpp b/source/Irrlicht/CGUISkin.cpp index 9eb23c6c..395691d6 100644 --- a/source/Irrlicht/CGUISkin.cpp +++ b/source/Irrlicht/CGUISkin.cpp @@ -578,12 +578,12 @@ core::rect CGUISkin::draw3DWindowBackground(IGUIElement* element, //else if ( Type == EGST_BURNING_SKIN ) { - const video::SColor c = titleBarColor.getInterpolated( 0xffffffff, 0.8f); + const video::SColor c = titleBarColor.getInterpolated( video::SColor(titleBarColor.getAlpha(),255,255,255), 0.8f); Driver->draw2DRectangle(rect, titleBarColor, titleBarColor, c, c, clip); } else { - const video::SColor c = titleBarColor.getInterpolated(video::SColor(255,0,0,0), 0.2f); + const video::SColor c = titleBarColor.getInterpolated(video::SColor(titleBarColor.getAlpha(),0,0,0), 0.2f); Driver->draw2DRectangle(rect, titleBarColor, c, titleBarColor, c, clip); } } @@ -909,8 +909,9 @@ void CGUISkin::drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon, if (!SpriteBank) return; + // TODO: we need another state for disabled elements (can't add now because it's an interface change) SpriteBank->draw2DSprite(Icons[icon], position, clip, - video::SColor(255,0,0,0), starttime, currenttime, loop, true); + Colors[EGDC_WINDOW_SYMBOL], starttime, currenttime, loop, true); } diff --git a/source/Irrlicht/CGUISpinBox.cpp b/source/Irrlicht/CGUISpinBox.cpp index 560f9851..e31506ac 100644 --- a/source/Irrlicht/CGUISpinBox.cpp +++ b/source/Irrlicht/CGUISpinBox.cpp @@ -29,6 +29,7 @@ CGUISpinBox::CGUISpinBox(const wchar_t* text, bool border,IGUIEnvironment* envir setDebugName("CGUISpinBox"); #endif + CurrentIconColor = video::SColor(255,255,255,255); s32 ButtonWidth = 16; IGUISpriteBank *sb = 0; if (environment && environment->getSkin()) @@ -52,27 +53,14 @@ CGUISpinBox::CGUISpinBox(const wchar_t* text, bool border,IGUIEnvironment* envir ButtonSpinUp->setSubElement(true); ButtonSpinUp->setTabStop(false); ButtonSpinUp->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_CENTER); - if (sb) - { - IGUISkin *skin = environment->getSkin(); - ButtonSpinDown->setSpriteBank(sb); - ButtonSpinDown->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); - ButtonSpinDown->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); - ButtonSpinUp->setSpriteBank(sb); - ButtonSpinUp->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_SMALL_CURSOR_UP), skin->getColor(EGDC_WINDOW_SYMBOL)); - ButtonSpinUp->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_SMALL_CURSOR_UP), skin->getColor(EGDC_WINDOW_SYMBOL)); - } - else - { - ButtonSpinDown->setText(L"-"); - ButtonSpinUp->setText(L"+"); - } const core::rect rectEdit(0, 0, rectangle.getWidth() - ButtonWidth - 1, rectangle.getHeight()); EditBox = Environment->addEditBox(text, rectEdit, border, this, -1); EditBox->grab(); EditBox->setSubElement(true); EditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + + refreshSprites(); } @@ -87,6 +75,31 @@ CGUISpinBox::~CGUISpinBox() EditBox->drop(); } +void CGUISpinBox::refreshSprites() +{ + IGUISpriteBank *sb = 0; + if (Environment && Environment->getSkin()) + { + sb = Environment->getSkin()->getSpriteBank(); + } + + if (sb) + { + IGUISkin * skin = Environment->getSkin(); + CurrentIconColor = skin->getColor(EGDC_WINDOW_SYMBOL); + ButtonSpinDown->setSpriteBank(sb); + ButtonSpinDown->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), CurrentIconColor); + ButtonSpinDown->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), CurrentIconColor); + ButtonSpinUp->setSpriteBank(sb); + ButtonSpinUp->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_SMALL_CURSOR_UP), CurrentIconColor); + ButtonSpinUp->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_SMALL_CURSOR_UP), CurrentIconColor); + } + else + { + ButtonSpinDown->setText(L"-"); + ButtonSpinUp->setText(L"+"); + } +} IGUIEditBox* CGUISpinBox::getEditBox() const { @@ -235,6 +248,11 @@ bool CGUISpinBox::OnEvent(const SEvent& event) void CGUISpinBox::verifyValueRange() { + // TODO: This should be called in "draw" similar to the way it's done in CGUIWindow. + // But guess I can't in bugfix-release as overloading draw would break binary compitibility. + // So added here to allow users at least to manually force the element to having new skin-colors. + refreshSprites(); + f32 val = getValue(); if ( val+core::ROUNDING_ERROR_f32 < RangeMin ) val = RangeMin; diff --git a/source/Irrlicht/CGUISpinBox.h b/source/Irrlicht/CGUISpinBox.h index c2e328ef..28840167 100644 --- a/source/Irrlicht/CGUISpinBox.h +++ b/source/Irrlicht/CGUISpinBox.h @@ -80,10 +80,12 @@ namespace gui protected: virtual void verifyValueRange(); + void refreshSprites(); IGUIEditBox * EditBox; IGUIButton * ButtonSpinUp; IGUIButton * ButtonSpinDown; + video::SColor CurrentIconColor; f32 StepSize; f32 RangeMin; f32 RangeMax; diff --git a/source/Irrlicht/CGUIStaticText.cpp b/source/Irrlicht/CGUIStaticText.cpp index e0f52a1b..a5e086f7 100644 --- a/source/Irrlicht/CGUIStaticText.cpp +++ b/source/Irrlicht/CGUIStaticText.cpp @@ -23,7 +23,7 @@ CGUIStaticText::CGUIStaticText(const wchar_t* text, bool border, bool background) : IGUIStaticText(environment, parent, id, rectangle), HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_UPPERLEFT), - Border(border), OverrideColorEnabled(false), WordWrap(false), Background(background), + Border(border), OverrideColorEnabled(false), OverrideBGColorEnabled(false), WordWrap(false), Background(background), OverrideColor(video::SColor(101,255,255,255)), BGColor(video::SColor(101,210,210,210)), OverrideFont(0), LastBreakFont(0) { @@ -64,6 +64,9 @@ void CGUIStaticText::draw() if (Background) { + if ( !OverrideBGColorEnabled ) // skin-colors can change + BGColor = skin->getColor(gui::EGDC_3D_FACE); + driver->draw2DRectangle(BGColor, frameRect, &AbsoluteClippingRect); } @@ -177,6 +180,7 @@ void CGUIStaticText::setOverrideColor(video::SColor color) void CGUIStaticText::setBackgroundColor(video::SColor color) { BGColor = color; + OverrideBGColorEnabled = true; Background = true; } @@ -425,9 +429,11 @@ void CGUIStaticText::serializeAttributes(io::IAttributes* out, io::SAttributeRea out->addBool ("Border", Border); out->addBool ("OverrideColorEnabled",OverrideColorEnabled); - out->addBool ("WordWrap", WordWrap); + out->addBool ("OverrideBGColorEnabled",OverrideBGColorEnabled); + out->addBool ("WordWrap", WordWrap); out->addBool ("Background", Background); out->addColor ("OverrideColor", OverrideColor); + out->addColor ("BGColor", BGColor); out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); @@ -441,11 +447,12 @@ void CGUIStaticText::deserializeAttributes(io::IAttributes* in, io::SAttributeRe IGUIStaticText::deserializeAttributes(in,options); Border = in->getAttributeAsBool("Border"); - OverrideColor = in->getAttributeAsColor("OverrideColor"); - enableOverrideColor(in->getAttributeAsBool("OverrideColorEnabled")); + OverrideBGColorEnabled = in->getAttributeAsBool("OverrideBGColorEnabled"); setWordWrap(in->getAttributeAsBool("WordWrap")); Background = in->getAttributeAsBool("Background"); + OverrideColor = in->getAttributeAsColor("OverrideColor"); + BGColor = in->getAttributeAsColor("BGColor"); setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames), (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames)); diff --git a/source/Irrlicht/CGUIStaticText.h b/source/Irrlicht/CGUIStaticText.h index ec37fa29..b2cd8ef5 100644 --- a/source/Irrlicht/CGUIStaticText.h +++ b/source/Irrlicht/CGUIStaticText.h @@ -94,6 +94,7 @@ namespace gui EGUI_ALIGNMENT HAlign, VAlign; bool Border; bool OverrideColorEnabled; + bool OverrideBGColorEnabled; bool WordWrap; bool Background; diff --git a/source/Irrlicht/CGUITabControl.cpp b/source/Irrlicht/CGUITabControl.cpp index f29fddce..380cbb61 100644 --- a/source/Irrlicht/CGUITabControl.cpp +++ b/source/Irrlicht/CGUITabControl.cpp @@ -27,7 +27,7 @@ CGUITab::CGUITab(s32 number, IGUIEnvironment* environment, IGUIElement* parent, const core::rect& rectangle, s32 id) : IGUITab(environment, parent, id, rectangle), Number(number), - BackColor(0,0,0,0), TextColor(255,0,0,0), + BackColor(0,0,0,0), OverrideTextColorEnabled(false), TextColor(255,0,0,0), DrawBackground(false) { #ifdef _DEBUG @@ -54,6 +54,13 @@ void CGUITab::setNumber(s32 n) Number = n; } +void CGUITab::refreshSkinColors() +{ + if ( !OverrideTextColorEnabled ) + { + TextColor = Environment->getSkin()->getColor(EGDC_BUTTON_TEXT); + } +} //! draws the element and its children void CGUITab::draw() @@ -87,6 +94,7 @@ void CGUITab::setBackgroundColor(video::SColor c) //! sets the color of the text void CGUITab::setTextColor(video::SColor c) { + OverrideTextColorEnabled = true; TextColor = c; } @@ -120,6 +128,7 @@ void CGUITab::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteO out->addInt ("TabNumber", Number); out->addBool ("DrawBackground", DrawBackground); out->addColor ("BackColor", BackColor); + out->addBool ("OverrideTextColorEnabled", OverrideTextColorEnabled); out->addColor ("TextColor", TextColor); } @@ -133,7 +142,12 @@ void CGUITab::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWrite setNumber(in->getAttributeAsInt("TabNumber")); setDrawBackground(in->getAttributeAsBool("DrawBackground")); setBackgroundColor(in->getAttributeAsColor("BackColor")); + bool override = in->getAttributeAsBool("OverrideTextColorEnabled"); setTextColor(in->getAttributeAsColor("TextColor")); + if ( !override ) + { + OverrideTextColorEnabled = false; + } if (Parent && Parent->getType() == EGUIET_TAB_CONTROL) { @@ -395,18 +409,18 @@ s32 CGUITabControl::calcTabWidth(s32 pos, IGUIFont* font, const wchar_t* text, b { if ( !font ) return 0; - + s32 len = font->getDimension(text).Width + TabExtraWidth; if ( TabMaxWidth > 0 && len > TabMaxWidth ) len = TabMaxWidth; - + // check if we miss the place to draw the tab-button if ( withScrollControl && ScrollControl && pos+len > UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 ) { s32 tabMinWidth = font->getDimension(L"A").Width; if ( TabExtraWidth > 0 && TabExtraWidth > tabMinWidth ) tabMinWidth = TabExtraWidth; - + if ( ScrollControl && pos+tabMinWidth <= UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 ) { len = UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 - pos; @@ -499,7 +513,7 @@ bool CGUITabControl::selectTab(core::position2d p) s32 len = calcTabWidth(pos, font, text, true); if ( ScrollControl && pos+len > UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 ) return false; - + frameRect.UpperLeftCorner.X = pos; frameRect.LowerRightCorner.X = frameRect.UpperLeftCorner.X + len; @@ -552,7 +566,7 @@ void CGUITabControl::draw() bool needLeftScroll = CurrentScrollTabIndex > 0; bool needRightScroll = false; - + // left and right pos of the active tab s32 left = 0; s32 right = 0; @@ -581,6 +595,9 @@ void CGUITabControl::draw() pos += len; + if ( text ) + Tabs[i]->refreshSkinColors(); + if ((s32)i == ActiveTab) { left = frameRect.UpperLeftCorner.X; @@ -669,7 +686,7 @@ void CGUITabControl::draw() } skin->draw3DTabBody(this, Border, FillBackground, AbsoluteRect, &AbsoluteClippingRect, TabHeight, VerticalAlignment); - + // enable scrollcontrols on need if ( UpButton ) UpButton->setEnabled(needLeftScroll); @@ -704,7 +721,7 @@ void CGUITabControl::setTabMaxWidth(s32 width ) { TabMaxWidth = width; } - + //! get the maximal width of a tab s32 CGUITabControl::getTabMaxWidth() const { diff --git a/source/Irrlicht/CGUITabControl.h b/source/Irrlicht/CGUITabControl.h index 2fe95382..78c1845f 100644 --- a/source/Irrlicht/CGUITabControl.h +++ b/source/Irrlicht/CGUITabControl.h @@ -65,11 +65,14 @@ namespace gui //! Reads attributes of the element virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + //! only for internal use by CGUITabControl + void refreshSkinColors(); private: s32 Number; video::SColor BackColor; + bool OverrideTextColorEnabled; video::SColor TextColor; bool DrawBackground; }; @@ -125,16 +128,16 @@ namespace gui //! Reads attributes of the element virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); - + //! Get the height of the tabs virtual s32 getTabHeight() const; //! set the maximal width of a tab. Per default width is 0 which means "no width restriction". virtual void setTabMaxWidth(s32 width ); - + //! get the maximal width of a tab virtual s32 getTabMaxWidth() const; - + //! Set the alignment of the tabs //! note: EGUIA_CENTER is not an option virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ); diff --git a/source/Irrlicht/CGUITable.cpp b/source/Irrlicht/CGUITable.cpp index 30f6be96..f24da7ca 100644 --- a/source/Irrlicht/CGUITable.cpp +++ b/source/Irrlicht/CGUITable.cpp @@ -78,12 +78,6 @@ void CGUITable::addColumn(const wchar_t* caption, s32 columnIndex) tabHeader.Width = Font->getDimension(caption).Width + (CellWidthPadding * 2) + ARROW_PAD; tabHeader.OrderingMode = EGCO_NONE; - IGUISkin* skin = Environment->getSkin(); - if (skin) - { - tabHeader.TextColor = skin->getColor(EGDC_BUTTON_TEXT); - } - if ( columnIndex < 0 || columnIndex >= (s32)Columns.size() ) { Columns.push_back(tabHeader); @@ -166,6 +160,7 @@ bool CGUITable::setActiveColumn(s32 idx, bool doOrder ) SEvent event; event.EventType = EET_GUI_EVENT; event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; event.GUIEvent.EventType = EGET_TABLE_HEADER_CHANGED; Parent->OnEvent(event); } @@ -195,6 +190,7 @@ bool CGUITable::setActiveColumn(s32 idx, bool doOrder ) SEvent event; event.EventType = EET_GUI_EVENT; event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; event.GUIEvent.EventType = EGET_TABLE_HEADER_CHANGED; Parent->OnEvent(event); } @@ -306,6 +302,7 @@ void CGUITable::setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& Rows[rowIndex].Items[columnIndex].Text = text; breakText( Rows[rowIndex].Items[columnIndex].Text, Rows[rowIndex].Items[columnIndex].BrokenText, Columns[columnIndex].Width ); Rows[rowIndex].Items[columnIndex].Color = color; + Rows[rowIndex].Items[columnIndex].IsOverrideColor = true; } } @@ -315,6 +312,7 @@ void CGUITable::setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) if ( rowIndex < Rows.size() && columnIndex < Columns.size() ) { Rows[rowIndex].Items[columnIndex].Color = color; + Rows[rowIndex].Items[columnIndex].IsOverrideColor = true; } } @@ -852,6 +850,7 @@ void CGUITable::selectNew(s32 ypos, bool onlyHover) SEvent event; event.EventType = EET_GUI_EVENT; event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; event.GUIEvent.EventType = (Selected != oldSelected) ? EGET_TABLE_CHANGED : EGET_TABLE_SELECTED_AGAIN; Parent->OnEvent(event); } @@ -950,6 +949,8 @@ void CGUITable::draw() } else { + if ( !Rows[i].Items[j].IsOverrideColor ) // skin-colors can change + Rows[i].Items[j].Color = skin->getColor(EGDC_BUTTON_TEXT); font->draw(Rows[i].Items[j].BrokenText.c_str(), textRect, IsEnabled ? Rows[i].Items[j].Color : skin->getColor(EGDC_GRAY_TEXT), false, true, &clientClip); } @@ -1092,8 +1093,6 @@ void CGUITable::serializeAttributes(io::IAttributes* out, io::SAttributeReadWrit label = "Column"; label += i; label += "name"; out->addString(label.c_str(), Columns[i].Name.c_str() ); - label = "Column"; label += i; label += "color"; - out->addColor(label.c_str(), Columns[i].TextColor ); label = "Column"; label += i; label += "width"; out->addInt(label.c_str(), Columns[i].Width ); label = "Column"; label += i; label += "OrderingMode"; @@ -1119,6 +1118,8 @@ void CGUITable::serializeAttributes(io::IAttributes* out, io::SAttributeReadWrit // core::stringw BrokenText; // can be recalculated label = "Row"; label += i; label += "cell"; label += c; label += "color"; out->addColor(label.c_str(), Rows[i].Items[c].Color ); + label = "Row"; label += i; label += "cell"; label += c; label += "IsOverrideColor"; + out->addColor(label.c_str(), Rows[i].Items[c].IsOverrideColor ); // void *data; // can't be serialized } } @@ -1162,8 +1163,6 @@ void CGUITable::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri label = "Column"; label += i; label += "name"; column.Name = core::stringw(in->getAttributeAsString(label.c_str()).c_str()); - label = "Column"; label += i; label += "color"; - column.TextColor = in->getAttributeAsColor(label.c_str()); label = "Column"; label += i; label += "width"; column.Width = in->getAttributeAsInt(label.c_str()); label = "Column"; label += i; label += "OrderingMode"; @@ -1202,6 +1201,9 @@ void CGUITable::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri breakText( cell.Text, cell.BrokenText, Columns[c].Width ); label = "Row"; label += i; label += "cell"; label += c; label += "color"; cell.Color = in->getAttributeAsColor(label.c_str()); + label = "Row"; label += i; label += "cell"; label += c; label += "IsOverrideColor"; + cell.IsOverrideColor = in->getAttributeAsBool(label.c_str()); + cell.Data = NULL; Rows[Rows.size()-1].Items.push_back(cell); diff --git a/source/Irrlicht/CGUITable.h b/source/Irrlicht/CGUITable.h index 361f4124..c31ebd4c 100644 --- a/source/Irrlicht/CGUITable.h +++ b/source/Irrlicht/CGUITable.h @@ -158,9 +158,10 @@ namespace gui struct Cell { - Cell() : Data(0) {} + Cell() : IsOverrideColor(false), Data(0) {} core::stringw Text; core::stringw BrokenText; + bool IsOverrideColor; video::SColor Color; void *Data; }; @@ -175,7 +176,6 @@ namespace gui { Column() : Width(0), OrderingMode(EGCO_NONE) {} core::stringw Name; - video::SColor TextColor; u32 Width; EGUI_COLUMN_ORDERING OrderingMode; }; diff --git a/source/Irrlicht/CGUITreeView.cpp b/source/Irrlicht/CGUITreeView.cpp index fe41ae10..121510f4 100644 --- a/source/Irrlicht/CGUITreeView.cpp +++ b/source/Irrlicht/CGUITreeView.cpp @@ -34,7 +34,7 @@ CGUITreeViewNode::~CGUITreeViewNode() setSelected( false ); } - clearChilds(); + clearChildren(); if( Data2 ) { @@ -62,15 +62,15 @@ void CGUITreeViewNode::setIcon( const wchar_t* icon ) Icon = icon; } -void CGUITreeViewNode::clearChilds() +void CGUITreeViewNode::clearChildren() { core::list::Iterator it; - for( it = Childs.begin(); it != Childs.end(); it++ ) + for( it = Children.begin(); it != Children.end(); it++ ) { ( *it )->drop(); } - Childs.clear(); + Children.clear(); } IGUITreeViewNode* CGUITreeViewNode::addChildBack( @@ -83,7 +83,7 @@ IGUITreeViewNode* CGUITreeViewNode::addChildBack( { CGUITreeViewNode* newChild = new CGUITreeViewNode( Owner, this ); - Childs.push_back( newChild ); + Children.push_back( newChild ); newChild->Text = text; newChild->Icon = icon; newChild->ImageIndex = imageIndex; @@ -107,7 +107,7 @@ IGUITreeViewNode* CGUITreeViewNode::addChildFront( { CGUITreeViewNode* newChild = new CGUITreeViewNode( Owner, this ); - Childs.push_front( newChild ); + Children.push_front( newChild ); newChild->Text = text; newChild->Icon = icon; newChild->ImageIndex = imageIndex; @@ -133,7 +133,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildAfter( core::list::Iterator itOther; CGUITreeViewNode* newChild = 0; - for( itOther = Childs.begin(); itOther != Childs.end(); itOther++ ) + for( itOther = Children.begin(); itOther != Children.end(); itOther++ ) { if( other == *itOther ) { @@ -148,7 +148,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildAfter( { data2->grab(); } - Childs.insert_after( itOther, newChild ); + Children.insert_after( itOther, newChild ); break; } } @@ -167,7 +167,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildBefore( core::list::Iterator itOther; CGUITreeViewNode* newChild = 0; - for( itOther = Childs.begin(); itOther != Childs.end(); itOther++ ) + for( itOther = Children.begin(); itOther != Children.end(); itOther++ ) { if( other == *itOther ) { @@ -182,7 +182,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildBefore( { data2->grab(); } - Childs.insert_before( itOther, newChild ); + Children.insert_before( itOther, newChild ); break; } } @@ -191,25 +191,25 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildBefore( IGUITreeViewNode* CGUITreeViewNode::getFirstChild() const { - if( Childs.empty() ) + if( Children.empty() ) { return 0; } else { - return *( Childs.begin() ); + return *( Children.begin() ); } } IGUITreeViewNode* CGUITreeViewNode::getLastChild() const { - if( Childs.empty() ) + if( Children.empty() ) { return 0; } else { - return *( Childs.getLast() ); + return *( Children.getLast() ); } } @@ -221,11 +221,11 @@ IGUITreeViewNode* CGUITreeViewNode::getPrevSibling() const if( Parent ) { - for( itThis = Parent->Childs.begin(); itThis != Parent->Childs.end(); itThis++ ) + for( itThis = Parent->Children.begin(); itThis != Parent->Children.end(); itThis++ ) { if( this == *itThis ) { - if( itThis != Parent->Childs.begin() ) + if( itThis != Parent->Children.begin() ) { other = *itOther; } @@ -244,11 +244,11 @@ IGUITreeViewNode* CGUITreeViewNode::getNextSibling() const if( Parent ) { - for( itThis = Parent->Childs.begin(); itThis != Parent->Childs.end(); itThis++ ) + for( itThis = Parent->Children.begin(); itThis != Parent->Children.end(); itThis++ ) { if( this == *itThis ) { - if( itThis != Parent->Childs.getLast() ) + if( itThis != Parent->Children.getLast() ) { other = *( ++itThis ); } @@ -266,7 +266,7 @@ IGUITreeViewNode* CGUITreeViewNode::getNextVisible() const node = const_cast( this ); - if( node->getExpanded() && node->hasChilds() ) + if( node->getExpanded() && node->hasChildren() ) { next = node->getFirstChild(); } @@ -291,12 +291,12 @@ bool CGUITreeViewNode::deleteChild( IGUITreeViewNode* child ) core::list::Iterator itChild; bool deleted = false; - for( itChild = Childs.begin(); itChild != Childs.end(); itChild++ ) + for( itChild = Children.begin(); itChild != Children.end(); itChild++ ) { if( child == *itChild ) { child->drop(); - Childs.erase( itChild ); + Children.erase( itChild ); deleted = true; break; } @@ -311,11 +311,11 @@ bool CGUITreeViewNode::moveChildUp( IGUITreeViewNode* child ) CGUITreeViewNode* nodeTmp; bool moved = false; - for( itChild = Childs.begin(); itChild != Childs.end(); itChild++ ) + for( itChild = Children.begin(); itChild != Children.end(); itChild++ ) { if( child == *itChild ) { - if( itChild != Childs.begin() ) + if( itChild != Children.begin() ) { nodeTmp = *itChild; *itChild = *itOther; @@ -336,11 +336,11 @@ bool CGUITreeViewNode::moveChildDown( IGUITreeViewNode* child ) CGUITreeViewNode* nodeTmp; bool moved = false; - for( itChild = Childs.begin(); itChild != Childs.end(); itChild++ ) + for( itChild = Children.begin(); itChild != Children.end(); itChild++ ) { if( child == *itChild ) { - if( itChild != Childs.getLast() ) + if( itChild != Children.getLast() ) { itOther = itChild; ++itOther; @@ -699,6 +699,7 @@ void CGUITreeView::mouseAction( s32 xpos, s32 ypos, bool onlyHover /*= false*/ ) event.EventType = EET_GUI_EVENT; event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; xpos -= AbsoluteRect.UpperLeftCorner.X; ypos -= AbsoluteRect.UpperLeftCorner.Y; @@ -731,7 +732,7 @@ void CGUITreeView::mouseAction( s32 xpos, s32 ypos, bool onlyHover /*= false*/ ) if( hitNode && !onlyHover && xpos < hitNode->getLevel() * IndentWidth && xpos > ( hitNode->getLevel() - 1 ) * IndentWidth - && hitNode->hasChilds() ) + && hitNode->hasChildren() ) { hitNode->setExpanded( !hitNode->getExpanded() ); @@ -873,7 +874,7 @@ void CGUITreeView::draw() driver->draw2DRectangle( skin->getColor( EGDC_HIGH_LIGHT ), frameRect, &clientClip ); } - if( node->hasChilds() ) + if( node->hasChildren() ) { core::rect rc; core::rect expanderRect; @@ -984,7 +985,7 @@ void CGUITreeView::draw() // horizontal line rc.UpperLeftCorner.X = frameRect.UpperLeftCorner.X - IndentWidth - ( IndentWidth >> 1 ) - 1; rc.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y + ( ( frameRect.getHeight() ) >> 1 ); - if( node->hasChilds() ) + if( node->hasChildren() ) { rc.LowerRightCorner.X = frameRect.UpperLeftCorner.X - IndentWidth; } diff --git a/source/Irrlicht/CGUITreeView.h b/source/Irrlicht/CGUITreeView.h index 782d0431..36b0280d 100644 --- a/source/Irrlicht/CGUITreeView.h +++ b/source/Irrlicht/CGUITreeView.h @@ -21,62 +21,62 @@ namespace gui class CGUITreeViewNode : public IGUITreeViewNode { friend class CGUITreeView; - + public: //! constructor CGUITreeViewNode( CGUITreeView* owner, CGUITreeViewNode* parent ); - + //! destructor ~CGUITreeViewNode(); - + //! returns the owner (tree view) of this node virtual IGUITreeView* getOwner() const; - - //! Returns the parent node of this node. + + //! Returns the parent node of this node. virtual IGUITreeViewNode* getParent() const; - + //! returns the text of the node virtual const wchar_t* getText() const { return Text.c_str(); } - + //! sets the text of the node virtual void setText( const wchar_t* text ); - - //! returns the icon text of the node + + //! returns the icon text of the node virtual const wchar_t* getIcon() const { return Icon.c_str(); } - + //! sets the icon text of the node virtual void setIcon( const wchar_t* icon ); - - //! returns the image index of the node + + //! returns the image index of the node virtual u32 getImageIndex() const { return ImageIndex; } - + //! sets the image index of the node virtual void setImageIndex( u32 imageIndex ) { ImageIndex = imageIndex; } - - //! returns the image index of the node + + //! returns the image index of the node virtual u32 getSelectedImageIndex() const { return SelectedImageIndex; } - + //! sets the image index of the node virtual void setSelectedImageIndex( u32 imageIndex ) { SelectedImageIndex = imageIndex; } - + //! returns the user data (void*) of this node virtual void* getData() const { return Data; } - + //! sets the user data (void*) of this node virtual void setData( void* data ) { Data = data; } - + //! returns the user data2 (IReferenceCounted) of this node virtual IReferenceCounted* getData2() const { return Data2; } - + //! sets the user data2 (IReferenceCounted) of this node virtual void setData2( IReferenceCounted* data ) { @@ -90,18 +90,18 @@ namespace gui Data2->grab(); } } - + //! returns the child item count virtual u32 getChildCount() const - { return Childs.getSize(); } - - //! removes all childs (recursive) from this node - virtual void clearChilds(); + { return Children.getSize(); } + + //! removes all children (recursive) from this node + virtual void clearChildren(); //! returns true if this node has child nodes - virtual bool hasChilds() const - { return !Childs.empty(); } - + virtual bool hasChildren() const + { return !Children.empty(); } + //! Adds a new node behind the last child node. //! \param text text of the new node //! \param icon icon text of the new node @@ -111,9 +111,9 @@ namespace gui //! \param data2 user data2 (IReferenceCounted*) of the new node //! \return //! returns the new node - virtual IGUITreeViewNode* addChildBack( - const wchar_t* text, - const wchar_t* icon = 0, + virtual IGUITreeViewNode* addChildBack( + const wchar_t* text, + const wchar_t* icon = 0, s32 imageIndex = -1, s32 selectedImageIndex = -1, void* data = 0, @@ -128,15 +128,15 @@ namespace gui //! \param data2 user data2 (IReferenceCounted*) of the new node //! \return //! returns the new node - virtual IGUITreeViewNode* addChildFront( - const wchar_t* text, - const wchar_t* icon = 0, + virtual IGUITreeViewNode* addChildFront( + const wchar_t* text, + const wchar_t* icon = 0, s32 imageIndex = -1, s32 selectedImageIndex = -1, void* data = 0, IReferenceCounted* data2 = 0 ); - //! Adds a new node behind the other node. + //! Adds a new node behind the other node. //! The other node has also te be a child node from this node. //! \param text text of the new node //! \param icon icon text of the new node @@ -146,16 +146,16 @@ namespace gui //! \param data2 user data2 (IReferenceCounted*) of the new node //! \return //! returns the new node or 0 if other is no child node from this - virtual IGUITreeViewNode* insertChildAfter( - IGUITreeViewNode* other, - const wchar_t* text, - const wchar_t* icon = 0, + virtual IGUITreeViewNode* insertChildAfter( + IGUITreeViewNode* other, + const wchar_t* text, + const wchar_t* icon = 0, s32 imageIndex = -1, s32 selectedImageIndex = -1, void* data = 0, IReferenceCounted* data2 = 0 ); - //! Adds a new node before the other node. + //! Adds a new node before the other node. //! The other node has also te be a child node from this node. //! \param text text of the new node //! \param icon icon text of the new node @@ -165,10 +165,10 @@ namespace gui //! \param data2 user data2 (IReferenceCounted*) of the new node //! \return //! returns the new node or 0 if other is no child node from this - virtual IGUITreeViewNode* insertChildBefore( - IGUITreeViewNode* other, - const wchar_t* text, - const wchar_t* icon = 0, + virtual IGUITreeViewNode* insertChildBefore( + IGUITreeViewNode* other, + const wchar_t* text, + const wchar_t* icon = 0, s32 imageIndex = -1, s32 selectedImageIndex = -1, void* data = 0, @@ -197,31 +197,31 @@ namespace gui //! Moves a child node one position down. virtual bool moveChildDown( IGUITreeViewNode* child ); - - //! Returns true if the node is expanded (childs are visible). + + //! Returns true if the node is expanded (children are visible). virtual bool getExpanded() const { return Expanded; } - + //! Sets if the node is expanded. virtual void setExpanded( bool expanded ); - + //! Returns true if the node is currently selected. virtual bool getSelected() const; - + //! Sets this node as selected. virtual void setSelected( bool selected ); - + //! Returns true if this node is the root node. virtual bool isRoot() const; - + //! Returns the level of this node. virtual s32 getLevel() const; - + //! Returns true if this node is visible (all parents are expanded). virtual bool isVisible() const; private: - + CGUITreeView* Owner; CGUITreeViewNode* Parent; core::stringw Text; @@ -231,7 +231,7 @@ namespace gui void* Data; IReferenceCounted* Data2; bool Expanded; - core::list Childs; + core::list Children; }; @@ -239,10 +239,10 @@ namespace gui class CGUITreeView : public IGUITreeView { friend class CGUITreeViewNode; - + public: //! constructor - CGUITreeView( IGUIEnvironment* environment, IGUIElement* parent, + CGUITreeView( IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle, bool clip = true, bool drawBack = false, bool scrollBarVertical = true, bool scrollBarHorizontal = true ); @@ -280,15 +280,15 @@ namespace gui //! Sets the image list which should be used for the image and selected image of every node. //! The default is 0 (no images). virtual void setImageList( IGUIImageList* imageList ); - + //! Returns the image list which is used for the nodes. virtual IGUIImageList* getImageList() const { return ImageList; } - + //! Sets if the image is left of the icon. Default is true. virtual void setImageLeftOfIcon( bool bLeftOf ) { ImageLeftOfIcon = bLeftOf; } - + //! Returns if the Image is left of the icon. Default is true. virtual bool getImageLeftOfIcon() const { return ImageLeftOfIcon; } @@ -300,7 +300,7 @@ namespace gui private: //! calculates the heigth of an node and of all visible nodes. void recalculateItemHeight(); - + //! executes an mouse action (like selectNew of CGUIListBox) void mouseAction( s32 xpos, s32 ypos, bool onlyHover = false ); diff --git a/source/Irrlicht/CGUIWindow.cpp b/source/Irrlicht/CGUIWindow.cpp index 4b7801e5..5391f9c1 100644 --- a/source/Irrlicht/CGUIWindow.cpp +++ b/source/Irrlicht/CGUIWindow.cpp @@ -29,15 +29,12 @@ CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id if (environment) skin = environment->getSkin(); - IGUISpriteBank* sprites = 0; - video::SColor color(255,255,255,255); + CurrentIconColor = video::SColor(255,255,255,255); s32 buttonw = 15; if (skin) { buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); - sprites = skin->getSpriteBank(); - color = skin->getColor(EGDC_WINDOW_SYMBOL); } s32 posx = RelativeRect.getWidth() - buttonw - 4; @@ -46,12 +43,6 @@ CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id CloseButton->setSubElement(true); CloseButton->setTabStop(false); CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); - if (sprites) - { - CloseButton->setSpriteBank(sprites); - CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color); - CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), color); - } posx -= buttonw + 2; RestoreButton = Environment->addButton(core::rect(posx, 3, posx + buttonw, 3 + buttonw), this, -1, @@ -60,12 +51,6 @@ CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id RestoreButton->setSubElement(true); RestoreButton->setTabStop(false); RestoreButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); - if (sprites) - { - RestoreButton->setSpriteBank(sprites); - RestoreButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESTORE), color); - RestoreButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESTORE), color); - } posx -= buttonw + 2; MinButton = Environment->addButton(core::rect(posx, 3, posx + buttonw, 3 + buttonw), this, -1, @@ -74,12 +59,6 @@ CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id MinButton->setSubElement(true); MinButton->setTabStop(false); MinButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); - if (sprites) - { - MinButton->setSpriteBank(sprites); - MinButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_MINIMIZE), color); - MinButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_MINIMIZE), color); - } MinButton->grab(); RestoreButton->grab(); @@ -90,6 +69,7 @@ CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id setTabStop(true); setTabOrder(-1); + refreshSprites(); updateClientRect(); } @@ -107,6 +87,35 @@ CGUIWindow::~CGUIWindow() CloseButton->drop(); } +void CGUIWindow::refreshSprites() +{ + if (!Environment) + return; + IGUISkin* skin = Environment->getSkin(); + if ( !skin ) + return; + + IGUISpriteBank* sprites = skin->getSpriteBank(); + if ( !sprites ) + return; + + CurrentIconColor = skin->getColor(EGDC_WINDOW_SYMBOL); + + if (sprites) + { + CloseButton->setSpriteBank(sprites); + CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), CurrentIconColor); + CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), CurrentIconColor); + + RestoreButton->setSpriteBank(sprites); + RestoreButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESTORE), CurrentIconColor); + RestoreButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESTORE), CurrentIconColor); + + MinButton->setSpriteBank(sprites); + MinButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_MINIMIZE), CurrentIconColor); + MinButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_MINIMIZE), CurrentIconColor); + } +} //! called if an event happened. bool CGUIWindow::OnEvent(const SEvent& event) @@ -223,9 +232,13 @@ void CGUIWindow::draw() { IGUISkin* skin = Environment->getSkin(); + // update each time because the skin is allowed to change this always. updateClientRect(); + if ( CurrentIconColor != skin->getColor(EGDC_WINDOW_SYMBOL) ) + refreshSprites(); + core::rect rect = AbsoluteRect; // draw body fast diff --git a/source/Irrlicht/CGUIWindow.h b/source/Irrlicht/CGUIWindow.h index 0d6a8755..009a7fd8 100644 --- a/source/Irrlicht/CGUIWindow.h +++ b/source/Irrlicht/CGUIWindow.h @@ -75,11 +75,13 @@ namespace gui protected: void updateClientRect(); + void refreshSprites(); IGUIButton* CloseButton; IGUIButton* MinButton; IGUIButton* RestoreButton; core::rect ClientRect; + video::SColor CurrentIconColor; core::position2d DragStart; bool Dragging, IsDraggable; diff --git a/source/Irrlicht/CImageLoaderDDS.cpp b/source/Irrlicht/CImageLoaderDDS.cpp new file mode 100644 index 00000000..eb0de066 --- /dev/null +++ b/source/Irrlicht/CImageLoaderDDS.cpp @@ -0,0 +1,741 @@ +// Copyright (C) 2002-2009 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +/* + Based on Code from Copyright (c) 2003 Randy Reddig + Based on code from Nvidia's DDS example: + http://www.nvidia.com/object/dxtc_decompression_code.html + + mainly c to cpp +*/ + + +#include "CImageLoaderDDS.h" + +#ifdef _IRR_COMPILE_WITH_DDS_LOADER_ + +#include "IReadFile.h" +#include "os.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "irrString.h" + + +namespace irr +{ + +namespace video +{ + +/*! + DDSDecodePixelFormat() + determines which pixel format the dds texture is in +*/ +void DDSDecodePixelFormat( ddsBuffer *dds, eDDSPixelFormat *pf ) +{ + u32 fourCC; + + + /* dummy check */ + if( dds == NULL || pf == NULL ) + return; + + /* extract fourCC */ + fourCC = dds->pixelFormat.fourCC; + + /* test it */ + if( fourCC == 0 ) + *pf = DDS_PF_ARGB8888; + else if( fourCC == *((u32*) "DXT1") ) + *pf = DDS_PF_DXT1; + else if( fourCC == *((u32*) "DXT2") ) + *pf = DDS_PF_DXT2; + else if( fourCC == *((u32*) "DXT3") ) + *pf = DDS_PF_DXT3; + else if( fourCC == *((u32*) "DXT4") ) + *pf = DDS_PF_DXT4; + else if( fourCC == *((u32*) "DXT5") ) + *pf = DDS_PF_DXT5; + else + *pf = DDS_PF_UNKNOWN; +} + + + +/*! +DDSGetInfo() +extracts relevant info from a dds texture, returns 0 on success +*/ +s32 DDSGetInfo( ddsBuffer *dds, s32 *width, s32 *height, eDDSPixelFormat *pf ) +{ + /* dummy test */ + if( dds == NULL ) + return -1; + + /* test dds header */ + if( *((s32*) dds->magic) != *((s32*) "DDS ") ) + return -1; + if( DDSLittleLong( dds->size ) != 124 ) + return -1; + + /* extract width and height */ + if( width != NULL ) + *width = DDSLittleLong( dds->width ); + if( height != NULL ) + *height = DDSLittleLong( dds->height ); + + /* get pixel format */ + DDSDecodePixelFormat( dds, pf ); + + /* return ok */ + return 0; +} + + + +/*! + DDSGetColorBlockColors() + extracts colors from a dds color block +*/ +void DDSGetColorBlockColors( ddsColorBlock *block, ddsColor colors[ 4 ] ) +{ + u16 word; + + + /* color 0 */ + word = DDSLittleShort( block->colors[ 0 ] ); + colors[ 0 ].a = 0xff; + + /* extract rgb bits */ + colors[ 0 ].b = (u8) word; + colors[ 0 ].b <<= 3; + colors[ 0 ].b |= (colors[ 0 ].b >> 5); + word >>= 5; + colors[ 0 ].g = (u8) word; + colors[ 0 ].g <<= 2; + colors[ 0 ].g |= (colors[ 0 ].g >> 5); + word >>= 6; + colors[ 0 ].r = (u8) word; + colors[ 0 ].r <<= 3; + colors[ 0 ].r |= (colors[ 0 ].r >> 5); + + /* same for color 1 */ + word = DDSLittleShort( block->colors[ 1 ] ); + colors[ 1 ].a = 0xff; + + /* extract rgb bits */ + colors[ 1 ].b = (u8) word; + colors[ 1 ].b <<= 3; + colors[ 1 ].b |= (colors[ 1 ].b >> 5); + word >>= 5; + colors[ 1 ].g = (u8) word; + colors[ 1 ].g <<= 2; + colors[ 1 ].g |= (colors[ 1 ].g >> 5); + word >>= 6; + colors[ 1 ].r = (u8) word; + colors[ 1 ].r <<= 3; + colors[ 1 ].r |= (colors[ 1 ].r >> 5); + + /* use this for all but the super-freak math method */ + if( block->colors[ 0 ] > block->colors[ 1 ] ) + { + /* four-color block: derive the other two colors. + 00 = color 0, 01 = color 1, 10 = color 2, 11 = color 3 + these two bit codes correspond to the 2-bit fields + stored in the 64-bit block. */ + + word = ((u16) colors[ 0 ].r * 2 + (u16) colors[ 1 ].r ) / 3; + /* no +1 for rounding */ + /* as bits have been shifted to 888 */ + colors[ 2 ].r = (u8) word; + word = ((u16) colors[ 0 ].g * 2 + (u16) colors[ 1 ].g) / 3; + colors[ 2 ].g = (u8) word; + word = ((u16) colors[ 0 ].b * 2 + (u16) colors[ 1 ].b) / 3; + colors[ 2 ].b = (u8) word; + colors[ 2 ].a = 0xff; + + word = ((u16) colors[ 0 ].r + (u16) colors[ 1 ].r * 2) / 3; + colors[ 3 ].r = (u8) word; + word = ((u16) colors[ 0 ].g + (u16) colors[ 1 ].g * 2) / 3; + colors[ 3 ].g = (u8) word; + word = ((u16) colors[ 0 ].b + (u16) colors[ 1 ].b * 2) / 3; + colors[ 3 ].b = (u8) word; + colors[ 3 ].a = 0xff; + } + else + { + /* three-color block: derive the other color. + 00 = color 0, 01 = color 1, 10 = color 2, + 11 = transparent. + These two bit codes correspond to the 2-bit fields + stored in the 64-bit block */ + + word = ((u16) colors[ 0 ].r + (u16) colors[ 1 ].r) / 2; + colors[ 2 ].r = (u8) word; + word = ((u16) colors[ 0 ].g + (u16) colors[ 1 ].g) / 2; + colors[ 2 ].g = (u8) word; + word = ((u16) colors[ 0 ].b + (u16) colors[ 1 ].b) / 2; + colors[ 2 ].b = (u8) word; + colors[ 2 ].a = 0xff; + + /* random color to indicate alpha */ + colors[ 3 ].r = 0x00; + colors[ 3 ].g = 0xff; + colors[ 3 ].b = 0xff; + colors[ 3 ].a = 0x00; + } +} + + + +/* +DDSDecodeColorBlock() +decodes a dds color block +fixme: make endian-safe +*/ + +static void DDSDecodeColorBlock( u32 *pixel, ddsColorBlock *block, s32 width, u32 colors[ 4 ] ) +{ + s32 r, n; + u32 bits; + u32 masks[] = { 3, 12, 3 << 4, 3 << 6 }; /* bit masks = 00000011, 00001100, 00110000, 11000000 */ + s32 shift[] = { 0, 2, 4, 6 }; + + + /* r steps through lines in y */ + for( r = 0; r < 4; r++, pixel += (width - 4) ) /* no width * 4 as u32 ptr inc will * 4 */ + { + /* width * 4 bytes per pixel per line, each j dxtc row is 4 lines of pixels */ + + /* n steps through pixels */ + for( n = 0; n < 4; n++ ) + { + bits = block->row[ r ] & masks[ n ]; + bits >>= shift[ n ]; + + switch( bits ) + { + case 0: + *pixel = colors[ 0 ]; + pixel++; + break; + + case 1: + *pixel = colors[ 1 ]; + pixel++; + break; + + case 2: + *pixel = colors[ 2 ]; + pixel++; + break; + + case 3: + *pixel = colors[ 3 ]; + pixel++; + break; + + default: + /* invalid */ + pixel++; + break; + } + } + } +} + + + +/* +DDSDecodeAlphaExplicit() +decodes a dds explicit alpha block +*/ + +static void DDSDecodeAlphaExplicit( u32 *pixel, ddsAlphaBlockExplicit *alphaBlock, s32 width, u32 alphaZero ) +{ + s32 row, pix; + u16 word; + ddsColor color; + + + /* clear color */ + color.r = 0; + color.g = 0; + color.b = 0; + + /* walk rows */ + for( row = 0; row < 4; row++, pixel += (width - 4) ) + { + word = DDSLittleShort( alphaBlock->row[ row ] ); + + /* walk pixels */ + for( pix = 0; pix < 4; pix++ ) + { + /* zero the alpha bits of image pixel */ + *pixel &= alphaZero; + color.a = word & 0x000F; + color.a = color.a | (color.a << 4); + *pixel |= *((u32*) &color); + word >>= 4; /* move next bits to lowest 4 */ + pixel++; /* move to next pixel in the row */ + + } + } +} + + + +/* +DDSDecodeAlpha3BitLinear() +decodes interpolated alpha block +*/ + +static void DDSDecodeAlpha3BitLinear( u32 *pixel, ddsAlphaBlock3BitLinear *alphaBlock, s32 width, u32 alphaZero ) +{ + + s32 row, pix; + u32 stuff; + u8 bits[ 4 ][ 4 ]; + u16 alphas[ 8 ]; + ddsColor aColors[ 4 ][ 4 ]; + + + /* get initial alphas */ + alphas[ 0 ] = alphaBlock->alpha0; + alphas[ 1 ] = alphaBlock->alpha1; + + /* 8-alpha block */ + if( alphas[ 0 ] > alphas[ 1 ] ) + { + /* 000 = alpha_0, 001 = alpha_1, others are interpolated */ + alphas[ 2 ] = ( 6 * alphas[ 0 ] + alphas[ 1 ]) / 7; /* bit code 010 */ + alphas[ 3 ] = ( 5 * alphas[ 0 ] + 2 * alphas[ 1 ]) / 7; /* bit code 011 */ + alphas[ 4 ] = ( 4 * alphas[ 0 ] + 3 * alphas[ 1 ]) / 7; /* bit code 100 */ + alphas[ 5 ] = ( 3 * alphas[ 0 ] + 4 * alphas[ 1 ]) / 7; /* bit code 101 */ + alphas[ 6 ] = ( 2 * alphas[ 0 ] + 5 * alphas[ 1 ]) / 7; /* bit code 110 */ + alphas[ 7 ] = ( alphas[ 0 ] + 6 * alphas[ 1 ]) / 7; /* bit code 111 */ + } + + /* 6-alpha block */ + else + { + /* 000 = alpha_0, 001 = alpha_1, others are interpolated */ + alphas[ 2 ] = (4 * alphas[ 0 ] + alphas[ 1 ]) / 5; /* bit code 010 */ + alphas[ 3 ] = (3 * alphas[ 0 ] + 2 * alphas[ 1 ]) / 5; /* bit code 011 */ + alphas[ 4 ] = (2 * alphas[ 0 ] + 3 * alphas[ 1 ]) / 5; /* bit code 100 */ + alphas[ 5 ] = ( alphas[ 0 ] + 4 * alphas[ 1 ]) / 5; /* bit code 101 */ + alphas[ 6 ] = 0; /* bit code 110 */ + alphas[ 7 ] = 255; /* bit code 111 */ + } + + /* decode 3-bit fields into array of 16 bytes with same value */ + + /* first two rows of 4 pixels each */ + stuff = *((u32*) &(alphaBlock->stuff[ 0 ])); + + bits[ 0 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 0 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 0 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 0 ][ 3 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 3 ] = (u8) (stuff & 0x00000007); + + /* last two rows */ + stuff = *((u32*) &(alphaBlock->stuff[ 3 ])); /* last 3 bytes */ + + bits[ 2 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 2 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 2 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 2 ][ 3 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 3 ] = (u8) (stuff & 0x00000007); + + /* decode the codes into alpha values */ + for( row = 0; row < 4; row++ ) + { + for( pix=0; pix < 4; pix++ ) + { + aColors[ row ][ pix ].r = 0; + aColors[ row ][ pix ].g = 0; + aColors[ row ][ pix ].b = 0; + aColors[ row ][ pix ].a = (u8) alphas[ bits[ row ][ pix ] ]; + } + } + + /* write out alpha values to the image bits */ + for( row = 0; row < 4; row++, pixel += width-4 ) + { + for( pix = 0; pix < 4; pix++ ) + { + /* zero the alpha bits of image pixel */ + *pixel &= alphaZero; + + /* or the bits into the prev. nulled alpha */ + *pixel |= *((u32*) &(aColors[ row ][ pix ])); + pixel++; + } + } +} + + + +/* +DDSDecompressDXT1() +decompresses a dxt1 format texture +*/ +s32 DDSDecompressDXT1( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 x, y, xBlocks, yBlocks; + u32 *pixel; + ddsColorBlock *block; + ddsColor colors[ 4 ]; + + + /* setup */ + xBlocks = width / 4; + yBlocks = height / 4; + + /* walk y */ + for( y = 0; y < yBlocks; y++ ) + { + /* 8 bytes per block */ + block = (ddsColorBlock*) ((u32) dds->data + y * xBlocks * 8); + + /* walk x */ + for( x = 0; x < xBlocks; x++, block++ ) + { + DDSGetColorBlockColors( block, colors ); + pixel = (u32*) (pixels + x * 16 + (y * 4) * width * 4); + DDSDecodeColorBlock( pixel, block, width, (u32*) colors ); + } + } + + /* return ok */ + return 0; +} + + + +/* +DDSDecompressDXT3() +decompresses a dxt3 format texture +*/ + +s32 DDSDecompressDXT3( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 x, y, xBlocks, yBlocks; + u32 *pixel, alphaZero; + ddsColorBlock *block; + ddsAlphaBlockExplicit *alphaBlock; + ddsColor colors[ 4 ]; + + + /* setup */ + xBlocks = width / 4; + yBlocks = height / 4; + + /* create zero alpha */ + colors[ 0 ].a = 0; + colors[ 0 ].r = 0xFF; + colors[ 0 ].g = 0xFF; + colors[ 0 ].b = 0xFF; + alphaZero = *((u32*) &colors[ 0 ]); + + /* walk y */ + for( y = 0; y < yBlocks; y++ ) + { + /* 8 bytes per block, 1 block for alpha, 1 block for color */ + block = (ddsColorBlock*) ((u32) dds->data + y * xBlocks * 16); + + /* walk x */ + for( x = 0; x < xBlocks; x++, block++ ) + { + /* get alpha block */ + alphaBlock = (ddsAlphaBlockExplicit*) block; + + /* get color block */ + block++; + DDSGetColorBlockColors( block, colors ); + + /* decode color block */ + pixel = (u32*) (pixels + x * 16 + (y * 4) * width * 4); + DDSDecodeColorBlock( pixel, block, width, (u32*) colors ); + + /* overwrite alpha bits with alpha block */ + DDSDecodeAlphaExplicit( pixel, alphaBlock, width, alphaZero ); + } + } + + /* return ok */ + return 0; +} + + + +/* +DDSDecompressDXT5() +decompresses a dxt5 format texture +*/ +s32 DDSDecompressDXT5( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 x, y, xBlocks, yBlocks; + u32 *pixel, alphaZero; + ddsColorBlock *block; + ddsAlphaBlock3BitLinear *alphaBlock; + ddsColor colors[ 4 ]; + + + /* setup */ + xBlocks = width / 4; + yBlocks = height / 4; + + /* create zero alpha */ + colors[ 0 ].a = 0; + colors[ 0 ].r = 0xFF; + colors[ 0 ].g = 0xFF; + colors[ 0 ].b = 0xFF; + alphaZero = *((u32*) &colors[ 0 ]); + + /* walk y */ + for( y = 0; y < yBlocks; y++ ) + { + /* 8 bytes per block, 1 block for alpha, 1 block for color */ + block = (ddsColorBlock*) ((u32) dds->data + y * xBlocks * 16); + + /* walk x */ + for( x = 0; x < xBlocks; x++, block++ ) + { + /* get alpha block */ + alphaBlock = (ddsAlphaBlock3BitLinear*) block; + + /* get color block */ + block++; + DDSGetColorBlockColors( block, colors ); + + /* decode color block */ + pixel = (u32*) (pixels + x * 16 + (y * 4) * width * 4); + DDSDecodeColorBlock( pixel, block, width, (u32*) colors ); + + /* overwrite alpha bits with alpha block */ + DDSDecodeAlpha3BitLinear( pixel, alphaBlock, width, alphaZero ); + } + } + + /* return ok */ + return 0; +} + + + +/* +DDSDecompressDXT2() +decompresses a dxt2 format texture (fixme: un-premultiply alpha) +*/ +s32 DDSDecompressDXT2( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 r; + + + /* decompress dxt3 first */ + r = DDSDecompressDXT3( dds, width, height, pixels ); + + /* return to sender */ + return r; +} + + + +/* +DDSDecompressDXT4() +decompresses a dxt4 format texture (fixme: un-premultiply alpha) +*/ +s32 DDSDecompressDXT4( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 r; + + + /* decompress dxt5 first */ + r = DDSDecompressDXT5( dds, width, height, pixels ); + + /* return to sender */ + return r; +} + + + +/* +DDSDecompressARGB8888() +decompresses an argb 8888 format texture +*/ +s32 DDSDecompressARGB8888( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 x, y; + u8 *in, *out; + + + /* setup */ + in = dds->data; + out = pixels; + + /* walk y */ + for( y = 0; y < height; y++ ) + { + /* walk x */ + for( x = 0; x < width; x++ ) + { + *out++ = *in++; + *out++ = *in++; + *out++ = *in++; + *out++ = *in++; + } + } + + /* return ok */ + return 0; +} + + + +/* +DDSDecompress() +decompresses a dds texture into an rgba image buffer, returns 0 on success +*/ +s32 DDSDecompress( ddsBuffer *dds, u8 *pixels ) +{ + s32 width, height, r; + eDDSPixelFormat pf; + + + /* get dds info */ + r = DDSGetInfo( dds, &width, &height, &pf ); + if( r ) + return r; + + /* decompress */ + switch( pf ) + { + case DDS_PF_ARGB8888: + /* fixme: support other [a]rgb formats */ + r = DDSDecompressARGB8888( dds, width, height, pixels ); + break; + + case DDS_PF_DXT1: + r = DDSDecompressDXT1( dds, width, height, pixels ); + break; + + case DDS_PF_DXT2: + r = DDSDecompressDXT2( dds, width, height, pixels ); + break; + + case DDS_PF_DXT3: + r = DDSDecompressDXT3( dds, width, height, pixels ); + break; + + case DDS_PF_DXT4: + r = DDSDecompressDXT4( dds, width, height, pixels ); + break; + + case DDS_PF_DXT5: + r = DDSDecompressDXT5( dds, width, height, pixels ); + break; + + default: + case DDS_PF_UNKNOWN: + memset( pixels, 0xFF, width * height * 4 ); + r = -1; + break; + } + + /* return to sender */ + return r; +} + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderDDS::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "dds" ); +} + + + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderDDS::isALoadableFileFormat(io::IReadFile* file) const +{ + if (!file) + return false; + + ddsBuffer header; + file->read(&header, sizeof(header)); + + s32 width, height; + eDDSPixelFormat pixelFormat; + + return 0 == DDSGetInfo( &header, &width, &height, &pixelFormat); +} + + + +//! creates a surface from the file +IImage* CImageLoaderDDS::loadImage(io::IReadFile* file) const +{ + u8 *memFile = new u8 [ file->getSize() ]; + file->read ( memFile, file->getSize() ); + + ddsBuffer *header = (ddsBuffer*) memFile; + IImage* image = 0; + s32 width, height; + eDDSPixelFormat pixelFormat; + + if ( 0 == DDSGetInfo( header, &width, &height, &pixelFormat) ) + { + image = new CImage(ECF_A8R8G8B8, core::dimension2d(width, height)); + + if ( DDSDecompress( header, (u8*) image->lock() ) == -1) + { + image->unlock(); + image->drop(); + image = 0; + } + } + + delete [] memFile; + if ( image ) + image->unlock(); + + return image; +} + + +//! creates a loader which is able to load tgas +IImageLoader* createImageLoaderDDS() +{ + return new CImageLoaderDDS(); +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/source/Irrlicht/CImageLoaderDDS.h b/source/Irrlicht/CImageLoaderDDS.h new file mode 100644 index 00000000..a24380f9 --- /dev/null +++ b/source/Irrlicht/CImageLoaderDDS.h @@ -0,0 +1,324 @@ +// Copyright (C) 2002-2009 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_DDS_H_INCLUDED__ +#define __C_IMAGE_LOADER_DDS_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#include "IImageLoader.h" + + +namespace irr +{ +namespace video +{ + +#if defined(_IRR_COMPILE_WITH_DDS_LOADER_) || defined(_IRR_COMPILE_WITH_DDS_WRITER_) + +// byte-align structures +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( push, packing ) +# pragma pack( 1 ) +# define PACK_STRUCT +#elif defined( __GNUC__ ) +# define PACK_STRUCT __attribute__((packed)) +#else +# define PACK_STRUCT +#endif + + +/* dependencies */ +/* dds definition */ +enum eDDSPixelFormat +{ + DDS_PF_ARGB8888, + DDS_PF_DXT1, + DDS_PF_DXT2, + DDS_PF_DXT3, + DDS_PF_DXT4, + DDS_PF_DXT5, + DDS_PF_UNKNOWN +}; + +/* 16bpp stuff */ +#define DDS_LOW_5 0x001F; +#define DDS_MID_6 0x07E0; +#define DDS_HIGH_5 0xF800; +#define DDS_MID_555 0x03E0; +#define DDS_HI_555 0x7C00; + + +/* structures */ +struct ddsColorKey +{ + u32 colorSpaceLowValue; + u32 colorSpaceHighValue; +} PACK_STRUCT; + +struct ddsCaps +{ + u32 caps1; + u32 caps2; + u32 caps3; + u32 caps4; +} PACK_STRUCT; + +struct ddsMultiSampleCaps +{ + u16 flipMSTypes; + u16 bltMSTypes; +} PACK_STRUCT; + + +struct ddsPixelFormat +{ + u32 size; + u32 flags; + u32 fourCC; + union + { + u32 rgbBitCount; + u32 yuvBitCount; + u32 zBufferBitDepth; + u32 alphaBitDepth; + u32 luminanceBitCount; + u32 bumpBitCount; + u32 privateFormatBitCount; + }; + union + { + u32 rBitMask; + u32 yBitMask; + u32 stencilBitDepth; + u32 luminanceBitMask; + u32 bumpDuBitMask; + u32 operations; + }; + union + { + u32 gBitMask; + u32 uBitMask; + u32 zBitMask; + u32 bumpDvBitMask; + ddsMultiSampleCaps multiSampleCaps; + }; + union + { + u32 bBitMask; + u32 vBitMask; + u32 stencilBitMask; + u32 bumpLuminanceBitMask; + }; + union + { + u32 rgbAlphaBitMask; + u32 yuvAlphaBitMask; + u32 luminanceAlphaBitMask; + u32 rgbZBitMask; + u32 yuvZBitMask; + }; +} PACK_STRUCT; + + +struct ddsBuffer +{ + /* magic: 'dds ' */ + c8 magic[ 4 ]; + + /* directdraw surface */ + u32 size; + u32 flags; + u32 height; + u32 width; + union + { + s32 pitch; + u32 linearSize; + }; + u32 backBufferCount; + union + { + u32 mipMapCount; + u32 refreshRate; + u32 srcVBHandle; + }; + u32 alphaBitDepth; + u32 reserved; + void *surface; + union + { + ddsColorKey ckDestOverlay; + u32 emptyFaceColor; + }; + ddsColorKey ckDestBlt; + ddsColorKey ckSrcOverlay; + ddsColorKey ckSrcBlt; + union + { + ddsPixelFormat pixelFormat; + u32 fvf; + }; + ddsCaps caps; + u32 textureStage; + + /* data (Varying size) */ + u8 data[ 4 ]; +} PACK_STRUCT; + + +struct ddsColorBlock +{ + u16 colors[ 2 ]; + u8 row[ 4 ]; +} PACK_STRUCT; + + +struct ddsAlphaBlockExplicit +{ + u16 row[ 4 ]; +} PACK_STRUCT; + + +struct ddsAlphaBlock3BitLinear +{ + u8 alpha0; + u8 alpha1; + u8 stuff[ 6 ]; +} PACK_STRUCT; + + +struct ddsColor +{ + u8 r, g, b, a; +} PACK_STRUCT; + + + +/* public functions */ +s32 DDSGetInfo( ddsBuffer *dds, s32 *width, s32 *height, eDDSPixelFormat *pf ); +s32 DDSDecompress( ddsBuffer *dds, u8 *pixels ); + + + +/* endian tomfoolery */ +typedef union +{ + f32 f; + c8 c[ 4 ]; +} +floatSwapUnion; + + +#ifndef __BIG_ENDIAN__ +#ifdef _SGI_SOURCE +#define __BIG_ENDIAN__ +#endif +#endif + + +#ifdef __BIG_ENDIAN__ + + s32 DDSBigLong( s32 src ) { return src; } + s16 DDSBigShort( s16 src ) { return src; } + f32 DDSBigFloat( f32 src ) { return src; } + + s32 DDSLittleLong( s32 src ) + { + return ((src & 0xFF000000) >> 24) | + ((src & 0x00FF0000) >> 8) | + ((src & 0x0000FF00) << 8) | + ((src & 0x000000FF) << 24); + } + + s16 DDSLittleShort( s16 src ) + { + return ((src & 0xFF00) >> 8) | + ((src & 0x00FF) << 8); + } + + f32 DDSLittleFloat( f32 src ) + { + floatSwapUnion in,out; + in.f = src; + out.c[ 0 ] = in.c[ 3 ]; + out.c[ 1 ] = in.c[ 2 ]; + out.c[ 2 ] = in.c[ 1 ]; + out.c[ 3 ] = in.c[ 0 ]; + return out.f; + } + +#else /*__BIG_ENDIAN__*/ + + s32 DDSLittleLong( s32 src ) { return src; } + s16 DDSLittleShort( s16 src ) { return src; } + f32 DDSLittleFloat( f32 src ) { return src; } + + s32 DDSBigLong( s32 src ) + { + return ((src & 0xFF000000) >> 24) | + ((src & 0x00FF0000) >> 8) | + ((src & 0x0000FF00) << 8) | + ((src & 0x000000FF) << 24); + } + + s16 DDSBigShort( s16 src ) + { + return ((src & 0xFF00) >> 8) | + ((src & 0x00FF) << 8); + } + + f32 DDSBigFloat( f32 src ) + { + floatSwapUnion in,out; + in.f = src; + out.c[ 0 ] = in.c[ 3 ]; + out.c[ 1 ] = in.c[ 2 ]; + out.c[ 2 ] = in.c[ 1 ]; + out.c[ 3 ] = in.c[ 0 ]; + return out.f; + } + +#endif /*__BIG_ENDIAN__*/ + + +// Default alignment +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( pop, packing ) +#endif + +#undef PACK_STRUCT + +#endif // compiled with loader or reader + +#ifdef _IRR_COMPILE_WITH_DDS_LOADER_ + +/*! + Surface Loader for targa images +*/ +class CImageLoaderDDS : public IImageLoader +{ +public: + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +private: + +}; + +#endif // compiled with loader + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/source/Irrlicht/CImageLoaderPNG.cpp b/source/Irrlicht/CImageLoaderPNG.cpp index 4dcbc1cd..acd85b3f 100644 --- a/source/Irrlicht/CImageLoaderPNG.cpp +++ b/source/Irrlicht/CImageLoaderPNG.cpp @@ -162,7 +162,11 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const if (BitDepth < 8) { if (ColorType==PNG_COLOR_TYPE_GRAY || ColorType==PNG_COLOR_TYPE_GRAY_ALPHA) +#if (PNG_LIBPNG_VER_MAJOR > 1) || (PNG_LIBPNG_VER_MINOR > 3) + png_set_expand_gray_1_2_4_to_8(png_ptr); +#else png_set_gray_1_2_4_to_8(png_ptr); +#endif else png_set_packing(png_ptr); } diff --git a/source/Irrlicht/CImageLoaderWAL.cpp b/source/Irrlicht/CImageLoaderWAL.cpp index a2f1d1af..5b03ab51 100644 --- a/source/Irrlicht/CImageLoaderWAL.cpp +++ b/source/Irrlicht/CImageLoaderWAL.cpp @@ -18,6 +18,9 @@ namespace irr namespace video { +// old implementation +#if 0 + // May or may not be fully implemented #define TRY_LOADING_PALETTE_FROM_FILE 0 @@ -141,6 +144,302 @@ IImageLoader* createImageLoaderWAL() return new irr::video::CImageLoaderWAL(); } +#endif + + +// Palette quake2 colormap.h, 768 byte, last is transparent +static const u32 colormap_h[256] = { + 0xFF000000,0xFF0F0F0F,0xFF1F1F1F,0xFF2F2F2F,0xFF3F3F3F,0xFF4B4B4B,0xFF5B5B5B,0xFF6B6B6B, + 0xFF7B7B7B,0xFF8B8B8B,0xFF9B9B9B,0xFFABABAB,0xFFBBBBBB,0xFFCBCBCB,0xFFDBDBDB,0xFFEBEBEB, + 0xFF0F0B07,0xFF170F0B,0xFF1F170B,0xFF271B0F,0xFF2F2313,0xFF372B17,0xFF3F2F17,0xFF4B371B, + 0xFF533B1B,0xFF5B431F,0xFF634B1F,0xFF6B531F,0xFF73571F,0xFF7B5F23,0xFF836723,0xFF8F6F23, + 0xFF0B0B0F,0xFF13131B,0xFF1B1B27,0xFF272733,0xFF2F2F3F,0xFF37374B,0xFF3F3F57,0xFF474767, + 0xFF4F4F73,0xFF5B5B7F,0xFF63638B,0xFF6B6B97,0xFF7373A3,0xFF7B7BAF,0xFF8383BB,0xFF8B8BCB, + 0xFF000000,0xFF070700,0xFF0B0B00,0xFF131300,0xFF1B1B00,0xFF232300,0xFF2B2B07,0xFF2F2F07, + 0xFF373707,0xFF3F3F07,0xFF474707,0xFF4B4B0B,0xFF53530B,0xFF5B5B0B,0xFF63630B,0xFF6B6B0F, + 0xFF070000,0xFF0F0000,0xFF170000,0xFF1F0000,0xFF270000,0xFF2F0000,0xFF370000,0xFF3F0000, + 0xFF470000,0xFF4F0000,0xFF570000,0xFF5F0000,0xFF670000,0xFF6F0000,0xFF770000,0xFF7F0000, + 0xFF131300,0xFF1B1B00,0xFF232300,0xFF2F2B00,0xFF372F00,0xFF433700,0xFF4B3B07,0xFF574307, + 0xFF5F4707,0xFF6B4B0B,0xFF77530F,0xFF835713,0xFF8B5B13,0xFF975F1B,0xFFA3631F,0xFFAF6723, + 0xFF231307,0xFF2F170B,0xFF3B1F0F,0xFF4B2313,0xFF572B17,0xFF632F1F,0xFF733723,0xFF7F3B2B, + 0xFF8F4333,0xFF9F4F33,0xFFAF632F,0xFFBF772F,0xFFCF8F2B,0xFFDFAB27,0xFFEFCB1F,0xFFFFF31B, + 0xFF0B0700,0xFF1B1300,0xFF2B230F,0xFF372B13,0xFF47331B,0xFF533723,0xFF633F2B,0xFF6F4733, + 0xFF7F533F,0xFF8B5F47,0xFF9B6B53,0xFFA77B5F,0xFFB7876B,0xFFC3937B,0xFFD3A38B,0xFFE3B397, + 0xFFAB8BA3,0xFF9F7F97,0xFF937387,0xFF8B677B,0xFF7F5B6F,0xFF775363,0xFF6B4B57,0xFF5F3F4B, + 0xFF573743,0xFF4B2F37,0xFF43272F,0xFF371F23,0xFF2B171B,0xFF231313,0xFF170B0B,0xFF0F0707, + 0xFFBB739F,0xFFAF6B8F,0xFFA35F83,0xFF975777,0xFF8B4F6B,0xFF7F4B5F,0xFF734353,0xFF6B3B4B, + 0xFF5F333F,0xFF532B37,0xFF47232B,0xFF3B1F23,0xFF2F171B,0xFF231313,0xFF170B0B,0xFF0F0707, + 0xFFDBC3BB,0xFFCBB3A7,0xFFBFA39B,0xFFAF978B,0xFFA3877B,0xFF977B6F,0xFF876F5F,0xFF7B6353, + 0xFF6B5747,0xFF5F4B3B,0xFF533F33,0xFF433327,0xFF372B1F,0xFF271F17,0xFF1B130F,0xFF0F0B07, + 0xFF6F837B,0xFF677B6F,0xFF5F7367,0xFF576B5F,0xFF4F6357,0xFF475B4F,0xFF3F5347,0xFF374B3F, + 0xFF2F4337,0xFF2B3B2F,0xFF233327,0xFF1F2B1F,0xFF172317,0xFF0F1B13,0xFF0B130B,0xFF070B07, + 0xFFFFF31B,0xFFEFDF17,0xFFDBCB13,0xFFCBB70F,0xFFBBA70F,0xFFAB970B,0xFF9B8307,0xFF8B7307, + 0xFF7B6307,0xFF6B5300,0xFF5B4700,0xFF4B3700,0xFF3B2B00,0xFF2B1F00,0xFF1B0F00,0xFF0B0700, + 0xFF0000FF,0xFF0B0BEF,0xFF1313DF,0xFF1B1BCF,0xFF2323BF,0xFF2B2BAF,0xFF2F2F9F,0xFF2F2F8F, + 0xFF2F2F7F,0xFF2F2F6F,0xFF2F2F5F,0xFF2B2B4F,0xFF23233F,0xFF1B1B2F,0xFF13131F,0xFF0B0B0F, + 0xFF2B0000,0xFF3B0000,0xFF4B0700,0xFF5F0700,0xFF6F0F00,0xFF7F1707,0xFF931F07,0xFFA3270B, + 0xFFB7330F,0xFFC34B1B,0xFFCF632B,0xFFDB7F3B,0xFFE3974F,0xFFE7AB5F,0xFFEFBF77,0xFFF7D38B, + 0xFFA77B3B,0xFFB79B37,0xFFC7C337,0xFFE7E357,0xFF7FBFFF,0xFFABE7FF,0xFFD7FFFF,0xFF670000, + 0xFF8B0000,0xFFB30000,0xFFD70000,0xFFFF0000,0xFFFFF393,0xFFFFF7C7,0xFFFFFFFF,0x009F5B53 +}; + +// Palette quake2 demo pics/colormap.pcx, last is transparent +static const u32 colormap_pcx[256] = { + 0xFF000000,0xFF0F0F0F,0xFF1F1F1F,0xFF2F2F2F,0xFF3F3F3F,0xFF4B4B4B,0xFF5B5B5B,0xFF6B6B6B, + 0xFF7B7B7B,0xFF8B8B8B,0xFF9B9B9B,0xFFABABAB,0xFFBBBBBB,0xFFCBCBCB,0xFFDBDBDB,0xFFEBEBEB, + 0xFF634B23,0xFF5B431F,0xFF533F1F,0xFF4F3B1B,0xFF47371B,0xFF3F2F17,0xFF3B2B17,0xFF332713, + 0xFF2F2313,0xFF2B1F13,0xFF271B0F,0xFF23170F,0xFF1B130B,0xFF170F0B,0xFF130F07,0xFF0F0B07, + 0xFF5F5F6F,0xFF5B5B67,0xFF5B535F,0xFF574F5B,0xFF534B53,0xFF4F474B,0xFF473F43,0xFF3F3B3B, + 0xFF3B3737,0xFF332F2F,0xFF2F2B2B,0xFF272727,0xFF232323,0xFF1B1B1B,0xFF171717,0xFF131313, + 0xFF8F7753,0xFF7B6343,0xFF735B3B,0xFF674F2F,0xFFCF974B,0xFFA77B3B,0xFF8B672F,0xFF6F5327, + 0xFFEB9F27,0xFFCB8B23,0xFFAF771F,0xFF93631B,0xFF774F17,0xFF5B3B0F,0xFF3F270B,0xFF231707, + 0xFFA73B2B,0xFF9F2F23,0xFF972B1B,0xFF8B2713,0xFF7F1F0F,0xFF73170B,0xFF671707,0xFF571300, + 0xFF4B0F00,0xFF430F00,0xFF3B0F00,0xFF330B00,0xFF2B0B00,0xFF230B00,0xFF1B0700,0xFF130700, + 0xFF7B5F4B,0xFF735743,0xFF6B533F,0xFF674F3B,0xFF5F4737,0xFF574333,0xFF533F2F,0xFF4B372B, + 0xFF433327,0xFF3F2F23,0xFF37271B,0xFF2F2317,0xFF271B13,0xFF1F170F,0xFF170F0B,0xFF0F0B07, + 0xFF6F3B17,0xFF5F3717,0xFF532F17,0xFF432B17,0xFF372313,0xFF271B0F,0xFF1B130B,0xFF0F0B07, + 0xFFB35B4F,0xFFBF7B6F,0xFFCB9B93,0xFFD7BBB7,0xFFCBD7DF,0xFFB3C7D3,0xFF9FB7C3,0xFF87A7B7, + 0xFF7397A7,0xFF5B879B,0xFF47778B,0xFF2F677F,0xFF17536F,0xFF134B67,0xFF0F435B,0xFF0B3F53, + 0xFF07374B,0xFF072F3F,0xFF072733,0xFF001F2B,0xFF00171F,0xFF000F13,0xFF00070B,0xFF000000, + 0xFF8B5757,0xFF834F4F,0xFF7B4747,0xFF734343,0xFF6B3B3B,0xFF633333,0xFF5B2F2F,0xFF572B2B, + 0xFF4B2323,0xFF3F1F1F,0xFF331B1B,0xFF2B1313,0xFF1F0F0F,0xFF130B0B,0xFF0B0707,0xFF000000, + 0xFF979F7B,0xFF8F9773,0xFF878B6B,0xFF7F8363,0xFF777B5F,0xFF737357,0xFF6B6B4F,0xFF636347, + 0xFF5B5B43,0xFF4F4F3B,0xFF434333,0xFF37372B,0xFF2F2F23,0xFF23231B,0xFF171713,0xFF0F0F0B, + 0xFF9F4B3F,0xFF934337,0xFF8B3B2F,0xFF7F3727,0xFF772F23,0xFF6B2B1B,0xFF632317,0xFF571F13, + 0xFF4F1B0F,0xFF43170B,0xFF37130B,0xFF2B0F07,0xFF1F0B07,0xFF170700,0xFF0B0000,0xFF000000, + 0xFF777BCF,0xFF6F73C3,0xFF676BB7,0xFF6363A7,0xFF5B5B9B,0xFF53578F,0xFF4B4F7F,0xFF474773, + 0xFF3F3F67,0xFF373757,0xFF2F2F4B,0xFF27273F,0xFF231F2F,0xFF1B1723,0xFF130F17,0xFF0B0707, + 0xFF9BAB7B,0xFF8F9F6F,0xFF879763,0xFF7B8B57,0xFF73834B,0xFF677743,0xFF5F6F3B,0xFF576733, + 0xFF4B5B27,0xFF3F4F1B,0xFF374313,0xFF2F3B0B,0xFF232F07,0xFF1B2300,0xFF131700,0xFF0B0F00, + 0xFF00FF00,0xFF23E70F,0xFF3FD31B,0xFF53BB27,0xFF5FA72F,0xFF5F8F33,0xFF5F7B33,0xFFFFFFFF, + 0xFFFFFFD3,0xFFFFFFA7,0xFFFFFF7F,0xFFFFFF53,0xFFFFFF27,0xFFFFEB1F,0xFFFFD717,0xFFFFBF0F, + 0xFFFFAB07,0xFFFF9300,0xFFEF7F00,0xFFE36B00,0xFFD35700,0xFFC74700,0xFFB73B00,0xFFAB2B00, + 0xFF9B1F00,0xFF8F1700,0xFF7F0F00,0xFF730700,0xFF5F0000,0xFF470000,0xFF2F0000,0xFF1B0000, + 0xFFEF0000,0xFF3737FF,0xFFFF0000,0xFF0000FF,0xFF2B2B23,0xFF1B1B17,0xFF13130F,0xFFEB977F, + 0xFFC37353,0xFF9F5733,0xFF7B3F1B,0xFFEBD3C7,0xFFC7AB9B,0xFFA78B77,0xFF876B57,0x009F5B53 +}; + +#if 0 +// palette halflife gfx/palette.lmp only 1 entry difference.. transparent = 0,0,255 +static const u32 palette_lmp[256] = { + 0xFF000000,0xFF0F0F0F,0xFF1F1F1F,0xFF2F2F2F,0xFF3F3F3F,0xFF4B4B4B,0xFF5B5B5B,0xFF6B6B6B, + 0xFF7B7B7B,0xFF8B8B8B,0xFF9B9B9B,0xFFABABAB,0xFFBBBBBB,0xFFCBCBCB,0xFFDBDBDB,0xFFEBEBEB, + 0xFF0F0B07,0xFF170F0B,0xFF1F170B,0xFF271B0F,0xFF2F2313,0xFF372B17,0xFF3F2F17,0xFF4B371B, + 0xFF533B1B,0xFF5B431F,0xFF634B1F,0xFF6B531F,0xFF73571F,0xFF7B5F23,0xFF836723,0xFF8F6F23, + 0xFF0B0B0F,0xFF13131B,0xFF1B1B27,0xFF272733,0xFF2F2F3F,0xFF37374B,0xFF3F3F57,0xFF474767, + 0xFF4F4F73,0xFF5B5B7F,0xFF63638B,0xFF6B6B97,0xFF7373A3,0xFF7B7BAF,0xFF8383BB,0xFF8B8BCB, + 0xFF000000,0xFF070700,0xFF0B0B00,0xFF131300,0xFF1B1B00,0xFF232300,0xFF2B2B07,0xFF2F2F07, + 0xFF373707,0xFF3F3F07,0xFF474707,0xFF4B4B0B,0xFF53530B,0xFF5B5B0B,0xFF63630B,0xFF6B6B0F, + 0xFF070000,0xFF0F0000,0xFF170000,0xFF1F0000,0xFF270000,0xFF2F0000,0xFF370000,0xFF3F0000, + 0xFF470000,0xFF4F0000,0xFF570000,0xFF5F0000,0xFF670000,0xFF6F0000,0xFF770000,0xFF7F0000, + 0xFF131300,0xFF1B1B00,0xFF232300,0xFF2F2B00,0xFF372F00,0xFF433700,0xFF4B3B07,0xFF574307, + 0xFF5F4707,0xFF6B4B0B,0xFF77530F,0xFF835713,0xFF8B5B13,0xFF975F1B,0xFFA3631F,0xFFAF6723, + 0xFF231307,0xFF2F170B,0xFF3B1F0F,0xFF4B2313,0xFF572B17,0xFF632F1F,0xFF733723,0xFF7F3B2B, + 0xFF8F4333,0xFF9F4F33,0xFFAF632F,0xFFBF772F,0xFFCF8F2B,0xFFDFAB27,0xFFEFCB1F,0xFFFFF31B, + 0xFF0B0700,0xFF1B1300,0xFF2B230F,0xFF372B13,0xFF47331B,0xFF533723,0xFF633F2B,0xFF6F4733, + 0xFF7F533F,0xFF8B5F47,0xFF9B6B53,0xFFA77B5F,0xFFB7876B,0xFFC3937B,0xFFD3A38B,0xFFE3B397, + 0xFFAB8BA3,0xFF9F7F97,0xFF937387,0xFF8B677B,0xFF7F5B6F,0xFF775363,0xFF6B4B57,0xFF5F3F4B, + 0xFF573743,0xFF4B2F37,0xFF43272F,0xFF371F23,0xFF2B171B,0xFF231313,0xFF170B0B,0xFF0F0707, + 0xFFBB739F,0xFFAF6B8F,0xFFA35F83,0xFF975777,0xFF8B4F6B,0xFF7F4B5F,0xFF734353,0xFF6B3B4B, + 0xFF5F333F,0xFF532B37,0xFF47232B,0xFF3B1F23,0xFF2F171B,0xFF231313,0xFF170B0B,0xFF0F0707, + 0xFFDBC3BB,0xFFCBB3A7,0xFFBFA39B,0xFFAF978B,0xFFA3877B,0xFF977B6F,0xFF876F5F,0xFF7B6353, + 0xFF6B5747,0xFF5F4B3B,0xFF533F33,0xFF433327,0xFF372B1F,0xFF271F17,0xFF1B130F,0xFF0F0B07, + 0xFF6F837B,0xFF677B6F,0xFF5F7367,0xFF576B5F,0xFF4F6357,0xFF475B4F,0xFF3F5347,0xFF374B3F, + 0xFF2F4337,0xFF2B3B2F,0xFF233327,0xFF1F2B1F,0xFF172317,0xFF0F1B13,0xFF0B130B,0xFF070B07, + 0xFFFFF31B,0xFFEFDF17,0xFFDBCB13,0xFFCBB70F,0xFFBBA70F,0xFFAB970B,0xFF9B8307,0xFF8B7307, + 0xFF7B6307,0xFF6B5300,0xFF5B4700,0xFF4B3700,0xFF3B2B00,0xFF2B1F00,0xFF1B0F00,0xFF0B0700, + 0xFF0000FF,0xFF0B0BEF,0xFF1313DF,0xFF1B1BCF,0xFF2323BF,0xFF2B2BAF,0xFF2F2F9F,0xFF2F2F8F, + 0xFF2F2F7F,0xFF2F2F6F,0xFF2F2F5F,0xFF2B2B4F,0xFF23233F,0xFF1B1B2F,0xFF13131F,0xFF0B0B0F, + 0xFF2B0000,0xFF3B0000,0xFF4B0700,0xFF5F0700,0xFF6F0F00,0xFF7F1707,0xFF931F07,0xFFA3270B, + 0xFFB7330F,0xFFC34B1B,0xFFCF632B,0xFFDB7F3B,0xFFE3974F,0xFFE7AB5F,0xFFEFBF77,0xFFF7D38B, + 0xFFA77B3B,0xFFB79B37,0xFFC7C337,0xFFE7E357,0xFF00FF00,0xFFABE7FF,0xFFD7FFFF,0xFF670000, + 0xFF8B0000,0xFFB30000,0xFFD70000,0xFFFF0000,0xFFFFF393,0xFFFFF7C7,0xFFFFFFFF,0xFF9F5B53 +}; + +#endif + +bool CImageLoaderLMP::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "lmp" ); +} + + +bool CImageLoaderLMP::isALoadableFileFormat(irr::io::IReadFile* file) const +{ + return false; +} + +/*! + Quake1, Quake2, Hallife lmp texture +*/ +IImage* CImageLoaderLMP::loadImage(irr::io::IReadFile* file) const +{ + SLMPHeader header; + + file->seek(0); + file->read(&header, sizeof(header)); + + // maybe palette file + u32 rawtexsize = header.width * header.height; + if ( rawtexsize + sizeof ( header ) != file->getSize() ) + return 0; + + u8 *rawtex = new u8 [ rawtexsize ]; + + file->read(rawtex, rawtexsize); + + IImage* image = new CImage(ECF_A8R8G8B8, core::dimension2d(header.width, header.height)); + + CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) colormap_h, 0, false); + image->unlock(); + + delete [] rawtex; + + return image; +} + + +/*! + Halflife +*/ +bool CImageLoaderWAL2::isALoadableFileExtension(const io::path& filename) const +{ + // embedded in Wad(WAD3 format). originally it has no extension + return core::hasFileExtension ( filename, "wal2" ); +} + + +bool CImageLoaderWAL2::isALoadableFileFormat(irr::io::IReadFile* file) const +{ + return false; +} + +/* + Halflite Texture WAD +*/ +IImage* CImageLoaderWAL2::loadImage(irr::io::IReadFile* file) const +{ + miptex_halflife header; + + file->seek(0); + file->read(&header, sizeof(header)); + +#ifdef __BIG_ENDIAN__ + header.width = os::Byteswap::byteswap(header.width); + header.height = os::Byteswap::byteswap(header.height); +#endif + + // palette + //u32 paletteofs = header.mipmap[0] + ((rawtexsize * 85) >> 6) + 2; + u32 *pal = new u32 [ 192 + 256 ]; + u8 *s = (u8*) pal; + + file->seek ( file->getSize() - 768 - 2 ); + file->read ( s, 768 ); + u32 i; + + for ( i = 0; i < 256; ++i, s+= 3 ) + { + pal [ 192 + i ] = 0xFF000000 | s[0] << 16 | s[1] << 8 | s[2]; + } + + ECOLOR_FORMAT format = ECF_R8G8B8; + + // transparency in filename;-) funny. rgb:0x0000FF is colorkey + if ( file->getFileName().findFirst ( '{' ) >= 0 ) + { + format = ECF_A8R8G8B8; + pal [ 192 + 255 ] &= 0x00FFFFFF; + } + + u32 rawtexsize = header.width * header.height; + + + u8 *rawtex = new u8 [ rawtexsize ]; + + file->seek ( header.mipmap[0] ); + file->read(rawtex, rawtexsize); + + IImage* image = new CImage(format, core::dimension2d(header.width, header.height)); + + switch ( format ) + { + case ECF_R8G8B8: + CColorConverter::convert8BitTo24Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) pal + 768, 0, false); + break; + case ECF_A8R8G8B8: + CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) pal + 768, 0, false); + break; + } + + image->unlock(); + + delete [] rawtex; + delete [] pal; + + return image; +} + +bool CImageLoaderWAL::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "wal" ); +} + + +bool CImageLoaderWAL::isALoadableFileFormat(irr::io::IReadFile* file) const +{ + return false; +} + + +/*! + quake2 +*/ +IImage* CImageLoaderWAL::loadImage(irr::io::IReadFile* file) const +{ + miptex_quake2 header; + + file->seek(0); + file->read(&header, sizeof(header)); + +#ifdef __BIG_ENDIAN__ + header.width = os::Byteswap::byteswap(header.width); + header.height = os::Byteswap::byteswap(header.height); +#endif + + u32 rawtexsize = header.width * header.height; + + u8 *rawtex = new u8 [ rawtexsize ]; + + file->seek ( header.mipmap[0] ); + file->read(rawtex, rawtexsize); + + IImage* image = new CImage(ECF_A8R8G8B8, core::dimension2d(header.width, header.height)); + + CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) colormap_pcx, 0, false); + image->unlock(); + + delete [] rawtex; + + return image; +} + + + +IImageLoader* createImageLoaderHalfLife() +{ + return new irr::video::CImageLoaderWAL2(); +} + +IImageLoader* createImageLoaderWAL() +{ + return new irr::video::CImageLoaderWAL(); +} + +IImageLoader* createImageLoaderLMP() +{ + return new irr::video::CImageLoaderLMP(); +} } } diff --git a/source/Irrlicht/CImageLoaderWAL.h b/source/Irrlicht/CImageLoaderWAL.h index 94d7bf28..23924325 100644 --- a/source/Irrlicht/CImageLoaderWAL.h +++ b/source/Irrlicht/CImageLoaderWAL.h @@ -17,6 +17,7 @@ namespace irr { namespace video { +#if 0 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) # pragma pack( push, packing ) @@ -62,6 +63,80 @@ private: static s32 DefaultPaletteQ2[256]; }; +#endif + +//! An Irrlicht image loader for Quake1,2 engine lmp textures/palette +class CImageLoaderLMP : public irr::video::IImageLoader +{ +public: + virtual bool isALoadableFileExtension(const io::path& filename) const; + virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const; + virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const; +}; + +//! An Irrlicht image loader for quake2 wal engine textures +class CImageLoaderWAL : public irr::video::IImageLoader +{ +public: + virtual bool isALoadableFileExtension(const io::path& filename) const; + virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const; + virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const; +}; + +//! An Irrlicht image loader for Halife 1 engine textures +class CImageLoaderWAL2 : public irr::video::IImageLoader +{ +public: + virtual bool isALoadableFileExtension(const io::path& filename) const; + virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const; + virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const; +}; + + + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( push, packing ) +# pragma pack( 1 ) +# define PACK_STRUCT +#elif defined( __GNUC__ ) +# define PACK_STRUCT __attribute__((packed)) +#else +# error compiler not supported +#endif + + struct SLMPHeader { + u32 width; // width + u32 height; // height + // variably sized + } PACK_STRUCT; + + // Halfelife wad3 type 67 file + struct miptex_halflife + { + c8 name[16]; + u32 width, height; + u32 mipmap[4]; // four mip maps stored + } PACK_STRUCT; + + //quake2 texture + struct miptex_quake2 + { + c8 name[32]; + u32 width; + u32 height; + u32 mipmap[4]; // four mip maps stored + c8 animname[32]; // next frame in animation chain + s32 flags; + s32 contents; + s32 value; + }; + + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( pop, packing ) +#endif +#undef PACK_STRUCT + } } diff --git a/source/Irrlicht/CIrrDeviceConsole.cpp b/source/Irrlicht/CIrrDeviceConsole.cpp index 984fa802..81f1192e 100644 --- a/source/Irrlicht/CIrrDeviceConsole.cpp +++ b/source/Irrlicht/CIrrDeviceConsole.cpp @@ -124,7 +124,7 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params) case video::EDT_BURNINGSVIDEO: #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - VideoDriver = video::createSoftwareDriver2(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); #else os::Printer::log("Burning's Video driver was not compiled in.", ELL_ERROR); #endif diff --git a/source/Irrlicht/CIrrDeviceFB.cpp b/source/Irrlicht/CIrrDeviceFB.cpp index 87a73d07..ea9c57d7 100644 --- a/source/Irrlicht/CIrrDeviceFB.cpp +++ b/source/Irrlicht/CIrrDeviceFB.cpp @@ -200,7 +200,7 @@ void CIrrDeviceFB::createDriver() case video::EDT_BURNINGSVIDEO: #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - VideoDriver = video::createSoftwareDriver2(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); #else os::Printer::log("Burning's video driver was not compiled in.", ELL_WARNING); #endif diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 02c9f406..66b6125a 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -19,9 +19,14 @@ #include "CColorConverter.h" #include "SIrrCreationParameters.h" #include "SExposedVideoData.h" +#include "IGUISpriteBank.h" #include #include +#ifdef _IRR_LINUX_XCURSOR_ +#include +#endif + #if defined _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ #include #include @@ -134,7 +139,7 @@ CIrrDeviceLinux::~CIrrDeviceLinux() #ifdef _IRR_COMPILE_WITH_X11_ if (StdHints) XFree(StdHints); - // Disable cursor and free it later on + // Disable cursor (it is drop'ed in stub) CursorControl->setVisible(false); if (display) { @@ -782,7 +787,7 @@ void CIrrDeviceLinux::createDriver() case video::EDT_BURNINGSVIDEO: #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - VideoDriver = video::createSoftwareDriver2(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); #else os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR); #endif @@ -841,6 +846,9 @@ bool CIrrDeviceLinux::run() os::Timer::tick(); #ifdef _IRR_COMPILE_WITH_X11_ + + static_cast(CursorControl)->update(); + if ((CreationParams.DriverType != video::EDT_NULL) && display) { SEvent irrevent; @@ -1925,6 +1933,301 @@ void CIrrDeviceLinux::initXAtoms() #endif } + +#ifdef _IRR_COMPILE_WITH_X11_ + +Cursor CIrrDeviceLinux::TextureToMonochromeCursor(irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot) +{ + XImage * sourceImage = XCreateImage(display, visual->visual, + 1, // depth, + ZPixmap, // XYBitmap (depth=1), ZPixmap(depth=x) + 0, 0, sourceRect.getWidth(), sourceRect.getHeight(), + 32, // bitmap_pad, + 0// bytes_per_line (0 means continuos in memory) + ); + sourceImage->data = new char[sourceImage->height * sourceImage->bytes_per_line]; + XImage * maskImage = XCreateImage(display, visual->visual, + 1, // depth, + ZPixmap, + 0, 0, sourceRect.getWidth(), sourceRect.getHeight(), + 32, // bitmap_pad, + 0 // bytes_per_line + ); + maskImage->data = new char[maskImage->height * maskImage->bytes_per_line]; + + // write texture into XImage + video::ECOLOR_FORMAT format = tex->getColorFormat(); + u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; + u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; + u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; + const u8* data = (const u8*)tex->lock(true, 0); + data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); + for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) + { + data += bytesLeftGap; + for ( s32 x = 0; x < sourceRect.getWidth(); ++x ) + { + video::SColor pixelCol; + pixelCol.setData((const void*)data, format); + data += bytesPerPixel; + + if ( pixelCol.getAlpha() == 0 ) // transparent + { + XPutPixel(maskImage, x, y, 0); + XPutPixel(sourceImage, x, y, 0); + } + else // color + { + if ( pixelCol.getAverage() >= 127 ) + XPutPixel(sourceImage, x, y, 1); + else + XPutPixel(sourceImage, x, y, 0); + XPutPixel(maskImage, x, y, 1); + } + } + data += bytesRightGap; + } + tex->unlock(); + + Pixmap sourcePixmap = XCreatePixmap(display, window, sourceImage->width, sourceImage->height, sourceImage->depth); + Pixmap maskPixmap = XCreatePixmap(display, window, maskImage->width, maskImage->height, maskImage->depth); + + XGCValues values; + values.foreground = 1; + values.background = 1; + GC gc = XCreateGC( display, sourcePixmap, GCForeground | GCBackground, &values ); + + XPutImage(display, sourcePixmap, gc, sourceImage, 0, 0, 0, 0, sourceImage->width, sourceImage->height); + XPutImage(display, maskPixmap, gc, maskImage, 0, 0, 0, 0, maskImage->width, maskImage->height); + + XFreeGC(display, gc); + XDestroyImage(sourceImage); + XDestroyImage(maskImage); + + Cursor cursorResult = 0; + XColor foreground, background; + foreground.red = 65535; + foreground.green = 65535; + foreground.blue = 65535; + foreground.flags = DoRed | DoGreen | DoBlue; + background.red = 0; + background.green = 0; + background.blue = 0; + background.flags = DoRed | DoGreen | DoBlue; + + cursorResult = XCreatePixmapCursor(display, sourcePixmap, maskPixmap, &foreground, &background, hotspot.X, hotspot.Y); + + XFreePixmap(display, sourcePixmap); + XFreePixmap(display, maskPixmap); + + return cursorResult; +} + +#ifdef _IRR_LINUX_XCURSOR_ +Cursor CIrrDeviceLinux::TextureToARGBCursor(irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot) +{ + XcursorImage * image = XcursorImageCreate (sourceRect.getWidth(), sourceRect.getHeight()); + image->xhot = hotspot.X; + image->yhot = hotspot.Y; + + // write texture into XcursorImage + video::ECOLOR_FORMAT format = tex->getColorFormat(); + u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; + u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; + u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; + XcursorPixel* target = image->pixels; + const u8* data = (const u8*)tex->lock(true, 0); + data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); + for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) + { + data += bytesLeftGap; + for ( s32 x = 0; x < sourceRect.getWidth(); ++x ) + { + video::SColor pixelCol; + pixelCol.setData((const void*)data, format); + data += bytesPerPixel; + + *target = (XcursorPixel)pixelCol.color; + ++target; + } + data += bytesRightGap; + } + tex->unlock(); + + Cursor cursorResult=XcursorImageLoadCursor(display, image); + + XcursorImageDestroy(image); + + + return cursorResult; +} +#endif // #ifdef _IRR_LINUX_XCURSOR_ + +Cursor CIrrDeviceLinux::TextureToCursor(irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot) +{ +#ifdef _IRR_LINUX_XCURSOR_ + return TextureToARGBCursor( tex, sourceRect, hotspot ); +#else + return TextureToMonochromeCursor( tex, sourceRect, hotspot ); +#endif +} +#endif // _IRR_COMPILE_WITH_X11_ + + +CIrrDeviceLinux::CCursorControl::CCursorControl(CIrrDeviceLinux* dev, bool null) + : Device(dev), IsVisible(true), Null(null), UseReferenceRect(false) + , ActiveIcon(gui::ECI_NORMAL), ActiveIconStartTime(0) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (!Null) + { + XGCValues values; + unsigned long valuemask = 0; + + XColor fg, bg; + + // this code, for making the cursor invisible was sent in by + // Sirshane, thank your very much! + + + Pixmap invisBitmap = XCreatePixmap(Device->display, Device->window, 32, 32, 1); + Pixmap maskBitmap = XCreatePixmap(Device->display, Device->window, 32, 32, 1); + Colormap screen_colormap = DefaultColormap( Device->display, DefaultScreen( Device->display ) ); + XAllocNamedColor( Device->display, screen_colormap, "black", &fg, &fg ); + XAllocNamedColor( Device->display, screen_colormap, "white", &bg, &bg ); + + GC gc = XCreateGC( Device->display, invisBitmap, valuemask, &values ); + + XSetForeground( Device->display, gc, BlackPixel( Device->display, DefaultScreen( Device->display ) ) ); + XFillRectangle( Device->display, invisBitmap, gc, 0, 0, 32, 32 ); + XFillRectangle( Device->display, maskBitmap, gc, 0, 0, 32, 32 ); + + invisCursor = XCreatePixmapCursor( Device->display, invisBitmap, maskBitmap, &fg, &bg, 1, 1 ); + XFreeGC(Device->display, gc); + XFreePixmap(Device->display, invisBitmap); + XFreePixmap(Device->display, maskBitmap); + + initCursors(); + } +#endif +} + +CIrrDeviceLinux::CCursorControl::~CCursorControl() +{ + for ( u32 i=0; i < Cursors.size(); ++i ) + { + for ( u32 f=0; f < Cursors[i].Frames.size(); ++f ) + { + XFreeCursor(Device->display, Cursors[i].Frames[f].IconHW); + } + } +} + + +#ifdef _IRR_COMPILE_WITH_X11_ +void CIrrDeviceLinux::CCursorControl::initCursors() +{ + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_top_left_arrow)) ); // (or XC_arrow?) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_crosshair)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_hand2)) ); // (or XC_hand1? ) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_question_arrow)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_xterm)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_X_cursor)) ); // (or XC_pirate?) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_watch)) ); // (or XC_clock?) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_fleur)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_top_right_corner)) ); // NESW not available in X11 + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_top_left_corner)) ); // NWSE not available in X11 + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_sb_v_double_arrow)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_sb_h_double_arrow)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_sb_up_arrow)) ); // (or XC_center_ptr?) +} + +void CIrrDeviceLinux::CCursorControl::update() +{ + if ( (u32)ActiveIcon < Cursors.size() && !Cursors[ActiveIcon].Frames.empty() && Cursors[ActiveIcon].FrameTime ) + { + // update animated cursors. This could also be done by X11 in case someone wants to figure that out (this way was just easier to implement) + u32 now = Device->getTimer()->getRealTime(); + u32 frame = ((now - ActiveIconStartTime) / Cursors[ActiveIcon].FrameTime) % Cursors[ActiveIcon].Frames.size(); + XDefineCursor(Device->display, Device->window, Cursors[ActiveIcon].Frames[frame].IconHW); + } +} +#endif + +//! Sets the active cursor icon +void CIrrDeviceLinux::CCursorControl::setActiveIcon(gui::ECURSOR_ICON iconId) +{ + if ( iconId >= (s32)Cursors.size() ) + return; + +#ifdef _IRR_COMPILE_WITH_X11_ + if ( Cursors[iconId].Frames.size() ) + XDefineCursor(Device->display, Device->window, Cursors[iconId].Frames[0].IconHW); +#endif + + ActiveIconStartTime = Device->getTimer()->getRealTime(); + ActiveIcon = iconId; +} + + +//! Add a custom sprite as cursor icon. +gui::ECURSOR_ICON CIrrDeviceLinux::CCursorControl::addIcon(const gui::SCursorSprite& icon) +{ + if ( icon.SpriteId >= 0 ) + { + CursorX11 cX11; + cX11.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect rectIcon = icon.SpriteBank->getPositions()[rectId]; + Cursor cursor = Device->TextureToCursor(icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cX11.Frames.push_back( CursorFrameX11(cursor) ); + } + + Cursors.push_back( cX11 ); + + return (gui::ECURSOR_ICON)(Cursors.size() - 1); + } + return gui::ECI_NORMAL; +} + +//! replace the given cursor icon. +void CIrrDeviceLinux::CCursorControl::changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon) +{ + if ( iconId >= (s32)Cursors.size() ) + return; + + for ( u32 i=0; i < Cursors[iconId].Frames.size(); ++i ) + XFreeCursor(Device->display, Cursors[iconId].Frames[i].IconHW); + + if ( icon.SpriteId >= 0 ) + { + CursorX11 cX11; + cX11.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect rectIcon = icon.SpriteBank->getPositions()[rectId]; + Cursor cursor = Device->TextureToCursor(icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cX11.Frames.push_back( CursorFrameX11(cursor) ); + } + + Cursors[iconId] = cX11; + } +} + +irr::core::dimension2di CIrrDeviceLinux::CCursorControl::getSupportedIconSize() const +{ + // this returns the closest match that is smaller or same size, so we just pass a value which should be large enough for cursors + unsigned int width, height; + XQueryBestCursor(Device->display, Device->window, 64, 64, &width, &height); + + return core::dimension2di(width, height); +} + } // end namespace #endif // _IRR_COMPILE_WITH_X11_DEVICE_ diff --git a/source/Irrlicht/CIrrDeviceLinux.h b/source/Irrlicht/CIrrDeviceLinux.h index 169e4101..c6ea3cda 100644 --- a/source/Irrlicht/CIrrDeviceLinux.h +++ b/source/Irrlicht/CIrrDeviceLinux.h @@ -27,6 +27,7 @@ #include #include +#include #ifdef _IRR_LINUX_X11_VIDMODE_ #include #endif @@ -125,6 +126,15 @@ namespace irr return EIDT_X11; } +#ifdef _IRR_COMPILE_WITH_X11_ + // convert an Irrlicht texture to a X11 cursor + Cursor TextureToCursor(irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot); + Cursor TextureToMonochromeCursor(irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot); +#ifdef _IRR_LINUX_XCURSOR_ + Cursor TextureToARGBCursor(irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot); +#endif +#endif + private: //! create the driver @@ -145,40 +155,9 @@ namespace irr { public: - CCursorControl(CIrrDeviceLinux* dev, bool null) - : Device(dev), IsVisible(true), Null(null), UseReferenceRect(false) - { -#ifdef _IRR_COMPILE_WITH_X11_ - if (!Null) - { - XGCValues values; - unsigned long valuemask = 0; + CCursorControl(CIrrDeviceLinux* dev, bool null); - XColor fg, bg; - - // this code, for making the cursor invisible was sent in by - // Sirshane, thank your very much! - - - Pixmap invisBitmap = XCreatePixmap(Device->display, Device->window, 32, 32, 1); - Pixmap maskBitmap = XCreatePixmap(Device->display, Device->window, 32, 32, 1); - Colormap screen_colormap = DefaultColormap( Device->display, DefaultScreen( Device->display ) ); - XAllocNamedColor( Device->display, screen_colormap, "black", &fg, &fg ); - XAllocNamedColor( Device->display, screen_colormap, "white", &bg, &bg ); - - GC gc = XCreateGC( Device->display, invisBitmap, valuemask, &values ); - - XSetForeground( Device->display, gc, BlackPixel( Device->display, DefaultScreen( Device->display ) ) ); - XFillRectangle( Device->display, invisBitmap, gc, 0, 0, 32, 32 ); - XFillRectangle( Device->display, maskBitmap, gc, 0, 0, 32, 32 ); - - invisCursor = XCreatePixmapCursor( Device->display, invisBitmap, maskBitmap, &fg, &bg, 1, 1 ); - XFreeGC(Device->display, gc); - XFreePixmap(Device->display, invisBitmap); - XFreePixmap(Device->display, maskBitmap); - } -#endif - } + ~CCursorControl(); //! Changes the visible state of the mouse cursor. virtual void setVisible(bool visible) @@ -295,6 +274,27 @@ namespace irr UseReferenceRect = false; } + //! Sets the active cursor icon + virtual void setActiveIcon(gui::ECURSOR_ICON iconId); + + //! Gets the currently active icon + virtual gui::ECURSOR_ICON getActiveIcon() const + { + return ActiveIcon; + } + + //! Add a custom sprite as cursor icon. + virtual gui::ECURSOR_ICON addIcon(const gui::SCursorSprite& icon); + + //! replace the given cursor icon. + virtual void changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon); + + //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. + virtual core::dimension2di getSupportedIconSize() const; + +#ifdef _IRR_COMPILE_WITH_X11_ + void update(); +#endif private: void updateCursorPos() @@ -327,10 +327,35 @@ namespace irr core::rect ReferenceRect; #ifdef _IRR_COMPILE_WITH_X11_ Cursor invisCursor; + + struct CursorFrameX11 + { + CursorFrameX11() : IconHW(0) {} + CursorFrameX11(Cursor icon) : IconHW(icon) {} + + Cursor IconHW; // hardware cursor + }; + + struct CursorX11 + { + CursorX11() {} + explicit CursorX11(Cursor iconHw, u32 frameTime=0) : FrameTime(frameTime) + { + Frames.push_back( CursorFrameX11(iconHw) ); + } + core::array Frames; + u32 FrameTime; + }; + + core::array Cursors; + + void initCursors(); #endif bool IsVisible; bool Null; bool UseReferenceRect; + gui::ECURSOR_ICON ActiveIcon; + u32 ActiveIconStartTime; }; friend class CCursorControl; diff --git a/source/Irrlicht/CIrrDeviceSDL.cpp b/source/Irrlicht/CIrrDeviceSDL.cpp index b4f8e5cf..8fd70174 100644 --- a/source/Irrlicht/CIrrDeviceSDL.cpp +++ b/source/Irrlicht/CIrrDeviceSDL.cpp @@ -32,13 +32,13 @@ namespace irr #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ IVideoDriver* createDirectX8Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, - bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias); + bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter); #endif #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ IVideoDriver* createDirectX9Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, - bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias); + bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter); #endif #ifdef _IRR_COMPILE_WITH_OPENGL_ @@ -226,7 +226,7 @@ void CIrrDeviceSDL::createDriver() VideoDriver = video::createDirectX8Driver(CreationParams.WindowSize, Info.window, CreationParams.Bits, CreationParams.Fullscreen, CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, - CreationParams.AntiAlias); + CreationParams.AntiAlias, CreationParams.DisplayAdapter); if (!VideoDriver) { @@ -244,7 +244,7 @@ void CIrrDeviceSDL::createDriver() VideoDriver = video::createDirectX9Driver(CreationParams.WindowSize, Info.window, CreationParams.Bits, CreationParams.Fullscreen, CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, - CreationParams.AntiAlias); + CreationParams.AntiAlias, CreationParams.DisplayAdapter); if (!VideoDriver) { @@ -266,7 +266,7 @@ void CIrrDeviceSDL::createDriver() case video::EDT_BURNINGSVIDEO: #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - VideoDriver = video::createSoftwareDriver2(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); #else os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR); #endif diff --git a/source/Irrlicht/CIrrDeviceStub.h b/source/Irrlicht/CIrrDeviceStub.h index 2167fc4b..862ddaaf 100644 --- a/source/Irrlicht/CIrrDeviceStub.h +++ b/source/Irrlicht/CIrrDeviceStub.h @@ -39,9 +39,8 @@ namespace irr IVideoDriver* createSoftwareDriver(const core::dimension2d& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter); - IVideoDriver* createSoftwareDriver2(const core::dimension2d& windowSize, - bool fullscreen, io::IFileSystem* io, - video::IImagePresenter* presenter); + IVideoDriver* createBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, video::IImagePresenter* presenter); IVideoDriver* createNullDriver(io::IFileSystem* io, const core::dimension2d& screenSize); } diff --git a/source/Irrlicht/CIrrDeviceWin32.cpp b/source/Irrlicht/CIrrDeviceWin32.cpp index ea8d08b1..0054c0c5 100644 --- a/source/Irrlicht/CIrrDeviceWin32.cpp +++ b/source/Irrlicht/CIrrDeviceWin32.cpp @@ -15,6 +15,7 @@ #include "irrString.h" #include "COSOperator.h" #include "dimension2d.h" +#include "IGUISpriteBank.h" #include #include "SExposedVideoData.h" @@ -25,13 +26,13 @@ namespace irr #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ IVideoDriver* createDirectX8Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, - bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias); + bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter); #endif #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ IVideoDriver* createDirectX9Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, - bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias); + bool pureSoftware, bool highPrecisionFPU, bool vsync, u8 antiAlias, u32 displayAdapter); #endif #ifdef _IRR_COMPILE_WITH_OPENGL_ @@ -486,7 +487,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) // because Windows forgot about that in the meantime dev = getDeviceFromHWnd(hWnd); if (dev) + { + dev->getCursorControl()->setActiveIcon( dev->getCursorControl()->getActiveIcon() ); dev->getCursorControl()->setVisible( dev->getCursorControl()->isVisible() ); + } break; case WM_INPUTLANGCHANGE: @@ -535,7 +539,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = NULL; - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hCursor = 0; // LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = 0; wcex.lpszClassName = ClassName; @@ -583,6 +587,8 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) HWnd = CreateWindow( ClassName, __TEXT(""), style, windowLeft, windowTop, realWidth, realHeight, NULL, NULL, hInstance, NULL); CreationParams.WindowId = HWnd; +// CreationParams.WindowSize.Width = realWidth; +// CreationParams.WindowSize.Height = realHeight; ShowWindow(HWnd, SW_SHOW); UpdateWindow(HWnd); @@ -607,7 +613,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) // create cursor control - Win32CursorControl = new CCursorControl(CreationParams.WindowSize, HWnd, CreationParams.Fullscreen); + Win32CursorControl = new CCursorControl(this, CreationParams.WindowSize, HWnd, CreationParams.Fullscreen); CursorControl = Win32CursorControl; // initialize doubleclicks with system values @@ -633,7 +639,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) // get the codepage used for keyboard input KEYBOARD_INPUT_HKL = GetKeyboardLayout(0); - KEYBOARD_INPUT_CODEPAGE = LocaleIdToCodepage( LOWORD(KEYBOARD_INPUT_HKL) ); + KEYBOARD_INPUT_CODEPAGE = LocaleIdToCodepage( LOWORD(KEYBOARD_INPUT_HKL) ); } @@ -667,7 +673,7 @@ void CIrrDeviceWin32::createDriver() VideoDriver = video::createDirectX8Driver(CreationParams.WindowSize, HWnd, CreationParams.Bits, CreationParams.Fullscreen, CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, - CreationParams.AntiAlias); + CreationParams.AntiAlias, CreationParams.DisplayAdapter); if (!VideoDriver) { @@ -685,7 +691,7 @@ void CIrrDeviceWin32::createDriver() VideoDriver = video::createDirectX9Driver(CreationParams.WindowSize, HWnd, CreationParams.Bits, CreationParams.Fullscreen, CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, - CreationParams.AntiAlias); + CreationParams.AntiAlias, CreationParams.DisplayAdapter); if (!VideoDriver) { @@ -747,7 +753,7 @@ void CIrrDeviceWin32::createDriver() #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ switchToFullScreen(); - VideoDriver = video::createSoftwareDriver2(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); #else os::Printer::log("Burning's Video driver was not compiled in.", ELL_ERROR); #endif @@ -770,6 +776,8 @@ bool CIrrDeviceWin32::run() { os::Timer::tick(); + static_cast(CursorControl)->update(); + MSG msg; while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) @@ -1566,6 +1574,217 @@ void CIrrDeviceWin32::ReportLastWinApiError() } } +// Convert an Irrlicht texture to a Windows cursor +// Based on http://www.codeguru.com/cpp/w-p/win32/cursors/article.php/c4529/ +HCURSOR CIrrDeviceWin32::TextureToCursor(HWND hwnd, irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot) +{ + // + // create the bitmaps needed for cursors from the texture + + HDC dc = GetDC(hwnd); + HDC andDc = CreateCompatibleDC(dc); + HDC xorDc = CreateCompatibleDC(dc); + HBITMAP andBitmap = CreateCompatibleBitmap(dc, sourceRect.getWidth(), sourceRect.getHeight()); + HBITMAP xorBitmap = CreateCompatibleBitmap(dc, sourceRect.getWidth(), sourceRect.getHeight()); + + HBITMAP oldAndBitmap = (HBITMAP)SelectObject(andDc, andBitmap); + HBITMAP oldXorBitmap = (HBITMAP)SelectObject(xorDc, xorBitmap); + + + video::ECOLOR_FORMAT format = tex->getColorFormat(); + u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; + u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; + u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; + const u8* data = (const u8*)tex->lock(true, 0); + data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); + for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) + { + data += bytesLeftGap; + for ( s32 x = 0; x < sourceRect.getWidth(); ++x ) + { + video::SColor pixelCol; + pixelCol.setData((const void*)data, format); + data += bytesPerPixel; + + if ( pixelCol.getAlpha() == 0 ) // transparent + { + SetPixel(andDc, x, y, RGB(255,255,255)); + SetPixel(xorDc, x, y, RGB(0,0,0)); + } + else // color + { + SetPixel(andDc, x, y, RGB(0,0,0)); + SetPixel(xorDc, x, y, RGB(pixelCol.getRed(), pixelCol.getGreen(), pixelCol.getBlue())); + } + } + data += bytesRightGap; + } + tex->unlock(); + + SelectObject(andDc, oldAndBitmap); + SelectObject(xorDc, oldXorBitmap); + + DeleteDC(xorDc); + DeleteDC(andDc); + + ReleaseDC(hwnd, dc); + + + // + // create the cursor + + ICONINFO iconinfo; + iconinfo.fIcon = false; // type is cursor not icon + iconinfo.xHotspot = hotspot.X; + iconinfo.yHotspot = hotspot.Y; + iconinfo.hbmMask = andBitmap; + iconinfo.hbmColor = xorBitmap; + + HCURSOR cursor = CreateIconIndirect(&iconinfo); + + DeleteObject(andBitmap); + DeleteObject(xorBitmap); + + return cursor; +} + + +CIrrDeviceWin32::CCursorControl::CCursorControl(CIrrDeviceWin32* device, const core::dimension2d& wsize, HWND hwnd, bool fullscreen) + : Device(device), WindowSize(wsize), InvWindowSize(0.0f, 0.0f), + HWnd(hwnd), BorderX(0), BorderY(0), + UseReferenceRect(false), IsVisible(true) + , ActiveIcon(gui::ECI_NORMAL), ActiveIconStartTime(0) +{ + if (WindowSize.Width!=0) + InvWindowSize.Width = 1.0f / WindowSize.Width; + + if (WindowSize.Height!=0) + InvWindowSize.Height = 1.0f / WindowSize.Height; + + updateBorderSize(fullscreen, false); + initCursors(); +} + +CIrrDeviceWin32::CCursorControl::~CCursorControl() +{ + for ( u32 i=0; i < Cursors.size(); ++i ) + { + for ( u32 f=0; f < Cursors[i].Frames.size(); ++f ) + { + DestroyCursor(Cursors[i].Frames[f].IconHW); + } + } +} + + +void CIrrDeviceWin32::CCursorControl::initCursors() +{ + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_ARROW)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_CROSS)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_HAND)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_HELP)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_IBEAM)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_NO)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_WAIT)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZEALL)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZENESW)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZENWSE)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZENS)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZEWE)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_UPARROW)) ); +} + + +void CIrrDeviceWin32::CCursorControl::update() +{ + if ( !Cursors[ActiveIcon].Frames.empty() && Cursors[ActiveIcon].FrameTime ) + { + // update animated cursors. This could also be done by X11 in case someone wants to figure that out (this way was just easier to implement) + u32 now = Device->getTimer()->getRealTime(); + u32 frame = ((now - ActiveIconStartTime) / Cursors[ActiveIcon].FrameTime) % Cursors[ActiveIcon].Frames.size(); + SetCursor( Cursors[ActiveIcon].Frames[frame].IconHW ); + } +} + +//! Sets the active cursor icon +void CIrrDeviceWin32::CCursorControl::setActiveIcon(gui::ECURSOR_ICON iconId) +{ + if ( iconId >= (s32)Cursors.size() ) + return; + + ActiveIcon = iconId; + ActiveIconStartTime = Device->getTimer()->getRealTime(); + if ( Cursors[ActiveIcon].Frames.size() ) + SetCursor( Cursors[ActiveIcon].Frames[0].IconHW ); +} + + +//! Add a custom sprite as cursor icon. +gui::ECURSOR_ICON CIrrDeviceWin32::CCursorControl::addIcon(const gui::SCursorSprite& icon) +{ + if ( icon.SpriteId >= 0 ) + { + CursorW32 cW32; + cW32.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect rectIcon = icon.SpriteBank->getPositions()[rectId]; + + HCURSOR hc = Device->TextureToCursor(HWnd, icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cW32.Frames.push_back( CursorFrameW32(hc) ); + } + + Cursors.push_back( cW32 ); + return (gui::ECURSOR_ICON)(Cursors.size() - 1); + } + return gui::ECI_NORMAL; +} + + +//! replace the given cursor icon. +void CIrrDeviceWin32::CCursorControl::changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon) +{ + if ( iconId >= (s32)Cursors.size() ) + return; + + for ( u32 i=0; i < Cursors[iconId].Frames.size(); ++i ) + DestroyCursor(Cursors[iconId].Frames[i].IconHW); + + if ( icon.SpriteId >= 0 ) + { + CursorW32 cW32; + cW32.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect rectIcon = icon.SpriteBank->getPositions()[rectId]; + + HCURSOR hc = Device->TextureToCursor(HWnd, icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cW32.Frames.push_back( CursorFrameW32(hc) ); + } + + Cursors[iconId] = cW32; + } +} + + +//! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. +core::dimension2di CIrrDeviceWin32::CCursorControl::getSupportedIconSize() const +{ + core::dimension2di result; + + result.Width = GetSystemMetrics(SM_CXCURSOR); + result.Height = GetSystemMetrics(SM_CYCURSOR); + + return result; +} + + + } // end namespace #endif // _IRR_COMPILE_WITH_WINDOWS_DEVICE_ diff --git a/source/Irrlicht/CIrrDeviceWin32.h b/source/Irrlicht/CIrrDeviceWin32.h index 8e694a9f..637e0ecb 100644 --- a/source/Irrlicht/CIrrDeviceWin32.h +++ b/source/Irrlicht/CIrrDeviceWin32.h @@ -111,24 +111,16 @@ namespace irr //! Does call GetLastError and on errors formats the errortext and displays it in a messagebox. static void ReportLastWinApiError(); + // convert an Irrlicht texture to a windows cursor + HCURSOR TextureToCursor(HWND hwnd, irr::video::ITexture * tex, const core::rect& sourceRect, const core::position2d &hotspot); + //! Implementation of the win32 cursor control class CCursorControl : public gui::ICursorControl { public: - CCursorControl(const core::dimension2d& wsize, HWND hwnd, bool fullscreen) - : WindowSize(wsize), InvWindowSize(0.0f, 0.0f), - HWnd(hwnd), BorderX(0), BorderY(0), - UseReferenceRect(false), IsVisible(true) - { - if (WindowSize.Width!=0) - InvWindowSize.Width = 1.0f / WindowSize.Width; - - if (WindowSize.Height!=0) - InvWindowSize.Height = 1.0f / WindowSize.Height; - - updateBorderSize(fullscreen, false); - } + CCursorControl(CIrrDeviceWin32* device, const core::dimension2d& wsize, HWND hwnd, bool fullscreen); + ~CCursorControl(); //! Changes the visible state of the mouse cursor. virtual void setVisible(bool visible) @@ -280,6 +272,27 @@ namespace irr } } + + //! Sets the active cursor icon + virtual void setActiveIcon(gui::ECURSOR_ICON iconId); + + //! Gets the currently active icon + virtual gui::ECURSOR_ICON getActiveIcon() const + { + return ActiveIcon; + } + + //! Add a custom sprite as cursor icon. + virtual gui::ECURSOR_ICON addIcon(const gui::SCursorSprite& icon); + + //! replace the given cursor icon. + virtual void changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon); + + //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. + virtual core::dimension2di getSupportedIconSize() const; + + void update(); + private: //! Updates the internal cursor position @@ -316,6 +329,7 @@ namespace irr } } + CIrrDeviceWin32* Device; core::position2d CursorPos; core::dimension2d WindowSize; core::dimension2d InvWindowSize; @@ -325,6 +339,32 @@ namespace irr core::rect ReferenceRect; bool UseReferenceRect; bool IsVisible; + + + struct CursorFrameW32 + { + CursorFrameW32() : IconHW(0) {} + CursorFrameW32(HCURSOR icon) : IconHW(icon) {} + + HCURSOR IconHW; // hardware cursor + }; + + struct CursorW32 + { + CursorW32() {} + explicit CursorW32(HCURSOR iconHw, u32 frameTime=0) : FrameTime(frameTime) + { + Frames.push_back( CursorFrameW32(iconHw) ); + } + core::array Frames; + u32 FrameTime; + }; + + core::array Cursors; + gui::ECURSOR_ICON ActiveIcon; + u32 ActiveIconStartTime; + + void initCursors(); }; //! returns the win32 cursor control diff --git a/source/Irrlicht/CIrrDeviceWinCE.cpp b/source/Irrlicht/CIrrDeviceWinCE.cpp index a38ebe52..27a5abcd 100644 --- a/source/Irrlicht/CIrrDeviceWinCE.cpp +++ b/source/Irrlicht/CIrrDeviceWinCE.cpp @@ -30,13 +30,13 @@ namespace irr #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ IVideoDriver* createDirectX8Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, - bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias); + bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias, u32 displayAdapter); #endif #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ IVideoDriver* createDirectX9Driver(const core::dimension2d& screenSize, HWND window, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, - bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias); + bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias, u32 displayAdapter); #endif #ifdef _IRR_COMPILE_WITH_OPENGL_ @@ -471,7 +471,8 @@ void CIrrDeviceWinCE::createDriver() case video::EDT_DIRECT3D8: #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ VideoDriver = video::createDirectX8Driver(CreationParams.WindowSize, HWnd, CreationParams.Bits, CreationParams.Fullscreen, - CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, CreationParams.AntiAlias); + CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, CreationParams.AntiAlias + , CreationParams.DisplayAdapter); if (!VideoDriver) { os::Printer::log("Could not create DIRECT3D8 Driver.", ELL_ERROR); @@ -485,7 +486,8 @@ void CIrrDeviceWinCE::createDriver() case video::EDT_DIRECT3D9: #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ VideoDriver = video::createDirectX9Driver(CreationParams.WindowSize, HWnd, CreationParams.Bits, CreationParams.Fullscreen, - CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, CreationParams.AntiAlias); + CreationParams.Stencilbuffer, FileSystem, false, CreationParams.HighPrecisionFPU, CreationParams.Vsync, CreationParams.AntiAlias + , CreationParams.DisplayAdapter); if (!VideoDriver) { os::Printer::log("Could not create DIRECT3D9 Driver.", ELL_ERROR); @@ -527,7 +529,7 @@ void CIrrDeviceWinCE::createDriver() #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ if (CreationParams.Fullscreen) switchToFullScreen(); - VideoDriver = video::createSoftwareDriver2(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); #else os::Printer::log("Burning's Video driver was not compiled in.", ELL_ERROR); #endif diff --git a/source/Irrlicht/CLightSceneNode.cpp b/source/Irrlicht/CLightSceneNode.cpp index a1ecc1c6..8d9c71c0 100644 --- a/source/Irrlicht/CLightSceneNode.cpp +++ b/source/Irrlicht/CLightSceneNode.cpp @@ -188,7 +188,8 @@ void CLightSceneNode::doLightRecalc() const f32 r = LightData.Radius * LightData.Radius * 0.5f; BBox.MaxEdge.set( r, r, r ); BBox.MinEdge.set( -r, -r, -r ); - setAutomaticCulling( scene::EAC_BOX ); + //setAutomaticCulling( scene::EAC_BOX ); + setAutomaticCulling( scene::EAC_OFF ); LightData.Position = getAbsolutePosition(); } if (LightData.Type == video::ELT_DIRECTIONAL) diff --git a/source/Irrlicht/CMD2MeshFileLoader.cpp b/source/Irrlicht/CMD2MeshFileLoader.cpp index 2d2fe0d7..cafaeba4 100644 --- a/source/Irrlicht/CMD2MeshFileLoader.cpp +++ b/source/Irrlicht/CMD2MeshFileLoader.cpp @@ -203,6 +203,7 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh) if (!file->read(textureCoords, sizeof(SMD2TextureCoordinate)*header.numTexcoords)) { + delete[] textureCoords; os::Printer::log("MD2 Loader: Error reading TextureCoords.", file->getFileName(), ELL_ERROR); return false; } @@ -222,6 +223,9 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh) SMD2Triangle *triangles = new SMD2Triangle[header.numTriangles]; if (!file->read(triangles, header.numTriangles *sizeof(SMD2Triangle))) { + delete[] triangles; + delete[] textureCoords; + os::Printer::log("MD2 Loader: Error reading triangles.", file->getFileName(), ELL_ERROR); return false; } diff --git a/source/Irrlicht/CMY3DMeshFileLoader.cpp b/source/Irrlicht/CMY3DMeshFileLoader.cpp index 26b58dc3..e7c98cd6 100644 --- a/source/Irrlicht/CMY3DMeshFileLoader.cpp +++ b/source/Irrlicht/CMY3DMeshFileLoader.cpp @@ -246,8 +246,6 @@ IAnimatedMesh* CMY3DMeshFileLoader::createMesh(io::IReadFile* file) // loading meshes - SMesh* mesh = new SMesh(); - if (id!=MY3D_MESH_LIST_ID) { os::Printer::log("Can not find MY3D_MESH_LIST_ID, loading failed!", ELL_ERROR); @@ -637,6 +635,7 @@ IAnimatedMesh* CMY3DMeshFileLoader::createMesh(io::IReadFile* file) } // creating mesh + SMesh* mesh = new SMesh(); for (u32 num=0; numisDirectory(i)) { - addItem(full, list->getFileSize(i), false, RealFileNames.size()); + addItem(full, list->getFileOffset(i), list->getFileSize(i), false, RealFileNames.size()); RealFileNames.push_back(list->getFullFileName(i)); } else @@ -131,7 +131,7 @@ void CMountPointReader::buildDirectory() if ( rel != "." && rel != ".." ) { - addItem(full, 0, true, 0); + addItem(full, 0, 0, true, 0); Parent->changeWorkingDirectoryTo(pwd); buildDirectory(); Parent->changeWorkingDirectoryTo(".."); diff --git a/source/Irrlicht/CNPKReader.cpp b/source/Irrlicht/CNPKReader.cpp index a2ef73a0..5412b396 100644 --- a/source/Irrlicht/CNPKReader.cpp +++ b/source/Irrlicht/CNPKReader.cpp @@ -222,8 +222,7 @@ bool CNPKReader::scanLocalHeader() #ifdef IRR_DEBUG_NPK_READER os::Printer::log("Name", entry.Name); #endif - addItem((isDir?dirName:dirName+entry.Name), entry.Length, isDir, Offsets.size()); - Offsets.push_back(entry.Offset+header.Offset); + addItem((isDir?dirName:dirName+entry.Name), entry.Offset+header.Offset, entry.Length, isDir); } return true; } @@ -244,12 +243,11 @@ IReadFile* CNPKReader::createAndOpenFile(const io::path& filename) //! opens a file by index IReadFile* CNPKReader::createAndOpenFile(u32 index) { - if (index < Files.size()) - { - return createLimitReadFile(Files[index].FullName, File, Offsets[Files[index].ID], Files[index].Size); - } - else + if (index >= Files.size() ) return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); } void CNPKReader::readString(core::stringc& name) diff --git a/source/Irrlicht/CNPKReader.h b/source/Irrlicht/CNPKReader.h index a625d505..c7222e04 100644 --- a/source/Irrlicht/CNPKReader.h +++ b/source/Irrlicht/CNPKReader.h @@ -117,9 +117,6 @@ namespace io void readString(core::stringc& name); IReadFile* File; - - //! Contains offsets of the files from the start of the archive file - core::array Offsets; }; } // end namespace io diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index dd1a714c..1455c3c0 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -33,6 +33,9 @@ IImageLoader* createImageLoaderTGA(); //! creates a loader which is able to load psd images IImageLoader* createImageLoaderPSD(); +//! creates a loader which is able to load dds images +IImageLoader* createImageLoaderDDS(); + //! creates a loader which is able to load pcx images IImageLoader* createImageLoaderPCX(); @@ -42,6 +45,12 @@ IImageLoader* createImageLoaderPNG(); //! creates a loader which is able to load WAL images IImageLoader* createImageLoaderWAL(); +//! creates a loader which is able to load halflife images +IImageLoader* createImageLoaderHalfLife(); + +//! creates a loader which is able to load lmp images +IImageLoader* createImageLoaderLMP(); + //! creates a loader which is able to load ppm/pgm/pbm images IImageLoader* createImageLoaderPPM(); @@ -108,6 +117,9 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d& scre #ifdef _IRR_COMPILE_WITH_PSD_LOADER_ SurfaceLoader.push_back(video::createImageLoaderPSD()); #endif +#ifdef _IRR_COMPILE_WITH_DDS_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderDDS()); +#endif #ifdef _IRR_COMPILE_WITH_PCX_LOADER_ SurfaceLoader.push_back(video::createImageLoaderPCX()); #endif @@ -117,6 +129,13 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d& scre #ifdef _IRR_COMPILE_WITH_WAL_LOADER_ SurfaceLoader.push_back(video::createImageLoaderWAL()); #endif +#ifdef _IRR_COMPILE_WITH_LMP_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderLMP()); +#endif +#ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderHalfLife()); +#endif + #ifdef _IRR_COMPILE_WITH_PPM_LOADER_ SurfaceLoader.push_back(video::createImageLoaderPPM()); #endif diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp index d2ee7e1c..8be9def4 100644 --- a/source/Irrlicht/COpenGLDriver.cpp +++ b/source/Irrlicht/COpenGLDriver.cpp @@ -3443,7 +3443,9 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 glPopAttrib(); } - +//! Fills the stencil shadow with color. After the shadow volume has been drawn +//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this +//! to draw the color of the shadow. void COpenGLDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) { diff --git a/source/Irrlicht/CPakReader.cpp b/source/Irrlicht/CPakReader.cpp index 0587172f..d8ac68c4 100644 --- a/source/Irrlicht/CPakReader.cpp +++ b/source/Irrlicht/CPakReader.cpp @@ -145,7 +145,6 @@ bool CPakReader::scanLocalHeader() const int numberOfFiles = header.length / sizeof(SPAKFileEntry); - Offsets.reallocate(numberOfFiles); // Loop through each entry in the table of contents for(int i = 0; i < numberOfFiles; i++) { @@ -162,8 +161,7 @@ bool CPakReader::scanLocalHeader() entry.length = os::Byteswap::byteswap(entry.length); #endif - addItem(io::path(entry.name), entry.length, false, Offsets.size()); - Offsets.push_back(entry.offset); + addItem(io::path(entry.name), entry.offset, entry.length, false ); } return true; } @@ -184,12 +182,11 @@ IReadFile* CPakReader::createAndOpenFile(const io::path& filename) //! opens a file by index IReadFile* CPakReader::createAndOpenFile(u32 index) { - if (index < Files.size()) - { - return createLimitReadFile(Files[index].FullName, File, Offsets[Files[index].ID], Files[index].Size); - } - else + if (index >= Files.size() ) return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); } } // end namespace io diff --git a/source/Irrlicht/CPakReader.h b/source/Irrlicht/CPakReader.h index 621afe90..00d282af 100644 --- a/source/Irrlicht/CPakReader.h +++ b/source/Irrlicht/CPakReader.h @@ -114,8 +114,6 @@ namespace io IReadFile* File; - //! Contains offsets of the files from the start of the archive file - core::array Offsets; }; } // end namespace io diff --git a/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp b/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp index 6ecead67..1d1f9d77 100644 --- a/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp +++ b/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp @@ -174,10 +174,18 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall, void CParticleAnimatedMeshSceneNodeEmitter::setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node ) { Node = node; + AnimatedMesh = 0; + BaseMesh = 0; + TotalVertices = 0; + VertexPerMeshBufferList.clear(); + if ( !node ) + { + return; + } + AnimatedMesh = node->getMesh(); BaseMesh = AnimatedMesh->getMesh(0); - TotalVertices = 0; MBCount = BaseMesh->getMeshBufferCount(); VertexPerMeshBufferList.reallocate(MBCount); for( u32 i = 0; i < MBCount; ++i ) diff --git a/source/Irrlicht/CParticleAttractionAffector.cpp b/source/Irrlicht/CParticleAttractionAffector.cpp index 872c9457..0fc38603 100644 --- a/source/Irrlicht/CParticleAttractionAffector.cpp +++ b/source/Irrlicht/CParticleAttractionAffector.cpp @@ -3,6 +3,7 @@ // For conditions of distribution and use, see copyright notice in irrlicht.h #include "CParticleAttractionAffector.h" +#include "IAttributes.h" namespace irr { @@ -56,6 +57,27 @@ void CParticleAttractionAffector::affect(u32 now, SParticle* particlearray, u32 } } +//! Writes attributes of the object. +void CParticleAttractionAffector::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Point", Point); + out->addFloat("Speed", Speed); + out->addBool("AffectX", AffectX); + out->addBool("AffectY", AffectY); + out->addBool("AffectZ", AffectZ); + out->addBool("Attract", Attract); +} + +//! Reads attributes of the object. +void CParticleAttractionAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Point = in->getAttributeAsVector3d("Point"); + Speed = in->getAttributeAsFloat("Speed"); + AffectX = in->getAttributeAsBool("AffectX"); + AffectY = in->getAttributeAsBool("AffectY"); + AffectZ = in->getAttributeAsBool("AffectZ"); + Attract = in->getAttributeAsBool("Attract"); +} } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CParticleAttractionAffector.h b/source/Irrlicht/CParticleAttractionAffector.h index 0c5eddac..241083fb 100644 --- a/source/Irrlicht/CParticleAttractionAffector.h +++ b/source/Irrlicht/CParticleAttractionAffector.h @@ -62,6 +62,12 @@ public: //! Get whether or not the particles Z position are affected virtual bool getAffectZ() const { return AffectZ; } + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + private: core::vector3df Point; diff --git a/source/Irrlicht/CParticleBoxEmitter.cpp b/source/Irrlicht/CParticleBoxEmitter.cpp index 138e0515..4486440c 100644 --- a/source/Irrlicht/CParticleBoxEmitter.cpp +++ b/source/Irrlicht/CParticleBoxEmitter.cpp @@ -109,6 +109,10 @@ void CParticleBoxEmitter::serializeAttributes(io::IAttributes* out, io::SAttribu b *= 0.5f; out->addVector3d("Box", b); out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); out->addColor("MinStartColor", MinStartColor); @@ -144,6 +148,11 @@ void CParticleBoxEmitter::deserializeAttributes(io::IAttributes* in, io::SAttrib if (Direction.getLength() == 0) Direction.set(0,0.01f,0); + MinStartSize.Width = in->getAttributeAsFloat("MinStartSizeWidth"); + MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); + MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); + MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleCylinderEmitter.cpp b/source/Irrlicht/CParticleCylinderEmitter.cpp index 095f447e..1c0937bf 100644 --- a/source/Irrlicht/CParticleCylinderEmitter.cpp +++ b/source/Irrlicht/CParticleCylinderEmitter.cpp @@ -4,6 +4,7 @@ #include "CParticleCylinderEmitter.h" #include "os.h" +#include "IAttributes.h" namespace irr { @@ -115,6 +116,67 @@ s32 CParticleCylinderEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& return 0; } +//! Writes attributes of the object. +void CParticleCylinderEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Center", Center); + out->addVector3d("Normal", Normal); + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addFloat("Radius", Radius); + out->addFloat("Length", Length); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); + out->addBool("OutlineOnly", OutlineOnly); +} + +//! Reads attributes of the object. +void CParticleCylinderEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Center = in->getAttributeAsVector3d("Center"); + Normal = in->getAttributeAsVector3d("Normal"); + if (Normal.getLength() == 0) + Normal.set(0,1.f,0); + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + MinStartSize.Width = in->getAttributeAsFloat("MinStartSizeWidth"); + MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); + MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); + MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); + + Radius = in->getAttributeAsFloat("Radius"); + Length = in->getAttributeAsFloat("Length"); + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); + OutlineOnly = in->getAttributeAsBool("OutlineOnly"); +} + + } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CParticleCylinderEmitter.h b/source/Irrlicht/CParticleCylinderEmitter.h index 709aa567..be2465ae 100644 --- a/source/Irrlicht/CParticleCylinderEmitter.h +++ b/source/Irrlicht/CParticleCylinderEmitter.h @@ -110,6 +110,12 @@ public: //! Gets the minimum starting size for particles virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + private: core::array Particles; diff --git a/source/Irrlicht/CParticleMeshEmitter.cpp b/source/Irrlicht/CParticleMeshEmitter.cpp index 2f673550..34c2835a 100644 --- a/source/Irrlicht/CParticleMeshEmitter.cpp +++ b/source/Irrlicht/CParticleMeshEmitter.cpp @@ -178,6 +178,12 @@ void CParticleMeshEmitter::setMesh(IMesh* mesh) Mesh = mesh; TotalVertices = 0; + MBCount = 0; + VertexPerMeshBufferList.clear(); + + if ( !Mesh ) + return; + MBCount = Mesh->getMeshBufferCount(); VertexPerMeshBufferList.reallocate(MBCount); for( u32 i = 0; i < MBCount; ++i ) diff --git a/source/Irrlicht/CParticlePointEmitter.cpp b/source/Irrlicht/CParticlePointEmitter.cpp index 7a94f6d0..1982ee3a 100644 --- a/source/Irrlicht/CParticlePointEmitter.cpp +++ b/source/Irrlicht/CParticlePointEmitter.cpp @@ -88,6 +88,10 @@ s32 CParticlePointEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& out void CParticlePointEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const { out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); out->addColor("MinStartColor", MinStartColor); @@ -97,7 +101,6 @@ void CParticlePointEmitter::serializeAttributes(io::IAttributes* out, io::SAttri out->addInt("MaxAngleDegrees", MaxAngleDegrees); } - //! Reads attributes of the object. void CParticlePointEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) { @@ -105,6 +108,11 @@ void CParticlePointEmitter::deserializeAttributes(io::IAttributes* in, io::SAttr if (Direction.getLength() == 0) Direction.set(0,0.01f,0); + MinStartSize.Width = in->getAttributeAsFloat("MinStartSizeWidth"); + MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); + MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); + MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleRingEmitter.cpp b/source/Irrlicht/CParticleRingEmitter.cpp index e424f94a..76566bad 100644 --- a/source/Irrlicht/CParticleRingEmitter.cpp +++ b/source/Irrlicht/CParticleRingEmitter.cpp @@ -4,6 +4,7 @@ #include "CParticleRingEmitter.h" #include "os.h" +#include "IAttributes.h" namespace irr { @@ -106,6 +107,62 @@ s32 CParticleRingEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA return 0; } +//! Writes attributes of the object. +void CParticleRingEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Center", Center); + out->addFloat("Radius", Radius); + out->addFloat("RingThickness", RingThickness); + + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); +} + +//! Reads attributes of the object. +void CParticleRingEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Center = in->getAttributeAsVector3d("Center"); + Radius = in->getAttributeAsFloat("Radius"); + RingThickness = in->getAttributeAsFloat("RingThickness"); + + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + MinStartSize.Width = in->getAttributeAsFloat("MinStartSizeWidth"); + MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); + MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); + MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); + + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); +} + } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CParticleRingEmitter.h b/source/Irrlicht/CParticleRingEmitter.h index 21451e94..7c2dee6c 100644 --- a/source/Irrlicht/CParticleRingEmitter.h +++ b/source/Irrlicht/CParticleRingEmitter.h @@ -97,6 +97,12 @@ public: //! Get the thickness of the ring virtual f32 getRingThickness() const { return RingThickness; } + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + private: core::array Particles; diff --git a/source/Irrlicht/CParticleRotationAffector.cpp b/source/Irrlicht/CParticleRotationAffector.cpp index 90a15949..c9fa8f6c 100644 --- a/source/Irrlicht/CParticleRotationAffector.cpp +++ b/source/Irrlicht/CParticleRotationAffector.cpp @@ -3,6 +3,7 @@ // For conditions of distribution and use, see copyright notice in irrlicht.h #include "CParticleRotationAffector.h" +#include "IAttributes.h" namespace irr { @@ -47,6 +48,19 @@ void CParticleRotationAffector::affect(u32 now, SParticle* particlearray, u32 co } } +//! Writes attributes of the object. +void CParticleRotationAffector::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("PivotPoint", PivotPoint); + out->addVector3d("Speed", Speed); +} + +//! Reads attributes of the object. +void CParticleRotationAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + PivotPoint = in->getAttributeAsVector3d("PivotPoint"); + Speed = in->getAttributeAsVector3d("Speed"); +} } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CParticleRotationAffector.h b/source/Irrlicht/CParticleRotationAffector.h index 68fc81ad..9c449579 100644 --- a/source/Irrlicht/CParticleRotationAffector.h +++ b/source/Irrlicht/CParticleRotationAffector.h @@ -35,6 +35,12 @@ public: //! Get the speed in degrees per second virtual const core::vector3df& getSpeed() const { return Speed; } + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + private: core::vector3df PivotPoint; diff --git a/source/Irrlicht/CParticleSphereEmitter.cpp b/source/Irrlicht/CParticleSphereEmitter.cpp index 5fefe7df..950eb6de 100644 --- a/source/Irrlicht/CParticleSphereEmitter.cpp +++ b/source/Irrlicht/CParticleSphereEmitter.cpp @@ -5,6 +5,7 @@ #include "IrrCompileConfig.h" #include "CParticleSphereEmitter.h" #include "os.h" +#include "IAttributes.h" namespace irr { @@ -107,6 +108,60 @@ s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& ou return 0; } +//! Writes attributes of the object. +void CParticleSphereEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Center", Direction); + out->addFloat("Radius", Radius); + + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); +} + +//! Reads attributes of the object. +void CParticleSphereEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Center = in->getAttributeAsVector3d("Center"); + Radius = in->getAttributeAsFloat("Radius"); + + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + MinStartSize.Width = in->getAttributeAsFloat("MinStartSizeWidth"); + MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); + MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); + MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); + + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); +} + } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CParticleSphereEmitter.h b/source/Irrlicht/CParticleSphereEmitter.h index 7618d0bf..5273db45 100644 --- a/source/Irrlicht/CParticleSphereEmitter.h +++ b/source/Irrlicht/CParticleSphereEmitter.h @@ -91,6 +91,12 @@ public: //! Get the radius of the sphere for particle emissions virtual f32 getRadius() const { return Radius; } + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + private: core::array Particles; diff --git a/source/Irrlicht/CParticleSystemSceneNode.cpp b/source/Irrlicht/CParticleSystemSceneNode.cpp index 069c5473..88d4c13b 100644 --- a/source/Irrlicht/CParticleSystemSceneNode.cpp +++ b/source/Irrlicht/CParticleSystemSceneNode.cpp @@ -607,9 +607,24 @@ void CParticleSystemSceneNode::deserializeAttributes(io::IAttributes* in, io::SA case EPET_POINT: Emitter = createPointEmitter(); break; + case EPET_ANIMATED_MESH: + Emitter = createAnimatedMeshSceneNodeEmitter(NULL); // we can't set the node - the user will have to do this + break; case EPET_BOX: Emitter = createBoxEmitter(); break; + case EPET_CYLINDER: + Emitter = createCylinderEmitter(core::vector3df(0,0,0), 10.f, core::vector3df(0,1,0), 10.f); // (values here don't matter) + break; + case EPET_MESH: + Emitter = createMeshEmitter(NULL); // we can't set the mesh - the user will have to do this + break; + case EPET_RING: + Emitter = createRingEmitter(core::vector3df(0,0,0), 10.f, 10.f); // (values here don't matter) + break; + case EPET_SPHERE: + Emitter = createSphereEmitter(core::vector3df(0,0,0), 10.f); // (values here don't matter) + break; default: break; } @@ -645,12 +660,18 @@ void CParticleSystemSceneNode::deserializeAttributes(io::IAttributes* in, io::SA switch(atype) { + case EPAT_ATTRACT: + aff = createAttractionAffector(core::vector3df(0,0,0)); + break; case EPAT_FADE_OUT: aff = createFadeOutParticleAffector(); break; case EPAT_GRAVITY: aff = createGravityAffector(); break; + case EPAT_ROTATE: + aff = createRotationAffector(); + break; case EPAT_SCALE: aff = createScaleParticleAffector(); break; diff --git a/source/Irrlicht/CParticleSystemSceneNode.h b/source/Irrlicht/CParticleSystemSceneNode.h index 915cf95e..23fde158 100644 --- a/source/Irrlicht/CParticleSystemSceneNode.h +++ b/source/Irrlicht/CParticleSystemSceneNode.h @@ -25,7 +25,7 @@ public: //! constructor CParticleSystemSceneNode(bool createDefaultEmitter, - ISceneNode* parent, ISceneManager* mgr, s32 id, + ISceneNode* parent, ISceneManager* mgr, s32 id, const core::vector3df& position, const core::vector3df& rotation, const core::vector3df& scale); @@ -77,7 +77,7 @@ public: //! Creates a box particle emitter. virtual IParticleBoxEmitter* createBoxEmitter( const core::aabbox3df& box = core::aabbox3d(-10,0,-10,5,30,10), - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, const video::SColor& minStartColor = video::SColor(255,0,0,0), @@ -117,7 +117,7 @@ public: //! Creates a point particle emitter. virtual IParticlePointEmitter* createPointEmitter( - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, const video::SColor& minStartColor = video::SColor(255,0,0,0), diff --git a/source/Irrlicht/CSceneCollisionManager.cpp b/source/Irrlicht/CSceneCollisionManager.cpp index baac48d2..123395a0 100644 --- a/source/Irrlicht/CSceneCollisionManager.cpp +++ b/source/Irrlicht/CSceneCollisionManager.cpp @@ -916,7 +916,7 @@ inline bool CSceneCollisionManager::getLowestRoot(f32 a, f32 b, f32 c, f32 maxR, f32 determinant = b*b - 4.0f*a*c; // if determinant is negative, no solution - if (determinant < 0.0f) return false; + if (determinant < 0.0f || a == 0.f ) return false; // calculate two roots: (if det==0 then x1==x2 // but lets disregard that slight optimization) diff --git a/source/Irrlicht/CSceneManager.cpp b/source/Irrlicht/CSceneManager.cpp index 5a932f2b..56efe516 100644 --- a/source/Irrlicht/CSceneManager.cpp +++ b/source/Irrlicht/CSceneManager.cpp @@ -29,6 +29,10 @@ #include "CMD2MeshFileLoader.h" #endif +#ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#include "CAnimatedMeshHalfLife.h" +#endif + #ifdef _IRR_COMPILE_WITH_MS3D_LOADER_ #include "CMS3DMeshFileLoader.h" #endif @@ -222,6 +226,9 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs, #ifdef _IRR_COMPILE_WITH_MS3D_LOADER_ MeshLoaderList.push_back(new CMS3DMeshFileLoader(Driver)); #endif + #ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ + MeshLoaderList.push_back(new CHalflifeMDLMeshFileLoader( this )); + #endif #ifdef _IRR_COMPILE_WITH_3DS_LOADER_ MeshLoaderList.push_back(new C3DSMeshFileLoader(this, FileSystem)); #endif diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h index bcc23969..ca64c75b 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h +++ b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h @@ -7,6 +7,7 @@ #include "ISceneNodeAnimatorCameraFPS.h" #include "vector2d.h" +#include "position2d.h" #include "SKeyMap.h" #include "irrArray.h" @@ -21,16 +22,16 @@ namespace scene { //! Special scene node animator for FPS cameras - class CSceneNodeAnimatorCameraFPS : public ISceneNodeAnimatorCameraFPS + class CSceneNodeAnimatorCameraFPS : public ISceneNodeAnimatorCameraFPS { public: //! Constructor - CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl, + CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl, f32 rotateSpeed = 100.0f, f32 moveSpeed = .5f, f32 jumpSpeed=0.f, SKeyMap* keyMapArray=0, u32 keyMapSize=0, bool noVerticalMovement=false, bool invertY=false); - + //! Destructor virtual ~CSceneNodeAnimatorCameraFPS(); diff --git a/source/Irrlicht/CShadowVolumeSceneNode.cpp b/source/Irrlicht/CShadowVolumeSceneNode.cpp index 0426693f..d1cda6c1 100644 --- a/source/Irrlicht/CShadowVolumeSceneNode.cpp +++ b/source/Irrlicht/CShadowVolumeSceneNode.cpp @@ -331,8 +331,9 @@ void CShadowVolumeSceneNode::render() driver->setTransform(video::ETS_WORLD, Parent->getAbsoluteTransformation()); for (u32 i=0; idrawStencilShadowVolume(ShadowVolumes[i].pointer(), - ShadowVolumes[i].size(), UseZFailMethod); + { + driver->drawStencilShadowVolume(ShadowVolumes[i].pointer(),ShadowVolumes[i].size(), UseZFailMethod); + } } diff --git a/source/Irrlicht/CSoftwareDriver2.cpp b/source/Irrlicht/CSoftwareDriver2.cpp index 07fb4d56..ce52b950 100644 --- a/source/Irrlicht/CSoftwareDriver2.cpp +++ b/source/Irrlicht/CSoftwareDriver2.cpp @@ -22,26 +22,338 @@ namespace irr namespace video { +namespace glsl +{ + +typedef sVec4 vec4; +typedef sVec3 vec3; +typedef sVec2 vec2; + +#define in +#define uniform +#define attribute +#define varying + +#pragma warning(disable:4244) + +struct mat4{ + float m[4][4]; + + vec4 operator* ( const vec4 &in ) const + { + vec4 out; + return out; + } + +}; + +struct mat3{ + float m[3][3]; + + vec3 operator* ( const vec3 &in ) const + { + vec3 out; + return out; + } +}; + +const int gl_MaxLights = 8; + + +inline float dot (float x, float y) { return x * y; } +inline float dot ( const vec2 &x, const vec2 &y) { return x.x * y.x + x.y * y.y; } +inline float dot ( const vec3 &x, const vec3 &y) { return x.x * y.x + x.y * y.y + x.z * y.z; } +inline float dot ( const vec4 &x, const vec4 &y) { return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; } + +inline float reflect (float I, float N) { return I - 2.0 * dot (N, I) * N; } +inline vec2 reflect (const vec2 &I, const vec2 &N) { return I - N * 2.0 * dot (N, I); } +inline vec3 reflect (const vec3 &I, const vec3 &N) { return I - N * 2.0 * dot (N, I); } +inline vec4 reflect (const vec4 &I, const vec4 &N) { return I - N * 2.0 * dot (N, I); } + + +inline float refract (float I, float N, float eta){ + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return 0.0; + return eta * I - (eta * dot (N, I) + sqrt (k)) * N; +} + +inline vec2 refract (const vec2 &I, const vec2 &N, float eta){ + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return vec2 (0.0); + return I * eta - N * (eta * dot (N, I) + sqrt (k)); +} + +inline vec3 refract (const vec3 &I, const vec3 &N, float eta) { + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return vec3 (0.0); + return I * eta - N * (eta * dot (N, I) + sqrt (k)); +} + +inline vec4 refract (const vec4 &I, const vec4 &N, float eta) { + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return vec4 (0.0); + return I * eta - N * (eta * dot (N, I) + sqrt (k)); +} + + +inline float length ( const vec3 &v ) { return sqrtf ( v.x * v.x + v.y * v.y + v.z * v.z ); } +vec3 normalize ( const vec3 &v ) { float l = 1.f / length ( v ); return vec3 ( v.x * l, v.y * l, v.z * l ); } +float max ( float a, float b ) { return a > b ? a : b; } +float min ( float a, float b ) { return a < b ? a : b; } +vec4 clamp ( const vec4 &a, f32 low, f32 high ) { return vec4 ( min (max(a.x,low), high), min (max(a.y,low), high), min (max(a.z,low), high), min (max(a.w,low), high) ); } + + + +typedef int sampler2D; +sampler2D texUnit0; + +vec4 texture2D (sampler2D sampler, const vec2 &coord) { return vec4 (0.0); } + +struct gl_LightSourceParameters { + vec4 ambient; // Acli + vec4 diffuse; // Dcli + vec4 specular; // Scli + vec4 position; // Ppli + vec4 halfVector; // Derived: Hi + vec3 spotDirection; // Sdli + float spotExponent; // Srli + float spotCutoff; // Crli + // (range: [0.0,90.0], 180.0) + float spotCosCutoff; // Derived: cos(Crli) + // (range: [1.0,0.0],-1.0) + float constantAttenuation; // K0 + float linearAttenuation; // K1 + float quadraticAttenuation;// K2 +}; + +uniform gl_LightSourceParameters gl_LightSource[gl_MaxLights]; + +struct gl_LightModelParameters { + vec4 ambient; +}; +uniform gl_LightModelParameters gl_LightModel; + +struct gl_LightModelProducts { + vec4 sceneColor; +}; + +uniform gl_LightModelProducts gl_FrontLightModelProduct; +uniform gl_LightModelProducts gl_BackLightModelProduct; + +struct gl_LightProducts { + vec4 ambient; + vec4 diffuse; + vec4 specular; +}; + +uniform gl_LightProducts gl_FrontLightProduct[gl_MaxLights]; +uniform gl_LightProducts gl_BackLightProduct[gl_MaxLights]; + +struct gl_MaterialParameters +{ + vec4 emission; // Ecm + vec4 ambient; // Acm + vec4 diffuse; // Dcm + vec4 specular; // Scm + float shininess; // Srm +}; +uniform gl_MaterialParameters gl_FrontMaterial; +uniform gl_MaterialParameters gl_BackMaterial; + +// GLSL has some built-in attributes in a vertex shader: +attribute vec4 gl_Vertex; // 4D vector representing the vertex position +attribute vec3 gl_Normal; // 3D vector representing the vertex normal +attribute vec4 gl_Color; // 4D vector representing the vertex color +attribute vec4 gl_MultiTexCoord0; // 4D vector representing the texture coordinate of texture unit X +attribute vec4 gl_MultiTexCoord1; // 4D vector representing the texture coordinate of texture unit X + +uniform mat4 gl_ModelViewMatrix; //4x4 Matrix representing the model-view matrix. +uniform mat4 gl_ModelViewProjectionMatrix; //4x4 Matrix representing the model-view-projection matrix. +uniform mat3 gl_NormalMatrix; //3x3 Matrix representing the inverse transpose model-view matrix. This matrix is used for normal transformation. + + +varying vec4 gl_FrontColor; // 4D vector representing the primitives front color +varying vec4 gl_FrontSecondaryColor; // 4D vector representing the primitives second front color +varying vec4 gl_BackColor; // 4D vector representing the primitives back color +varying vec4 gl_TexCoord[4]; // 4D vector representing the Xth texture coordinate + +// shader output +varying vec4 gl_Position; // 4D vector representing the final processed vertex position. Only available in vertex shader. +varying vec4 gl_FragColor; // 4D vector representing the final color which is written in the frame buffer. Only available in fragment shader. +varying float gl_FragDepth; // float representing the depth which is written in the depth buffer. Only available in fragment shader. + +varying vec4 gl_SecondaryColor; +varying float gl_FogFragCoord; + + +vec4 ftransform(void) +{ + return gl_ModelViewProjectionMatrix * gl_Vertex; +} + +vec3 fnormal(void) +{ + //Compute the normal + vec3 normal = gl_NormalMatrix * gl_Normal; + normal = normalize(normal); + return normal; +} + + + +struct program1 +{ + vec4 Ambient; + vec4 Diffuse; + vec4 Specular; + + void pointLight(in int i, in vec3 normal, in vec3 eye, in vec3 ecPosition3) + { + float nDotVP; // normal . light direction + float nDotHV; // normal . light half vector + float pf; // power factor + float attenuation; // computed attenuation factor + float d; // distance from surface to light source + vec3 VP; // direction from surface to light position + vec3 halfVector; // direction of maximum highlights + + // Compute vector from surface to light position + VP = vec3 (gl_LightSource[i].position) - ecPosition3; + + // Compute distance between surface and light position + d = length(VP); + + // Normalize the vector from surface to light position + VP = normalize(VP); + + // Compute attenuation + attenuation = 1.0 / (gl_LightSource[i].constantAttenuation + + gl_LightSource[i].linearAttenuation * d + + gl_LightSource[i].quadraticAttenuation * d * d); + + halfVector = normalize(VP + eye); + + nDotVP = max(0.0, dot(normal, VP)); + nDotHV = max(0.0, dot(normal, halfVector)); + + if (nDotVP == 0.0) + { + pf = 0.0; + } + else + { + pf = pow(nDotHV, gl_FrontMaterial.shininess); + + } + Ambient += gl_LightSource[i].ambient * attenuation; + Diffuse += gl_LightSource[i].diffuse * nDotVP * attenuation; + Specular += gl_LightSource[i].specular * pf * attenuation; + } + + vec3 fnormal(void) + { + //Compute the normal + vec3 normal = gl_NormalMatrix * gl_Normal; + normal = normalize(normal); + return normal; + } + + void ftexgen(in vec3 normal, in vec4 ecPosition) + { + + gl_TexCoord[0] = gl_MultiTexCoord0; + } + + void flight(in vec3 normal, in vec4 ecPosition, float alphaFade) + { + vec4 color; + vec3 ecPosition3; + vec3 eye; + + ecPosition3 = (vec3 (ecPosition)) / ecPosition.w; + eye = vec3 (0.0, 0.0, 1.0); + + // Clear the light intensity accumulators + Ambient = vec4 (0.0); + Diffuse = vec4 (0.0); + Specular = vec4 (0.0); + + pointLight(0, normal, eye, ecPosition3); + + pointLight(1, normal, eye, ecPosition3); + + color = gl_FrontLightModelProduct.sceneColor + + Ambient * gl_FrontMaterial.ambient + + Diffuse * gl_FrontMaterial.diffuse; + gl_FrontSecondaryColor = Specular * gl_FrontMaterial.specular; + color = clamp( color, 0.0, 1.0 ); + gl_FrontColor = color; + + gl_FrontColor.a *= alphaFade; + } + + + void vertexshader_main (void) + { + vec3 transformedNormal; + float alphaFade = 1.0; + + // Eye-coordinate position of vertex, needed in various calculations + vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; + + // Do fixed functionality vertex transform + gl_Position = ftransform(); + transformedNormal = fnormal(); + flight(transformedNormal, ecPosition, alphaFade); + ftexgen(transformedNormal, ecPosition); + } + + void fragmentshader_main (void) + { + vec4 color; + + color = gl_Color; + + color *= texture2D(texUnit0, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y) ); + + color += gl_SecondaryColor; + color = clamp(color, 0.0, 1.0); + + gl_FragColor = color; + } +}; + +} //! constructor -CBurningVideoDriver::CBurningVideoDriver(const core::dimension2d& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter) -: CNullDriver(io, windowSize), BackBuffer(0), Presenter(presenter), +CBurningVideoDriver::CBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, video::IImagePresenter* presenter) +: CNullDriver(io, params.WindowSize), BackBuffer(0), Presenter(presenter), WindowId(0), SceneSourceRect(0), RenderTargetTexture(0), RenderTargetSurface(0), CurrentShader(0), - DepthBuffer(0), CurrentOut ( 12 * 2, 128 ), Temp ( 12 * 2, 128 ) + DepthBuffer(0), StencilBuffer ( 0 ), + CurrentOut ( 12 * 2, 128 ), Temp ( 12 * 2, 128 ) { #ifdef _DEBUG setDebugName("CBurningVideoDriver"); #endif // create backbuffer - BackBuffer = new CImage(BURNINGSHADER_COLOR_FORMAT, windowSize); + BackBuffer = new CImage(BURNINGSHADER_COLOR_FORMAT, params.WindowSize); if (BackBuffer) { BackBuffer->fill(SColor(0)); // create z buffer - DepthBuffer = video::createDepthBuffer(BackBuffer->getDimension()); + if ( params.ZBufferBits ) + DepthBuffer = video::createDepthBuffer(BackBuffer->getDimension()); + + // create stencil buffer + if ( params.Stencilbuffer ) + StencilBuffer = video::createStencilBuffer(BackBuffer->getDimension()); } // create triangle renderers @@ -49,32 +361,34 @@ CBurningVideoDriver::CBurningVideoDriver(const core::dimension2d& windowSiz irr::memset32 ( BurningShader, 0, sizeof ( BurningShader ) ); //BurningShader[ETR_FLAT] = createTRFlat2(DepthBuffer); //BurningShader[ETR_FLAT_WIRE] = createTRFlatWire2(DepthBuffer); - BurningShader[ETR_GOURAUD] = createTriangleRendererGouraud2(DepthBuffer); - BurningShader[ETR_GOURAUD_ALPHA] = createTriangleRendererGouraudAlpha2(DepthBuffer ); - BurningShader[ETR_GOURAUD_ALPHA_NOZ] = createTRGouraudAlphaNoZ2(DepthBuffer ); + BurningShader[ETR_GOURAUD] = createTriangleRendererGouraud2(this); + BurningShader[ETR_GOURAUD_ALPHA] = createTriangleRendererGouraudAlpha2(this ); + BurningShader[ETR_GOURAUD_ALPHA_NOZ] = createTRGouraudAlphaNoZ2(this ); //BurningShader[ETR_GOURAUD_WIRE] = createTriangleRendererGouraudWire2(DepthBuffer); //BurningShader[ETR_TEXTURE_FLAT] = createTriangleRendererTextureFlat2(DepthBuffer); //BurningShader[ETR_TEXTURE_FLAT_WIRE] = createTriangleRendererTextureFlatWire2(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD] = createTriangleRendererTextureGouraud2(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M1] = createTriangleRendererTextureLightMap2_M1(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M2] = createTriangleRendererTextureLightMap2_M2(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M4] = createTriangleRendererGTextureLightMap2_M4(DepthBuffer); - BurningShader[ETR_TEXTURE_LIGHTMAP_M4] = createTriangleRendererTextureLightMap2_M4(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_ADD] = createTriangleRendererTextureLightMap2_Add(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_DETAIL_MAP] = createTriangleRendererTextureDetailMap2(DepthBuffer); + BurningShader[ETR_TEXTURE_GOURAUD] = createTriangleRendererTextureGouraud2(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M1] = createTriangleRendererTextureLightMap2_M1(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M2] = createTriangleRendererTextureLightMap2_M2(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M4] = createTriangleRendererGTextureLightMap2_M4(this); + BurningShader[ETR_TEXTURE_LIGHTMAP_M4] = createTriangleRendererTextureLightMap2_M4(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_ADD] = createTriangleRendererTextureLightMap2_Add(this); + BurningShader[ETR_TEXTURE_GOURAUD_DETAIL_MAP] = createTriangleRendererTextureDetailMap2(this); - BurningShader[ETR_TEXTURE_GOURAUD_WIRE] = createTriangleRendererTextureGouraudWire2(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_NOZ] = createTRTextureGouraudNoZ2(); - BurningShader[ETR_TEXTURE_GOURAUD_ADD] = createTRTextureGouraudAdd2(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_ADD_NO_Z] = createTRTextureGouraudAddNoZ2(DepthBuffer); - BurningShader[ETR_TEXTURE_GOURAUD_VERTEX_ALPHA] = createTriangleRendererTextureVertexAlpha2 ( DepthBuffer ); + BurningShader[ETR_TEXTURE_GOURAUD_WIRE] = createTriangleRendererTextureGouraudWire2(this); + BurningShader[ETR_TEXTURE_GOURAUD_NOZ] = createTRTextureGouraudNoZ2(this); + BurningShader[ETR_TEXTURE_GOURAUD_ADD] = createTRTextureGouraudAdd2(this); + BurningShader[ETR_TEXTURE_GOURAUD_ADD_NO_Z] = createTRTextureGouraudAddNoZ2(this); + BurningShader[ETR_TEXTURE_GOURAUD_VERTEX_ALPHA] = createTriangleRendererTextureVertexAlpha2 ( this ); - BurningShader[ETR_TEXTURE_GOURAUD_ALPHA] = createTRTextureGouraudAlpha(DepthBuffer ); - BurningShader[ETR_TEXTURE_GOURAUD_ALPHA_NOZ] = createTRTextureGouraudAlphaNoZ( DepthBuffer ); + BurningShader[ETR_TEXTURE_GOURAUD_ALPHA] = createTRTextureGouraudAlpha(this ); + BurningShader[ETR_TEXTURE_GOURAUD_ALPHA_NOZ] = createTRTextureGouraudAlphaNoZ( this ); - BurningShader[ETR_TEXTURE_BLEND] = createTRTextureBlend( DepthBuffer ); + BurningShader[ETR_NORMAL_MAP_SOLID] = createTRNormalMap ( this ); + BurningShader[ETR_STENCIL_SHADOW] = createTRStencilShadow ( this ); + BurningShader[ETR_TEXTURE_BLEND] = createTRTextureBlend( this ); - BurningShader[ETR_REFERENCE] = createTriangleRendererReference ( DepthBuffer ); + BurningShader[ETR_REFERENCE] = createTriangleRendererReference ( this ); // add the same renderer for all solid types @@ -100,12 +414,12 @@ CBurningVideoDriver::CBurningVideoDriver(const core::dimension2d& windowSiz addMaterialRenderer ( tmr ); // EMT_TRANSPARENT_ALPHA_CHANNEL_REF, addMaterialRenderer ( tmr ); // EMT_TRANSPARENT_VERTEX_ALPHA, addMaterialRenderer ( smr ); // EMT_TRANSPARENT_REFLECTION_2_LAYER, - addMaterialRenderer ( umr ); // EMT_NORMAL_MAP_SOLID, + addMaterialRenderer ( smr ); // EMT_NORMAL_MAP_SOLID, addMaterialRenderer ( umr ); // EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR, - addMaterialRenderer ( umr ); // EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA, - addMaterialRenderer ( umr ); // EMT_PARALLAX_MAP_SOLID, - addMaterialRenderer ( umr ); // EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR, - addMaterialRenderer ( umr ); // EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA, + addMaterialRenderer ( tmr ); // EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA, + addMaterialRenderer ( smr ); // EMT_PARALLAX_MAP_SOLID, + addMaterialRenderer ( tmr ); // EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR, + addMaterialRenderer ( tmr ); // EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA, addMaterialRenderer ( tmr ); // EMT_ONETEXTURE_BLEND smr->drop (); @@ -133,10 +447,14 @@ CBurningVideoDriver::~CBurningVideoDriver() // delete triangle renderers for (s32 i=0; idrop(); + } - // delete zbuffer + // delete Additional buffer + if (StencilBuffer) + StencilBuffer->drop(); if (DepthBuffer) DepthBuffer->drop(); @@ -229,6 +547,14 @@ void CBurningVideoDriver::setCurrentShader() LightSpace.Flags |= VERTEXTRANSFORM; break; + case EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA: + case EMT_NORMAL_MAP_SOLID: + case EMT_PARALLAX_MAP_SOLID: + case EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA: + shader = ETR_NORMAL_MAP_SOLID; + LightSpace.Flags |= VERTEXTRANSFORM; + break; + default: break; @@ -286,6 +612,7 @@ bool CBurningVideoDriver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const case EVDF_MIP_MAP: return true; #endif + case EVDF_STENCIL_BUFFER: case EVDF_RENDER_TO_TARGET: case EVDF_MULTITEXTURE: case EVDF_HARDWARE_TL: @@ -318,16 +645,20 @@ void CBurningVideoDriver::setTransform(E_TRANSFORMATION_STATE state, const core: case ETS_WORLD: if ( TransformationFlag[state] & ETF_IDENTITY ) { + Transformation[ETS_WORLD_INVERSE] = Transformation[ETS_WORLD]; + TransformationFlag[ETS_WORLD_INVERSE] |= ETF_IDENTITY; Transformation[ETS_CURRENT] = Transformation[ETS_VIEW_PROJECTION]; } else { + //Transformation[ETS_WORLD].getInversePrimitive ( Transformation[ETS_WORLD_INVERSE] ); Transformation[ETS_CURRENT].setbyproduct_nocheck ( Transformation[ETS_VIEW_PROJECTION], Transformation[ETS_WORLD] ); } TransformationFlag[ETS_CURRENT] = 0; + //getLightPosObjectSpace (); break; case ETS_TEXTURE_0: case ETS_TEXTURE_1: @@ -428,6 +759,9 @@ void CBurningVideoDriver::setRenderTarget(video::CImage* image) if (DepthBuffer) DepthBuffer->setSize(RenderTargetSize); + + if (StencilBuffer) + StencilBuffer->setSize(RenderTargetSize); } @@ -671,7 +1005,7 @@ inline void CBurningVideoDriver::ndc_2_dc_and_project ( s4DVertex *dest,s4DVerte #endif #endif - + dest[g].LightTangent[0] = source[g].LightTangent[0] * iw; dest[g].Pos.w = iw; } } @@ -711,6 +1045,7 @@ inline void CBurningVideoDriver::ndc_2_dc_and_project2 ( const s4DVertex **v, co #endif #endif + a[1].LightTangent[0] = a[0].LightTangent[0] * iw; a[1].Pos.w = iw; } @@ -763,7 +1098,7 @@ inline f32 CBurningVideoDriver::texelarea2 ( const s4DVertex **v, s32 tex ) cons /*! */ -inline void CBurningVideoDriver::select_polygon_mipmap ( s4DVertex *v, u32 vIn, u32 tex, const core::dimension2du& texSize ) +inline void CBurningVideoDriver::select_polygon_mipmap ( s4DVertex *v, u32 vIn, u32 tex, const core::dimension2du& texSize ) const { f32 f[2]; @@ -819,8 +1154,9 @@ const SVSize CBurningVideoDriver::vSize[] = { { VERTEX4D_FORMAT_TEXTURE_1 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertex), 1 }, { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertex2TCoords),2 }, - { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertexTangents),2 }, - { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertex), 2 }, + { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1 | VERTEX4D_FORMAT_BUMP_DOT3, sizeof(S3DVertexTangents),2 }, + { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertex), 2 }, // reflection map + { 0, sizeof(f32) * 3, 0 }, // core::vector3df* }; @@ -828,8 +1164,7 @@ const SVSize CBurningVideoDriver::vSize[] = /*! fill a cache line with transformed, light and clipp test triangles */ -void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex, - const u32 destIndex) +void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex, const u32 destIndex) { u8 * source; s4DVertex *dest; @@ -851,6 +1186,9 @@ void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex, const S3DVertex *base = ((S3DVertex*) source ); Transformation [ ETS_CURRENT].transformVect ( &dest->Pos.x, base->Pos ); + //mhm ;-) maybe no goto + if ( VertexCache.vType == 4 ) goto clipandproject; + #if defined (SOFTWARE_DRIVER_2_LIGHTING) || defined ( SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM ) @@ -865,15 +1203,17 @@ void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex, else { Transformation[ETS_WORLD].rotateVect ( &LightSpace.normal.x, base->Normal ); - if ( LightSpace.Flags & NORMALIZE ) - LightSpace.normal.normalize_xyz(); // vertex in light space if ( LightSpace.Flags & ( POINTLIGHT | FOG | SPECULAR | VERTEXTRANSFORM) ) Transformation[ETS_WORLD].transformVect ( &LightSpace.vertex.x, base->Pos ); } + if ( LightSpace.Flags & NORMALIZE ) + LightSpace.normal.normalize_xyz(); + } + #endif #if defined ( SOFTWARE_DRIVER_2_USE_VERTEX_COLOR ) @@ -1007,8 +1347,107 @@ void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex, } } } + +#if 0 + // tangent space light vector, emboss + if ( Lights.size () && ( vSize[VertexCache.vType].Format & VERTEX4D_FORMAT_BUMP_DOT3 ) ) + { + const S3DVertexTangents *tangent = ((S3DVertexTangents*) source ); + const SBurningShaderLight &light = LightSpace.Light[0]; + + sVec4 vp; + + vp.x = light.pos.x - LightSpace.vertex.x; + vp.y = light.pos.y - LightSpace.vertex.y; + vp.z = light.pos.z - LightSpace.vertex.z; + + vp.normalize_xyz(); + + LightSpace.tangent.x = vp.x * tangent->Tangent.X + vp.y * tangent->Tangent.Y + vp.z * tangent->Tangent.Z; + LightSpace.tangent.y = vp.x * tangent->Binormal.X + vp.y * tangent->Binormal.Y + vp.z * tangent->Binormal.Z; + //LightSpace.tangent.z = vp.x * tangent->Normal.X + vp.y * tangent->Normal.Y + vp.z * tangent->Normal.Z; + LightSpace.tangent.z = 0.f; + LightSpace.tangent.normalize_xyz(); + + f32 scale = 1.f / 128.f; + if ( Material.org.MaterialTypeParam > 0.f ) + scale = Material.org.MaterialTypeParam; + + // emboss, shift coordinates + dest->Tex[1].x = dest->Tex[0].x + LightSpace.tangent.x * scale; + dest->Tex[1].y = dest->Tex[0].y + LightSpace.tangent.y * scale; + //dest->Tex[1].z = LightSpace.tangent.z * scale; + } #endif + if ( LightSpace.Light.size () && ( vSize[VertexCache.vType].Format & VERTEX4D_FORMAT_BUMP_DOT3 ) ) + { + const S3DVertexTangents *tangent = ((S3DVertexTangents*) source ); + + sVec4 vp; + + dest->LightTangent[0].x = 0.f; + dest->LightTangent[0].y = 0.f; + dest->LightTangent[0].z = 0.f; + for ( u32 i = 0; i < 2 && i < LightSpace.Light.size (); ++i ) + { + const SBurningShaderLight &light = LightSpace.Light[i]; + + if ( !light.LightIsOn ) + continue; + + vp.x = light.pos.x - LightSpace.vertex.x; + vp.y = light.pos.y - LightSpace.vertex.y; + vp.z = light.pos.z - LightSpace.vertex.z; + + /* + vp.x = light.pos_objectspace.x - base->Pos.X; + vp.y = light.pos_objectspace.y - base->Pos.Y; + vp.z = light.pos_objectspace.z - base->Pos.Z; + */ + + vp.normalize_xyz(); + + + // transform by tangent matrix + sVec3 l; + #if 1 + l.x = (vp.x * tangent->Tangent.X + vp.y * tangent->Tangent.Y + vp.z * tangent->Tangent.Z ); + l.y = (vp.x * tangent->Binormal.X + vp.y * tangent->Binormal.Y + vp.z * tangent->Binormal.Z ); + l.z = (vp.x * tangent->Normal.X + vp.y * tangent->Normal.Y + vp.z * tangent->Normal.Z ); + #else + l.x = (vp.x * tangent->Tangent.X + vp.y * tangent->Binormal.X + vp.z * tangent->Normal.X ); + l.y = (vp.x * tangent->Tangent.Y + vp.y * tangent->Binormal.Y + vp.z * tangent->Normal.Y ); + l.z = (vp.x * tangent->Tangent.Z + vp.y * tangent->Binormal.Z + vp.z * tangent->Normal.Z ); + #endif + + + /* + f32 scale = 1.f / 128.f; + scale /= dest->LightTangent[0].b; + + // emboss, shift coordinates + dest->Tex[1].x = dest->Tex[0].x + l.r * scale; + dest->Tex[1].y = dest->Tex[0].y + l.g * scale; + */ + dest->Tex[1].x = dest->Tex[0].x; + dest->Tex[1].y = dest->Tex[0].y; + + // scale bias + dest->LightTangent[0].x += l.x; + dest->LightTangent[0].y += l.y; + dest->LightTangent[0].z += l.z; + } + dest->LightTangent[0].setLength ( 0.5f ); + dest->LightTangent[0].x += 0.5f; + dest->LightTangent[0].y += 0.5f; + dest->LightTangent[0].z += 0.5f; + } + + +#endif + +clipandproject: dest[0].flag = dest[1].flag = vSize[VertexCache.vType].Format; // test vertex @@ -1067,10 +1506,18 @@ REALINLINE void CBurningVideoDriver::VertexCache_get ( s4DVertex ** face ) fillIndex < VERTEXCACHE_ELEMENT ) { - sourceIndex = VertexCache.iType == 1 ? - ((u16*)VertexCache.indices) [ VertexCache.indicesIndex ] : - ((u32*)VertexCache.indices) [ VertexCache.indicesIndex ]; - + switch ( VertexCache.iType ) + { + case 1: + sourceIndex = ((u16*)VertexCache.indices) [ VertexCache.indicesIndex ]; + break; + case 2: + sourceIndex = ((u32*)VertexCache.indices) [ VertexCache.indicesIndex ]; + break; + case 4: + sourceIndex = VertexCache.indicesIndex; + break; + } VertexCache.indicesIndex += 1; @@ -1132,19 +1579,28 @@ REALINLINE void CBurningVideoDriver::VertexCache_get ( s4DVertex ** face ) const u32 i0 = core::if_c_a_else_0 ( VertexCache.pType != scene::EPT_TRIANGLE_FAN, VertexCache.indicesRun ); - if ( VertexCache.iType == 1 ) + switch ( VertexCache.iType ) { - const u16 *p = (const u16 *) VertexCache.indices; - face[0] = VertexCache_getVertex ( p[ i0 ] ); - face[1] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 1] ); - face[2] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 2] ); - } - else - { - const u32 *p = (const u32 *) VertexCache.indices; - face[0] = VertexCache_getVertex ( p[ i0 ] ); - face[1] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 1] ); - face[2] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 2] ); + case 1: + { + const u16 *p = (const u16 *) VertexCache.indices; + face[0] = VertexCache_getVertex ( p[ i0 ] ); + face[1] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 1] ); + face[2] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 2] ); + } break; + + case 2: + { + const u32 *p = (const u32 *) VertexCache.indices; + face[0] = VertexCache_getVertex ( p[ i0 ] ); + face[1] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 1] ); + face[2] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 2] ); + } break; + case 4: + face[0] = VertexCache_getVertex ( VertexCache.indicesRun + 0 ); + face[1] = VertexCache_getVertex ( VertexCache.indicesRun + 1 ); + face[2] = VertexCache_getVertex ( VertexCache.indicesRun + 2 ); + break; } VertexCache.indicesRun += VertexCache.primitivePitch; @@ -1199,7 +1655,14 @@ void CBurningVideoDriver::VertexCache_reset ( const void* vertices, u32 vertexCo else VertexCache.vType = vType; VertexCache.pType = pType; - VertexCache.iType = iType == EIT_16BIT ? 1 : 2; + + switch ( iType ) + { + case EIT_16BIT: VertexCache.iType = 1; break; + case EIT_32BIT: VertexCache.iType = 2; break; + default: + VertexCache.iType = iType; break; + } switch ( VertexCache.pType ) { @@ -1276,6 +1739,7 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert s32 lodLevel; u32 i; u32 g; + u32 m; video::CSoftwareTexture2* tex; for ( i = 0; i < (u32) primitiveCount; ++i ) @@ -1294,26 +1758,23 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert dc_area = screenarea2 ( face ); if ( Material.org.BackfaceCulling && F32_LOWER_EQUAL_0( dc_area ) ) continue; + else if ( Material.org.FrontfaceCulling && F32_GREATER_EQUAL_0( dc_area ) ) continue; - dc_area = core::reciprocal ( dc_area ); - // select mipmap - - for ( g = 0; g != vSize[VertexCache.vType].TexSize; ++g ) - //for ( g = 0; g != BURNING_MATERIAL_MAX_TEXTURES; ++g ) + dc_area = core::reciprocal ( dc_area ); + for ( m = 0; m != vSize[VertexCache.vType].TexSize; ++m ) { - if ( 0 == (tex = MAT_TEXTURE ( g )) ) + if ( 0 == (tex = MAT_TEXTURE ( m )) ) { - CurrentShader->setTextureParam(g, 0, 0); + CurrentShader->setTextureParam(m, 0, 0); continue; } - lodLevel = s32_log2_f32 ( texelarea2 ( face, g ) * dc_area ); - CurrentShader->setTextureParam(g, tex, lodLevel); - select_polygon_mipmap2 ( (s4DVertex**) face, g, tex->getSize() ); - + lodLevel = s32_log2_f32 ( texelarea2 ( face, m ) * dc_area ); + CurrentShader->setTextureParam(m, tex, lodLevel ); + select_polygon_mipmap2 ( (s4DVertex**) face, m, tex->getSize() ); } // rasterize @@ -1415,24 +1876,26 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert dc_area = screenarea ( CurrentOut.data ); if ( Material.org.BackfaceCulling && F32_LOWER_EQUAL_0 ( dc_area ) ) continue; + else if ( Material.org.FrontfaceCulling && F32_GREATER_EQUAL_0( dc_area ) ) continue; // select mipmap - //for ( g = 0; g != BURNING_MATERIAL_MAX_TEXTURES; ++g ) - for ( g = 0; g != vSize[VertexCache.vType].TexSize; ++g ) + dc_area = core::reciprocal ( dc_area ); + for ( m = 0; m != vSize[VertexCache.vType].TexSize; ++m ) { - if ( 0 == (tex = MAT_TEXTURE ( g )) ) + if ( 0 == (tex = MAT_TEXTURE ( m )) ) { - CurrentShader->setTextureParam(g, 0, 0); + CurrentShader->setTextureParam(m, 0, 0); continue; } - lodLevel = s32_log2_f32 ( texelarea ( CurrentOut.data, g ) / dc_area ); - CurrentShader->setTextureParam(g, tex, lodLevel); - select_polygon_mipmap ( CurrentOut.data, vOut, g, tex->getSize() ); + lodLevel = s32_log2_f32 ( texelarea ( CurrentOut.data, m ) * dc_area ); + CurrentShader->setTextureParam(m, tex, lodLevel ); + select_polygon_mipmap ( CurrentOut.data, vOut, m, tex->getSize() ); } + // re-tesselate ( triangle-fan, 0-1-2,0-2-3.. ) for ( g = 0; g <= vOut - 6; g += 2 ) { @@ -1517,7 +1980,9 @@ s32 CBurningVideoDriver::addDynamicLight(const SLight& dl) void CBurningVideoDriver::turnLightOn(s32 lightIndex, bool turnOn) { if(lightIndex > -1 && lightIndex < (s32)LightSpace.Light.size()) - LightSpace.Light[lightIndex].LightIsOn = turnOn; + { + LightSpace.Light[lightIndex].LightIsOn = turnOn; + } } //! deletes all dynamic lights there are @@ -1586,6 +2051,28 @@ void CBurningVideoDriver::getCameraPosWorldSpace () LightSpace.campos.w = 1.f; } +void CBurningVideoDriver::getLightPosObjectSpace () +{ + if ( TransformationFlag[ETS_WORLD] & ETF_IDENTITY ) + { + Transformation[ETS_WORLD_INVERSE] = Transformation[ETS_WORLD]; + TransformationFlag[ETS_WORLD_INVERSE] |= ETF_IDENTITY; + } + else + { + Transformation[ETS_WORLD].getInverse ( Transformation[ETS_WORLD_INVERSE] ); + TransformationFlag[ETS_WORLD_INVERSE] &= ~ETF_IDENTITY; + } + + for ( u32 i = 0; i < 1 && i < LightSpace.Light.size(); ++i ) + { + SBurningShaderLight &l = LightSpace.Light[i]; + + Transformation[ETS_WORLD_INVERSE].transformVec3 ( &l.pos_objectspace.x, &l.pos.x ); + } +} + + #ifdef SOFTWARE_DRIVER_2_LIGHTING //! Sets the fog mode. @@ -1634,6 +2121,9 @@ void CBurningVideoDriver::lightVertex ( s4DVertex *dest, u32 vertexargb ) { const SBurningShaderLight &light = LightSpace.Light[i]; + if ( !light.LightIsOn ) + continue; + // accumulate ambient ambient.add ( light.AmbientColor ); @@ -1645,25 +2135,28 @@ void CBurningVideoDriver::lightVertex ( s4DVertex *dest, u32 vertexargb ) vp.x = light.pos.x - LightSpace.vertex.x; vp.y = light.pos.y - LightSpace.vertex.y; vp.z = light.pos.z - LightSpace.vertex.z; + //vp.x = light.pos_objectspace.x - LightSpace.vertex.x; + //vp.y = light.pos_objectspace.y - LightSpace.vertex.x; + //vp.z = light.pos_objectspace.z - LightSpace.vertex.x; len = vp.get_length_xyz_square(); if ( light.radius < len ) continue; - len = core::squareroot ( len ); - - attenuation = light.constantAttenuation + ( 1.f - ( len * light.linearAttenuation ) ); + len = core::reciprocal_squareroot ( len ); // build diffuse reflection //angle between normal and light vector - vp.mulReciprocal ( len ); + vp.mul ( len ); dot = LightSpace.normal.dot_xyz ( vp ); if ( dot < 0.f ) continue; + attenuation = light.constantAttenuation + ( 1.f - ( len * light.linearAttenuation ) ); + // diffuse component - diffuse.mulAdd ( light.DiffuseColor, dot * attenuation ); + diffuse.mulAdd ( light.DiffuseColor, 3.f * dot * attenuation ); if ( !(LightSpace.Flags & SPECULAR) ) continue; @@ -1987,20 +2480,20 @@ void CBurningVideoDriver::draw3DLine(const core::vector3df& start, const wchar_t* CBurningVideoDriver::getName() const { #ifdef BURNINGVIDEO_RENDERER_BEAUTIFUL - return L"Burning's Video 0.44 beautiful"; + return L"Burning's Video 0.47 beautiful"; #elif defined ( BURNINGVIDEO_RENDERER_ULTRA_FAST ) - return L"Burning's Video 0.44 ultra fast"; + return L"Burning's Video 0.47 ultra fast"; #elif defined ( BURNINGVIDEO_RENDERER_FAST ) - return L"Burning's Video 0.44 fast"; + return L"Burning's Video 0.47 fast"; #else - return L"Burning's Video 0.44"; + return L"Burning's Video 0.47"; #endif } //! Returns the graphics card vendor name. core::stringc CBurningVideoDriver::getVendorInfo() { - return "Burning's Video: Ing. Thomas Alten (c) 2006-2009"; + return "Burning's Video: Ing. Thomas Alten (c) 2006-2010"; } @@ -2084,82 +2577,92 @@ u32 CBurningVideoDriver::getMaximalPrimitiveCount() const //! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do //! this: First, draw all geometry. Then use this method, to draw the shadow -//! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. +//! volume. Next use IVideoDriver::drawStencilShadow() to visualize the shadow. void CBurningVideoDriver::drawStencilShadowVolume(const core::vector3df* triangles, s32 count, bool zfail) { -/* - if (!StencilBuffer || !count) - return; + IBurningShader *shader = BurningShader [ ETR_STENCIL_SHADOW ]; - setRenderStatesStencilShadowMode(zfail); + CurrentShader = shader; + shader->setRenderTarget(RenderTargetSurface, ViewPort); - if (!zfail) + Material.org.MaterialType = video::EMT_SOLID; + Material.org.Lighting = false; + Material.org.ZWriteEnable = false; + Material.org.ZBuffer = ECFN_LESSEQUAL; + LightSpace.Flags &= ~VERTEXTRANSFORM; + + //glStencilMask(~0); + //glStencilFunc(GL_ALWAYS, 0, ~0); + + if (zfail) { - // ZPASS Method + Material.org.BackfaceCulling = true; + Material.org.FrontfaceCulling = false; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 1 ); + shader->setParam ( 2, 0 ); + drawVertexPrimitiveList ( triangles, count, 0, count/3, (video::E_VERTEX_TYPE) 4, scene::EPT_TRIANGLES, (video::E_INDEX_TYPE) 4 ); + //glStencilOp(GL_KEEP, incr, GL_KEEP); + //glDrawArrays(GL_TRIANGLES,0,count); - // Draw front-side of shadow volume in stencil/z only - pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW ); - pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_INCRSAT); - pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles, sizeof(core::vector3df)); - - // Now reverse cull order so front sides of shadow volume are written. - pID3DDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CW ); - pID3DDevice->SetRenderState( D3DRS_STENCILPASS, D3DSTENCILOP_DECRSAT); - pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles, sizeof(core::vector3df)); + Material.org.BackfaceCulling = false; + Material.org.FrontfaceCulling = true; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 2 ); + shader->setParam ( 2, 0 ); + drawVertexPrimitiveList ( triangles, count, 0, count/3, (video::E_VERTEX_TYPE) 4, scene::EPT_TRIANGLES, (video::E_INDEX_TYPE) 4 ); + //glStencilOp(GL_KEEP, decr, GL_KEEP); + //glDrawArrays(GL_TRIANGLES,0,count); } - else + else // zpass { - // ZFAIL Method + Material.org.BackfaceCulling = true; + Material.org.FrontfaceCulling = false; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 0 ); + shader->setParam ( 2, 1 ); + //glStencilOp(GL_KEEP, GL_KEEP, incr); + //glDrawArrays(GL_TRIANGLES,0,count); - // Draw front-side of shadow volume in stencil/z only - pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW ); - pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_INCRSAT ); - pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles, sizeof(core::vector3df)); - - // Now reverse cull order so front sides of shadow volume are written. - pID3DDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW ); - pID3DDevice->SetRenderState( D3DRS_STENCILZFAIL, D3DSTENCILOP_DECRSAT ); - pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles, sizeof(core::vector3df)); + Material.org.BackfaceCulling = false; + Material.org.FrontfaceCulling = true; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 0 ); + shader->setParam ( 2, 2 ); + //glStencilOp(GL_KEEP, GL_KEEP, decr); + //glDrawArrays(GL_TRIANGLES,0,count); } -*/ + + } - - //! Fills the stencil shadow with color. After the shadow volume has been drawn //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this //! to draw the color of the shadow. void CBurningVideoDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, - video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) + video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) { -/* - if (!StencilBuffer) - return; + // draw a shadow rectangle covering the entire screen using stencil buffer + const u32 h = RenderTargetSurface->getDimension().Height; + const u32 w = RenderTargetSurface->getDimension().Width; + tVideoSample *dst; + u32 *stencil; - S3DVertex vtx[4]; - vtx[0] = S3DVertex(1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, leftUpEdge, 0.0f, 0.0f); - vtx[1] = S3DVertex(1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, rightUpEdge, 0.0f, 1.0f); - vtx[2] = S3DVertex(-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, leftDownEdge, 1.0f, 0.0f); - vtx[3] = S3DVertex(-1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, rightDownEdge, 1.0f, 1.0f); + for ( u32 y = 0; y < h; ++y ) + { + dst = (tVideoSample*)RenderTargetSurface->lock() + ( y * w ); + stencil = (u32*) StencilBuffer->lock() + ( y * w ); - s16 indices[6] = {0,1,2,1,3,2}; + for ( u32 x = 0; x < w; ++x ) + { + if ( stencil[x] > 1 ) + { + dst[x] = PixelBlend32 ( dst[x], leftUpEdge.color ); + } + } + } - setRenderStatesStencilFillMode( - leftUpEdge.getAlpha() < 255 || - rightUpEdge.getAlpha() < 255 || - leftDownEdge.getAlpha() < 255 || - rightDownEdge.getAlpha() < 255); - - setTexture(0,0); - - setVertexShader(EVT_STANDARD); - - pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], - D3DFMT_INDEX16, &vtx[0], sizeof(S3DVertex)); - - if (clearStencilBuffer) - pID3DDevice->Clear( 0, NULL, D3DCLEAR_STENCIL,0, 1.0, 0); -*/ + StencilBuffer->clear(); } @@ -2180,10 +2683,10 @@ namespace video { //! creates a video driver -IVideoDriver* createSoftwareDriver2(const core::dimension2d& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter) +IVideoDriver* createBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, video::IImagePresenter* presenter) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CBurningVideoDriver(windowSize, fullscreen, io, presenter); + return new CBurningVideoDriver(params, io, presenter); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CSoftwareDriver2.h b/source/Irrlicht/CSoftwareDriver2.h index 1a23332f..91a024d7 100644 --- a/source/Irrlicht/CSoftwareDriver2.h +++ b/source/Irrlicht/CSoftwareDriver2.h @@ -11,6 +11,7 @@ #include "CImage.h" #include "os.h" #include "irrString.h" +#include "SIrrCreationParameters.h" namespace irr { @@ -21,7 +22,7 @@ namespace video public: //! constructor - CBurningVideoDriver(const core::dimension2d& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter); + CBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, video::IImagePresenter* presenter); //! destructor virtual ~CBurningVideoDriver(); @@ -157,6 +158,9 @@ namespace video //! Returns the maximum texture size supported. virtual core::dimension2du getMaxTextureSize() const; + virtual IDepthBuffer * getDepthBuffer () { return DepthBuffer; } + virtual IStencilBuffer * getStencilBuffer () { return StencilBuffer; } + protected: @@ -187,6 +191,7 @@ namespace video IBurningShader* BurningShader[ETR2_COUNT]; IDepthBuffer* DepthBuffer; + IStencilBuffer* StencilBuffer; /* @@ -201,6 +206,7 @@ namespace video ETS_CURRENT, ETS_CLIPSCALE, ETS_VIEW_INVERSE, + ETS_WORLD_INVERSE, ETS_COUNT_BURNING }; @@ -215,6 +221,7 @@ namespace video core::matrix4 Transformation[ETS_COUNT_BURNING]; void getCameraPosWorldSpace (); + void getLightPosObjectSpace (); // Vertex Cache @@ -254,7 +261,7 @@ namespace video void ndc_2_dc_and_project ( s4DVertex *dest,s4DVertex *source, u32 vIn ) const; f32 screenarea ( const s4DVertex *v0 ) const; - void select_polygon_mipmap ( s4DVertex *source, u32 vIn, u32 tex, const core::dimension2du& texSize ); + void select_polygon_mipmap ( s4DVertex *source, u32 vIn, u32 tex, const core::dimension2du& texSize ) const; f32 texelarea ( const s4DVertex *v0, int tex ) const; diff --git a/source/Irrlicht/CSoftwareTexture2.cpp b/source/Irrlicht/CSoftwareTexture2.cpp index 520ba69e..ab2e381b 100644 --- a/source/Irrlicht/CSoftwareTexture2.cpp +++ b/source/Irrlicht/CSoftwareTexture2.cpp @@ -66,6 +66,8 @@ CSoftwareTexture2::CSoftwareTexture2(IImage* image, const io::path& name, MipMap[0] = new CImage(BURNINGSHADER_COLOR_FORMAT, optSize); image->copyToScalingBoxFilter ( MipMap[0],0, false ); } + + OrigImageDataSizeInPixels = (f32) 0.3f * MipMap[0]->getImageDataSizeInPixels(); } regenerateMipMapLevels(mipmapData); @@ -139,6 +141,8 @@ void CSoftwareTexture2::regenerateMipMapLevels(void* mipmapData) else { MipMap[i] = new CImage(BURNINGSHADER_COLOR_FORMAT, newSize); + + //static u32 color[] = { 0, 0xFFFF0000, 0xFF00FF00,0xFF0000FF,0xFFFFFF00,0xFFFF00FF,0xFF00FFFF,0xFF0F0F0F }; MipMap[i]->fill ( 0 ); MipMap[0]->copyToScalingBoxFilter( MipMap[i], 0, false ); } diff --git a/source/Irrlicht/CSoftwareTexture2.h b/source/Irrlicht/CSoftwareTexture2.h index c117d9dc..f58a7627 100644 --- a/source/Irrlicht/CSoftwareTexture2.h +++ b/source/Irrlicht/CSoftwareTexture2.h @@ -59,7 +59,8 @@ public: //! Returns the size of the largest mipmap. f32 getLODFactor( const f32 texArea ) const { - return MipMap[0]->getImageDataSizeInPixels () * texArea; + return OrigImageDataSizeInPixels * texArea; + //return MipMap[0]->getImageDataSizeInPixels () * texArea; } //! Returns (=size) of the texture. @@ -122,6 +123,7 @@ public: } private: + f32 OrigImageDataSizeInPixels; core::dimension2d OrigSize; CImage * MipMap[SOFTWARE_DRIVER_2_MIPMAPPING_MAX]; diff --git a/source/Irrlicht/CTRGouraud2.cpp b/source/Irrlicht/CTRGouraud2.cpp index 61702585..383a4b67 100644 --- a/source/Irrlicht/CTRGouraud2.cpp +++ b/source/Irrlicht/CTRGouraud2.cpp @@ -80,7 +80,7 @@ class CTRGouraud2 : public IBurningShader public: //! constructor - CTRGouraud2(IDepthBuffer* zbuffer); + CTRGouraud2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -94,8 +94,8 @@ private: }; //! constructor -CTRGouraud2::CTRGouraud2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRGouraud2::CTRGouraud2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRGouraud2"); @@ -132,10 +132,7 @@ void CTRGouraud2::scanline_bilinear () sVec4 slopeC; #endif #ifdef IPOL_T0 - sVec2 slopeT[0]; -#endif -#ifdef IPOL_T1 - sVec2 slopeT[1]; + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; #endif // apply top-left fill-convention, left @@ -631,10 +628,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTriangleRendererGouraud2(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererGouraud2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRGouraud2(zbuffer); + return new CTRGouraud2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRGouraudAlpha2.cpp b/source/Irrlicht/CTRGouraudAlpha2.cpp index dab272b4..c0d197fa 100644 --- a/source/Irrlicht/CTRGouraudAlpha2.cpp +++ b/source/Irrlicht/CTRGouraudAlpha2.cpp @@ -81,7 +81,7 @@ class CTRGouraudAlpha2 : public IBurningShader public: //! constructor - CTRGouraudAlpha2(IDepthBuffer* zbuffer); + CTRGouraudAlpha2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -96,8 +96,8 @@ private: }; //! constructor -CTRGouraudAlpha2::CTRGouraudAlpha2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRGouraudAlpha2::CTRGouraudAlpha2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRGouraudAlpha2"); @@ -640,10 +640,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTriangleRendererGouraudAlpha2(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererGouraudAlpha2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRGouraudAlpha2(zbuffer); + return new CTRGouraudAlpha2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp b/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp index 50c52ef1..45e701ce 100644 --- a/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp +++ b/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp @@ -81,7 +81,7 @@ class CTRGouraudAlphaNoZ2 : public IBurningShader public: //! constructor - CTRGouraudAlphaNoZ2(IDepthBuffer* zbuffer); + CTRGouraudAlphaNoZ2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -95,8 +95,8 @@ private: }; //! constructor -CTRGouraudAlphaNoZ2::CTRGouraudAlphaNoZ2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRGouraudAlphaNoZ2::CTRGouraudAlphaNoZ2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRGouraudAlphaNoZ2"); @@ -134,10 +134,7 @@ void CTRGouraudAlphaNoZ2::scanline_bilinear () sVec4 slopeC; #endif #ifdef IPOL_T0 - sVec2 slopeT[0]; -#endif -#ifdef IPOL_T1 - sVec2 slopeT[1]; + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; #endif // apply top-left fill-convention, left @@ -641,10 +638,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTRGouraudAlphaNoZ2(IDepthBuffer* zbuffer) +IBurningShader* createTRGouraudAlphaNoZ2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRGouraudAlphaNoZ2(zbuffer); + return new CTRGouraudAlphaNoZ2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRNormalMap.cpp b/source/Irrlicht/CTRNormalMap.cpp new file mode 100644 index 00000000..5f2f8b93 --- /dev/null +++ b/source/Irrlicht/CTRNormalMap.cpp @@ -0,0 +1,848 @@ +// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 +#undef IPOL_T2 +#undef IPOL_L0 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 +#define IPOL_L0 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + + +class CTRNormalMap : public IBurningShader +{ +public: + + //! constructor + CTRNormalMap(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRNormalMap::CTRNormalMap(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRNormalMap"); + #endif +} + + + +/*! +*/ +void CTRNormalMap::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif +#ifdef IPOL_L0 + sVec3 slopeL[BURNING_MATERIAL_MAX_TANGENT]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif +#ifdef IPOL_T2 + slopeT[2] = (line.t[2][1] - line.t[2][0]) * invDeltaX; +#endif +#ifdef IPOL_L0 + slopeL[0] = (line.l[0][1] - line.l[0][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2] * subPixel; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint tx0, tx1; + tFixPoint ty0, ty1; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + tFixPoint lx, ly, lz; + tFixPoint ndotl; + + sVec3 light; + + +#ifdef IPOL_C0 + tFixPoint r3, g3, b3; +#endif + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + { +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); + tx1 = tofix ( line.t[1][0].x,inversew); + ty1 = tofix ( line.t[1][0].y,inversew); + + +#ifdef IPOL_C0 + r3 = tofix ( line.c[0][0].y ,inversew ); + g3 = tofix ( line.c[0][0].z ,inversew ); + b3 = tofix ( line.c[0][0].w ,inversew ); +#endif + +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); + tx1 = tofix ( line.t[1][0].x ); + ty1 = tofix ( line.t[1][0].y ); + +#ifdef IPOL_C0 + r3 = tofix ( line.c[0][0].y ); + g3 = tofix ( line.c[0][0].z ); + b3 = tofix ( line.c[0][0].w ); +#endif + +#endif + getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 ); + + // normal map + getSample_texture ( r1, g1, b1, &IT[1], tx1, ty1 ); + + r1 = ( r1 - FIX_POINT_HALF_COLOR) >> (COLOR_MAX_LOG2-1); + g1 = ( g1 - FIX_POINT_HALF_COLOR) >> (COLOR_MAX_LOG2-1); + b1 = ( b1 - FIX_POINT_HALF_COLOR) >> (COLOR_MAX_LOG2-1); + +/* + sVec3 l = line.l[0][0] * inversew; + l.setLength( 2.f ); + + lx = tofix ( l.x - 0.5f ); + ly = tofix ( l.y - 0.5f ); + lz = tofix ( l.z - 0.5f ); +*/ + + lx = tofix ( line.l[0][0].x, inversew ); + ly = tofix ( line.l[0][0].y, inversew ); + lz = tofix ( line.l[0][0].z, inversew ); + + // DOT 3 Normal Map light in tangent space + ndotl = saturateFix ( FIX_POINT_HALF_COLOR + (( imulFix ( r1, lx ) + imulFix ( g1, ly ) + imulFix ( b1, lz ) ) << (COLOR_MAX_LOG2-1)) ); + +#ifdef IPOL_C0 + + // N . L + r2 = imulFix ( imulFix_tex1 ( r0, ndotl ), r3 ); + g2 = imulFix ( imulFix_tex1 ( g0, ndotl ), g3 ); + b2 = imulFix ( imulFix_tex1 ( b0, ndotl ), b3 ); + +/* + // heightmap: (1 - neu ) + alt - 0.5, on_minus_srcalpha + add signed + // emboss bump map + a4 -= a1; + r2 = clampfix_maxcolor ( clampfix_mincolor ( imulFix ( r0 + a4, r3 ) ) ); + g2 = clampfix_maxcolor ( clampfix_mincolor ( imulFix ( g0 + a4, g3 ) ) ); + b2 = clampfix_maxcolor ( clampfix_mincolor ( imulFix ( b0 + a4, b3 ) ) ); +*/ + +/* + r2 = clampfix_maxcolor ( imulFix_tex1 ( r2, r1 ) ); + g2 = clampfix_maxcolor ( imulFix_tex1 ( g2, g1 ) ); + b2 = clampfix_maxcolor ( imulFix_tex1 ( b2, b1 ) ); +*/ +#else + r2 = clampfix_maxcolor ( imulFix_tex4 ( r0, r1 ) ); + g2 = clampfix_maxcolor ( imulFix_tex4 ( g0, g1 ) ); + b2 = clampfix_maxcolor ( imulFix_tex4 ( b0, b1 ) ); +#endif + + + dst[i] = fix_to_color ( r2, g2, b2 ); + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2]; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0]; +#endif + } + +} + +void CTRNormalMap::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][0] = (c->Tex[2] - a->Tex[2]) * scan.invDeltaY[0]; + scan.t[2][0] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][0] = (c->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[0]; + scan.l[0][0] = a->LightTangent[0]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + + // rasterize upper sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (b->Tex[2] - a->Tex[2]) * scan.invDeltaY[1]; + scan.t[2][1] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (b->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[1]; + scan.l[0][1] = a->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + //if( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] = a->Tex[2] + scan.slopeT[2][0] * temp[0]; +#endif +#ifdef IPOL_L0 + scan.l[0][0] = a->LightTangent[0] + scan.slopeL[0][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (c->Tex[2] - b->Tex[2]) * scan.invDeltaY[2]; + scan.t[2][1] = b->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (c->LightTangent[0] - b->LightTangent[0]) * scan.invDeltaY[2]; + scan.l[0][1] = b->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a triangle renderer +IBurningShader* createTRNormalMap(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRNormalMap(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/source/Irrlicht/CTRStencilShadow.cpp b/source/Irrlicht/CTRStencilShadow.cpp new file mode 100644 index 00000000..069e35c9 --- /dev/null +++ b/source/Irrlicht/CTRStencilShadow.cpp @@ -0,0 +1,936 @@ +// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef USE_SBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 +#undef IPOL_T2 +#undef IPOL_L0 + +// define render case +#define SUBTEXEL +//#define INVERSE_W + +#define USE_ZBUFFER +#define USE_SBUFFER +#define IPOL_W +#define CMP_W +//#define WRITE_W + + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRStencilShadow : public IBurningShader +{ +public: + + //! constructor + CTRStencilShadow(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + virtual void setParam ( u32 index, f32 value); + +private: + // fragment shader + typedef void (CTRStencilShadow::*tFragmentShader) (); + void fragment_zfail_decr (); + void fragment_zfail_incr (); + + tFragmentShader fragmentShader; + + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRStencilShadow::CTRStencilShadow(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRStencilShadow"); + #endif +} + + + +/*! +*/ +void CTRStencilShadow::setParam ( u32 index, f32 value) +{ + u32 val = (u32) value; + + + // glStencilOp (fail,zfail,zpass + if ( index == 1 && val == 1 ) + { + fragmentShader = &CTRStencilShadow::fragment_zfail_incr; + } + else + if ( index == 1 && val == 2 ) + { + fragmentShader = &CTRStencilShadow::fragment_zfail_decr; + } + + +} + +/*! +*/ +void CTRStencilShadow::fragment_zfail_decr () +{ + //tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + +#ifdef USE_SBUFFER + u32 *stencil; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif +#ifdef IPOL_L0 + sVec3 slopeL[BURNING_MATERIAL_MAX_TANGENT]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif +#ifdef IPOL_T2 + slopeT[2] = (line.t[2][1] - line.t[2][0]) * invDeltaX; +#endif +#ifdef IPOL_L0 + slopeL[0] = (line.l[0][1] - line.l[0][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2] * subPixel; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0] * subPixel; +#endif +#endif + + //dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + +#ifdef USE_SBUFFER + stencil = (u32*) Stencil->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + +#ifdef IPOL_C0 + tFixPoint r3, g3, b3; +#endif + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] < z[i] ) +#endif + { + // zfail + stencil[i] -= 1; + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2]; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0]; +#endif + } + +} + +/*! +*/ +void CTRStencilShadow::fragment_zfail_incr () +{ + //tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + +#ifdef USE_SBUFFER + u32 *stencil; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif +#ifdef IPOL_L0 + sVec3 slopeL[BURNING_MATERIAL_MAX_TANGENT]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif +#ifdef IPOL_T2 + slopeT[2] = (line.t[2][1] - line.t[2][0]) * invDeltaX; +#endif +#ifdef IPOL_L0 + slopeL[0] = (line.l[0][1] - line.l[0][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2] * subPixel; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0] * subPixel; +#endif +#endif + + //dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + +#ifdef USE_SBUFFER + stencil = (u32*) Stencil->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + +#ifdef IPOL_C0 + tFixPoint r3, g3, b3; +#endif + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] < z[i] ) +#endif + { + // zfail + stencil[i] += 1; + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2]; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0]; +#endif + } + +} + +void CTRStencilShadow::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][0] = (c->Tex[2] - a->Tex[2]) * scan.invDeltaY[0]; + scan.t[2][0] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][0] = (c->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[0]; + scan.l[0][0] = a->LightTangent[0]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + + // rasterize upper sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (b->Tex[2] - a->Tex[2]) * scan.invDeltaY[1]; + scan.t[2][1] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (b->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[1]; + scan.l[0][1] = a->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + (this->*fragmentShader) (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + //if( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] = a->Tex[2] + scan.slopeT[2][0] * temp[0]; +#endif +#ifdef IPOL_L0 + scan.l[0][0] = a->LightTangent[0] + scan.slopeL[0][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (c->Tex[2] - b->Tex[2]) * scan.invDeltaY[2]; + scan.t[2][1] = b->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (c->LightTangent[0] - b->LightTangent[0]) * scan.invDeltaY[2]; + scan.l[0][1] = b->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + (this->*fragmentShader) (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a triangle renderer +IBurningShader* createTRStencilShadow(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRStencilShadow(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/source/Irrlicht/CTRTextureBlend.cpp b/source/Irrlicht/CTRTextureBlend.cpp index 736796e6..ea332e25 100644 --- a/source/Irrlicht/CTRTextureBlend.cpp +++ b/source/Irrlicht/CTRTextureBlend.cpp @@ -81,7 +81,7 @@ class CTRTextureBlend : public IBurningShader public: //! constructor - CTRTextureBlend(IDepthBuffer* zbuffer); + CTRTextureBlend(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -111,8 +111,8 @@ private: }; //! constructor -CTRTextureBlend::CTRTextureBlend(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureBlend::CTRTextureBlend(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureBlend"); @@ -334,7 +334,7 @@ void CTRTextureBlend::fragment_dst_color_src_alpha () iw = fix_inverse32 ( line.w[0] ); #endif - getSample_texture ( (tFixPointu&) a0, (tFixPointu&)r0, (tFixPointu&)g0, (tFixPointu&)b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,iw), tofix ( line.t[0][0].y,iw) @@ -377,7 +377,7 @@ void CTRTextureBlend::fragment_dst_color_src_alpha () iw = fix_inverse32 ( line.w[0] ); #endif - getSample_texture ( (tFixPointu&) a0, (tFixPointu&)r0, (tFixPointu&)g0, (tFixPointu&)b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,iw), tofix ( line.t[0][0].y,iw) @@ -494,7 +494,7 @@ void CTRTextureBlend::fragment_src_color_src_alpha () f32 iw = FIX_POINT_F32_MUL; - tFixPointu a0, r0, g0, b0; + tFixPoint a0, r0, g0, b0; tFixPoint r1, g1, b1; s32 i; @@ -557,7 +557,7 @@ void CTRTextureBlend::fragment_src_color_src_alpha () iw = fix_inverse32 ( line.w[0] ); #endif - getSample_texture ( (tFixPointu&) a0, (tFixPointu&)r0, (tFixPointu&)g0, (tFixPointu&)b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,iw), tofix ( line.t[0][0].y,iw) @@ -674,7 +674,7 @@ void CTRTextureBlend::fragment_one_one_minus_src_alpha() f32 iw = FIX_POINT_F32_MUL; - tFixPointu a0,r0, g0, b0; + tFixPoint a0,r0, g0, b0; tFixPoint r1, g1, b1; tFixPoint r2, g2, b2; @@ -1067,7 +1067,7 @@ void CTRTextureBlend::fragment_src_alpha_one () f32 iw = FIX_POINT_F32_MUL; - tFixPointu a0, r0, g0, b0; + tFixPoint a0, r0, g0, b0; tFixPoint r1, g1, b1; tFixPoint r2, g2, b2; @@ -2369,10 +2369,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTRTextureBlend(IDepthBuffer* zbuffer) +IBurningShader* createTRTextureBlend(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureBlend(zbuffer); + return new CTRTextureBlend(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureDetailMap2.cpp b/source/Irrlicht/CTRTextureDetailMap2.cpp index 0f334588..e131e061 100644 --- a/source/Irrlicht/CTRTextureDetailMap2.cpp +++ b/source/Irrlicht/CTRTextureDetailMap2.cpp @@ -81,7 +81,7 @@ class CTRTextureDetailMap2 : public IBurningShader public: //! constructor - CTRTextureDetailMap2(IDepthBuffer* zbuffer); + CTRTextureDetailMap2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -95,8 +95,8 @@ private: }; //! constructor -CTRTextureDetailMap2::CTRTextureDetailMap2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureDetailMap2::CTRTextureDetailMap2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureDetailMap2"); @@ -230,8 +230,6 @@ void CTRTextureDetailMap2::scanline_bilinear () getSample_texture ( r0, g0, b0, &IT[0], tx0,ty0 ); getSample_texture ( r1, g1, b1, &IT[1], tx1,ty1 ); -#define FIX_POINT_HALF_COLOR ( (tFixPoint) ( ((f32) COLOR_MAX / 2.f * FIX_POINT_F32_MUL ) ) ) - // bias half color r1 += -FIX_POINT_HALF_COLOR; g1 += -FIX_POINT_HALF_COLOR; @@ -645,10 +643,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureDetailMap2(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureDetailMap2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureDetailMap2(zbuffer); + return new CTRTextureDetailMap2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureGouraud2.cpp b/source/Irrlicht/CTRTextureGouraud2.cpp index 5bf84556..fb5beb0b 100644 --- a/source/Irrlicht/CTRTextureGouraud2.cpp +++ b/source/Irrlicht/CTRTextureGouraud2.cpp @@ -80,7 +80,7 @@ class CTRTextureGouraud2 : public IBurningShader public: //! constructor - CTRTextureGouraud2(IDepthBuffer* zbuffer); + CTRTextureGouraud2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -94,8 +94,8 @@ private: }; //! constructor -CTRTextureGouraud2::CTRTextureGouraud2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureGouraud2::CTRTextureGouraud2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureGouraud2"); @@ -657,10 +657,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureGouraud2(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureGouraud2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureGouraud2(zbuffer); + return new CTRTextureGouraud2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureGouraudAdd2.cpp b/source/Irrlicht/CTRTextureGouraudAdd2.cpp index 0ec81e8b..01779a76 100644 --- a/source/Irrlicht/CTRTextureGouraudAdd2.cpp +++ b/source/Irrlicht/CTRTextureGouraudAdd2.cpp @@ -81,7 +81,7 @@ class CTRTextureGouraudAdd2 : public IBurningShader public: //! constructor - CTRTextureGouraudAdd2(IDepthBuffer* zbuffer); + CTRTextureGouraudAdd2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -94,8 +94,8 @@ private: }; //! constructor -CTRTextureGouraudAdd2::CTRTextureGouraudAdd2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureGouraudAdd2::CTRTextureGouraudAdd2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureGouraudAdd2"); @@ -663,10 +663,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTRTextureGouraudAdd2(IDepthBuffer* zbuffer) +IBurningShader* createTRTextureGouraudAdd2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureGouraudAdd2(zbuffer); + return new CTRTextureGouraudAdd2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp b/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp index 02770668..d3f0aa28 100644 --- a/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp +++ b/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp @@ -80,7 +80,7 @@ class CTRTextureGouraudAddNoZ2 : public IBurningShader public: //! constructor - CTRTextureGouraudAddNoZ2(IDepthBuffer* zbuffer); + CTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -94,8 +94,8 @@ private: }; //! constructor -CTRTextureGouraudAddNoZ2::CTRTextureGouraudAddNoZ2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureGouraudAddNoZ2::CTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureGouraudAddNoZ2"); @@ -199,8 +199,6 @@ void CTRTextureGouraudAddNoZ2::scanline_bilinear () tFixPoint r0, g0, b0; tFixPoint r1, g1, b1; - tFixPoint r2, g2, b2; - for ( s32 i = 0; i <= dx; ++i ) { @@ -225,12 +223,10 @@ void CTRTextureGouraudAddNoZ2::scanline_bilinear () color_to_fix ( r1, g1, b1, dst[i] ); - r2 = clampfix_maxcolor ( r1 + r0 ); - g2 = clampfix_maxcolor ( g1 + g0 ); - b2 = clampfix_maxcolor ( b1 + b0 ); - - - dst[i] = fix_to_color ( r2, g2, b2 ); + dst[i] = fix_to_color ( clampfix_maxcolor ( r1 + (r0 >> 1 ) ), + clampfix_maxcolor ( g1 + (g0 >> 1 ) ), + clampfix_maxcolor ( b1 + (b0 >> 1) ) + ); #ifdef WRITE_Z z[i] = line.z[0]; @@ -633,10 +629,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTRTextureGouraudAddNoZ2(IDepthBuffer* zbuffer) +IBurningShader* createTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureGouraudAddNoZ2(zbuffer); + return new CTRTextureGouraudAddNoZ2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureGouraudAlpha.cpp b/source/Irrlicht/CTRTextureGouraudAlpha.cpp index 1e651f53..9bc3a6d5 100644 --- a/source/Irrlicht/CTRTextureGouraudAlpha.cpp +++ b/source/Irrlicht/CTRTextureGouraudAlpha.cpp @@ -81,7 +81,7 @@ class CTRTextureGouraudAlpha2 : public IBurningShader public: //! constructor - CTRTextureGouraudAlpha2(IDepthBuffer* zbuffer); + CTRTextureGouraudAlpha2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -99,8 +99,8 @@ private: }; //! constructor -CTRTextureGouraudAlpha2::CTRTextureGouraudAlpha2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureGouraudAlpha2::CTRTextureGouraudAlpha2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureGouraudAlpha2"); @@ -273,13 +273,13 @@ void CTRTextureGouraudAlpha2::scanline_bilinear () #ifdef INVERSE_W inversew = fix_inverse32 ( line.w[0] ); - getSample_texture ( (tFixPointu&) a0, (tFixPointu&) r0, (tFixPointu&)g0, (tFixPointu&)b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); #else - getSample_texture ( (tFixPointu&) a0, (tFixPointu&) r0, (tFixPointu&)g0, (tFixPointu&)b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x), tofix ( line.t[0][0].y) @@ -728,10 +728,10 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTRTextureGouraudAlpha(IDepthBuffer* zbuffer) +IBurningShader* createTRTextureGouraudAlpha(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureGouraudAlpha2(zbuffer); + return new CTRTextureGouraudAlpha2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp b/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp index 394f41ed..47d79345 100644 --- a/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp +++ b/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp @@ -81,7 +81,7 @@ class CTRTextureGouraudAlphaNoZ : public IBurningShader public: //! constructor - CTRTextureGouraudAlphaNoZ(IDepthBuffer* zbuffer); + CTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -99,8 +99,8 @@ private: }; //! constructor -CTRTextureGouraudAlphaNoZ::CTRTextureGouraudAlphaNoZ(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureGouraudAlphaNoZ::CTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureGouraudAlphaNoZ"); @@ -273,13 +273,13 @@ void CTRTextureGouraudAlphaNoZ::scanline_bilinear () #ifdef INVERSE_W inversew = fix_inverse32 ( line.w[0] ); - getSample_texture ( (tFixPointu&) a0, (tFixPointu&) r0, (tFixPointu&)g0, (tFixPointu&)b0, + getSample_texture ( a0, r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); #else - getSample_texture ( (tFixPointu&) a0, (tFixPointu&) r0, (tFixPointu&)g0, (tFixPointu&)b0, + getSample_texture ( a0, r0, g0,b0, &IT[0], tofix ( line.t[0][0].x), tofix ( line.t[0][0].y) @@ -729,10 +729,10 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTRTextureGouraudAlphaNoZ(IDepthBuffer* zbuffer) +IBurningShader* createTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureGouraudAlphaNoZ(zbuffer); + return new CTRTextureGouraudAlphaNoZ(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureGouraudNoZ2.cpp b/source/Irrlicht/CTRTextureGouraudNoZ2.cpp index a05af5a2..10a22b8e 100644 --- a/source/Irrlicht/CTRTextureGouraudNoZ2.cpp +++ b/source/Irrlicht/CTRTextureGouraudNoZ2.cpp @@ -85,7 +85,7 @@ class CTRTextureGouraudNoZ2 : public IBurningShader public: //! constructor - CTRTextureGouraudNoZ2(IDepthBuffer* zbuffer); + CTRTextureGouraudNoZ2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -99,8 +99,8 @@ private: }; //! constructor -CTRTextureGouraudNoZ2::CTRTextureGouraudNoZ2(IDepthBuffer* zbuffer) -: IBurningShader(0) +CTRTextureGouraudNoZ2::CTRTextureGouraudNoZ2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureGouraudNoZ2"); @@ -630,10 +630,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTRTextureGouraudNoZ2() +IBurningShader* createTRTextureGouraudNoZ2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureGouraudNoZ2( 0 ); + return new CTRTextureGouraudNoZ2( driver ); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp b/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp index 02a953ca..b18072c8 100644 --- a/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp +++ b/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp @@ -79,7 +79,7 @@ class CTRTextureVertexAlpha2 : public IBurningShader public: //! constructor - CTRTextureVertexAlpha2(IDepthBuffer* zbuffer); + CTRTextureVertexAlpha2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -93,8 +93,8 @@ private: }; //! constructor -CTRTextureVertexAlpha2::CTRTextureVertexAlpha2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureVertexAlpha2::CTRTextureVertexAlpha2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureVertexAlpha2"); @@ -673,10 +673,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureVertexAlpha2(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureVertexAlpha2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureVertexAlpha2(zbuffer); + return new CTRTextureVertexAlpha2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureLightMap2_Add.cpp b/source/Irrlicht/CTRTextureLightMap2_Add.cpp index b7b7244c..3d1e6898 100644 --- a/source/Irrlicht/CTRTextureLightMap2_Add.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_Add.cpp @@ -79,7 +79,7 @@ class CTRTextureLightMap2_Add : public IBurningShader public: //! constructor - CTRTextureLightMap2_Add(IDepthBuffer* zbuffer); + CTRTextureLightMap2_Add(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -94,8 +94,8 @@ private: }; //! constructor -CTRTextureLightMap2_Add::CTRTextureLightMap2_Add(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureLightMap2_Add::CTRTextureLightMap2_Add(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureLightMap2_Add"); @@ -655,10 +655,10 @@ namespace video { //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureLightMap2_Add(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureLightMap2_Add(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureLightMap2_Add(zbuffer); + return new CTRTextureLightMap2_Add(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureLightMap2_M1.cpp b/source/Irrlicht/CTRTextureLightMap2_M1.cpp index f1b262b9..82529a18 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M1.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M1.cpp @@ -79,7 +79,7 @@ class CTRTextureLightMap2_M1 : public IBurningShader public: //! constructor - CTRTextureLightMap2_M1(IDepthBuffer* zbuffer); + CTRTextureLightMap2_M1(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -93,8 +93,8 @@ private: }; //! constructor -CTRTextureLightMap2_M1::CTRTextureLightMap2_M1(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureLightMap2_M1::CTRTextureLightMap2_M1(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureLightMap2_M1"); @@ -627,10 +627,10 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureLightMap2_M1(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureLightMap2_M1(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureLightMap2_M1(zbuffer); + return new CTRTextureLightMap2_M1(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureLightMap2_M2.cpp b/source/Irrlicht/CTRTextureLightMap2_M2.cpp index 2591502b..06893300 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M2.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M2.cpp @@ -79,7 +79,7 @@ class CTRTextureLightMap2_M2 : public IBurningShader public: //! constructor - CTRTextureLightMap2_M2(IDepthBuffer* zbuffer); + CTRTextureLightMap2_M2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -93,8 +93,8 @@ private: }; //! constructor -CTRTextureLightMap2_M2::CTRTextureLightMap2_M2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureLightMap2_M2::CTRTextureLightMap2_M2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureLightMap2_M2"); @@ -627,10 +627,10 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureLightMap2_M2(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureLightMap2_M2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureLightMap2_M2(zbuffer); + return new CTRTextureLightMap2_M2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureLightMap2_M4.cpp b/source/Irrlicht/CTRTextureLightMap2_M4.cpp index 80a245e7..4d0e10d3 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M4.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M4.cpp @@ -79,7 +79,7 @@ class CTRTextureLightMap2_M4 : public IBurningShader public: //! constructor - CTRTextureLightMap2_M4(IDepthBuffer* zbuffer); + CTRTextureLightMap2_M4(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -99,8 +99,8 @@ private: }; //! constructor -CTRTextureLightMap2_M4::CTRTextureLightMap2_M4(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureLightMap2_M4::CTRTextureLightMap2_M4(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureLightMap2_M4"); @@ -374,196 +374,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min () } - -#if 0 -/*! -*/ -REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear () -{ - tVideoSample *dst; - -#ifdef USE_ZBUFFER - fp24 *z; -#endif - - s32 xStart; - s32 xEnd; - s32 dx; - - -#ifdef SUBTEXEL - f32 subPixel; -#endif - -#ifdef IPOL_Z - f32 slopeZ; -#endif -#ifdef IPOL_W - fp24 slopeW; -#endif -#ifdef IPOL_C0 - sVec4 slopeC; -#endif -#ifdef IPOL_T0 - sVec2 slopeT[0]; -#endif -#ifdef IPOL_T1 - sVec2 slopeT[1]; -#endif - - // apply top-left fill-convention, left - xStart = core::ceil32( line.x[0] ); - xEnd = core::ceil32( line.x[1] ) - 1; - - dx = xEnd - xStart; - - if ( dx < 0 ) - return; - - // slopes - const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); - -#ifdef IPOL_Z - slopeZ = (line.z[1] - line.z[0]) * invDeltaX; -#endif -#ifdef IPOL_W - slopeW = (line.w[1] - line.w[0]) * invDeltaX; -#endif -#ifdef IPOL_C0 - slopeC = (line.c[1] - line.c[0]) * invDeltaX; -#endif -#ifdef IPOL_T0 - slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; -#endif -#ifdef IPOL_T1 - slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; -#endif - -#ifdef SUBTEXEL - subPixel = ( (f32) xStart ) - line.x[0]; -#ifdef IPOL_Z - line.z[0] += slopeZ * subPixel; -#endif -#ifdef IPOL_W - line.w[0] += slopeW * subPixel; -#endif -#ifdef IPOL_C0 - line.c[0] += slopeC * subPixel; -#endif -#ifdef IPOL_T0 - line.t[0][0] += slopeT[0] * subPixel; -#endif -#ifdef IPOL_T1 - line.t[1][0] += slopeT[1] * subPixel; -#endif -#endif - - dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; - -#ifdef USE_ZBUFFER - z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; -#endif - - -#ifdef INVERSE_W - f32 inversew; -#endif - - tFixPointu tx0, tx1; - tFixPointu ty0, ty1; - - tFixPoint r0, g0, b0; - tFixPoint r1, g1, b1; - tFixPoint r2, g2, b2; - -#ifdef IPOL_C0 - tFixPoint r3, g3, b3; -#endif - - for ( s32 i = 0; i <= dx; i++ ) - { -#ifdef CMP_Z - if ( line.z[0] < z[i] ) -#endif -#ifdef CMP_W - if ( line.w[0] >= z[i] ) -#endif - { -#ifdef INVERSE_W - inversew = fix_inverse32 ( line.w[0] ); - - tx0 = tofix ( line.t[0][0].x,inversew); - ty0 = tofix ( line.t[0][0].y,inversew); - tx1 = tofix ( line.t[1][0].x,inversew); - ty1 = tofix ( line.t[1][0].y,inversew); - -#ifdef IPOL_C0 - r3 = tofix ( line.c[0].y ,inversew ); - g3 = tofix ( line.c[0].z ,inversew ); - b3 = tofix ( line.c[0].w ,inversew ); -#endif - -#else - tx0 = tofix ( line.t[0][0].x ); - ty0 = tofix ( line.t[0][0].y ); - tx1 = tofix ( line.t[1][0].x ); - ty1 = tofix ( line.t[1][0].y ); - -#endif - getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 ); - getSample_texture ( r1, g1, b1, &IT[1], tx1, ty1 ); - -#ifdef IPOL_C0 - r2 = imulFix ( r0, r3 ); - g2 = imulFix ( g0, g3 ); - b2 = imulFix ( b0, b3 ); - - r2 = clampfix_maxcolor ( imulFix_tex4 ( r2, r1 ) ); - g2 = clampfix_maxcolor ( imulFix_tex4 ( g2, g1 ) ); - b2 = clampfix_maxcolor ( imulFix_tex4 ( b2, b1 ) ); -/* - r2 = r3 << 8; - g2 = g3 << 8; - b2 = b3 << 8; -*/ -#else - r2 = clampfix_maxcolor ( imulFix_tex4 ( r0, r1 ) ); - g2 = clampfix_maxcolor ( imulFix_tex4 ( g0, g1 ) ); - b2 = clampfix_maxcolor ( imulFix_tex4 ( b0, b1 ) ); -#endif - - - dst[i] = fix_to_color ( r2, g2, b2 ); - -#ifdef WRITE_Z - z[i] = line.z[0]; -#endif -#ifdef WRITE_W - z[i] = line.w[0]; -#endif - } - -#ifdef IPOL_Z - line.z[0] += slopeZ; -#endif -#ifdef IPOL_W - line.w[0] += slopeW; -#endif -#ifdef IPOL_C0 - line.c[0] += slopeC; -#endif -#ifdef IPOL_T0 - line.t[0][0] += slopeT[0]; -#endif -#ifdef IPOL_T1 - line.t[1][0] += slopeT[1]; -#endif - } - -} -#endif - - //#ifdef BURNINGVIDEO_RENDERER_FAST #if 1 @@ -1327,10 +1137,10 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureLightMap2_M4(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureLightMap2_M4(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureLightMap2_M4(zbuffer); + return new CTRTextureLightMap2_M4(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp b/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp index 4097d9de..357a528d 100644 --- a/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp +++ b/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp @@ -79,7 +79,7 @@ class CTRGTextureLightMap2_M4 : public IBurningShader public: //! constructor - CTRGTextureLightMap2_M4(IDepthBuffer* zbuffer); + CTRGTextureLightMap2_M4(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -94,8 +94,8 @@ private: }; //! constructor -CTRGTextureLightMap2_M4::CTRGTextureLightMap2_M4(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRGTextureLightMap2_M4::CTRGTextureLightMap2_M4(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRGTextureLightMap2_M4"); @@ -673,10 +673,10 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTriangleRendererGTextureLightMap2_M4(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererGTextureLightMap2_M4(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRGTextureLightMap2_M4(zbuffer); + return new CTRGTextureLightMap2_M4(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTRTextureWire2.cpp b/source/Irrlicht/CTRTextureWire2.cpp index 17de4521..6176a14e 100644 --- a/source/Irrlicht/CTRTextureWire2.cpp +++ b/source/Irrlicht/CTRTextureWire2.cpp @@ -77,7 +77,7 @@ class CTRTextureWire2 : public IBurningShader public: //! constructor - CTRTextureWire2(IDepthBuffer* zbuffer); + CTRTextureWire2(CBurningVideoDriver* driver); //! draws an indexed triangle list virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); @@ -92,8 +92,8 @@ private: }; //! constructor -CTRTextureWire2::CTRTextureWire2(IDepthBuffer* zbuffer) -: IBurningShader(zbuffer) +CTRTextureWire2::CTRTextureWire2(CBurningVideoDriver* driver) +: IBurningShader(driver) { #ifdef _DEBUG setDebugName("CTRTextureWire2"); @@ -282,10 +282,10 @@ namespace video //! creates a flat triangle renderer -IBurningShader* createTriangleRendererTextureGouraudWire2(IDepthBuffer* zbuffer) +IBurningShader* createTriangleRendererTextureGouraudWire2(CBurningVideoDriver* driver) { #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return new CTRTextureWire2(zbuffer); + return new CTRTextureWire2(driver); #else return 0; #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/source/Irrlicht/CTarReader.cpp b/source/Irrlicht/CTarReader.cpp index 1b92f4cf..e9b0310d 100644 --- a/source/Irrlicht/CTarReader.cpp +++ b/source/Irrlicht/CTarReader.cpp @@ -216,8 +216,7 @@ u32 CTarReader::populateFileList() pos = offset + (size / 512) * 512 + ((size % 512) ? 512 : 0); // add file to list - addItem(fullPath, size, false, Offsets.size()); - Offsets.push_back(offset); + addItem(fullPath, offset, size, false ); } else { @@ -246,10 +245,11 @@ IReadFile* CTarReader::createAndOpenFile(const io::path& filename) //! opens a file by index IReadFile* CTarReader::createAndOpenFile(u32 index) { - if (index < Files.size()) - return createLimitReadFile(Files[index].FullName, File, Offsets[Files[index].ID], Files[index].Size); - else + if (index >= Files.size() ) return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); } } // end namespace io diff --git a/source/Irrlicht/CTarReader.h b/source/Irrlicht/CTarReader.h index d2501566..06937d18 100644 --- a/source/Irrlicht/CTarReader.h +++ b/source/Irrlicht/CTarReader.h @@ -135,9 +135,6 @@ namespace io u32 populateFileList(); IReadFile* File; - - //! Contains offsets of the files from the start of the archive file - core::array Offsets; }; } // end namespace io diff --git a/source/Irrlicht/CTextSceneNode.cpp b/source/Irrlicht/CTextSceneNode.cpp index 242541ef..9b1ef66a 100644 --- a/source/Irrlicht/CTextSceneNode.cpp +++ b/source/Irrlicht/CTextSceneNode.cpp @@ -154,6 +154,9 @@ CBillboardTextSceneNode::~CBillboardTextSceneNode() //! sets the text string void CBillboardTextSceneNode::setText(const wchar_t* text) { + if ( !Mesh ) + return; + Text = text; Symbol.clear(); @@ -325,6 +328,9 @@ void CBillboardTextSceneNode::OnRegisterSceneNode() //! render void CBillboardTextSceneNode::render() { + if ( !Mesh ) + return; + video::IVideoDriver* driver = SceneManager->getVideoDriver(); // draw @@ -408,6 +414,9 @@ void CBillboardTextSceneNode::setTextColor(video::SColor color) //! \param overallColor: the color to set void CBillboardTextSceneNode::setColor(const video::SColor & overallColor) { + if ( !Mesh ) + return; + for ( u32 i = 0; i != Text.size (); ++i ) { const SSymbolInfo &info = Symbol[i]; @@ -425,6 +434,9 @@ void CBillboardTextSceneNode::setColor(const video::SColor & overallColor) //! \param bottomColor: the color to set the bottom vertices void CBillboardTextSceneNode::setColor(const video::SColor & topColor, const video::SColor & bottomColor) { + if ( !Mesh ) + return; + ColorBottom = bottomColor; ColorTop = topColor; for ( u32 i = 0; i != Text.size (); ++i ) diff --git a/source/Irrlicht/CWADReader.cpp b/source/Irrlicht/CWADReader.cpp new file mode 100644 index 00000000..bba7bda4 --- /dev/null +++ b/source/Irrlicht/CWADReader.cpp @@ -0,0 +1,263 @@ +// Copyright (C) 2002-2009 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// Code contributed by skreamz + +#include "IrrCompileConfig.h" + +#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + +#include "CWADReader.h" +#include "os.h" +#include "coreutil.h" + +namespace irr +{ +namespace io +{ + +//! Constructor +CArchiveLoaderWAD::CArchiveLoaderWAD( io::IFileSystem* fs) +: FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("CArchiveLoaderWAD"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CArchiveLoaderWAD::isALoadableFileFormat(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "wad" ); +} + + +//! Creates an archive from the filename +/** \param file File handle to check. +\return Pointer to newly created archive, or 0 upon error. */ +IFileArchive* CArchiveLoaderWAD::createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + + if (file) + { + archive = createArchive ( file, ignoreCase, ignorePaths ); + file->drop (); + } + + return archive; +} + +//! creates/loads an archive from the file. +//! \return Pointer to the created archive. Returns 0 if loading failed. +IFileArchive* CArchiveLoaderWAD::createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + if ( file ) + { + file->seek ( 0 ); + archive = new CWADReader(file, ignoreCase, ignorePaths); + } + return archive; +} + + +//! Check if the file might be loaded by this class +/** Check might look into the file. +\param file File handle to check. +\return True if file seems to be loadable. */ +bool CArchiveLoaderWAD::isALoadableFileFormat(io::IReadFile* file) const +{ + SWADFileHeader header; + memset(&header, 0, sizeof(header)); + + file->read( &header.tag, 4 ); + + return !strncmp ( header.tag, "WAD2", 4 ) || !strncmp ( header.tag, "WAD3", 4 ); +} + +//! Check to see if the loader can create archives of this type. +bool CArchiveLoaderWAD::isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const +{ + return fileType == EFAT_WAD; +} + +void createDir ( const c8 *full ); + + +/*! + WAD Reader +*/ +CWADReader::CWADReader(IReadFile* file, bool ignoreCase, bool ignorePaths) +: CFileList((file ? file->getFileName() : io::path("")), ignoreCase, ignorePaths), File(file) +{ + #ifdef _DEBUG + setDebugName("CWADReader"); + #endif + + if (File) + { + File->grab(); + + Base = File->getFileName(); + Base.replace ( '\\', '/' ); + + // scan local headers + scanLocalHeader(); + + sort(); + } + +#if 0 + for ( u32 i = 0; i < FileList.size(); ++i ) + { + SWADFileEntry &e = FileList[i]; + char buf[128]; + snprintf ( buf, 128, "c:\\h2\\%s", e.wadFileName.c_str() ); + + createDir ( buf ); + FILE * f = fopen ( buf, "wb" ); + if ( 0 == f ) + continue; + + u8 * mem = new u8 [ e.header.disksize ]; + File->seek ( e.header.filepos ); + File->read ( mem, e.header.disksize ); + fwrite ( mem, e.header.disksize, 1, f ); + delete [] mem; + fclose ( f ); + } +#endif + +} + + +CWADReader::~CWADReader() +{ + if (File) + File->drop(); +} + + +//! return the id of the file Archive +const io::path& CWADReader::getArchiveName () const +{ + return Base; +} + +const IFileList* CWADReader::getFileList() const +{ + return this; +} + + +//! scans for a local header, returns false if there is no more local file header. +bool CWADReader::scanLocalHeader() +{ + SWADFileEntryOriginal entry; + SWADFileEntry save; + + memset(&Header, 0, sizeof(SWADFileHeader)); + File->read(&Header, sizeof(SWADFileHeader)); + + if ( 0 == strncmp ( Header.tag, "WAD2", 4 ) ) + WadType = WAD_FORMAT_QUAKE2; + else + if ( 0 == strncmp ( Header.tag, "WAD3", 4 ) ) + WadType = WAD_FORMAT_HALFLIFE; + else + WadType = WAD_FORMAT_UNKNOWN; + + if ( WadType == WAD_FORMAT_UNKNOWN ) + return false; + +#ifdef __BIG_ENDIAN__ + header.numlumps = os::Byteswap::byteswap(header.numlumps); + header.infotableofs = os::Byteswap::byteswap(header.infotableofs); +#endif + + File->seek ( Header.infotableofs ); + + c8 buf[16]; + for ( u32 i = 0; i < Header.numlumps; ++i ) + { + // read entry + File->read(&entry, sizeof ( SWADFileEntryOriginal )); + entry.name[ sizeof ( entry.name ) - 1 ] = 0; + + save.header = entry; + save.wadFileName = "/"; + save.wadFileName += entry.name; + + if ( WadType == WAD_FORMAT_HALFLIFE ) + { + // don't know about the types! i'm guessing + switch ( entry.type ) + { + case WAD_TYP_MIPTEX_HALFLIFE: + save.wadFileName += ".wal2"; + break; + default: + snprintf ( buf, 16, ".%02d", entry.type ); + save.wadFileName += buf; + break; + } + } + else + if ( WadType == WAD_FORMAT_QUAKE2 ) + { + switch ( entry.type ) + { + case WAD_TYP_MIPTEX: save.wadFileName += ".miptex"; break; + case WAD_TYP_SOUND: save.wadFileName += ".sound"; break; + case WAD_TYP_PALETTE: save.wadFileName += ".palette"; break; + case WAD_TYP_QTEX: save.wadFileName += ".qtex"; break; + case WAD_TYP_QPIC: save.wadFileName += ".qpic"; break; + case WAD_TYP_FONT: save.wadFileName += ".font"; break; + default: + snprintf ( buf, 16, ".%02d", entry.type ); + save.wadFileName += buf; + break; + } + } + + // add file to list + addItem(save.wadFileName,save.header.filepos, save.header.disksize, false ); + //FileInfo.push_back(save); + } + return true; +} + + +//! opens a file by file name +IReadFile* CWADReader::createAndOpenFile(const io::path& filename) +{ + s32 index = findFile(filename, false); + + if (index != -1) + return createAndOpenFile(index); + + return 0; +} + + +//! opens a file by index +IReadFile* CWADReader::createAndOpenFile(u32 index) +{ + if (index >= Files.size() ) + return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); +} + + + +} // end namespace io +} // end namespace irr + + +#endif // __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + diff --git a/source/Irrlicht/CWADReader.h b/source/Irrlicht/CWADReader.h new file mode 100644 index 00000000..cbe0f577 --- /dev/null +++ b/source/Irrlicht/CWADReader.h @@ -0,0 +1,188 @@ +// Copyright (C) 2002-2009 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_WAD_READER_H_INCLUDED__ +#define __C_WAD_READER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + +#include "IReferenceCounted.h" +#include "IReadFile.h" +#include "irrArray.h" +#include "irrString.h" +#include "IFileSystem.h" +#include "CFileList.h" + + +namespace irr +{ +namespace io +{ +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( push, packing ) +# pragma pack( 1 ) +# define PACK_STRUCT +#elif defined( __GNUC__ ) +# define PACK_STRUCT __attribute__((packed)) +#else +# error compiler not supported +#endif + + + enum eWADFileTypes + { + WAD_FORMAT_UNKNOWN = 0, + WAD_FORMAT_QUAKE2 = 1, + WAD_FORMAT_HALFLIFE = 2, + + WAD_CMP_NONE = 0, + WAD_CMP_LZSS = 1, + + WAD_TYP_NONE = 0, + WAD_TYP_LABEL = 1, + + WAD_TYP_LUMPY = 64, // 64 + grab command number + WAD_TYP_PALETTE = 64, + WAD_TYP_QTEX = 65, + WAD_TYP_QPIC = 66, + WAD_TYP_SOUND = 67, + WAD_TYP_MIPTEX = 68, + WAD_TYP_MIPTEX_HALFLIFE = 67, + WAD_TYP_FONT = 70, + }; + + struct SWADFileHeader + { + c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife + u32 numlumps; + u32 infotableofs; + } PACK_STRUCT; + + struct SWADFileEntryOriginal + { + u32 filepos; + u32 disksize; + u32 size; // uncompressed + u8 type; + u8 compression; + u8 pad[2]; + u8 name[16]; // must be null terminated + } PACK_STRUCT; + +// Default alignment +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( pop, packing ) +#endif + +#undef PACK_STRUCT + + struct SWADFileEntry + { + io::path simpleFileName; + bool operator < (const SWADFileEntry& other) const + { + return simpleFileName < other.simpleFileName; + } + + io::path wadFileName; + SWADFileEntryOriginal header; + }; + + //! Archiveloader capable of loading WAD Archives + class CArchiveLoaderWAD : public IArchiveLoader + { + public: + + //! Constructor + CArchiveLoaderWAD(io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".zip") + virtual bool isALoadableFileFormat(const io::path& filename) const; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; + + //! Creates an archive from the filename + /** \param file File handle to check. + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; + + //! creates/loads an archive from the file. + //! \return Pointer to the created archive. Returns 0 if loading failed. + virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; + + private: + io::IFileSystem* FileSystem; + }; + + + //! reads from WAD + class CWADReader : public IFileArchive, virtual CFileList + { + public: + + CWADReader(IReadFile* file, bool ignoreCase, bool ignorePaths); + virtual ~CWADReader(); + + // file archive methods + + //! return the id of the file Archive + virtual const io::path& getArchiveName() const; + + //! opens a file by file name + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! opens a file by index + virtual IReadFile* createAndOpenFile(u32 index); + + //! returns the list of files + virtual const IFileList* getFileList() const; + + //! get the class Type + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_WAD; } + + + private: + + io::path Type; + + //! scans for a local header, returns false if there is no more local file header. + bool scanLocalHeader(); + + //! splits filename from zip file into useful filenames and paths + void extractFilename(SWADFileEntry* entry); + + + io::path Base; + io::path MountPoint; + + IReadFile* File; + + eWADFileTypes WadType; + SWADFileHeader Header; + + //core::array FileInfo; + + io::IFileSystem* FileSystem; + }; + +} // end namespace io +} // end namespace irr + +#endif + + +#endif // #ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + diff --git a/source/Irrlicht/CXMLReaderImpl.h b/source/Irrlicht/CXMLReaderImpl.h index 4dd9a847..0f6a9985 100644 --- a/source/Irrlicht/CXMLReaderImpl.h +++ b/source/Irrlicht/CXMLReaderImpl.h @@ -139,14 +139,24 @@ public: //! Returns the value of an attribute as integer. int getAttributeValueAsInt(const char_type* name) const { - return (int)getAttributeValueAsFloat(name); + const SAttribute* attr = getAttributeByName(name); + if (!attr) + return 0; + + core::stringc c(attr->Value.c_str()); + return core::strtol10(c.c_str()); } //! Returns the value of an attribute as integer. int getAttributeValueAsInt(int idx) const { - return (int)getAttributeValueAsFloat(idx); + const char_type* attrvalue = getAttributeValue(idx); + if (!attrvalue) + return 0; + + core::stringc c(attrvalue); + return core::strtol10(c.c_str()); } diff --git a/source/Irrlicht/CZipReader.cpp b/source/Irrlicht/CZipReader.cpp index 27a1dcb0..ead1d59e 100644 --- a/source/Irrlicht/CZipReader.cpp +++ b/source/Irrlicht/CZipReader.cpp @@ -363,7 +363,7 @@ bool CZipReader::scanGZipHeader() #endif // now we've filled all the fields, this is just a standard deflate block - addItem(ZipFileName, entry.header.DataDescriptor.UncompressedSize, false, 0); + addItem(ZipFileName, entry.Offset, entry.header.DataDescriptor.UncompressedSize, false, 0); FileInfo.push_back(entry); } @@ -471,7 +471,7 @@ bool CZipReader::scanZipHeader() //os::Debuginfo::print("added file from archive", ZipFileName.c_str()); #endif - addItem(ZipFileName, entry.header.DataDescriptor.UncompressedSize, false, FileInfo.size()); + addItem(ZipFileName, entry.Offset, entry.header.DataDescriptor.UncompressedSize, false, FileInfo.size()); FileInfo.push_back(entry); return true; diff --git a/source/Irrlicht/IBurningShader.cpp b/source/Irrlicht/IBurningShader.cpp index 6e180a99..3045a0d4 100644 --- a/source/Irrlicht/IBurningShader.cpp +++ b/source/Irrlicht/IBurningShader.cpp @@ -7,6 +7,7 @@ #include "SoftwareDriver2_compile_config.h" #include "IBurningShader.h" +#include "CSoftwareDriver2.h" namespace irr { @@ -21,8 +22,7 @@ namespace video 0xf0,0x70,0xd0,0x50 }; - IBurningShader::IBurningShader(IDepthBuffer* zbuffer) - : RenderTarget(0),DepthBuffer(zbuffer) + IBurningShader::IBurningShader(CBurningVideoDriver* driver) { #ifdef _DEBUG setDebugName("IBurningShader"); @@ -33,8 +33,17 @@ namespace video IT[i].Texture = 0; } + Driver = driver; + RenderTarget = 0; + ColorMask = COLOR_BRIGHT_WHITE; + DepthBuffer = (CDepthBuffer*) driver->getDepthBuffer (); if ( DepthBuffer ) DepthBuffer->grab(); + + Stencil = (CStencilBuffer*) driver->getStencilBuffer (); + if ( Stencil ) + Stencil->grab(); + } @@ -47,6 +56,9 @@ namespace video if (DepthBuffer) DepthBuffer->drop(); + if (Stencil) + Stencil->drop(); + for ( u32 i = 0; i != BURNING_MATERIAL_MAX_TEXTURES; ++i ) { if ( IT[i].Texture ) diff --git a/source/Irrlicht/IBurningShader.h b/source/Irrlicht/IBurningShader.h index 771fd88e..aaea2f24 100644 --- a/source/Irrlicht/IBurningShader.h +++ b/source/Irrlicht/IBurningShader.h @@ -11,7 +11,7 @@ #include "IImage.h" #include "S2DVertex.h" #include "rect.h" -#include "IDepthBuffer.h" +#include "CDepthBuffer.h" #include "S4DVertex.h" #include "irrArray.h" #include "SLight.h" @@ -40,6 +40,7 @@ namespace video sVec3 AmbientColor; sVec3 DiffuseColor; sVec3 SpecularColor; + sVec4 pos_objectspace; }; enum eLightFlags @@ -110,6 +111,9 @@ namespace video ETR_TEXTURE_GOURAUD_ALPHA, ETR_TEXTURE_GOURAUD_ALPHA_NOZ, + ETR_NORMAL_MAP_SOLID, + ETR_STENCIL_SHADOW, + ETR_TEXTURE_BLEND, ETR_REFERENCE, ETR_INVALID, @@ -118,10 +122,11 @@ namespace video }; + class CBurningVideoDriver; class IBurningShader : public virtual IReferenceCounted { public: - IBurningShader(IDepthBuffer* zbuffer); + IBurningShader(CBurningVideoDriver* driver); //! destructor virtual ~IBurningShader(); @@ -141,8 +146,12 @@ namespace video protected: + CBurningVideoDriver *Driver; + video::CImage* RenderTarget; - IDepthBuffer* DepthBuffer; + CDepthBuffer* DepthBuffer; + CStencilBuffer * Stencil; + tVideoSample ColorMask; sInternalTexture IT[ BURNING_MATERIAL_MAX_TEXTURES ]; @@ -150,35 +159,38 @@ namespace video }; - IBurningShader* createTriangleRendererTextureGouraud2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureLightMap2_M1(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureLightMap2_M2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureLightMap2_M4(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererGTextureLightMap2_M4(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureLightMap2_Add(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureDetailMap2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureVertexAlpha2(IDepthBuffer* zbuffer); + IBurningShader* createTriangleRendererTextureGouraud2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_M1(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_M2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_M4(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGTextureLightMap2_M4(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_Add(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureDetailMap2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureVertexAlpha2(CBurningVideoDriver* driver); - IBurningShader* createTriangleRendererTextureGouraudWire2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererGouraud2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererGouraudAlpha2(IDepthBuffer* zbuffer); - IBurningShader* createTRGouraudAlphaNoZ2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererGouraudWire2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureFlat2(IDepthBuffer* zbuffer); - IBurningShader* createTriangleRendererTextureFlatWire2(IDepthBuffer* zbuffer); - IBurningShader* createTRFlat2(IDepthBuffer* zbuffer); - IBurningShader* createTRFlatWire2(IDepthBuffer* zbuffer); - IBurningShader* createTRTextureGouraudNoZ2(); - IBurningShader* createTRTextureGouraudAdd2(IDepthBuffer* zbuffer); - IBurningShader* createTRTextureGouraudAddNoZ2(IDepthBuffer* zbuffer); + IBurningShader* createTriangleRendererTextureGouraudWire2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGouraud2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGouraudAlpha2(CBurningVideoDriver* driver); + IBurningShader* createTRGouraudAlphaNoZ2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGouraudWire2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureFlat2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureFlatWire2(CBurningVideoDriver* driver); + IBurningShader* createTRFlat2(CBurningVideoDriver* driver); + IBurningShader* createTRFlatWire2(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudNoZ2(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudAdd2(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver); - IBurningShader* createTRTextureGouraudAlpha(IDepthBuffer* zbuffer); - IBurningShader* createTRTextureGouraudAlphaNoZ(IDepthBuffer* zbuffer); - IBurningShader* createTRTextureBlend(IDepthBuffer* zbuffer); - IBurningShader* createTRTextureInverseAlphaBlend(IDepthBuffer* zbuffer); + IBurningShader* createTRTextureGouraudAlpha(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver); + IBurningShader* createTRTextureBlend(CBurningVideoDriver* driver); + IBurningShader* createTRTextureInverseAlphaBlend(CBurningVideoDriver* driver); - IBurningShader* createTriangleRendererReference(IDepthBuffer* zbuffer); + IBurningShader* createTRNormalMap(CBurningVideoDriver* driver); + IBurningShader* createTRStencilShadow(CBurningVideoDriver* driver); + + IBurningShader* createTriangleRendererReference(CBurningVideoDriver* driver); diff --git a/source/Irrlicht/IDepthBuffer.h b/source/Irrlicht/IDepthBuffer.h index b9c33151..04dc6689 100644 --- a/source/Irrlicht/IDepthBuffer.h +++ b/source/Irrlicht/IDepthBuffer.h @@ -44,6 +44,37 @@ namespace video //! creates a ZBuffer IDepthBuffer* createDepthBuffer(const core::dimension2d& size); + class IStencilBuffer : public virtual IReferenceCounted + { + public: + + //! destructor + virtual ~IStencilBuffer() {}; + + //! clears the zbuffer + virtual void clear() = 0; + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d& size) = 0; + + //! returns the size of the zbuffer + virtual const core::dimension2d& getSize() const = 0; + + //! locks the zbuffer + virtual void* lock() = 0; + + //! unlocks the zbuffer + virtual void unlock() = 0; + + //! returns pitch of depthbuffer (in bytes) + virtual u32 getPitch() const = 0; + + }; + + + //! creates a Stencil Buffer + IStencilBuffer* createStencilBuffer(const core::dimension2d& size); + } // end namespace video } // end namespace irr diff --git a/source/Irrlicht/Irrlicht-gcc.cbp b/source/Irrlicht/Irrlicht-gcc.cbp index d9777e24..a746658e 100644 --- a/source/Irrlicht/Irrlicht-gcc.cbp +++ b/source/Irrlicht/Irrlicht-gcc.cbp @@ -449,6 +449,7 @@ + @@ -562,6 +563,8 @@ + + @@ -696,6 +699,8 @@ + + @@ -889,6 +894,8 @@ + + @@ -928,6 +935,8 @@ + + diff --git a/source/Irrlicht/Irrlicht8.0.vcproj b/source/Irrlicht/Irrlicht8.0.vcproj index e4edadd6..23cdb89b 100644 --- a/source/Irrlicht/Irrlicht8.0.vcproj +++ b/source/Irrlicht/Irrlicht8.0.vcproj @@ -1705,6 +1705,14 @@ RelativePath="CImageLoaderBMP.h" > + + + + @@ -1945,6 +1953,14 @@ RelativePath=".\CTRGouraudAlphaNoZ2.cpp" > + + + + @@ -2093,6 +2109,14 @@ RelativePath=".\C3DSMeshFileLoader.h" > + + + + @@ -2754,14 +2778,6 @@ RelativePath="CMountPointReader.h" > - - - - @@ -2770,6 +2786,14 @@ RelativePath="CNPKReader.h" > + + + + @@ -2790,6 +2814,14 @@ RelativePath="CTarReader.h" > + + + + diff --git a/source/Irrlicht/Irrlicht9.0.vcproj b/source/Irrlicht/Irrlicht9.0.vcproj index bd081349..892809c5 100644 --- a/source/Irrlicht/Irrlicht9.0.vcproj +++ b/source/Irrlicht/Irrlicht9.0.vcproj @@ -1,7 +1,7 @@ + + + + @@ -2389,6 +2398,14 @@ RelativePath="CImageLoaderBMP.h" > + + + + @@ -2558,6 +2575,14 @@ RelativePath="CTRGouraudAlphaNoZ2.cpp" > + + + + @@ -3343,6 +3368,14 @@ RelativePath="CTarReader.h" > + + + + diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile index d230a212..142eb9d3 100644 --- a/source/Irrlicht/Makefile +++ b/source/Irrlicht/Makefile @@ -27,16 +27,16 @@ IRRMESHWRITER = CColladaMeshWriter.o CIrrMeshWriter.o CSTLMeshWriter.o COBJMeshW IRRMESHOBJ = $(IRRMESHLOADER) $(IRRMESHWRITER) \ CSkinnedMesh.o CBoneSceneNode.o CMeshSceneNode.o \ CAnimatedMeshSceneNode.o CAnimatedMeshMD2.o CAnimatedMeshMD3.o \ - CQ3LevelMesh.o CQuake3ShaderSceneNode.o + CQ3LevelMesh.o CQuake3ShaderSceneNode.o CAnimatedMeshHalfLife.o IRROBJ = CBillboardSceneNode.o CCameraSceneNode.o CDummyTransformationSceneNode.o CEmptySceneNode.o CGeometryCreator.o CLightSceneNode.o CMeshManipulator.o CMetaTriangleSelector.o COctreeSceneNode.o COctreeTriangleSelector.o CSceneCollisionManager.o CSceneManager.o CShadowVolumeSceneNode.o CSkyBoxSceneNode.o CSkyDomeSceneNode.o CTerrainSceneNode.o CTerrainTriangleSelector.o CVolumeLightSceneNode.o CCubeSceneNode.o CSphereSceneNode.o CTextSceneNode.o CTriangleBBSelector.o CTriangleSelector.o CWaterSurfaceSceneNode.o CMeshCache.o CDefaultSceneNodeAnimatorFactory.o CDefaultSceneNodeFactory.o IRRPARTICLEOBJ = CParticleAnimatedMeshSceneNodeEmitter.o CParticleBoxEmitter.o CParticleCylinderEmitter.o CParticleMeshEmitter.o CParticlePointEmitter.o CParticleRingEmitter.o CParticleSphereEmitter.o CParticleAttractionAffector.o CParticleFadeOutAffector.o CParticleGravityAffector.o CParticleRotationAffector.o CParticleSystemSceneNode.o CParticleScaleAffector.o IRRANIMOBJ = CSceneNodeAnimatorCameraFPS.o CSceneNodeAnimatorCameraMaya.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorFollowSpline.o CSceneNodeAnimatorRotation.o CSceneNodeAnimatorTexture.o IRRDRVROBJ = CNullDriver.o COpenGLDriver.o COpenGLNormalMapRenderer.o COpenGLParallaxMapRenderer.o COpenGLShaderMaterialRenderer.o COpenGLTexture.o COpenGLSLMaterialRenderer.o COpenGLExtensionHandler.o CD3D8Driver.o CD3D8NormalMapRenderer.o CD3D8ParallaxMapRenderer.o CD3D8ShaderMaterialRenderer.o CD3D8Texture.o CD3D9Driver.o CD3D9HLSLMaterialRenderer.o CD3D9NormalMapRenderer.o CD3D9ParallaxMapRenderer.o CD3D9ShaderMaterialRenderer.o CD3D9Texture.o COGLESDriver.o COGLESTexture.o COGLESExtensionHandler.o -IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderJPG.o CImageLoaderPCX.o CImageLoaderPNG.o CImageLoaderPSD.o CImageLoaderTGA.o CImageLoaderPPM.o CImageLoaderWAL.o CImageLoaderRGB.o \ +IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderDDS.o CImageLoaderJPG.o CImageLoaderPCX.o CImageLoaderPNG.o CImageLoaderPSD.o CImageLoaderTGA.o CImageLoaderPPM.o CImageLoaderWAL.o CImageLoaderRGB.o \ CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ) -IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o -IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o irrXML.o CAttributes.o lzma/LzmaDec.o +IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRNormalMap.o CTRStencilShadow.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o +IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CWADReader.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o irrXML.o CAttributes.o lzma/LzmaDec.o IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o diff --git a/source/Irrlicht/Octree.h b/source/Irrlicht/Octree.h index 67f6100d..b02db0ba 100644 --- a/source/Irrlicht/Octree.h +++ b/source/Irrlicht/Octree.h @@ -329,7 +329,7 @@ private: return; #if defined (OCTREE_PARENTTEST ) if ( r == core::ISREL3D_CLIPPED ) - parentTest = 1; // must still check childs + parentTest = 1; // must still check children #endif } } diff --git a/source/Irrlicht/S4DVertex.h b/source/Irrlicht/S4DVertex.h index 57472ab8..1ded847d 100644 --- a/source/Irrlicht/S4DVertex.h +++ b/source/Irrlicht/S4DVertex.h @@ -23,6 +23,7 @@ struct sVec2 sVec2 () {} + sVec2 ( f32 s) : x ( s ), y ( s ) {} sVec2 ( f32 _x, f32 _y ) : x ( _x ), y ( _y ) {} @@ -107,10 +108,19 @@ struct sCompressedVec4 struct sVec4 { - f32 x, y, z, w; + union + { + struct { f32 x, y, z, w; }; + struct { f32 a, r, g, b; }; +// struct { sVec2 xy, zw; }; // sorry, this does not compile with gcc + }; + + sVec4 () {} + sVec4 ( f32 s) : x ( s ), y ( s ), z ( s ), w ( s ) {} + sVec4 ( f32 _x, f32 _y, f32 _z, f32 _w ) : x ( _x ), y ( _y ), z( _z ), w ( _w ){} @@ -205,7 +215,7 @@ struct sVec4 w += other.w; } - sVec4 operator*(f32 s) const + sVec4 operator*(const f32 s) const { return sVec4(x * s , y * s, z * s,w * s); } @@ -223,6 +233,15 @@ struct sVec4 z = (f32) ( z * i ); w = (f32) ( w * i ); } + + void mul ( const f32 s ) + { + x *= s; + y *= s; + z *= s; + w *= s; + } + /* void operator*=(f32 s) { @@ -251,7 +270,19 @@ struct sVec4 struct sVec3 { - f32 r, g, b; + union + { + struct { f32 r, g, b; }; + struct { f32 x, y, z; }; + }; + + + sVec3 () {} + sVec3 ( f32 _x, f32 _y, f32 _z ) + : r ( _x ), g ( _y ), b( _z ) {} + + sVec3 ( const sVec4 &v ) + : r ( v.x ), g ( v.y ), b( v.z ) {} void set ( f32 _r, f32 _g, f32 _b ) { @@ -303,6 +334,56 @@ struct sVec3 dest.w = core::min_ ( b, 1.f ); } + // f = a * t + b * ( 1 - t ) + void interpolate(const sVec3& v0, const sVec3& v1, const f32 t) + { + r = v1.r + ( ( v0.r - v1.r ) * t ); + g = v1.g + ( ( v0.g - v1.g ) * t ); + b = v1.b + ( ( v0.b - v1.b ) * t ); + } + + sVec3 operator-(const sVec3& other) const + { + return sVec3(r - other.r, b - other.b, g - other.g); + } + + sVec3 operator+(const sVec3& other) const + { + return sVec3(r + other.r, g + other.g, b + other.b); + } + + sVec3 operator*(const f32 s) const + { + return sVec3(r * s , g * s, b * s); + } + + sVec3 operator/(const f32 s) const + { + f32 inv = 1.f / s; + return sVec3(r * inv , g * inv, b * inv); + } + + sVec3 operator*(const sVec3 &other) const + { + return sVec3(r * other.r , b * other.b, g * other.g); + } + + void operator+=(const sVec3& other) + { + r += other.r; + g += other.g; + b += other.b; + } + + void setLength ( f32 len ) + { + const f32 l = len * core::reciprocal_squareroot ( r * r + g * g + b * b ); + + r *= l; + g *= l; + b *= l; + } + }; @@ -332,24 +413,30 @@ enum e4DVertexFlag VERTEX4D_FORMAT_MASK_COLOR = 0x00F00000, VERTEX4D_FORMAT_COLOR_1 = 0x00100000, - VERTEX4D_FORMAT_COLOR_2 = 0x00200000 + VERTEX4D_FORMAT_COLOR_2 = 0x00200000, + + VERTEX4D_FORMAT_MASK_BUMP = 0x0F000000, + VERTEX4D_FORMAT_BUMP_DOT3 = 0x01000000, }; const u32 MATERIAL_MAX_COLORS = 1; const u32 BURNING_MATERIAL_MAX_TEXTURES = 2; +const u32 BURNING_MATERIAL_MAX_TANGENT = 1; // dummy Vertex. used for calculation vertex memory size struct s4DVertex_proxy { + u32 flag; sVec4 Pos; + sVec2 Tex[BURNING_MATERIAL_MAX_TEXTURES]; #ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR sVec4 Color[MATERIAL_MAX_COLORS]; #endif - sVec2 Tex[BURNING_MATERIAL_MAX_TEXTURES]; - u32 flag; + sVec3 LightTangent[BURNING_MATERIAL_MAX_TANGENT]; + }; #define SIZEOF_SVERTEX 64 @@ -360,17 +447,18 @@ struct s4DVertex_proxy */ struct s4DVertex { + u32 flag; + sVec4 Pos; + sVec2 Tex[ BURNING_MATERIAL_MAX_TEXTURES ]; #ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR sVec4 Color[ MATERIAL_MAX_COLORS ]; #endif - sVec2 Tex[ BURNING_MATERIAL_MAX_TEXTURES ]; + sVec3 LightTangent[BURNING_MATERIAL_MAX_TANGENT]; - u32 flag; - - u8 fill [ SIZEOF_SVERTEX - sizeof (s4DVertex_proxy) ]; + //u8 fill [ SIZEOF_SVERTEX - sizeof (s4DVertex_proxy) ]; // f = a * t + b * ( 1 - t ) void interpolate(const s4DVertex& b, const s4DVertex& a, const f32 t) @@ -394,6 +482,12 @@ struct s4DVertex Tex[i].interpolate ( a.Tex[i], b.Tex[i], t ); } + size = (flag & VERTEX4D_FORMAT_MASK_BUMP) >> 24; + for ( i = 0; i!= size; ++i ) + { + LightTangent[i].interpolate ( a.LightTangent[i], b.LightTangent[i], t ); + } + } }; @@ -507,6 +601,8 @@ struct sScanConvertData sVec2 t[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture slope along edges + sVec3 l[BURNING_MATERIAL_MAX_TANGENT][2]; // Light Tangent + sVec3 slopeL[BURNING_MATERIAL_MAX_TEXTURES][2]; // tanget slope along edges }; // passed to scan Line @@ -526,6 +622,7 @@ struct sScanLineData #endif sVec2 t[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture start, texture end of scanline + sVec3 l[BURNING_MATERIAL_MAX_TANGENT][2]; // Light Tangent start, end }; // passed to pixel Shader @@ -543,7 +640,7 @@ struct sPixelShaderData /* load a color value */ -inline void getTexel_plain2 ( tFixPoint &r, tFixPoint &g, tFixPoint &b, +inline void getTexel_plain2 ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const sVec4 &v ) { @@ -555,7 +652,7 @@ inline void getTexel_plain2 ( tFixPoint &r, tFixPoint &g, tFixPoint &b, /* load a color value */ -inline void getSample_color ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, +inline void getSample_color ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, const sVec4 &v ) { @@ -592,5 +689,5 @@ inline void getSample_color ( tFixPoint &r, tFixPoint &g, tFixPoint &b, } -#endif +#endif diff --git a/source/Irrlicht/SoftwareDriver2_compile_config.h b/source/Irrlicht/SoftwareDriver2_compile_config.h index 5e509df6..7d0ca1ea 100644 --- a/source/Irrlicht/SoftwareDriver2_compile_config.h +++ b/source/Irrlicht/SoftwareDriver2_compile_config.h @@ -78,7 +78,7 @@ #if defined ( SOFTWARE_DRIVER_2_MIPMAPPING ) #if defined( BURNINGVIDEO_RENDERER_BEAUTIFUL ) #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 8 - #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS -1 + #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0 #elif defined ( BURNINGVIDEO_RENDERER_CE ) #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 4 #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0 diff --git a/source/Irrlicht/SoftwareDriver2_helper.h b/source/Irrlicht/SoftwareDriver2_helper.h index 68b6fffe..e1e39d8a 100644 --- a/source/Irrlicht/SoftwareDriver2_helper.h +++ b/source/Irrlicht/SoftwareDriver2_helper.h @@ -358,8 +358,30 @@ inline u32 PixelBlend32 ( const u32 c2, const u32 c1 ) typedef s32 tFixPoint; typedef u32 tFixPointu; -// Fix Point 9 +// Fix Point 12 +#if 0 + #define FIX_POINT_PRE 12 + #define FIX_POINT_FRACT_MASK 0xFFF + #define FIX_POINT_SIGNED_MASK 0xFFFFF000 + #define FIX_POINT_UNSIGNED_MASK 0x7FFFF000 + #define FIX_POINT_ONE 0x1000 + #define FIX_POINT_ZERO_DOT_FIVE 0x0800 + #define FIX_POINT_F32_MUL 4096.f +#endif + +// Fix Point 10 #if 1 + #define FIX_POINT_PRE 10 + #define FIX_POINT_FRACT_MASK 0x3FF + #define FIX_POINT_SIGNED_MASK 0xFFFFFC00 + #define FIX_POINT_UNSIGNED_MASK 0x7FFFFE00 + #define FIX_POINT_ONE 0x400 + #define FIX_POINT_ZERO_DOT_FIVE 0x200 + #define FIX_POINT_F32_MUL 1024.f +#endif + +// Fix Point 9 +#if 0 #define FIX_POINT_PRE 9 #define FIX_POINT_FRACT_MASK 0x1FF #define FIX_POINT_SIGNED_MASK 0xFFFFFE00 @@ -381,6 +403,7 @@ typedef u32 tFixPointu; #endif #define FIXPOINT_COLOR_MAX ( COLOR_MAX << FIX_POINT_PRE ) +#define FIX_POINT_HALF_COLOR ( (tFixPoint) ( ((f32) COLOR_MAX / 2.f * FIX_POINT_F32_MUL ) ) ) /* @@ -496,11 +519,16 @@ REALINLINE tFixPoint clampfix_maxcolor ( const tFixPoint a) /*! clamp FixPoint to 0 in FixPoint, max(a,0) */ -inline tFixPoint clampfix_mincolor ( const tFixPoint a) +REALINLINE tFixPoint clampfix_mincolor ( const tFixPoint a) { return a - ( a & ( a >> 31 ) ); } +REALINLINE tFixPoint saturateFix ( const tFixPoint a) +{ + return clampfix_mincolor ( clampfix_maxcolor ( a ) ); +} + // rount fixpoint to int inline s32 roundFix ( const tFixPoint x ) @@ -685,6 +713,23 @@ inline void getTexel_fix ( tFixPoint &r, tFixPoint &g, tFixPoint &b, } +// get video sample to fixpoint +REALINLINE void getTexel_fix ( tFixPoint &a, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + tVideoSample t00; + t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE); +} + inline void getSample_texture_dither ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty, @@ -762,6 +807,7 @@ inline void getSample_texture ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tFi #else + // get sample linear REALINLINE void getSample_linear ( tFixPointu &r, tFixPointu &g, tFixPointu &b, const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty @@ -792,10 +838,33 @@ REALINLINE void getSample_texture ( tFixPoint &r, tFixPoint &g, tFixPoint &b, tFixPointu r10,g10,b10; tFixPointu r11,g11,b11; +#if 0 getSample_linear ( r00, g00, b00, t, tx,ty ); getSample_linear ( r10, g10, b10, t, tx + FIX_POINT_ONE,ty ); getSample_linear ( r01, g01, b01, t, tx,ty + FIX_POINT_ONE ); getSample_linear ( r11, g11, b11, t, tx + FIX_POINT_ONE,ty + FIX_POINT_ONE ); +#else + u32 o0, o1,o2,o3; + tVideoSample t00; + + o0 = ( ( (ty) & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + o1 = ( ( (ty+FIX_POINT_ONE) & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + o2 = ( (tx) & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + o3 = ( (tx+FIX_POINT_ONE) & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + t00 = *((tVideoSample*)( (u8*) t->data + (o0 | o2 ) )); + r00 = (t00 & MASK_R) >> SHIFT_R; g00 = (t00 & MASK_G) >> SHIFT_G; b00 = (t00 & MASK_B); + + t00 = *((tVideoSample*)( (u8*) t->data + (o0 | o3 ) )); + r10 = (t00 & MASK_R) >> SHIFT_R; g10 = (t00 & MASK_G) >> SHIFT_G; b10 = (t00 & MASK_B); + + t00 = *((tVideoSample*)( (u8*) t->data + (o1 | o2 ) )); + r01 = (t00 & MASK_R) >> SHIFT_R; g01 = (t00 & MASK_G) >> SHIFT_G; b01 = (t00 & MASK_B); + + t00 = *((tVideoSample*)( (u8*) t->data + (o1 | o3 ) )); + r11 = (t00 & MASK_R) >> SHIFT_R; g11 = (t00 & MASK_G) >> SHIFT_G; b11 = (t00 & MASK_B); + +#endif const tFixPointu txFract = tx & FIX_POINT_FRACT_MASK; const tFixPointu txFractInv = FIX_POINT_ONE - txFract; @@ -847,7 +916,7 @@ REALINLINE void getSample_linear ( tFixPointu &a, tFixPointu &r, tFixPointu &g, } // get Sample bilinear -REALINLINE void getSample_texture ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tFixPointu &b, +REALINLINE void getSample_texture ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty ) { diff --git a/source/Irrlicht/jpeglib/Makefile.am b/source/Irrlicht/jpeglib/Makefile.am index a3c08377..b4b46005 100644 --- a/source/Irrlicht/jpeglib/Makefile.am +++ b/source/Irrlicht/jpeglib/Makefile.am @@ -38,11 +38,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 \ @@ -118,7 +119,7 @@ uninstall-local: # Run tests test: check-local check-local: - $(RM) testout* + 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 diff --git a/source/Irrlicht/jpeglib/Makefile.in b/source/Irrlicht/jpeglib/Makefile.in index 6e5dae07..1af8ad81 100644 --- a/source/Irrlicht/jpeglib/Makefile.in +++ b/source/Irrlicht/jpeglib/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -218,6 +218,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -320,11 +321,12 @@ MKFILES = configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 @@ -1070,7 +1072,7 @@ uninstall-local: # Run tests test: check-local check-local: - $(RM) testout* + 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 diff --git a/source/Irrlicht/jpeglib/README b/source/Irrlicht/jpeglib/README index 5cdf78fc..c5d725c9 100644 --- a/source/Irrlicht/jpeglib/README +++ b/source/Irrlicht/jpeglib/README @@ -1,10 +1,10 @@ The Independent JPEG Group's JPEG software ========================================== -README for release 7 of 27-Jun-2009 -=================================== +README for release 8b of 16-May-2010 +==================================== -This distribution contains the seventh public release of the Independent JPEG +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. @@ -114,7 +114,7 @@ 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-2009, Thomas G. Lane, Guido Vollbeding. +This software is copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. All Rights Reserved except as specified below. Permission is hereby granted to use, copy, modify, and distribute this @@ -221,16 +221,18 @@ 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. A copy of the JFIF spec is available from: - Literature Department - C-Cube Microsystems, Inc. - 1778 McCarthy Blvd. - Milpitas, CA 95035 - phone (408) 944-6300, fax (408) 944-6314 -A PostScript version of this document is available at +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. @@ -252,8 +254,8 @@ 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.v7.tar.gz, and in Windows-compatible -"zip" archive format as http://www.ijg.org/files/jpegsr7.zip. +http://www.ijg.org/files/jpegsrc.v8b.tar.gz, and in Windows-compatible +"zip" archive format as http://www.ijg.org/files/jpegsr8b.zip. The JPEG FAQ (Frequently Asked Questions) article is a source of some general information about JPEG. @@ -269,9 +271,8 @@ with body ACKNOWLEDGMENTS =============== -Thank to Juergen Bruder of the Georg-Cantor-Organization at the -Martin-Luther-University Halle for providing me with a copy of the common -DCT algorithm article, only to find out that I had come to the same result +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 @@ -283,8 +284,9 @@ 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, and Simone Zuck for -corresponding business development. +Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther +Maier-Gerber, Walter Stoeber, and Fred Schmitz 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 @@ -293,6 +295,8 @@ 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. @@ -301,9 +305,9 @@ 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). +"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. @@ -315,8 +319,8 @@ image files indefinitely.) TO DO ===== -v7 is basically just a necessary interim release, paving the way for a -major breakthrough in image coding technology with the next v8 package -which is scheduled for release in the year 2010. +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@jpegclub.org. +Please send bug reports, offers of help, etc. to jpeg-info@uc.ag. diff --git a/source/Irrlicht/jpeglib/aclocal.m4 b/source/Irrlicht/jpeglib/aclocal.m4 index e4131c4d..8f0a0940 100644 --- a/source/Irrlicht/jpeglib/aclocal.m4 +++ b/source/Irrlicht/jpeglib/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -7859,15 +7859,15 @@ m4_define([lt_dict_filter], # Generated from ltversion.in. -# serial 3012 ltversion.m4 +# serial 3017 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' +[macro_version='2.2.6b' +macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) @@ -7980,7 +7980,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -7996,7 +7996,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff --git a/source/Irrlicht/jpeglib/cderror.h b/source/Irrlicht/jpeglib/cderror.h index c19d38fb..fb72a51f 100644 --- a/source/Irrlicht/jpeglib/cderror.h +++ b/source/Irrlicht/jpeglib/cderror.h @@ -2,6 +2,7 @@ * 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. * @@ -45,6 +46,7 @@ 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") diff --git a/source/Irrlicht/jpeglib/change.log b/source/Irrlicht/jpeglib/change.log index 85c0084b..297950a3 100644 --- a/source/Irrlicht/jpeglib/change.log +++ b/source/Irrlicht/jpeglib/change.log @@ -1,6 +1,51 @@ CHANGE LOG for Independent JPEG Group's JPEG software +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 ---------------------- diff --git a/source/Irrlicht/jpeglib/cjpeg.1 b/source/Irrlicht/jpeglib/cjpeg.1 index fa7bfa81..4667d4f0 100644 --- a/source/Irrlicht/jpeglib/cjpeg.1 +++ b/source/Irrlicht/jpeglib/cjpeg.1 @@ -1,4 +1,4 @@ -.TH CJPEG 1 "10 June 2009" +.TH CJPEG 1 "30 December 2009" .SH NAME cjpeg \- compress an image file to a JPEG file .SH SYNOPSIS @@ -135,7 +135,7 @@ and assigned to components with .B \-qslots parameter (see the "wizard" switches below). .B Caution: -You must explicitely add +You must explicitly add .BI \-sample " 1x1" for efficient separate color quality selection, since the default value used by library is 2x2! @@ -322,4 +322,4 @@ Not all variants of BMP and Targa file formats are supported. 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.) \ No newline at end of file +designers had not been clueless.) diff --git a/source/Irrlicht/jpeglib/config.guess b/source/Irrlicht/jpeglib/config.guess index 49c41dc8..2a5ba8ae 100644 --- a/source/Irrlicht/jpeglib/config.guess +++ b/source/Irrlicht/jpeglib/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-27' +timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ timestamp='2009-04-27' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -333,6 +333,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -656,7 +659,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -807,12 +810,12 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) + *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -822,6 +825,9 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -851,6 +857,20 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -873,6 +893,17 @@ EOF frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; @@ -882,78 +913,34 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -962,8 +949,11 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -986,66 +976,6 @@ EOF xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1074,7 +1004,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1182,7 +1112,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1275,6 +1205,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} diff --git a/source/Irrlicht/jpeglib/config.sub b/source/Irrlicht/jpeglib/config.sub index a95b231e..d75bea76 100644 --- a/source/Irrlicht/jpeglib/config.sub +++ b/source/Irrlicht/jpeglib/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-17' +timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ timestamp='2009-04-17' # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -149,10 +152,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -281,6 +287,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -288,13 +295,14 @@ case $basic_machine in | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -337,7 +345,7 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -365,7 +373,7 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -374,6 +382,7 @@ case $basic_machine in | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -467,6 +476,10 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -719,6 +732,9 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1240,6 +1256,9 @@ case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1260,9 +1279,9 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1283,7 +1302,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1613,7 +1632,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/source/Irrlicht/jpeglib/configure b/source/Irrlicht/jpeglib/configure index a3cd8b07..23f01ee6 100644 --- a/source/Irrlicht/jpeglib/configure +++ b/source/Irrlicht/jpeglib/configure @@ -1,18 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for libjpeg 7.0. +# Generated by GNU Autoconf 2.65 for libjpeg 8.0.2. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -20,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -44,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -55,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -78,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -94,15 +89,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -114,12 +109,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -131,7 +130,248 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -145,8 +385,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -166,295 +410,19 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -471,8 +439,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -482,29 +449,18 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -534,7 +490,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -553,10 +509,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -571,7 +527,6 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} @@ -720,7 +675,8 @@ fi -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -738,14 +694,14 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libjpeg' PACKAGE_TARNAME='libjpeg' -PACKAGE_VERSION='7.0' -PACKAGE_STRING='libjpeg 7.0' +PACKAGE_VERSION='8.0.2' +PACKAGE_STRING='libjpeg 8.0.2' PACKAGE_BUGREPORT='' +PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ @@ -901,6 +857,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -1040,8 +997,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1067,8 +1023,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1272,8 +1227,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1289,8 +1243,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1320,17 +1273,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1347,15 +1300,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1378,8 +1329,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1409,11 +1359,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1452,13 +1400,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1484,7 +1430,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libjpeg 7.0 to adapt to many kinds of systems. +\`configure' configures libjpeg 8.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1555,7 +1501,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libjpeg 7.0:";; + short | recursive ) echo "Configuration of libjpeg 8.0.2:";; esac cat <<\_ACEOF @@ -1592,13 +1538,14 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1661,22 +1608,373 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libjpeg configure 7.0 -generated by GNU Autoconf 2.63 +libjpeg configure 8.0.2 +generated by GNU Autoconf 2.65 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libjpeg $as_me 7.0, which was -generated by GNU Autoconf 2.63. Invocation command line was +It was created by libjpeg $as_me 8.0.2, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -1712,8 +2010,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1750,9 +2048,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1768,13 +2066,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1799,13 +2097,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1877,39 +2175,41 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. @@ -1927,8 +2227,8 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" @@ -1936,10 +2236,10 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -1947,7 +2247,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1962,11 +2262,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -1976,17 +2276,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -1998,43 +2298,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2047,24 +2324,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Directory where autotools helper scripts lives. ac_aux_dir= for ac_dir in . "$srcdir"/.; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2087,35 +2356,27 @@ AUTOHEADER="echo autoheader ignored" # Check system type # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2131,28 +2392,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2168,28 +2425,24 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then +if test "${ac_cv_target+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -$as_echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -2230,10 +2483,10 @@ am__api_version='1.11' # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2241,11 +2494,11 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2282,7 +2535,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -2298,7 +2551,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2309,7 +2562,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 @@ -2320,15 +2573,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2350,11 +2599,8 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -2363,13 +2609,10 @@ then # Ok. : else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" @@ -2397,7 +2640,7 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi @@ -2418,9 +2661,9 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2431,24 +2674,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2458,9 +2701,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2471,24 +2714,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2497,7 +2740,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2510,10 +2753,10 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then + if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2521,7 +2764,7 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do + for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( @@ -2533,11 +2776,12 @@ do esac done done -done + done IFS=$as_save_IFS fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2545,11 +2789,10 @@ fi # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" @@ -2562,9 +2805,9 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2575,24 +2818,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2600,11 +2843,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2622,11 +2865,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2646,9 +2889,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2664,7 +2905,7 @@ fi # Define the identity of the package. PACKAGE='libjpeg' - VERSION='7.0' + VERSION='8.0.2' cat >>confdefs.h <<_ACEOF @@ -2709,7 +2950,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # To get verbose build output you may configure # with --disable-silent-rules or use "make V=1". # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi @@ -2734,7 +2975,7 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= @@ -2762,12 +3003,12 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -2792,9 +3033,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2805,24 +3046,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2832,9 +3073,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2845,24 +3086,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2871,7 +3112,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2885,9 +3126,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2898,24 +3139,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2925,9 +3166,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2939,18 +3180,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2969,10 +3210,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2984,9 +3225,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2997,24 +3238,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3028,9 +3269,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3041,24 +3282,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3071,7 +3312,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -3082,57 +3323,37 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3148,8 +3369,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3165,17 +3386,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3192,7 +3413,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3211,84 +3432,42 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3303,32 +3482,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3340,17 +3570,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3363,31 +3593,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3401,37 +3623,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3440,20 +3641,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3464,35 +3661,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3503,36 +3676,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3543,42 +3692,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3595,18 +3719,14 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3663,32 +3783,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3699,17 +3796,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3719,9 +3818,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -3829,7 +3928,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -3844,23 +3943,19 @@ else fi -{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 $as_echo_n "checking for function prototypes... " >&6; } if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define PROTOTYPES 1 -_ACEOF +$as_echo "#define PROTOTYPES 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define __PROTOTYPES 1 -_ACEOF +$as_echo "#define __PROTOTYPES 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3870,14 +3965,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3892,11 +3987,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3905,78 +3996,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -3988,7 +4035,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -3999,11 +4046,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4012,87 +4055,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -4102,9 +4098,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4115,7 +4111,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue @@ -4135,7 +4131,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -4150,26 +4146,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4183,7 +4177,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue @@ -4203,7 +4197,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -4218,12 +4212,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4231,21 +4223,17 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4260,48 +4248,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4311,18 +4274,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4332,14 +4291,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4366,118 +4321,34 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4495,146 +4366,12 @@ else fi # Ensure some checks needed by ansi2knr itself. - for ac_header in string.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STRING_H 1 _ACEOF fi @@ -4647,16 +4384,16 @@ done # dependency checking and generation useful to package maintainers. # This is made an option to avoid confusing end users. -{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi - { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= @@ -4679,9 +4416,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4692,24 +4429,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4719,9 +4456,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4732,24 +4469,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4758,7 +4495,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -4772,9 +4509,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4785,24 +4522,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4812,9 +4549,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4826,18 +4563,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -4856,10 +4593,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4871,9 +4608,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4884,24 +4621,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4915,9 +4652,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4928,24 +4665,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4958,7 +4695,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -4969,62 +4706,42 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5038,37 +4755,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -5077,20 +4773,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5101,35 +4793,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5140,36 +4808,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5180,42 +4824,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -5232,18 +4851,14 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5300,32 +4915,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -5336,17 +4928,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5356,9 +4950,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -5466,7 +5060,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -5481,20 +5075,18 @@ else fi - case $ac_cv_prog_cc_stdc in - no) ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; - *) { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 + case $ac_cv_prog_cc_stdc in #( + no) : + ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( + *) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then +if test "${ac_cv_prog_cc_c99+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5636,32 +5228,9 @@ _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done @@ -5672,31 +5241,27 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c99" != xno; then +if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else - { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5753,32 +5318,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -5789,56 +5331,56 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then +if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi - fi - ;; esac - { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO Standard C" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if test "${ac_cv_prog_cc_stdc+set}" = set; then + if test "${ac_cv_prog_cc_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 fi - case $ac_cv_prog_cc_stdc in - no) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - '') { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - *) { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 + case $ac_cv_prog_cc_stdc in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; #( + '') : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; #( + *) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5853,11 +5395,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -5866,78 +5404,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -5949,7 +5443,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -5960,11 +5454,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -5973,87 +5463,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -6062,104 +5505,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -6177,23 +5528,23 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi @@ -6201,12 +5552,12 @@ fi # Check if LD supports linker scripts, # and define automake conditional HAVE_LD_VERSION_SCRIPT if so. # Check whether --enable-ld-version-script was given. -if test "${enable_ld_version_script+set}" = set; then +if test "${enable_ld_version_script+set}" = set; then : enableval=$enable_ld_version_script; have_ld_version_script=$enableval fi if test -z "$have_ld_version_script"; then - { $as_echo "$as_me:$LINENO: checking if LD -Wl,--version-script works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LD -Wl,--version-script works" >&5 $as_echo_n "checking if LD -Wl,--version-script works... " >&6; } save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" @@ -6219,11 +5570,7 @@ VERS_2 { global: sym; } VERS_1; EOF - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6234,41 +5581,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : have_ld_version_script=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_ld_version_script=no + have_ld_version_script=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext rm -f conftest.map LDFLAGS="$save_LDFLAGS" - { $as_echo "$as_me:$LINENO: result: $have_ld_version_script" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ld_version_script" >&5 $as_echo "$have_ld_version_script" >&6; } fi if test "$have_ld_version_script" = "yes"; then @@ -6281,16 +5603,12 @@ fi # See if compiler supports prototypes. -{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 $as_echo_n "checking for function prototypes... " >&6; } -if test "${ijg_cv_have_prototypes+set}" = set; then +if test "${ijg_cv_have_prototypes+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int testfunction (int arg1, int * arg2); /* check prototypes */ @@ -6312,42 +5630,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ijg_cv_have_prototypes=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ijg_cv_have_prototypes=no + ijg_cv_have_prototypes=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ijg_cv_have_prototypes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ijg_cv_have_prototypes" >&5 $as_echo "$ijg_cv_have_prototypes" >&6; } if test $ijg_cv_have_prototypes = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PROTOTYPES 1 -_ACEOF +$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h else echo Your compiler does not seem to know about function prototypes. @@ -6358,146 +5653,12 @@ else fi # Check header files - - - for ac_header in stddef.h stdlib.h locale.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6506,140 +5667,12 @@ fi done -if test "${ac_cv_header_string_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for string.h" >&5 -$as_echo_n "checking for string.h... " >&6; } -if test "${ac_cv_header_string_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -$as_echo "$ac_cv_header_string_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking string.h usability" >&5 -$as_echo_n "checking string.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = x""yes; then : - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking string.h presence" >&5 -$as_echo_n "checking string.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for string.h" >&5 -$as_echo_n "checking for string.h... " >&6; } -if test "${ac_cv_header_string_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_string_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -$as_echo "$ac_cv_header_string_h" >&6; } - -fi -if test "x$ac_cv_header_string_h" = x""yes; then - : else -cat >>confdefs.h <<\_ACEOF -#define NEED_BSD_STRINGS 1 -_ACEOF +$as_echo "#define NEED_BSD_STRINGS 1" >>confdefs.h fi @@ -6647,13 +5680,9 @@ fi # See whether type size_t is defined in any ANSI-standard places; # if not, perhaps it is defined in . -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_STDDEF_H @@ -6678,179 +5707,26 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ijg_size_t_ok=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h" + ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ijg_size_t_ok" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ijg_size_t_ok" >&5 $as_echo "$ijg_size_t_ok" >&6; } if test "$ijg_size_t_ok" != yes; then -if test "${ac_cv_header_sys_types_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sys/types.h" >&5 -$as_echo_n "checking for sys/types.h... " >&6; } -if test "${ac_cv_header_sys_types_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -$as_echo "$ac_cv_header_sys_types_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/types.h usability" >&5 -$as_echo_n "checking sys/types.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = x""yes; then : - ac_header_compiler=no -fi +$as_echo "#define NEED_SYS_TYPES_H 1" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/types.h presence" >&5 -$as_echo_n "checking sys/types.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/types.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/types.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sys/types.h" >&5 -$as_echo_n "checking for sys/types.h... " >&6; } -if test "${ac_cv_header_sys_types_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sys_types_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -$as_echo "$ac_cv_header_sys_types_h" >&6; } - -fi -if test "x$ac_cv_header_sys_types_h" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define NEED_SYS_TYPES_H 1 -_ACEOF - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "size_t" >/dev/null 2>&1; then + $EGREP "size_t" >/dev/null 2>&1; then : ijg_size_t_ok="size_t is in sys/types.h" else ijg_size_t_ok=no @@ -6862,7 +5738,7 @@ else fi -{ $as_echo "$as_me:$LINENO: result: $ijg_size_t_ok" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ijg_size_t_ok" >&5 $as_echo "$ijg_size_t_ok" >&6; } if test "$ijg_size_t_ok" = no; then echo Type size_t is not defined in any of the usual places. @@ -6871,13 +5747,9 @@ fi fi # Check compiler characteristics -{ $as_echo "$as_me:$LINENO: checking for type unsigned char" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type unsigned char" >&5 $as_echo_n "checking for type unsigned char... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6888,47 +5760,20 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSIGNED_CHAR 1 -_ACEOF +$as_echo "#define HAVE_UNSIGNED_CHAR 1" >>confdefs.h else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for type unsigned short" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type unsigned short" >&5 $as_echo_n "checking for type unsigned short... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6939,47 +5784,20 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSIGNED_SHORT 1 -_ACEOF +$as_echo "#define HAVE_UNSIGNED_SHORT 1" >>confdefs.h else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for type void" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type void" >&5 $as_echo_n "checking for type void... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Caution: a C++ compiler will insist on valid prototypes */ @@ -7011,50 +5829,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define void char -_ACEOF +$as_echo "#define void char" >>confdefs.h fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then +if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7114,54 +5905,27 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no + ac_cv_c_const=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF +$as_echo "#define const /**/" >>confdefs.h fi # Check for non-broken inline under various spellings -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } ijg_cv_inline="" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7173,34 +5937,10 @@ int bar() { return foo(); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ijg_cv_inline="__inline__" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7212,34 +5952,10 @@ int bar() { return foo(); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ijg_cv_inline="__inline" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7251,40 +5967,15 @@ int bar() { return foo(); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ijg_cv_inline="inline" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ijg_cv_inline" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ijg_cv_inline" >&5 $as_echo "$ijg_cv_inline" >&6; } cat >>confdefs.h <<_ACEOF @@ -7293,13 +5984,9 @@ _ACEOF # We cannot check for bogus warnings, but at least we can check for errors -{ $as_echo "$as_me:$LINENO: checking for broken incomplete types" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken incomplete types" >&5 $as_echo_n "checking for broken incomplete types... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef struct undefined_structure * undef_struct_ptr; int @@ -7310,49 +5997,22 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: ok" >&5 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: broken" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5 $as_echo "broken" >&6; } -cat >>confdefs.h <<\_ACEOF -#define INCOMPLETE_TYPES_BROKEN 1 -_ACEOF +$as_echo "#define INCOMPLETE_TYPES_BROKEN 1" >>confdefs.h fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Test whether global names are unique to at least 15 chars -{ $as_echo "$as_me:$LINENO: checking for short external names" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for short external names" >&5 $as_echo_n "checking for short external names... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int possibly_duplicate_function () { return 0; } @@ -7366,59 +6026,28 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: ok" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: short" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: short" >&5 $as_echo "short" >&6; } -cat >>confdefs.h <<\_ACEOF -#define NEED_SHORT_EXTERNAL_NAMES 1 -_ACEOF +$as_echo "#define NEED_SHORT_EXTERNAL_NAMES 1" >>confdefs.h fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # Run-time checks -{ $as_echo "$as_me:$LINENO: checking to see if char is signed" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if char is signed" >&5 $as_echo_n "checking to see if char is signed... " >&6; } -if test "$cross_compiling" = yes; then +if test "$cross_compiling" = yes; then : echo Assuming that char is signed on target machine. echo If it is unsigned, this will be a little bit inefficient. else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_PROTOTYPES @@ -7442,60 +6071,27 @@ int main() { exit(is_char_signed((int) signed_char_check)); } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define CHAR_IS_UNSIGNED 1 -_ACEOF +$as_echo "#define CHAR_IS_UNSIGNED 1" >>confdefs.h else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - -{ $as_echo "$as_me:$LINENO: checking to see if right shift is signed" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if right shift is signed" >&5 $as_echo_n "checking to see if right shift is signed... " >&6; } -if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: Assuming that right shift is signed on target machine." >&5 +if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Assuming that right shift is signed on target machine." >&5 $as_echo "Assuming that right shift is signed on target machine." >&6; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_PROTOTYPES @@ -7525,60 +6121,27 @@ int main() { exit(is_shifting_signed(-0x7F7E80B1L)); } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define RIGHT_SHIFT_IS_UNSIGNED 1 -_ACEOF +$as_echo "#define RIGHT_SHIFT_IS_UNSIGNED 1" >>confdefs.h else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - -{ $as_echo "$as_me:$LINENO: checking to see if fopen accepts b spec" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if fopen accepts b spec" >&5 $as_echo_n "checking to see if fopen accepts b spec... " >&6; } -if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: Assuming that it does." >&5 +if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Assuming that it does." >&5 $as_echo "Assuming that it does." >&6; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7588,50 +6151,21 @@ int main() { exit(1); } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define DONT_USE_B_MODE 1 -_ACEOF +$as_echo "#define DONT_USE_B_MODE 1" >>confdefs.h fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - # Configure libtool enable_win32_dll=yes @@ -7640,9 +6174,9 @@ case $host in if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then +if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then @@ -7653,24 +6187,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then - { $as_echo "$as_me:$LINENO: result: $AS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7680,9 +6214,9 @@ if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then @@ -7693,24 +6227,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7719,7 +6253,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7732,9 +6266,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -7745,24 +6279,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7772,9 +6306,9 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -7785,24 +6319,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7811,7 +6345,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7824,9 +6358,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -7837,24 +6371,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7864,9 +6398,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -7877,24 +6411,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7903,7 +6437,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7938,14 +6472,14 @@ test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' @@ -7961,9 +6495,9 @@ macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then +if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -7971,7 +6505,7 @@ else ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= + { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -7980,7 +6514,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue @@ -8000,7 +6534,7 @@ case `"$ac_path_SED" --version 2>&1` in $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" @@ -8015,19 +6549,17 @@ esac $ac_path_SED_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -8045,9 +6577,9 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then +if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -8061,7 +6593,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue @@ -8081,7 +6613,7 @@ case `"$ac_path_FGREP" --version 2>&1` in $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" @@ -8096,12 +6628,10 @@ esac $ac_path_FGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -8109,7 +6639,7 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -8135,7 +6665,7 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -8144,7 +6674,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -8174,13 +6704,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then +if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -8211,18 +6741,16 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then +if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -8235,7 +6763,7 @@ case `$LD -v 2>&1 &5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -8247,9 +6775,9 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then +if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -8296,7 +6824,7 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" @@ -8307,9 +6835,9 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then +if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -8320,24 +6848,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8351,9 +6879,9 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -8364,24 +6892,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8394,7 +6922,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -8414,33 +6942,33 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then +if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:8424: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6952: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:8427: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6955: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:8430: output\"" >&5) + (eval echo "\"\$as_me:6958: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then +if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 @@ -8558,10 +7086,10 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -8575,7 +7103,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no @@ -8585,17 +7113,17 @@ xsi_shell=no && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } @@ -8630,14 +7158,14 @@ esac -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then +if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in @@ -8666,9 +7194,9 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -8679,24 +7207,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8706,9 +7234,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -8719,24 +7247,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8745,7 +7273,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -8762,9 +7290,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then +if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -8958,7 +7486,7 @@ tpf*) esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method @@ -8978,9 +7506,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then +if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -8991,24 +7519,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9018,9 +7546,9 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -9031,24 +7559,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9057,7 +7585,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -9083,9 +7611,9 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -9096,24 +7624,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9123,9 +7651,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -9136,24 +7664,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9162,7 +7690,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -9182,9 +7710,9 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then +if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -9195,24 +7723,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9222,9 +7750,9 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -9235,24 +7763,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9261,7 +7789,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -9339,9 +7867,9 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -9457,18 +7985,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -9521,11 +8049,11 @@ _LT_EOF lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -9559,10 +8087,10 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi @@ -9588,7 +8116,7 @@ fi # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -9600,11 +8128,11 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -9618,12 +8146,12 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 9621 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo '#line 8149 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -9657,11 +8185,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -9710,9 +8238,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then +if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -9721,11 +8249,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9736,38 +8260,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9775,7 +8274,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -9785,11 +8284,11 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in @@ -9815,9 +8314,9 @@ need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -9828,24 +8327,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9855,9 +8354,9 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -9868,24 +8367,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9894,7 +8393,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -9907,9 +8406,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then +if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -9920,24 +8419,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9947,9 +8446,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -9960,24 +8459,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9986,7 +8485,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -9999,9 +8498,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then +if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -10012,24 +8511,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10039,9 +8538,9 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -10052,24 +8551,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10078,7 +8577,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -10091,9 +8590,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then +if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -10104,24 +8603,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10131,9 +8630,9 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -10144,24 +8643,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10170,7 +8669,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -10183,9 +8682,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then +if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -10196,24 +8695,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10223,9 +8722,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -10236,24 +8735,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10262,7 +8761,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -10298,9 +8797,9 @@ fi - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then +if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -10325,22 +8824,18 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10351,42 +8846,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no + lt_cv_ld_exported_symbols_list=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) @@ -10423,62 +8893,13 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } ;; esac - for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -10496,7 +8917,7 @@ done # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -10527,7 +8948,7 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -10559,7 +8980,7 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then +if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default @@ -10575,7 +8996,7 @@ test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -10656,9 +9077,9 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then +if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -10671,7 +9092,7 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -10764,9 +9185,9 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -10817,10 +9238,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10830,9 +9251,9 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -10883,10 +9304,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10963,9 +9384,9 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -10981,11 +9402,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10984: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9405: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10988: \$? = $ac_status" >&5 + echo "$as_me:9409: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -10998,7 +9419,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then @@ -11018,7 +9439,7 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then @@ -11290,7 +9711,7 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } @@ -11302,9 +9723,9 @@ $as_echo "$lt_prog_compiler_pic" >&6; } # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -11320,11 +9741,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11323: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9744: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11327: \$? = $ac_status" >&5 + echo "$as_me:9748: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11337,7 +9758,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then @@ -11361,9 +9782,9 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then +if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -11389,7 +9810,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then @@ -11404,9 +9825,9 @@ fi - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -11425,11 +9846,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11428: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9849: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11432: \$? = $ac_status" >&5 + echo "$as_me:9853: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11451,7 +9872,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -11459,9 +9880,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -11480,11 +9901,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11483: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9904: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11487: \$? = $ac_status" >&5 + echo "$as_me:9908: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11506,7 +9927,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -11515,7 +9936,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -11523,10 +9944,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -11539,7 +9960,7 @@ fi - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= @@ -11981,11 +10402,7 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11996,27 +10413,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -12030,16 +10427,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -12052,11 +10442,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -12067,27 +10453,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -12101,16 +10467,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -12322,42 +10681,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int foo(void) {} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' @@ -12613,7 +10946,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi fi -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no @@ -12650,16 +10983,16 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -12673,11 +11006,11 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } then archive_cmds_need_lc=no else @@ -12688,7 +11021,7 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } cat conftest.err 1>&5 fi $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac @@ -12852,7 +11185,7 @@ esac - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then @@ -13274,11 +11607,7 @@ linux* | k*bsd*-gnu) save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13289,41 +11618,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -13535,7 +11836,7 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no @@ -13637,7 +11938,7 @@ fi - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || @@ -13662,7 +11963,7 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || @@ -13707,18 +12008,14 @@ else darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -13736,43 +12033,18 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -13785,106 +12057,18 @@ fi ;; *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -13902,145 +12086,32 @@ return shl_load (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14058,57 +12129,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then +if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14126,57 +12168,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then +if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14194,43 +12207,18 @@ return dld_link (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -14269,9 +12257,9 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then +if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14280,7 +12268,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14283 "configure" +#line 12271 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14339,11 +12327,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -14360,14 +12348,14 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then +if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14376,7 +12364,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14379 "configure" +#line 12367 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14435,11 +12423,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -14456,7 +12444,7 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi @@ -14495,12 +12483,12 @@ fi striplib= old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough @@ -14509,15 +12497,15 @@ else if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac @@ -14535,12 +12523,12 @@ fi # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no @@ -14561,14 +12549,14 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -14609,7 +12597,7 @@ CC="$lt_save_CC" MEMORYMGR='jmemnobs' MAXMEM="no" # Check whether --enable-maxmem was given. -if test "${enable_maxmem+set}" = set; then +if test "${enable_maxmem+set}" = set; then : enableval=$enable_maxmem; MAXMEM="$enableval" fi @@ -14618,9 +12606,7 @@ if test "x$MAXMEM" = xyes; then fi if test "x$MAXMEM" != xno; then if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then - { { $as_echo "$as_me:$LINENO: error: non-numeric argument to --enable-maxmem" >&5 -$as_echo "$as_me: error: non-numeric argument to --enable-maxmem" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "non-numeric argument to --enable-maxmem" "$LINENO" 5 fi DEFAULTMAXMEM=`expr $MAXMEM \* 1048576` @@ -14628,13 +12614,9 @@ cat >>confdefs.h <<_ACEOF #define DEFAULT_MAX_MEM ${DEFAULTMAXMEM} _ACEOF -{ $as_echo "$as_me:$LINENO: checking for 'tmpfile()'" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 'tmpfile()'" >&5 $as_echo_n "checking for 'tmpfile()'... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -14645,51 +12627,22 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MEMORYMGR='jmemansi' else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } MEMORYMGR='jmemname' # Test for the need to remove temporary files using a signal handler (for cjpeg/djpeg) -cat >>confdefs.h <<\_ACEOF -#define NEED_SIGNAL_CATCHER 1 -_ACEOF +$as_echo "#define NEED_SIGNAL_CATCHER 1" >>confdefs.h -{ $as_echo "$as_me:$LINENO: checking for 'mktemp()'" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 'mktemp()'" >&5 $as_echo_n "checking for 'mktemp()'... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -14700,59 +12653,30 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define NO_MKTEMP 1 -_ACEOF +$as_echo "#define NO_MKTEMP 1" >>confdefs.h fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi # Extract the library version ID from jpeglib.h. -{ $as_echo "$as_me:$LINENO: checking libjpeg version number" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libjpeg version number" >&5 $as_echo_n "checking libjpeg version number... " >&6; } JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h` -JPEG_LIB_VERSION="`expr $JPEG_LIB_VERSION / 10`:`expr $JPEG_LIB_VERSION % 10`" -{ $as_echo "$as_me:$LINENO: result: $JPEG_LIB_VERSION" >&5 +JPEG_LIB_VERSION="`expr $JPEG_LIB_VERSION / 10`:2" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JPEG_LIB_VERSION" >&5 $as_echo "$JPEG_LIB_VERSION" >&6; } @@ -14785,13 +12709,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -14799,8 +12723,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -14823,11 +12747,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -14847,8 +12771,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -14864,48 +12788,34 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -14915,17 +12825,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -14933,23 +12844,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -14957,7 +12860,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -14968,7 +12877,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -14991,13 +12900,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -15007,15 +12909,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -15027,12 +12929,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -15044,7 +12950,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -15058,8 +13046,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -15079,76 +13071,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -15177,8 +13118,56 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -15197,10 +13186,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -15215,13 +13204,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libjpeg $as_me 7.0, which was -generated by GNU Autoconf 2.63. Invocation command line was +This file was extended by libjpeg $as_me 8.0.2, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15253,13 +13248,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -15278,16 +13275,17 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libjpeg config.status 7.0 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +libjpeg config.status 8.0.2 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15323,6 +13321,8 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -15330,20 +13330,19 @@ do case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -15351,11 +13350,10 @@ Try \`$0 --help' for more information." >&2 ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -15667,9 +13665,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15696,7 +13692,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -15707,11 +13703,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15719,10 +13711,16 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi @@ -15736,24 +13734,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15775,7 +13767,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -15789,7 +13781,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -15842,9 +13834,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), @@ -15885,9 +13875,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15972,9 +13960,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -15987,9 +13973,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -16017,12 +14001,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -16033,7 +14015,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -16046,9 +14028,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -16076,47 +14056,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -16173,7 +14113,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -16183,12 +14122,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -16198,7 +14136,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -16227,14 +14165,12 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} @@ -16244,9 +14180,7 @@ which seems to be undefined. Please make sure it is defined." >&2;} -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -16257,25 +14191,19 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -16313,7 +14241,7 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -16408,47 +14336,7 @@ $as_echo X"$file" | q } s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done @@ -17101,15 +14989,12 @@ _LT_EOF done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -17130,10 +15015,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/source/Irrlicht/jpeglib/configure.ac b/source/Irrlicht/jpeglib/configure.ac index ff96fe10..abde33b8 100644 --- a/source/Irrlicht/jpeglib/configure.ac +++ b/source/Irrlicht/jpeglib/configure.ac @@ -5,7 +5,7 @@ # Configure script for IJG libjpeg # -AC_INIT([libjpeg], [7.0]) +AC_INIT([libjpeg], [8.0.2]) # Directory where autotools helper scripts lives. AC_CONFIG_AUX_DIR([.]) @@ -309,7 +309,7 @@ AC_SUBST(MEMORYMGR) # Extract the library version ID from jpeglib.h. AC_MSG_CHECKING([libjpeg version number]) [JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`] -[JPEG_LIB_VERSION="`expr $JPEG_LIB_VERSION / 10`:`expr $JPEG_LIB_VERSION % 10`"] +[JPEG_LIB_VERSION="`expr $JPEG_LIB_VERSION / 10`:2"] AC_MSG_RESULT([$JPEG_LIB_VERSION]) AC_SUBST([JPEG_LIB_VERSION]) diff --git a/source/Irrlicht/jpeglib/djpeg.1 b/source/Irrlicht/jpeglib/djpeg.1 index e0725602..9f7038f6 100644 --- a/source/Irrlicht/jpeglib/djpeg.1 +++ b/source/Irrlicht/jpeglib/djpeg.1 @@ -1,4 +1,4 @@ -.TH DJPEG 1 "28 March 2009" +.TH DJPEG 1 "3 October 2009" .SH NAME djpeg \- decompress a JPEG file to an image file .SH SYNOPSIS @@ -62,9 +62,10 @@ 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/8 with all M from 1 to 16. If the /N part is omitted, then M specifies the -DCT scaled size to be applied on the given input, which is currently -equivalent to M/8 scaling, since the source DCT size is currently always 8. +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. diff --git a/source/Irrlicht/jpeglib/filelist.txt b/source/Irrlicht/jpeglib/filelist.txt index 6624de7a..040abffc 100644 --- a/source/Irrlicht/jpeglib/filelist.txt +++ b/source/Irrlicht/jpeglib/filelist.txt @@ -73,7 +73,7 @@ jfdctflt.c Forward DCT using floating-point arithmetic. jchuff.c Huffman entropy coding. jcarith.c Arithmetic entropy coding. jcmarker.c JPEG marker writing. -jdatadst.c Data destination manager for stdio output. +jdatadst.c Data destination managers for memory and stdio output. Decompression side of the library: @@ -95,7 +95,7 @@ jdmerge.c Merged upsampling/color conversion (faster, lower quality). jquant1.c One-pass color quantization using a fixed-spacing colormap. jquant2.c Two-pass color quantization using a custom-generated colormap. Also handles one-pass quantization to an externally given map. -jdatasrc.c Data source manager for stdio input. +jdatasrc.c Data source managers for memory and stdio input. Support files for both compression and decompression: diff --git a/source/Irrlicht/jpeglib/install.txt b/source/Irrlicht/jpeglib/install.txt index 24bb4ee9..b8f584fb 100644 --- a/source/Irrlicht/jpeglib/install.txt +++ b/source/Irrlicht/jpeglib/install.txt @@ -1,6 +1,6 @@ INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software -Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. +Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. This file is part of the Independent JPEG Group's software. For conditions of distribution and use, see the accompanying README file. @@ -149,7 +149,7 @@ makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C (16-bit only) makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C makefile.vc jconfig.vc Windows NT/95, MS Visual C++ make*.vc6 jconfig.vc Windows NT/95, MS Visual C++ 6 -make*.vc9 jconfig.vc Windows NT/95, MS Visual C++ 2008 (v9) +make*.v10 jconfig.vc Windows NT/95, MS Visual C++ 2010 (v10) makefile.mms jconfig.vms Digital VMS, with MMS software makefile.vms jconfig.vms Digital VMS, without MMS software @@ -534,17 +534,17 @@ In general, it's worth trying the maximum optimization level of your compiler, and experimenting with any optional optimizations such as loop unrolling. (Unfortunately, far too many compilers have optimizer bugs ... be prepared to back off if the code fails self-test.) If you do any experimentation along -these lines, please report the optimal settings to jpeg-info@jpegclub.org so -we can mention them in future releases. Be sure to specify your machine and -compiler version. +these lines, please report the optimal settings to jpeg-info@uc.ag so we +can mention them in future releases. Be sure to specify your machine +and compiler version. HINTS FOR SPECIFIC SYSTEMS ========================== We welcome reports on changes needed for systems not mentioned here. Submit -'em to jpeg-info@jpegclub.org. Also, if configure or ckconfig.c is wrong -about how to configure the JPEG software for your system, please let us know. +'em to jpeg-info@uc.ag. Also, if configure or ckconfig.c is wrong about how +to configure the JPEG software for your system, please let us know. Acorn RISC OS: @@ -998,8 +998,8 @@ model. makefile.vc is intended for command-line use. (If you are using the Developer Studio environment, you may prefer the DevStudio project files; see below.) -v7 adds extern "C" to jpeglib.h. This avoids the need to put extern "C" -{ ... } around #include "jpeglib.h" in your C++ application. +IJG JPEG 7 adds extern "C" to jpeglib.h. This avoids the need to put +extern "C" { ... } around #include "jpeglib.h" in your C++ application. You can also force VC++ to treat the library as C++ code by renaming all the *.c files to *.cpp (and adjusting the makefile to match). In this case you also need to define the symbol DONT_USE_EXTERN_C in @@ -1015,51 +1015,50 @@ as Win32 console applications. (Even if you only want the library, we recommend building the applications so that you can run the self-test.) To use: -1. Copy jconfig.vc to jconfig.h, makejdsw.vc6 to jpeg.dsw, - makeadsw.vc6 to apps.dsw, makejmak.vc6 to jpeg.mak, - makejdep.vc6 to jpeg.dep, makejdsp.vc6 to jpeg.dsp, - makecmak.vc6 to cjpeg.mak, makecdep.vc6 to cjpeg.dep, - makecdsp.vc6 to cjpeg.dsp, makedmak.vc6 to djpeg.mak, - makeddep.vc6 to djpeg.dep, makeddsp.vc6 to djpeg.dsp, - maketmak.vc6 to jpegtran.mak, maketdep.vc6 to jpegtran.dep, - maketdsp.vc6 to jpegtran.dsp, makermak.vc6 to rdjpgcom.mak, - makerdep.vc6 to rdjpgcom.dep, makerdsp.vc6 to rdjpgcom.dsp, - makewmak.vc6 to wrjpgcom.mak, makewdep.vc6 to wrjpgcom.dep, and - makewdsp.vc6 to wrjpgcom.dsp. (Note that the renaming is critical!) -2. Click on jpeg.dsw and apps.dsw to load the project workspaces. +1. Open the command prompt, change to the main directory and execute the + command line + NMAKE /f makefile.vc setup-vc6 + This will move jconfig.vc to jconfig.h and makefiles to project files. + (Note that the renaming is critical!) +2. Open the workspace file jpeg.dsw, build the library project. (If you are using DevStudio more recent than 6.0, you'll probably get a message saying that the project files are being updated.) -3. Build the library project, then the applications project. -4. Move the application .exe files from `app`\Release to an +3. Open the workspace file apps.dsw, build the application projects. +4. To perform the self-test, execute the command line + NMAKE /f makefile.vc test-build +5. Move the application .exe files from `app`\Release to an appropriate location on your path. -5. To perform the self-test, execute the command line - NMAKE /f makefile.vc test -Microsoft Windows, Microsoft Visual C++ 2008 Developer Studio (v9): +Microsoft Windows, Microsoft Visual C++ 2010 Developer Studio (v10): We include makefiles that should work as project files in Visual Studio -2008 or later. There is a library makefile that builds the IJG library +2010 or later. There is a library makefile that builds the IJG library as a static Win32 library, and application makefiles that build the sample applications as Win32 console applications. (Even if you only want the library, we recommend building the applications so that you can run the self-test.) To use: -1. Copy jconfig.vc to jconfig.h, makejsln.vc9 to jpeg.sln, - makeasln.vc9 to apps.sln, makejvcp.vc9 to jpeg.vcproj, - makecvcp.vc9 to cjpeg.vcproj, makedvcp.vc9 to djpeg.vcproj, - maketvcp.vc9 to jpegtran.vcproj, makervcp.vc9 to rdjpgcom.vcproj, and - makewvcp.vc9 to wrjpgcom.vcproj. (Note that the renaming is critical!) -2. Click on jpeg.sln and apps.sln to load the project solutions. - (If you are using Visual Studio more recent than 2008 (v9), you'll - probably get a message saying that the project files are being - updated.) -3. Build the library project, then the applications project. -4. Move the application .exe files from `app`\Release to an +1. Open the command prompt, change to the main directory and execute the + command line + NMAKE /f makefile.vc setup-v10 + This will move jconfig.vc to jconfig.h and makefiles to project files. + (Note that the renaming is critical!) +2. Open the solution file jpeg.sln, build the library project. + (If you are using Visual Studio more recent than 2010 (v10), you'll + probably get a message saying that the project files are being updated.) +3. Open the solution file apps.sln, build the application projects. +4. To perform the self-test, execute the command line + NMAKE /f makefile.vc test-build +5. Move the application .exe files from `app`\Release to an appropriate location on your path. -5. To perform the self-test, execute the command line - NMAKE /f makefile.vc test + +Note: +There seems to be an optimization bug in the compiler which causes the +self-test to fail with the color quantization option. +We have disabled optimization for the file jquant2.c in the library +project file which causes the self-test to pass properly. OS/2, Borland C++: diff --git a/source/Irrlicht/jpeglib/jaricom.c b/source/Irrlicht/jpeglib/jaricom.c index 23d73c38..d130aaca 100644 --- a/source/Irrlicht/jpeglib/jaricom.c +++ b/source/Irrlicht/jpeglib/jaricom.c @@ -1,7 +1,7 @@ /* * jaricom.c * - * Developed 1997 by Guido Vollbeding. + * Developed 1997-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. * @@ -26,123 +26,128 @@ * implementation (jbig_tab.c). */ -#define V(a,b,c,d) (((INT32)a << 16) | ((INT32)c << 8) | ((INT32)d << 7) | b) +#define V(i,a,b,c,d) (((INT32)a << 16) | ((INT32)c << 8) | ((INT32)d << 7) | b) -const INT32 jaritab[113] = { +const INT32 jpeg_aritab[113+1] = { /* * Index, Qe_Value, Next_Index_LPS, Next_Index_MPS, Switch_MPS */ -/* 0 */ V( 0x5a1d, 1, 1, 1 ), -/* 1 */ V( 0x2586, 14, 2, 0 ), -/* 2 */ V( 0x1114, 16, 3, 0 ), -/* 3 */ V( 0x080b, 18, 4, 0 ), -/* 4 */ V( 0x03d8, 20, 5, 0 ), -/* 5 */ V( 0x01da, 23, 6, 0 ), -/* 6 */ V( 0x00e5, 25, 7, 0 ), -/* 7 */ V( 0x006f, 28, 8, 0 ), -/* 8 */ V( 0x0036, 30, 9, 0 ), -/* 9 */ V( 0x001a, 33, 10, 0 ), -/* 10 */ V( 0x000d, 35, 11, 0 ), -/* 11 */ V( 0x0006, 9, 12, 0 ), -/* 12 */ V( 0x0003, 10, 13, 0 ), -/* 13 */ V( 0x0001, 12, 13, 0 ), -/* 14 */ V( 0x5a7f, 15, 15, 1 ), -/* 15 */ V( 0x3f25, 36, 16, 0 ), -/* 16 */ V( 0x2cf2, 38, 17, 0 ), -/* 17 */ V( 0x207c, 39, 18, 0 ), -/* 18 */ V( 0x17b9, 40, 19, 0 ), -/* 19 */ V( 0x1182, 42, 20, 0 ), -/* 20 */ V( 0x0cef, 43, 21, 0 ), -/* 21 */ V( 0x09a1, 45, 22, 0 ), -/* 22 */ V( 0x072f, 46, 23, 0 ), -/* 23 */ V( 0x055c, 48, 24, 0 ), -/* 24 */ V( 0x0406, 49, 25, 0 ), -/* 25 */ V( 0x0303, 51, 26, 0 ), -/* 26 */ V( 0x0240, 52, 27, 0 ), -/* 27 */ V( 0x01b1, 54, 28, 0 ), -/* 28 */ V( 0x0144, 56, 29, 0 ), -/* 29 */ V( 0x00f5, 57, 30, 0 ), -/* 30 */ V( 0x00b7, 59, 31, 0 ), -/* 31 */ V( 0x008a, 60, 32, 0 ), -/* 32 */ V( 0x0068, 62, 33, 0 ), -/* 33 */ V( 0x004e, 63, 34, 0 ), -/* 34 */ V( 0x003b, 32, 35, 0 ), -/* 35 */ V( 0x002c, 33, 9, 0 ), -/* 36 */ V( 0x5ae1, 37, 37, 1 ), -/* 37 */ V( 0x484c, 64, 38, 0 ), -/* 38 */ V( 0x3a0d, 65, 39, 0 ), -/* 39 */ V( 0x2ef1, 67, 40, 0 ), -/* 40 */ V( 0x261f, 68, 41, 0 ), -/* 41 */ V( 0x1f33, 69, 42, 0 ), -/* 42 */ V( 0x19a8, 70, 43, 0 ), -/* 43 */ V( 0x1518, 72, 44, 0 ), -/* 44 */ V( 0x1177, 73, 45, 0 ), -/* 45 */ V( 0x0e74, 74, 46, 0 ), -/* 46 */ V( 0x0bfb, 75, 47, 0 ), -/* 47 */ V( 0x09f8, 77, 48, 0 ), -/* 48 */ V( 0x0861, 78, 49, 0 ), -/* 49 */ V( 0x0706, 79, 50, 0 ), -/* 50 */ V( 0x05cd, 48, 51, 0 ), -/* 51 */ V( 0x04de, 50, 52, 0 ), -/* 52 */ V( 0x040f, 50, 53, 0 ), -/* 53 */ V( 0x0363, 51, 54, 0 ), -/* 54 */ V( 0x02d4, 52, 55, 0 ), -/* 55 */ V( 0x025c, 53, 56, 0 ), -/* 56 */ V( 0x01f8, 54, 57, 0 ), -/* 57 */ V( 0x01a4, 55, 58, 0 ), -/* 58 */ V( 0x0160, 56, 59, 0 ), -/* 59 */ V( 0x0125, 57, 60, 0 ), -/* 60 */ V( 0x00f6, 58, 61, 0 ), -/* 61 */ V( 0x00cb, 59, 62, 0 ), -/* 62 */ V( 0x00ab, 61, 63, 0 ), -/* 63 */ V( 0x008f, 61, 32, 0 ), -/* 64 */ V( 0x5b12, 65, 65, 1 ), -/* 65 */ V( 0x4d04, 80, 66, 0 ), -/* 66 */ V( 0x412c, 81, 67, 0 ), -/* 67 */ V( 0x37d8, 82, 68, 0 ), -/* 68 */ V( 0x2fe8, 83, 69, 0 ), -/* 69 */ V( 0x293c, 84, 70, 0 ), -/* 70 */ V( 0x2379, 86, 71, 0 ), -/* 71 */ V( 0x1edf, 87, 72, 0 ), -/* 72 */ V( 0x1aa9, 87, 73, 0 ), -/* 73 */ V( 0x174e, 72, 74, 0 ), -/* 74 */ V( 0x1424, 72, 75, 0 ), -/* 75 */ V( 0x119c, 74, 76, 0 ), -/* 76 */ V( 0x0f6b, 74, 77, 0 ), -/* 77 */ V( 0x0d51, 75, 78, 0 ), -/* 78 */ V( 0x0bb6, 77, 79, 0 ), -/* 79 */ V( 0x0a40, 77, 48, 0 ), -/* 80 */ V( 0x5832, 80, 81, 1 ), -/* 81 */ V( 0x4d1c, 88, 82, 0 ), -/* 82 */ V( 0x438e, 89, 83, 0 ), -/* 83 */ V( 0x3bdd, 90, 84, 0 ), -/* 84 */ V( 0x34ee, 91, 85, 0 ), -/* 85 */ V( 0x2eae, 92, 86, 0 ), -/* 86 */ V( 0x299a, 93, 87, 0 ), -/* 87 */ V( 0x2516, 86, 71, 0 ), -/* 88 */ V( 0x5570, 88, 89, 1 ), -/* 89 */ V( 0x4ca9, 95, 90, 0 ), -/* 90 */ V( 0x44d9, 96, 91, 0 ), -/* 91 */ V( 0x3e22, 97, 92, 0 ), -/* 92 */ V( 0x3824, 99, 93, 0 ), -/* 93 */ V( 0x32b4, 99, 94, 0 ), -/* 94 */ V( 0x2e17, 93, 86, 0 ), -/* 95 */ V( 0x56a8, 95, 96, 1 ), -/* 96 */ V( 0x4f46, 101, 97, 0 ), -/* 97 */ V( 0x47e5, 102, 98, 0 ), -/* 98 */ V( 0x41cf, 103, 99, 0 ), -/* 99 */ V( 0x3c3d, 104, 100, 0 ), -/* 100 */ V( 0x375e, 99, 93, 0 ), -/* 101 */ V( 0x5231, 105, 102, 0 ), -/* 102 */ V( 0x4c0f, 106, 103, 0 ), -/* 103 */ V( 0x4639, 107, 104, 0 ), -/* 104 */ V( 0x415e, 103, 99, 0 ), -/* 105 */ V( 0x5627, 105, 106, 1 ), -/* 106 */ V( 0x50e7, 108, 107, 0 ), -/* 107 */ V( 0x4b85, 109, 103, 0 ), -/* 108 */ V( 0x5597, 110, 109, 0 ), -/* 109 */ V( 0x504f, 111, 107, 0 ), -/* 110 */ V( 0x5a10, 110, 111, 1 ), -/* 111 */ V( 0x5522, 112, 109, 0 ), -/* 112 */ V( 0x59eb, 112, 111, 1 ) + V( 0, 0x5a1d, 1, 1, 1 ), + V( 1, 0x2586, 14, 2, 0 ), + V( 2, 0x1114, 16, 3, 0 ), + V( 3, 0x080b, 18, 4, 0 ), + V( 4, 0x03d8, 20, 5, 0 ), + V( 5, 0x01da, 23, 6, 0 ), + V( 6, 0x00e5, 25, 7, 0 ), + V( 7, 0x006f, 28, 8, 0 ), + V( 8, 0x0036, 30, 9, 0 ), + V( 9, 0x001a, 33, 10, 0 ), + V( 10, 0x000d, 35, 11, 0 ), + V( 11, 0x0006, 9, 12, 0 ), + V( 12, 0x0003, 10, 13, 0 ), + V( 13, 0x0001, 12, 13, 0 ), + V( 14, 0x5a7f, 15, 15, 1 ), + V( 15, 0x3f25, 36, 16, 0 ), + V( 16, 0x2cf2, 38, 17, 0 ), + V( 17, 0x207c, 39, 18, 0 ), + V( 18, 0x17b9, 40, 19, 0 ), + V( 19, 0x1182, 42, 20, 0 ), + V( 20, 0x0cef, 43, 21, 0 ), + V( 21, 0x09a1, 45, 22, 0 ), + V( 22, 0x072f, 46, 23, 0 ), + V( 23, 0x055c, 48, 24, 0 ), + V( 24, 0x0406, 49, 25, 0 ), + V( 25, 0x0303, 51, 26, 0 ), + V( 26, 0x0240, 52, 27, 0 ), + V( 27, 0x01b1, 54, 28, 0 ), + V( 28, 0x0144, 56, 29, 0 ), + V( 29, 0x00f5, 57, 30, 0 ), + V( 30, 0x00b7, 59, 31, 0 ), + V( 31, 0x008a, 60, 32, 0 ), + V( 32, 0x0068, 62, 33, 0 ), + V( 33, 0x004e, 63, 34, 0 ), + V( 34, 0x003b, 32, 35, 0 ), + V( 35, 0x002c, 33, 9, 0 ), + V( 36, 0x5ae1, 37, 37, 1 ), + V( 37, 0x484c, 64, 38, 0 ), + V( 38, 0x3a0d, 65, 39, 0 ), + V( 39, 0x2ef1, 67, 40, 0 ), + V( 40, 0x261f, 68, 41, 0 ), + V( 41, 0x1f33, 69, 42, 0 ), + V( 42, 0x19a8, 70, 43, 0 ), + V( 43, 0x1518, 72, 44, 0 ), + V( 44, 0x1177, 73, 45, 0 ), + V( 45, 0x0e74, 74, 46, 0 ), + V( 46, 0x0bfb, 75, 47, 0 ), + V( 47, 0x09f8, 77, 48, 0 ), + V( 48, 0x0861, 78, 49, 0 ), + V( 49, 0x0706, 79, 50, 0 ), + V( 50, 0x05cd, 48, 51, 0 ), + V( 51, 0x04de, 50, 52, 0 ), + V( 52, 0x040f, 50, 53, 0 ), + V( 53, 0x0363, 51, 54, 0 ), + V( 54, 0x02d4, 52, 55, 0 ), + V( 55, 0x025c, 53, 56, 0 ), + V( 56, 0x01f8, 54, 57, 0 ), + V( 57, 0x01a4, 55, 58, 0 ), + V( 58, 0x0160, 56, 59, 0 ), + V( 59, 0x0125, 57, 60, 0 ), + V( 60, 0x00f6, 58, 61, 0 ), + V( 61, 0x00cb, 59, 62, 0 ), + V( 62, 0x00ab, 61, 63, 0 ), + V( 63, 0x008f, 61, 32, 0 ), + V( 64, 0x5b12, 65, 65, 1 ), + V( 65, 0x4d04, 80, 66, 0 ), + V( 66, 0x412c, 81, 67, 0 ), + V( 67, 0x37d8, 82, 68, 0 ), + V( 68, 0x2fe8, 83, 69, 0 ), + V( 69, 0x293c, 84, 70, 0 ), + V( 70, 0x2379, 86, 71, 0 ), + V( 71, 0x1edf, 87, 72, 0 ), + V( 72, 0x1aa9, 87, 73, 0 ), + V( 73, 0x174e, 72, 74, 0 ), + V( 74, 0x1424, 72, 75, 0 ), + V( 75, 0x119c, 74, 76, 0 ), + V( 76, 0x0f6b, 74, 77, 0 ), + V( 77, 0x0d51, 75, 78, 0 ), + V( 78, 0x0bb6, 77, 79, 0 ), + V( 79, 0x0a40, 77, 48, 0 ), + V( 80, 0x5832, 80, 81, 1 ), + V( 81, 0x4d1c, 88, 82, 0 ), + V( 82, 0x438e, 89, 83, 0 ), + V( 83, 0x3bdd, 90, 84, 0 ), + V( 84, 0x34ee, 91, 85, 0 ), + V( 85, 0x2eae, 92, 86, 0 ), + V( 86, 0x299a, 93, 87, 0 ), + V( 87, 0x2516, 86, 71, 0 ), + V( 88, 0x5570, 88, 89, 1 ), + V( 89, 0x4ca9, 95, 90, 0 ), + V( 90, 0x44d9, 96, 91, 0 ), + V( 91, 0x3e22, 97, 92, 0 ), + V( 92, 0x3824, 99, 93, 0 ), + V( 93, 0x32b4, 99, 94, 0 ), + V( 94, 0x2e17, 93, 86, 0 ), + V( 95, 0x56a8, 95, 96, 1 ), + V( 96, 0x4f46, 101, 97, 0 ), + V( 97, 0x47e5, 102, 98, 0 ), + V( 98, 0x41cf, 103, 99, 0 ), + V( 99, 0x3c3d, 104, 100, 0 ), + V( 100, 0x375e, 99, 93, 0 ), + V( 101, 0x5231, 105, 102, 0 ), + V( 102, 0x4c0f, 106, 103, 0 ), + V( 103, 0x4639, 107, 104, 0 ), + V( 104, 0x415e, 103, 99, 0 ), + V( 105, 0x5627, 105, 106, 1 ), + V( 106, 0x50e7, 108, 107, 0 ), + V( 107, 0x4b85, 109, 103, 0 ), + V( 108, 0x5597, 110, 109, 0 ), + V( 109, 0x504f, 111, 107, 0 ), + V( 110, 0x5a10, 110, 111, 1 ), + V( 111, 0x5522, 112, 109, 0 ), + V( 112, 0x59eb, 112, 111, 1 ), +/* + * This last entry is used for fixed probability estimate of 0.5 + * as recommended in Section 10.3 Table 5 of ITU-T Rec. T.851. + */ + V( 113, 0x5a1d, 113, 113, 0 ) }; diff --git a/source/Irrlicht/jpeglib/jcapimin.c b/source/Irrlicht/jpeglib/jcapimin.c index 4cac1949..3382d915 100644 --- a/source/Irrlicht/jpeglib/jcapimin.c +++ b/source/Irrlicht/jpeglib/jcapimin.c @@ -2,6 +2,7 @@ * jcapimin.c * * Copyright (C) 1994-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. * @@ -73,6 +74,11 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) cinfo->ac_huff_tbl_ptrs[i] = NULL; } + /* Must do it here for emit_dqt in case jpeg_write_tables is used */ + cinfo->block_size = DCTSIZE; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + cinfo->script_space = NULL; cinfo->input_gamma = 1.0; /* in case application forgets */ diff --git a/source/Irrlicht/jpeglib/jcarith.c b/source/Irrlicht/jpeglib/jcarith.c index dc19d950..69afce56 100644 --- a/source/Irrlicht/jpeglib/jcarith.c +++ b/source/Irrlicht/jpeglib/jcarith.c @@ -1,7 +1,7 @@ /* * jcarith.c * - * Developed 1997 by Guido Vollbeding. + * Developed 1997-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. * @@ -40,6 +40,9 @@ typedef struct { /* Pointers to statistics areas (these workspaces have image lifespan) */ unsigned char * dc_stats[NUM_ARITH_TBLS]; unsigned char * ac_stats[NUM_ARITH_TBLS]; + + /* Statistics bin for coding with fixed probability 0.5 */ + unsigned char fixed_bin[4]; } arith_entropy_encoder; typedef arith_entropy_encoder * arith_entropy_ptr; @@ -48,8 +51,6 @@ typedef arith_entropy_encoder * arith_entropy_ptr; * for the statistics area. * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least * 49 statistics bins for DC, and 245 statistics bins for AC coding. - * Note that we use one additional AC bin for codings with fixed - * probability (0.5), thus the minimum number for AC is 246. * * We use a compact representation with 1 byte per statistics bin, * thus the numbers directly represent byte sizes. @@ -217,7 +218,6 @@ finish_pass (j_compress_ptr cinfo) LOCAL(void) arith_encode (j_compress_ptr cinfo, unsigned char *st, int val) { - extern const INT32 jaritab[]; register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; register unsigned char nl, nm; register INT32 qe, temp; @@ -227,7 +227,7 @@ arith_encode (j_compress_ptr cinfo, unsigned char *st, int val) * Qe values and probability estimation state machine */ sv = *st; - qe = jaritab[sv & 0x7F]; /* => Qe_Value */ + qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */ nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */ nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */ @@ -327,16 +327,18 @@ emit_restart (j_compress_ptr cinfo, int restart_num) emit_byte(0xFF, cinfo); emit_byte(JPEG_RST0 + restart_num, cinfo); + /* Re-initialize statistics areas */ for (ci = 0; ci < cinfo->comps_in_scan; ci++) { compptr = cinfo->cur_comp_info[ci]; - /* Re-initialize statistics areas */ - if (cinfo->progressive_mode == 0 || (cinfo->Ss == 0 && cinfo->Ah == 0)) { + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); /* Reset DC predictions to 0 */ entropy->last_dc_val[ci] = 0; entropy->dc_context[ci] = 0; } - if (cinfo->progressive_mode == 0 || cinfo->Ss) { + /* AC needs no table when not present */ + if (cinfo->Se) { MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); } } @@ -427,9 +429,9 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) } arith_encode(cinfo, st, 0); /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) (((INT32) 1 << cinfo->arith_dc_L[tbl]) >> 1)) + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) (((INT32) 1 << cinfo->arith_dc_U[tbl]) >> 1)) + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) entropy->dc_context[ci] += 8; /* large diff category */ /* Figure F.9: Encoding the magnitude bit pattern of v */ st += 14; @@ -455,6 +457,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) unsigned char *st; int tbl, k, ke; int v, v2, m; + const int * natural_order; /* Emit restart marker if needed */ if (cinfo->restart_interval) { @@ -467,6 +470,8 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) entropy->restarts_to_go--; } + natural_order = cinfo->natural_order; + /* Encode the MCU data block */ block = MCU_data[0]; tbl = cinfo->cur_comp_info[0]->ac_tbl_no; @@ -474,12 +479,12 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */ /* Establish EOB (end-of-block) index */ - for (ke = cinfo->Se + 1; ke > 1; ke--) + for (ke = cinfo->Se; ke > 0; ke--) /* We must apply the point transform by Al. For AC coefficients this * is an integer division with rounding towards 0. To do this portably * in C, we shift after obtaining the absolute value. */ - if ((v = (*block)[jpeg_natural_order[ke - 1]]) >= 0) { + if ((v = (*block)[natural_order[ke]]) >= 0) { if (v >>= cinfo->Al) break; } else { v = -v; @@ -487,22 +492,21 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) } /* Figure F.5: Encode_AC_Coefficients */ - for (k = cinfo->Ss; k < ke; k++) { + for (k = cinfo->Ss; k <= ke; k++) { st = entropy->ac_stats[tbl] + 3 * (k - 1); arith_encode(cinfo, st, 0); /* EOB decision */ - entropy->ac_stats[tbl][245] = 0; for (;;) { - if ((v = (*block)[jpeg_natural_order[k]]) >= 0) { + if ((v = (*block)[natural_order[k]]) >= 0) { if (v >>= cinfo->Al) { arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->ac_stats[tbl] + 245, 0); + arith_encode(cinfo, entropy->fixed_bin, 0); break; } } else { v = -v; if (v >>= cinfo->Al) { arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->ac_stats[tbl] + 245, 1); + arith_encode(cinfo, entropy->fixed_bin, 1); break; } } @@ -551,7 +555,7 @@ METHODDEF(boolean) encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) { arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - unsigned char st[4]; + unsigned char *st; int Al, blkn; /* Emit restart marker if needed */ @@ -565,11 +569,11 @@ encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) entropy->restarts_to_go--; } + st = entropy->fixed_bin; /* use fixed probability estimation */ Al = cinfo->Al; /* Encode the MCU data blocks */ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - st[0] = 0; /* use fixed probability estimation */ /* We simply emit the Al'th bit of the DC coefficient value. */ arith_encode(cinfo, st, (MCU_data[blkn][0][0] >> Al) & 1); } @@ -590,6 +594,7 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) unsigned char *st; int tbl, k, ke, kex; int v; + const int * natural_order; /* Emit restart marker if needed */ if (cinfo->restart_interval) { @@ -602,6 +607,8 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) entropy->restarts_to_go--; } + natural_order = cinfo->natural_order; + /* Encode the MCU data block */ block = MCU_data[0]; tbl = cinfo->cur_comp_info[0]->ac_tbl_no; @@ -609,12 +616,12 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) /* Section G.1.3.3: Encoding of AC coefficients */ /* Establish EOB (end-of-block) index */ - for (ke = cinfo->Se + 1; ke > 1; ke--) + for (ke = cinfo->Se; ke > 0; ke--) /* We must apply the point transform by Al. For AC coefficients this * is an integer division with rounding towards 0. To do this portably * in C, we shift after obtaining the absolute value. */ - if ((v = (*block)[jpeg_natural_order[ke - 1]]) >= 0) { + if ((v = (*block)[natural_order[ke]]) >= 0) { if (v >>= cinfo->Al) break; } else { v = -v; @@ -622,8 +629,8 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) } /* Establish EOBx (previous stage end-of-block) index */ - for (kex = ke; kex > 1; kex--) - if ((v = (*block)[jpeg_natural_order[kex - 1]]) >= 0) { + for (kex = ke; kex > 0; kex--) + if ((v = (*block)[natural_order[kex]]) >= 0) { if (v >>= cinfo->Ah) break; } else { v = -v; @@ -631,30 +638,29 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) } /* Figure G.10: Encode_AC_Coefficients_SA */ - for (k = cinfo->Ss; k < ke; k++) { + for (k = cinfo->Ss; k <= ke; k++) { st = entropy->ac_stats[tbl] + 3 * (k - 1); - if (k >= kex) + if (k > kex) arith_encode(cinfo, st, 0); /* EOB decision */ - entropy->ac_stats[tbl][245] = 0; for (;;) { - if ((v = (*block)[jpeg_natural_order[k]]) >= 0) { + if ((v = (*block)[natural_order[k]]) >= 0) { if (v >>= cinfo->Al) { - if (v >> 1) /* previously nonzero coef */ + if (v >> 1) /* previously nonzero coef */ arith_encode(cinfo, st + 2, (v & 1)); - else { /* newly nonzero coef */ + else { /* newly nonzero coef */ arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->ac_stats[tbl] + 245, 0); + arith_encode(cinfo, entropy->fixed_bin, 0); } break; } } else { v = -v; if (v >>= cinfo->Al) { - if (v >> 1) /* previously nonzero coef */ + if (v >> 1) /* previously nonzero coef */ arith_encode(cinfo, st + 2, (v & 1)); - else { /* newly nonzero coef */ + else { /* newly nonzero coef */ arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->ac_stats[tbl] + 245, 1); + arith_encode(cinfo, entropy->fixed_bin, 1); } break; } @@ -685,6 +691,7 @@ encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data) unsigned char *st; int blkn, ci, tbl, k, ke; int v, v2, m; + const int * natural_order; /* Emit restart marker if needed */ if (cinfo->restart_interval) { @@ -697,6 +704,8 @@ encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data) entropy->restarts_to_go--; } + natural_order = cinfo->natural_order; + /* Encode the MCU data blocks */ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { block = MCU_data[blkn]; @@ -744,9 +753,9 @@ encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data) } arith_encode(cinfo, st, 0); /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) (((INT32) 1 << cinfo->arith_dc_L[tbl]) >> 1)) + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) (((INT32) 1 << cinfo->arith_dc_U[tbl]) >> 1)) + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) entropy->dc_context[ci] += 8; /* large diff category */ /* Figure F.9: Encoding the magnitude bit pattern of v */ st += 14; @@ -759,25 +768,24 @@ encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data) tbl = compptr->ac_tbl_no; /* Establish EOB (end-of-block) index */ - for (ke = DCTSIZE2; ke > 1; ke--) - if ((*block)[jpeg_natural_order[ke - 1]]) break; + for (ke = cinfo->lim_Se; ke > 0; ke--) + if ((*block)[natural_order[ke]]) break; /* Figure F.5: Encode_AC_Coefficients */ - for (k = 1; k < ke; k++) { + for (k = 1; k <= ke; k++) { st = entropy->ac_stats[tbl] + 3 * (k - 1); arith_encode(cinfo, st, 0); /* EOB decision */ - while ((v = (*block)[jpeg_natural_order[k]]) == 0) { + while ((v = (*block)[natural_order[k]]) == 0) { arith_encode(cinfo, st + 1, 0); st += 3; k++; } arith_encode(cinfo, st + 1, 1); /* Figure F.6: Encoding nonzero value v */ /* Figure F.7: Encoding the sign of v */ - entropy->ac_stats[tbl][245] = 0; if (v > 0) { - arith_encode(cinfo, entropy->ac_stats[tbl] + 245, 0); + arith_encode(cinfo, entropy->fixed_bin, 0); } else { v = -v; - arith_encode(cinfo, entropy->ac_stats[tbl] + 245, 1); + arith_encode(cinfo, entropy->fixed_bin, 1); } st += 2; /* Figure F.8: Encoding the magnitude category of v */ @@ -804,8 +812,8 @@ encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data) while (m >>= 1) arith_encode(cinfo, st, (m & v) ? 1 : 0); } - /* Encode EOB decision only if k < DCTSIZE2 */ - if (k < DCTSIZE2) { + /* Encode EOB decision only if k <= cinfo->lim_Se */ + if (k <= cinfo->lim_Se) { st = entropy->ac_stats[tbl] + 3 * (k - 1); arith_encode(cinfo, st, 1); } @@ -851,10 +859,11 @@ start_pass (j_compress_ptr cinfo, boolean gather_statistics) } else entropy->pub.encode_mcu = encode_mcu; + /* Allocate & initialize requested statistics areas */ for (ci = 0; ci < cinfo->comps_in_scan; ci++) { compptr = cinfo->cur_comp_info[ci]; - /* Allocate & initialize requested statistics areas */ - if (cinfo->progressive_mode == 0 || (cinfo->Ss == 0 && cinfo->Ah == 0)) { + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { tbl = compptr->dc_tbl_no; if (tbl < 0 || tbl >= NUM_ARITH_TBLS) ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); @@ -866,7 +875,8 @@ start_pass (j_compress_ptr cinfo, boolean gather_statistics) entropy->last_dc_val[ci] = 0; entropy->dc_context[ci] = 0; } - if (cinfo->progressive_mode == 0 || cinfo->Ss) { + /* AC needs no table when not present */ + if (cinfo->Se) { tbl = compptr->ac_tbl_no; if (tbl < 0 || tbl >= NUM_ARITH_TBLS) ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); @@ -918,4 +928,7 @@ jinit_arith_encoder (j_compress_ptr cinfo) entropy->dc_stats[i] = NULL; entropy->ac_stats[i] = NULL; } + + /* Initialize index for fixed probability estimation */ + entropy->fixed_bin[0] = 113; } diff --git a/source/Irrlicht/jpeglib/jchuff.c b/source/Irrlicht/jpeglib/jchuff.c index f3971209..4cbab438 100644 --- a/source/Irrlicht/jpeglib/jchuff.c +++ b/source/Irrlicht/jpeglib/jchuff.c @@ -87,8 +87,6 @@ typedef struct { unsigned int restarts_to_go; /* MCUs left in this restart interval */ int next_restart_num; /* next restart number to write (0-7) */ - /* Following four fields used only in sequential mode */ - /* Pointers to derived tables (these workspaces have image lifespan) */ c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; @@ -114,15 +112,6 @@ typedef struct { unsigned int BE; /* # of buffered correction bits before MCU */ char * bit_buffer; /* buffer for correction bits (1 per char) */ /* packing correction bits tightly would save some space but cost time... */ - - /* Pointers to derived tables (these workspaces have image lifespan). - * Since any one scan in progressive mode codes only DC or only AC, - * we only need one set of tables, not one for DC and one for AC. - */ - c_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; - - /* Statistics tables for optimization; again, one set is enough */ - long * count_ptrs[NUM_HUFF_TBLS]; } huff_entropy_encoder; typedef huff_entropy_encoder * huff_entropy_ptr; @@ -419,12 +408,25 @@ flush_bits_e (huff_entropy_ptr entropy) INLINE LOCAL(void) -emit_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol) +emit_dc_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol) { if (entropy->gather_statistics) - entropy->count_ptrs[tbl_no][symbol]++; + entropy->dc_count_ptrs[tbl_no][symbol]++; else { - c_derived_tbl * tbl = entropy->derived_tbls[tbl_no]; + c_derived_tbl * tbl = entropy->dc_derived_tbls[tbl_no]; + emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); + } +} + + +INLINE +LOCAL(void) +emit_ac_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol) +{ + if (entropy->gather_statistics) + entropy->ac_count_ptrs[tbl_no][symbol]++; + else { + c_derived_tbl * tbl = entropy->ac_derived_tbls[tbl_no]; emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); } } @@ -467,7 +469,7 @@ emit_eobrun (huff_entropy_ptr entropy) if (nbits > 14) ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); - emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4); + emit_ac_symbol(entropy, entropy->ac_tbl_no, nbits << 4); if (nbits) emit_bits_e(entropy, entropy->EOBRUN, nbits); @@ -592,7 +594,7 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ERREXIT(cinfo, JERR_BAD_DCT_COEF); /* Count/emit the Huffman-coded symbol for the number of bits */ - emit_symbol(entropy, compptr->dc_tbl_no, nbits); + emit_dc_symbol(entropy, compptr->dc_tbl_no, nbits); /* Emit that number of bits of the value, if positive, */ /* or the complement of its magnitude, if negative. */ @@ -629,8 +631,8 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) register int temp, temp2; register int nbits; register int r, k; - int Se = cinfo->Se; - int Al = cinfo->Al; + int Se, Al; + const int * natural_order; JBLOCKROW block; entropy->next_output_byte = cinfo->dest->next_output_byte; @@ -641,6 +643,10 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->restarts_to_go == 0) emit_restart_e(entropy, entropy->next_restart_num); + Se = cinfo->Se; + Al = cinfo->Al; + natural_order = cinfo->natural_order; + /* Encode the MCU data block */ block = MCU_data[0]; @@ -649,7 +655,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) r = 0; /* r = run length of zeros */ for (k = cinfo->Ss; k <= Se; k++) { - if ((temp = (*block)[jpeg_natural_order[k]]) == 0) { + if ((temp = (*block)[natural_order[k]]) == 0) { r++; continue; } @@ -678,7 +684,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) emit_eobrun(entropy); /* if run length > 15, must emit special run-length-16 codes (0xF0) */ while (r > 15) { - emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0); r -= 16; } @@ -691,7 +697,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ERREXIT(cinfo, JERR_BAD_DCT_COEF); /* Count/emit Huffman symbol for run length / number of bits */ - emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); + emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); /* Emit that number of bits of the value, if positive, */ /* or the complement of its magnitude, if negative. */ @@ -785,8 +791,8 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) int EOB; char *BR_buffer; unsigned int BR; - int Se = cinfo->Se; - int Al = cinfo->Al; + int Se, Al; + const int * natural_order; JBLOCKROW block; int absvalues[DCTSIZE2]; @@ -798,6 +804,10 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->restarts_to_go == 0) emit_restart_e(entropy, entropy->next_restart_num); + Se = cinfo->Se; + Al = cinfo->Al; + natural_order = cinfo->natural_order; + /* Encode the MCU data block */ block = MCU_data[0]; @@ -806,7 +816,7 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) */ EOB = 0; for (k = cinfo->Ss; k <= Se; k++) { - temp = (*block)[jpeg_natural_order[k]]; + temp = (*block)[natural_order[k]]; /* We must apply the point transform by Al. For AC coefficients this * is an integer division with rounding towards 0. To do this portably * in C, we shift after obtaining the absolute value. @@ -836,7 +846,7 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) /* emit any pending EOBRUN and the BE correction bits */ emit_eobrun(entropy); /* Emit ZRL */ - emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0); r -= 16; /* Emit buffered correction bits that must be associated with ZRL */ emit_buffered_bits(entropy, BR_buffer, BR); @@ -859,10 +869,10 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) emit_eobrun(entropy); /* Count/emit Huffman symbol for run length / number of bits */ - emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); + emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); /* Emit output bit for newly-nonzero coef */ - temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1; + temp = ((*block)[natural_order[k]] < 0) ? 0 : 1; emit_bits_e(entropy, (unsigned int) temp, 1); /* Emit buffered correction bits that must be associated with this code */ @@ -909,6 +919,8 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, register int temp, temp2; register int nbits; register int k, r, i; + int Se = state->cinfo->lim_Se; + const int * natural_order = state->cinfo->natural_order; /* Encode the DC coefficient difference per section F.1.2.1 */ @@ -947,8 +959,8 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, r = 0; /* r = run length of zeros */ - for (k = 1; k < DCTSIZE2; k++) { - if ((temp = block[jpeg_natural_order[k]]) == 0) { + for (k = 1; k <= Se; k++) { + if ((temp = block[natural_order[k]]) == 0) { r++; } else { /* if run length > 15, must emit special run-length-16 codes (0xF0) */ @@ -1113,6 +1125,8 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, register int temp; register int nbits; register int k, r; + int Se = cinfo->lim_Se; + const int * natural_order = cinfo->natural_order; /* Encode the DC coefficient difference per section F.1.2.1 */ @@ -1139,8 +1153,8 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, r = 0; /* r = run length of zeros */ - for (k = 1; k < DCTSIZE2; k++) { - if ((temp = block[jpeg_natural_order[k]]) == 0) { + for (k = 1; k <= Se; k++) { + if ((temp = block[natural_order[k]]) == 0) { r++; } else { /* if run length > 15, must emit special run-length-16 codes (0xF0) */ @@ -1383,63 +1397,44 @@ METHODDEF(void) finish_pass_gather (j_compress_ptr cinfo) { huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, dctbl, actbl, tbl; + int ci, tbl; jpeg_component_info * compptr; JHUFF_TBL **htblptr; boolean did_dc[NUM_HUFF_TBLS]; boolean did_ac[NUM_HUFF_TBLS]; - boolean did[NUM_HUFF_TBLS]; /* It's important not to apply jpeg_gen_optimal_table more than once * per table, because it clobbers the input frequency counts! */ - if (cinfo->progressive_mode) { + if (cinfo->progressive_mode) /* Flush out buffered data (all we care about is counting the EOB symbol) */ emit_eobrun(entropy); - MEMZERO(did, SIZEOF(did)); + MEMZERO(did_dc, SIZEOF(did_dc)); + MEMZERO(did_ac, SIZEOF(did_ac)); - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - if (cinfo->Ss == 0) { - if (cinfo->Ah != 0) /* DC refinement needs no table */ - continue; - tbl = compptr->dc_tbl_no; - } else { - tbl = compptr->ac_tbl_no; - } - if (! did[tbl]) { - if (cinfo->Ss == 0) - htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; - else - htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { + tbl = compptr->dc_tbl_no; + if (! did_dc[tbl]) { + htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; if (*htblptr == NULL) *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]); - did[tbl] = TRUE; + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[tbl]); + did_dc[tbl] = TRUE; } } - } else { - MEMZERO(did_dc, SIZEOF(did_dc)); - MEMZERO(did_ac, SIZEOF(did_ac)); - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - dctbl = compptr->dc_tbl_no; - actbl = compptr->ac_tbl_no; - if (! did_dc[dctbl]) { - htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl]; + /* AC needs no table when not present */ + if (cinfo->Se) { + tbl = compptr->ac_tbl_no; + if (! did_ac[tbl]) { + htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; if (*htblptr == NULL) *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]); - did_dc[dctbl] = TRUE; - } - if (! did_ac[actbl]) { - htblptr = & cinfo->ac_huff_tbl_ptrs[actbl]; - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]); - did_ac[actbl] = TRUE; + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[tbl]); + did_ac[tbl] = TRUE; } } } @@ -1456,7 +1451,7 @@ METHODDEF(void) start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) { huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, dctbl, actbl, tbl; + int ci, tbl; jpeg_component_info * compptr; if (gather_statistics) @@ -1489,42 +1484,8 @@ start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) } } - /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1 - * for AC coefficients. - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Initialize DC predictions to 0 */ - entropy->saved.last_dc_val[ci] = 0; - /* Get table index */ - if (cinfo->Ss == 0) { - if (cinfo->Ah != 0) /* DC refinement needs no table */ - continue; - tbl = compptr->dc_tbl_no; - } else { - entropy->ac_tbl_no = tbl = compptr->ac_tbl_no; - } - if (gather_statistics) { - /* Check for invalid table index */ - /* (make_c_derived_tbl does this in the other path) */ - if (tbl < 0 || tbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); - /* Allocate and zero the statistics tables */ - /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ - if (entropy->count_ptrs[tbl] == NULL) - entropy->count_ptrs[tbl] = (long *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - 257 * SIZEOF(long)); - MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long)); - } else { - /* Compute derived values for Huffman table */ - /* We may do this more than once for a table, but it's not expensive */ - jpeg_make_c_derived_tbl(cinfo, cinfo->Ss == 0, tbl, - & entropy->derived_tbls[tbl]); - } - } - /* Initialize AC stuff */ + entropy->ac_tbl_no = cinfo->cur_comp_info[0]->ac_tbl_no; entropy->EOBRUN = 0; entropy->BE = 0; } else { @@ -1532,41 +1493,50 @@ start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) entropy->pub.encode_mcu = encode_mcu_gather; else entropy->pub.encode_mcu = encode_mcu_huff; + } - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - dctbl = compptr->dc_tbl_no; - actbl = compptr->ac_tbl_no; + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { + tbl = compptr->dc_tbl_no; if (gather_statistics) { - /* Check for invalid table indexes */ + /* Check for invalid table index */ /* (make_c_derived_tbl does this in the other path) */ - if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl); - if (actbl < 0 || actbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl); + if (tbl < 0 || tbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); /* Allocate and zero the statistics tables */ /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ - if (entropy->dc_count_ptrs[dctbl] == NULL) - entropy->dc_count_ptrs[dctbl] = (long *) + if (entropy->dc_count_ptrs[tbl] == NULL) + entropy->dc_count_ptrs[tbl] = (long *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, 257 * SIZEOF(long)); - MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long)); - if (entropy->ac_count_ptrs[actbl] == NULL) - entropy->ac_count_ptrs[actbl] = (long *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - 257 * SIZEOF(long)); - MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long)); + MEMZERO(entropy->dc_count_ptrs[tbl], 257 * SIZEOF(long)); } else { /* Compute derived values for Huffman tables */ /* We may do this more than once for a table, but it's not expensive */ - jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl, - & entropy->dc_derived_tbls[dctbl]); - jpeg_make_c_derived_tbl(cinfo, FALSE, actbl, - & entropy->ac_derived_tbls[actbl]); + jpeg_make_c_derived_tbl(cinfo, TRUE, tbl, + & entropy->dc_derived_tbls[tbl]); } /* Initialize DC predictions to 0 */ entropy->saved.last_dc_val[ci] = 0; } + /* AC needs no table when not present */ + if (cinfo->Se) { + tbl = compptr->ac_tbl_no; + if (gather_statistics) { + if (tbl < 0 || tbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); + if (entropy->ac_count_ptrs[tbl] == NULL) + entropy->ac_count_ptrs[tbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->ac_count_ptrs[tbl], 257 * SIZEOF(long)); + } else { + jpeg_make_c_derived_tbl(cinfo, FALSE, tbl, + & entropy->ac_derived_tbls[tbl]); + } + } } /* Initialize bit buffer to empty */ @@ -1595,18 +1565,12 @@ jinit_huff_encoder (j_compress_ptr cinfo) cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; entropy->pub.start_pass = start_pass_huff; - if (cinfo->progressive_mode) { - /* Mark tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->derived_tbls[i] = NULL; - entropy->count_ptrs[i] = NULL; - } - entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ - } else { - /* Mark tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; - entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; - } + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; + entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; } + + if (cinfo->progressive_mode) + entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ } diff --git a/source/Irrlicht/jpeglib/jcmarker.c b/source/Irrlicht/jpeglib/jcmarker.c index 7f1de978..19793852 100644 --- a/source/Irrlicht/jpeglib/jcmarker.c +++ b/source/Irrlicht/jpeglib/jcmarker.c @@ -2,6 +2,7 @@ * jcmarker.c * * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2003-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. * @@ -153,21 +154,22 @@ emit_dqt (j_compress_ptr cinfo, int index) ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index); prec = 0; - for (i = 0; i < DCTSIZE2; i++) { - if (qtbl->quantval[i] > 255) + for (i = 0; i <= cinfo->lim_Se; i++) { + if (qtbl->quantval[cinfo->natural_order[i]] > 255) prec = 1; } if (! qtbl->sent_table) { emit_marker(cinfo, M_DQT); - emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2); + emit_2bytes(cinfo, + prec ? cinfo->lim_Se * 2 + 2 + 1 + 2 : cinfo->lim_Se + 1 + 1 + 2); emit_byte(cinfo, index + (prec<<4)); - for (i = 0; i < DCTSIZE2; i++) { + for (i = 0; i <= cinfo->lim_Se; i++) { /* The table entries must be emitted in zigzag order. */ - unsigned int qval = qtbl->quantval[jpeg_natural_order[i]]; + unsigned int qval = qtbl->quantval[cinfo->natural_order[i]]; if (prec) emit_byte(cinfo, (int) (qval >> 8)); emit_byte(cinfo, (int) (qval & 0xFF)); @@ -235,8 +237,12 @@ emit_dac (j_compress_ptr cinfo) for (i = 0; i < cinfo->comps_in_scan; i++) { compptr = cinfo->cur_comp_info[i]; - dc_in_use[compptr->dc_tbl_no] = 1; - ac_in_use[compptr->ac_tbl_no] = 1; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) + dc_in_use[compptr->dc_tbl_no] = 1; + /* AC needs no table when not present */ + if (cinfo->Se) + ac_in_use[compptr->ac_tbl_no] = 1; } length = 0; @@ -320,22 +326,16 @@ emit_sos (j_compress_ptr cinfo) for (i = 0; i < cinfo->comps_in_scan; i++) { compptr = cinfo->cur_comp_info[i]; emit_byte(cinfo, compptr->component_id); - td = compptr->dc_tbl_no; - ta = compptr->ac_tbl_no; - if (cinfo->progressive_mode) { - /* Progressive mode: only DC or only AC tables are used in one scan; - * furthermore, Huffman coding of DC refinement uses no table at all. - * We emit 0 for unused field(s); this is recommended by the P&M text - * but does not seem to be specified in the standard. - */ - if (cinfo->Ss == 0) { - ta = 0; /* DC scan */ - if (cinfo->Ah != 0 && !cinfo->arith_code) - td = 0; /* no DC table either */ - } else { - td = 0; /* AC scan */ - } - } + + /* We emit 0 for unused field(s); this is recommended by the P&M text + * but does not seem to be specified in the standard. + */ + + /* DC needs no table for refinement scan */ + td = cinfo->Ss == 0 && cinfo->Ah == 0 ? compptr->dc_tbl_no : 0; + /* AC needs no table when not present */ + ta = cinfo->Se ? compptr->ac_tbl_no : 0; + emit_byte(cinfo, (td << 4) + ta); } @@ -345,6 +345,22 @@ emit_sos (j_compress_ptr cinfo) } +LOCAL(void) +emit_pseudo_sos (j_compress_ptr cinfo) +/* Emit a pseudo SOS marker */ +{ + emit_marker(cinfo, M_SOS); + + emit_2bytes(cinfo, 2 + 1 + 3); /* length */ + + emit_byte(cinfo, 0); /* Ns */ + + emit_byte(cinfo, 0); /* Ss */ + emit_byte(cinfo, cinfo->block_size * cinfo->block_size - 1); /* Se */ + emit_byte(cinfo, 0); /* Ah/Al */ +} + + LOCAL(void) emit_jfif_app0 (j_compress_ptr cinfo) /* Emit a JFIF-compliant APP0 marker */ @@ -484,7 +500,7 @@ write_file_header (j_compress_ptr cinfo) /* * Write frame header. - * This consists of DQT and SOFn markers. + * This consists of DQT and SOFn markers, and a conditional pseudo SOS marker. * Note that we do not emit the SOF until we have emitted the DQT(s). * This avoids compatibility problems with incorrect implementations that * try to error-check the quant table numbers as soon as they see the SOF. @@ -511,7 +527,7 @@ write_frame_header (j_compress_ptr cinfo) * Note we assume that Huffman table numbers won't be changed later. */ if (cinfo->arith_code || cinfo->progressive_mode || - cinfo->data_precision != 8) { + cinfo->data_precision != 8 || cinfo->block_size != DCTSIZE) { is_baseline = FALSE; } else { is_baseline = TRUE; @@ -541,6 +557,10 @@ write_frame_header (j_compress_ptr cinfo) else emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */ } + + /* Check to emit pseudo SOS marker */ + if (cinfo->progressive_mode && cinfo->block_size != DCTSIZE) + emit_pseudo_sos(cinfo); } @@ -569,19 +589,12 @@ write_scan_header (j_compress_ptr cinfo) */ for (i = 0; i < cinfo->comps_in_scan; i++) { compptr = cinfo->cur_comp_info[i]; - if (cinfo->progressive_mode) { - /* Progressive mode: only DC or only AC tables are used in one scan */ - if (cinfo->Ss == 0) { - if (cinfo->Ah == 0) /* DC needs no table for refinement scan */ - emit_dht(cinfo, compptr->dc_tbl_no, FALSE); - } else { - emit_dht(cinfo, compptr->ac_tbl_no, TRUE); - } - } else { - /* Sequential mode: need both DC and AC tables */ + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + /* AC needs no table when not present */ + if (cinfo->Se) emit_dht(cinfo, compptr->ac_tbl_no, TRUE); - } } } diff --git a/source/Irrlicht/jpeglib/jcmaster.c b/source/Irrlicht/jpeglib/jcmaster.c index 15f2b303..2cf794aa 100644 --- a/source/Irrlicht/jpeglib/jcmaster.c +++ b/source/Irrlicht/jpeglib/jcmaster.c @@ -2,7 +2,7 @@ * jcmaster.c * * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2003-2009 by Guido Vollbeding. + * 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. * @@ -110,8 +110,8 @@ jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo) /* Provide 1/1 scaling */ cinfo->jpeg_width = cinfo->image_width; cinfo->jpeg_height = cinfo->image_height; - cinfo->min_DCT_h_scaled_size = DCTSIZE; - cinfo->min_DCT_v_scaled_size = DCTSIZE; + cinfo->min_DCT_h_scaled_size = 8; + cinfo->min_DCT_v_scaled_size = 8; } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * 8) { /* Provide 8/9 scaling */ cinfo->jpeg_width = (JDIMENSION) @@ -191,7 +191,32 @@ jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo) LOCAL(void) -initial_setup (j_compress_ptr cinfo) +jpeg_calc_trans_dimensions (j_compress_ptr cinfo) +{ + if (cinfo->min_DCT_h_scaled_size < 1 || cinfo->min_DCT_h_scaled_size > 16 + || cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size) + ERREXIT2(cinfo, JERR_BAD_DCTSIZE, + cinfo->min_DCT_h_scaled_size, cinfo->min_DCT_v_scaled_size); + + cinfo->block_size = cinfo->min_DCT_h_scaled_size; + + switch (cinfo->block_size) { + case 2: cinfo->natural_order = jpeg_natural_order2; break; + case 3: cinfo->natural_order = jpeg_natural_order3; break; + case 4: cinfo->natural_order = jpeg_natural_order4; break; + case 5: cinfo->natural_order = jpeg_natural_order5; break; + case 6: cinfo->natural_order = jpeg_natural_order6; break; + case 7: cinfo->natural_order = jpeg_natural_order7; break; + default: cinfo->natural_order = jpeg_natural_order; break; + } + + cinfo->lim_Se = cinfo->block_size < DCTSIZE ? + cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1; +} + + +LOCAL(void) +initial_setup (j_compress_ptr cinfo, boolean transcode_only) /* Do computations that are needed before master selection phase */ { int ci, ssize; @@ -199,11 +224,14 @@ initial_setup (j_compress_ptr cinfo) long samplesperrow; JDIMENSION jd_samplesperrow; - jpeg_calc_jpeg_dimensions(cinfo); + if (transcode_only) + jpeg_calc_trans_dimensions(cinfo); + else + jpeg_calc_jpeg_dimensions(cinfo); /* Sanity check on image dimensions */ - if (cinfo->jpeg_height <= 0 || cinfo->jpeg_width <= 0 - || cinfo->num_components <= 0 || cinfo->input_components <= 0) + if (cinfo->jpeg_height <= 0 || cinfo->jpeg_width <= 0 || + cinfo->num_components <= 0 || cinfo->input_components <= 0) ERREXIT(cinfo, JERR_EMPTY_IMAGE); /* Make sure image isn't bigger than I can handle */ @@ -278,19 +306,19 @@ initial_setup (j_compress_ptr cinfo) /* Size in DCT blocks */ compptr->width_in_blocks = (JDIMENSION) jdiv_round_up((long) cinfo->jpeg_width * (long) compptr->h_samp_factor, - (long) (cinfo->max_h_samp_factor * DCTSIZE)); + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); compptr->height_in_blocks = (JDIMENSION) jdiv_round_up((long) cinfo->jpeg_height * (long) compptr->v_samp_factor, - (long) (cinfo->max_v_samp_factor * DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); /* Size in samples */ compptr->downsampled_width = (JDIMENSION) jdiv_round_up((long) cinfo->jpeg_width * (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size), - (long) (cinfo->max_h_samp_factor * DCTSIZE)); + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); compptr->downsampled_height = (JDIMENSION) jdiv_round_up((long) cinfo->jpeg_height * (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size), - (long) (cinfo->max_v_samp_factor * DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); /* Mark component needed (this flag isn't actually used for compression) */ compptr->component_needed = TRUE; } @@ -300,7 +328,7 @@ initial_setup (j_compress_ptr cinfo) */ cinfo->total_iMCU_rows = (JDIMENSION) jdiv_round_up((long) cinfo->jpeg_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); } @@ -440,6 +468,39 @@ validate_script (j_compress_ptr cinfo) } } + +LOCAL(void) +reduce_script (j_compress_ptr cinfo) +/* Adapt scan script for use with reduced block size; + * assume that script has been validated before. + */ +{ + jpeg_scan_info * scanptr; + int idxout, idxin; + + /* Circumvent const declaration for this function */ + scanptr = (jpeg_scan_info *) cinfo->scan_info; + idxout = 0; + + for (idxin = 0; idxin < cinfo->num_scans; idxin++) { + /* After skipping, idxout becomes smaller than idxin */ + if (idxin != idxout) + /* Copy rest of data; + * note we stay in given chunk of allocated memory. + */ + scanptr[idxout] = scanptr[idxin]; + if (scanptr[idxout].Ss > cinfo->lim_Se) + /* Entire scan out of range - skip this entry */ + continue; + if (scanptr[idxout].Se > cinfo->lim_Se) + /* Limit scan to end of block */ + scanptr[idxout].Se = cinfo->lim_Se; + idxout++; + } + + cinfo->num_scans = idxout; +} + #endif /* C_MULTISCAN_FILES_SUPPORTED */ @@ -460,10 +521,13 @@ select_scan_parameters (j_compress_ptr cinfo) cinfo->cur_comp_info[ci] = &cinfo->comp_info[scanptr->component_index[ci]]; } - cinfo->Ss = scanptr->Ss; - cinfo->Se = scanptr->Se; - cinfo->Ah = scanptr->Ah; - cinfo->Al = scanptr->Al; + if (cinfo->progressive_mode) { + cinfo->Ss = scanptr->Ss; + cinfo->Se = scanptr->Se; + cinfo->Ah = scanptr->Ah; + cinfo->Al = scanptr->Al; + return; + } } else #endif @@ -476,11 +540,11 @@ select_scan_parameters (j_compress_ptr cinfo) for (ci = 0; ci < cinfo->num_components; ci++) { cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci]; } - cinfo->Ss = 0; - cinfo->Se = DCTSIZE2-1; - cinfo->Ah = 0; - cinfo->Al = 0; } + cinfo->Ss = 0; + cinfo->Se = cinfo->block_size * cinfo->block_size - 1; + cinfo->Ah = 0; + cinfo->Al = 0; } @@ -528,10 +592,10 @@ per_scan_setup (j_compress_ptr cinfo) /* Overall image size in MCUs */ cinfo->MCUs_per_row = (JDIMENSION) jdiv_round_up((long) cinfo->jpeg_width, - (long) (cinfo->max_h_samp_factor*DCTSIZE)); + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); cinfo->MCU_rows_in_scan = (JDIMENSION) jdiv_round_up((long) cinfo->jpeg_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); cinfo->blocks_in_MCU = 0; @@ -734,11 +798,13 @@ jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only) master->pub.is_last_pass = FALSE; /* Validate parameters, determine derived values */ - initial_setup(cinfo); + initial_setup(cinfo, transcode_only); if (cinfo->scan_info != NULL) { #ifdef C_MULTISCAN_FILES_SUPPORTED validate_script(cinfo); + if (cinfo->block_size < DCTSIZE) + reduce_script(cinfo); #else ERREXIT(cinfo, JERR_NOT_COMPILED); #endif @@ -747,8 +813,10 @@ jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only) cinfo->num_scans = 1; } - if (cinfo->progressive_mode && cinfo->arith_code == 0) /* TEMPORARY HACK ??? */ - cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */ + if ((cinfo->progressive_mode || cinfo->block_size < DCTSIZE) && + !cinfo->arith_code) /* TEMPORARY HACK ??? */ + /* assume default tables no good for progressive or downscale mode */ + cinfo->optimize_coding = TRUE; /* Initialize my private state */ if (transcode_only) { diff --git a/source/Irrlicht/jpeglib/jconfig.cfg b/source/Irrlicht/jpeglib/jconfig.cfg index 2a509ae7..5f57e8eb 100644 --- a/source/Irrlicht/jpeglib/jconfig.cfg +++ b/source/Irrlicht/jpeglib/jconfig.cfg @@ -17,6 +17,14 @@ /* Define this if you get warnings about undefined structures. */ #undef INCOMPLETE_TYPES_BROKEN +/* Define "boolean" as unsigned char, not int, on Windows systems. */ +#ifdef _WIN32 +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ +#endif + #ifdef JPEG_INTERNALS #undef RIGHT_SHIFT_IS_UNSIGNED diff --git a/source/Irrlicht/jpeglib/jconfig.mc6 b/source/Irrlicht/jpeglib/jconfig.mc6 index 894a635f..91c3e2f8 100644 --- a/source/Irrlicht/jpeglib/jconfig.mc6 +++ b/source/Irrlicht/jpeglib/jconfig.mc6 @@ -30,7 +30,7 @@ #define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ /* Note: the above define is known to improve the code with Microsoft C 6.00A. * I do not know whether it is good for later compiler versions. - * Please report any info on this point to jpeg-info@uunet.uu.net. + * Please report any info on this point to jpeg-info@uc.ag. */ #endif /* JPEG_INTERNALS */ diff --git a/source/Irrlicht/jpeglib/jconfig.txt b/source/Irrlicht/jpeglib/jconfig.txt index 253c9fd8..27086a36 100644 --- a/source/Irrlicht/jpeglib/jconfig.txt +++ b/source/Irrlicht/jpeglib/jconfig.txt @@ -91,6 +91,15 @@ */ #undef INCOMPLETE_TYPES_BROKEN +/* Define "boolean" as unsigned char, not int, on Windows systems. + */ +#ifdef _WIN32 +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ +#endif + /* * The following options affect code selection within the JPEG library, diff --git a/source/Irrlicht/jpeglib/jctrans.c b/source/Irrlicht/jpeglib/jctrans.c index e1a97a57..7623790e 100644 --- a/source/Irrlicht/jpeglib/jctrans.c +++ b/source/Irrlicht/jpeglib/jctrans.c @@ -2,6 +2,7 @@ * jctrans.c * * Copyright (C) 1995-1998, Thomas G. Lane. + * Modified 2000-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. * @@ -76,6 +77,10 @@ jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, dstinfo->image_height = srcinfo->image_height; dstinfo->input_components = srcinfo->num_components; dstinfo->in_color_space = srcinfo->jpeg_color_space; + dstinfo->jpeg_width = srcinfo->output_width; + dstinfo->jpeg_height = srcinfo->output_height; + dstinfo->min_DCT_h_scaled_size = srcinfo->min_DCT_h_scaled_size; + dstinfo->min_DCT_v_scaled_size = srcinfo->min_DCT_v_scaled_size; /* Initialize all parameters to default values */ jpeg_set_defaults(dstinfo); /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB. @@ -158,17 +163,13 @@ LOCAL(void) transencode_master_selection (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays) { - /* Although we don't actually use input_components for transcoding, - * jcmaster.c's initial_setup will complain if input_components is 0. - */ - cinfo->input_components = 1; /* Initialize master control (includes parameter checking/processing) */ jinit_c_master_control(cinfo, TRUE /* transcode only */); /* Entropy encoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) { + if (cinfo->arith_code) jinit_arith_encoder(cinfo); - } else { + else { jinit_huff_encoder(cinfo); } diff --git a/source/Irrlicht/jpeglib/jdapimin.c b/source/Irrlicht/jpeglib/jdapimin.c index 1ba7f111..65f8a491 100644 --- a/source/Irrlicht/jpeglib/jdapimin.c +++ b/source/Irrlicht/jpeglib/jdapimin.c @@ -186,8 +186,8 @@ default_decompress_parms (j_decompress_ptr cinfo) } /* Set defaults for other decompression parameters. */ - cinfo->scale_num = DCTSIZE; /* 1:1 scaling */ - cinfo->scale_denom = DCTSIZE; + cinfo->scale_num = cinfo->block_size; /* 1:1 scaling */ + cinfo->scale_denom = cinfo->block_size; cinfo->output_gamma = 1.0; cinfo->buffered_image = FALSE; cinfo->raw_data_out = FALSE; diff --git a/source/Irrlicht/jpeglib/jdarith.c b/source/Irrlicht/jpeglib/jdarith.c index c28604cb..478c37d3 100644 --- a/source/Irrlicht/jpeglib/jdarith.c +++ b/source/Irrlicht/jpeglib/jdarith.c @@ -1,7 +1,7 @@ /* * jdarith.c * - * Developed 1997 by Guido Vollbeding. + * Developed 1997-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. * @@ -37,6 +37,9 @@ typedef struct { /* Pointers to statistics areas (these workspaces have image lifespan) */ unsigned char * dc_stats[NUM_ARITH_TBLS]; unsigned char * ac_stats[NUM_ARITH_TBLS]; + + /* Statistics bin for coding with fixed probability 0.5 */ + unsigned char fixed_bin[4]; } arith_entropy_decoder; typedef arith_entropy_decoder * arith_entropy_ptr; @@ -45,8 +48,6 @@ typedef arith_entropy_decoder * arith_entropy_ptr; * for the statistics area. * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least * 49 statistics bins for DC, and 245 statistics bins for AC coding. - * Note that we use one additional AC bin for codings with fixed - * probability (0.5), thus the minimum number for AC is 246. * * We use a compact representation with 1 byte per statistics bin, * thus the numbers directly represent byte sizes. @@ -104,7 +105,6 @@ get_byte (j_decompress_ptr cinfo) LOCAL(int) arith_decode (j_decompress_ptr cinfo, unsigned char *st) { - extern const INT32 jaritab[]; register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; register unsigned char nl, nm; register INT32 qe, temp; @@ -149,7 +149,7 @@ arith_decode (j_decompress_ptr cinfo, unsigned char *st) * Qe values and probability estimation state machine */ sv = *st; - qe = jaritab[sv & 0x7F]; /* => Qe_Value */ + qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */ nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */ nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */ @@ -197,16 +197,17 @@ process_restart (j_decompress_ptr cinfo) if (! (*cinfo->marker->read_restart_marker) (cinfo)) ERREXIT(cinfo, JERR_CANT_SUSPEND); + /* Re-initialize statistics areas */ for (ci = 0; ci < cinfo->comps_in_scan; ci++) { compptr = cinfo->cur_comp_info[ci]; - /* Re-initialize statistics areas */ - if (cinfo->progressive_mode == 0 || (cinfo->Ss == 0 && cinfo->Ah == 0)) { + if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); /* Reset DC predictions to 0 */ entropy->last_dc_val[ci] = 0; entropy->dc_context[ci] = 0; } - if (cinfo->progressive_mode == 0 || cinfo->Ss) { + if ((! cinfo->progressive_mode && cinfo->lim_Se) || + (cinfo->progressive_mode && cinfo->Ss)) { MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); } } @@ -288,9 +289,9 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) } } /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) (((INT32) 1 << cinfo->arith_dc_L[tbl]) >> 1)) + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) (((INT32) 1 << cinfo->arith_dc_U[tbl]) >> 1)) + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */ else entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */ @@ -324,6 +325,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) unsigned char *st; int tbl, sign, k; int v, m; + const int * natural_order; /* Process restart marker if needed */ if (cinfo->restart_interval) { @@ -334,6 +336,8 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->ct == -1) return TRUE; /* if error do nothing */ + natural_order = cinfo->natural_order; + /* There is always only one block per MCU */ block = MCU_data[0]; tbl = cinfo->cur_comp_info[0]->ac_tbl_no; @@ -354,8 +358,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) } /* Figure F.21: Decoding nonzero value v */ /* Figure F.22: Decoding the sign of v */ - entropy->ac_stats[tbl][245] = 0; - sign = arith_decode(cinfo, entropy->ac_stats[tbl] + 245); + sign = arith_decode(cinfo, entropy->fixed_bin); st += 2; /* Figure F.23: Decoding the magnitude category of v */ if ((m = arith_decode(cinfo, st)) != 0) { @@ -380,7 +383,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) if (arith_decode(cinfo, st)) v |= m; v += 1; if (sign) v = -v; /* Scale and output coefficient in natural (dezigzagged) order */ - (*block)[jpeg_natural_order[k]] = (JCOEF) (v << cinfo->Al); + (*block)[natural_order[k]] = (JCOEF) (v << cinfo->Al); } return TRUE; @@ -395,7 +398,7 @@ METHODDEF(boolean) decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) { arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - unsigned char st[4]; + unsigned char *st; int p1, blkn; /* Process restart marker if needed */ @@ -405,12 +408,12 @@ decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) entropy->restarts_to_go--; } + st = entropy->fixed_bin; /* use fixed probability estimation */ p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ /* Outer loop handles each block in the MCU */ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - st[0] = 0; /* use fixed probability estimation */ /* Encoded data is simply the next bit of the two's-complement DC value */ if (arith_decode(cinfo, st)) MCU_data[blkn][0][0] |= p1; @@ -433,6 +436,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) unsigned char *st; int tbl, k, kex; int p1, m1; + const int * natural_order; /* Process restart marker if needed */ if (cinfo->restart_interval) { @@ -443,6 +447,8 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->ct == -1) return TRUE; /* if error do nothing */ + natural_order = cinfo->natural_order; + /* There is always only one block per MCU */ block = MCU_data[0]; tbl = cinfo->cur_comp_info[0]->ac_tbl_no; @@ -451,15 +457,15 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ /* Establish EOBx (previous stage end-of-block) index */ - for (kex = cinfo->Se + 1; kex > 1; kex--) - if ((*block)[jpeg_natural_order[kex - 1]]) break; + for (kex = cinfo->Se; kex > 0; kex--) + if ((*block)[natural_order[kex]]) break; for (k = cinfo->Ss; k <= cinfo->Se; k++) { st = entropy->ac_stats[tbl] + 3 * (k - 1); - if (k >= kex) + if (k > kex) if (arith_decode(cinfo, st)) break; /* EOB flag */ for (;;) { - thiscoef = *block + jpeg_natural_order[k]; + thiscoef = *block + natural_order[k]; if (*thiscoef) { /* previously nonzero coef */ if (arith_decode(cinfo, st + 2)) { if (*thiscoef < 0) @@ -470,8 +476,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) break; } if (arith_decode(cinfo, st + 1)) { /* newly nonzero coef */ - entropy->ac_stats[tbl][245] = 0; - if (arith_decode(cinfo, entropy->ac_stats[tbl] + 245)) + if (arith_decode(cinfo, entropy->fixed_bin)) *thiscoef = m1; else *thiscoef = p1; @@ -503,6 +508,7 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) unsigned char *st; int blkn, ci, tbl, sign, k; int v, m; + const int * natural_order; /* Process restart marker if needed */ if (cinfo->restart_interval) { @@ -513,6 +519,8 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->ct == -1) return TRUE; /* if error do nothing */ + natural_order = cinfo->natural_order; + /* Outer loop handles each block in the MCU */ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { @@ -548,9 +556,9 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) } } /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) (((INT32) 1 << cinfo->arith_dc_L[tbl]) >> 1)) + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) (((INT32) 1 << cinfo->arith_dc_U[tbl]) >> 1)) + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */ else entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */ @@ -570,12 +578,12 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) tbl = compptr->ac_tbl_no; /* Figure F.20: Decode_AC_coefficients */ - for (k = 1; k < DCTSIZE2; k++) { + for (k = 1; k <= cinfo->lim_Se; k++) { st = entropy->ac_stats[tbl] + 3 * (k - 1); if (arith_decode(cinfo, st)) break; /* EOB flag */ while (arith_decode(cinfo, st + 1) == 0) { st += 3; k++; - if (k >= DCTSIZE2) { + if (k > cinfo->lim_Se) { WARNMS(cinfo, JWRN_ARITH_BAD_CODE); entropy->ct = -1; /* spectral overflow */ return TRUE; @@ -583,8 +591,7 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) } /* Figure F.21: Decoding nonzero value v */ /* Figure F.22: Decoding the sign of v */ - entropy->ac_stats[tbl][245] = 0; - sign = arith_decode(cinfo, entropy->ac_stats[tbl] + 245); + sign = arith_decode(cinfo, entropy->fixed_bin); st += 2; /* Figure F.23: Decoding the magnitude category of v */ if ((m = arith_decode(cinfo, st)) != 0) { @@ -608,7 +615,7 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) while (m >>= 1) if (arith_decode(cinfo, st)) v |= m; v += 1; if (sign) v = -v; - (*block)[jpeg_natural_order[k]] = (JCOEF) v; + (*block)[natural_order[k]] = (JCOEF) v; } } @@ -634,7 +641,7 @@ start_pass (j_decompress_ptr cinfo) goto bad; } else { /* need not check Ss/Se < 0 since they came from unsigned bytes */ - if (cinfo->Se < cinfo->Ss || cinfo->Se >= DCTSIZE2) + if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se) goto bad; /* AC scans may have only one component */ if (cinfo->comps_in_scan != 1) @@ -680,20 +687,19 @@ start_pass (j_decompress_ptr cinfo) } } else { /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. - * This ought to be an error condition, but we make it a warning because - * there are some baseline files out there with all zeroes in these bytes. + * This ought to be an error condition, but we make it a warning. */ - if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 || - cinfo->Ah != 0 || cinfo->Al != 0) + if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 || + (cinfo->Se < DCTSIZE2 && cinfo->Se != cinfo->lim_Se)) WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); /* Select MCU decoding routine */ entropy->pub.decode_mcu = decode_mcu; } + /* Allocate & initialize requested statistics areas */ for (ci = 0; ci < cinfo->comps_in_scan; ci++) { compptr = cinfo->cur_comp_info[ci]; - /* Allocate & initialize requested statistics areas */ - if (cinfo->progressive_mode == 0 || (cinfo->Ss == 0 && cinfo->Ah == 0)) { + if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { tbl = compptr->dc_tbl_no; if (tbl < 0 || tbl >= NUM_ARITH_TBLS) ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); @@ -705,7 +711,8 @@ start_pass (j_decompress_ptr cinfo) entropy->last_dc_val[ci] = 0; entropy->dc_context[ci] = 0; } - if (cinfo->progressive_mode == 0 || cinfo->Ss) { + if ((! cinfo->progressive_mode && cinfo->lim_Se) || + (cinfo->progressive_mode && cinfo->Ss)) { tbl = compptr->ac_tbl_no; if (tbl < 0 || tbl >= NUM_ARITH_TBLS) ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); @@ -748,6 +755,9 @@ jinit_arith_decoder (j_decompress_ptr cinfo) entropy->ac_stats[i] = NULL; } + /* Initialize index for fixed probability estimation */ + entropy->fixed_bin[0] = 113; + if (cinfo->progressive_mode) { /* Create progression status table */ int *coef_bit_ptr, ci; diff --git a/source/Irrlicht/jpeglib/jdatadst.c b/source/Irrlicht/jpeglib/jdatadst.c index 2ece4e95..0e9f14b8 100644 --- a/source/Irrlicht/jpeglib/jdatadst.c +++ b/source/Irrlicht/jpeglib/jdatadst.c @@ -2,13 +2,14 @@ * jdatadst.c * * Copyright (C) 1994-1996, 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 compression data destination routines for the case of - * emitting JPEG data to a file (or any stdio stream). While these routines - * are sufficient for most applications, some will want to use a different - * destination manager. + * emitting JPEG data to memory or to a file (or any stdio stream). + * While these routines are sufficient for most applications, + * some will want to use a different destination manager. * IMPORTANT: we assume that fwrite() will correctly transcribe an array of * JOCTETs into 8-bit-wide elements on external storage. If char is wider * than 8 bits on your machine, you may need to do some tweaking. @@ -19,6 +20,11 @@ #include "jpeglib.h" #include "jerror.h" +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + /* Expanded data destination object for stdio output */ @@ -34,6 +40,21 @@ typedef my_destination_mgr * my_dest_ptr; #define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ +/* Expanded data destination object for memory output */ + +typedef struct { + struct jpeg_destination_mgr pub; /* public fields */ + + unsigned char ** outbuffer; /* target buffer */ + unsigned long * outsize; + unsigned char * newbuffer; /* newly allocated buffer */ + JOCTET * buffer; /* start of buffer */ + size_t bufsize; +} my_mem_destination_mgr; + +typedef my_mem_destination_mgr * my_mem_dest_ptr; + + /* * Initialize destination --- called by jpeg_start_compress * before any data is actually written. @@ -53,6 +74,12 @@ init_destination (j_compress_ptr cinfo) dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; } +METHODDEF(void) +init_mem_destination (j_compress_ptr cinfo) +{ + /* no work necessary here */ +} + /* * Empty the output buffer --- called whenever buffer fills up. @@ -92,6 +119,36 @@ empty_output_buffer (j_compress_ptr cinfo) return TRUE; } +METHODDEF(boolean) +empty_mem_output_buffer (j_compress_ptr cinfo) +{ + size_t nextsize; + JOCTET * nextbuffer; + my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; + + /* Try to allocate new buffer with double size */ + nextsize = dest->bufsize * 2; + nextbuffer = malloc(nextsize); + + if (nextbuffer == NULL) + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10); + + MEMCOPY(nextbuffer, dest->buffer, dest->bufsize); + + if (dest->newbuffer != NULL) + free(dest->newbuffer); + + dest->newbuffer = nextbuffer; + + dest->pub.next_output_byte = nextbuffer + dest->bufsize; + dest->pub.free_in_buffer = dest->bufsize; + + dest->buffer = nextbuffer; + dest->bufsize = nextsize; + + return TRUE; +} + /* * Terminate destination --- called by jpeg_finish_compress @@ -119,6 +176,15 @@ term_destination (j_compress_ptr cinfo) ERREXIT(cinfo, JERR_FILE_WRITE); } +METHODDEF(void) +term_mem_destination (j_compress_ptr cinfo) +{ + my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; + + *dest->outbuffer = dest->buffer; + *dest->outsize = dest->bufsize - dest->pub.free_in_buffer; +} + /* * Prepare for output to a stdio stream. @@ -149,3 +215,53 @@ jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) dest->pub.term_destination = term_destination; dest->outfile = outfile; } + + +/* + * Prepare for output to a memory buffer. + * The caller may supply an own initial buffer with appropriate size. + * Otherwise, or when the actual data output exceeds the given size, + * the library adapts the buffer size as necessary. + * The standard library functions malloc/free are used for allocating + * larger memory, so the buffer is available to the application after + * finishing compression, and then the application is responsible for + * freeing the requested memory. + */ + +GLOBAL(void) +jpeg_mem_dest (j_compress_ptr cinfo, + unsigned char ** outbuffer, unsigned long * outsize) +{ + my_mem_dest_ptr dest; + + if (outbuffer == NULL || outsize == NULL) /* sanity check */ + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same buffer without re-executing jpeg_mem_dest. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_mem_destination_mgr)); + } + + dest = (my_mem_dest_ptr) cinfo->dest; + dest->pub.init_destination = init_mem_destination; + dest->pub.empty_output_buffer = empty_mem_output_buffer; + dest->pub.term_destination = term_mem_destination; + dest->outbuffer = outbuffer; + dest->outsize = outsize; + dest->newbuffer = NULL; + + if (*outbuffer == NULL || *outsize == 0) { + /* Allocate initial buffer */ + dest->newbuffer = *outbuffer = malloc(OUTPUT_BUF_SIZE); + if (dest->newbuffer == NULL) + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10); + *outsize = OUTPUT_BUF_SIZE; + } + + dest->pub.next_output_byte = dest->buffer = *outbuffer; + dest->pub.free_in_buffer = dest->bufsize = *outsize; +} diff --git a/source/Irrlicht/jpeglib/jdatasrc.c b/source/Irrlicht/jpeglib/jdatasrc.c index 29b69832..557fc961 100644 --- a/source/Irrlicht/jpeglib/jdatasrc.c +++ b/source/Irrlicht/jpeglib/jdatasrc.c @@ -2,13 +2,14 @@ * jdatasrc.c * * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2009-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 decompression data source routines for the case of - * reading JPEG data from a file (or any stdio stream). While these routines - * are sufficient for most applications, some will want to use a different - * source manager. + * reading JPEG data from memory or from a file (or any stdio stream). + * While these routines are sufficient for most applications, + * some will want to use a different source manager. * IMPORTANT: we assume that fread() will correctly transcribe an array of * JOCTETs from 8-bit-wide elements on external storage. If char is wider * than 8 bits on your machine, you may need to do some tweaking. @@ -52,6 +53,12 @@ init_source (j_decompress_ptr cinfo) src->start_of_file = TRUE; } +METHODDEF(void) +init_mem_source (j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + /* * Fill the input buffer --- called whenever buffer is emptied. @@ -111,6 +118,26 @@ fill_input_buffer (j_decompress_ptr cinfo) return TRUE; } +METHODDEF(boolean) +fill_mem_input_buffer (j_decompress_ptr cinfo) +{ + static JOCTET mybuffer[4]; + + /* The whole JPEG data is expected to reside in the supplied memory + * buffer, so any request for more data beyond the given buffer size + * is treated as an error. + */ + WARNMS(cinfo, JWRN_JPEG_EOF); + /* Insert a fake EOI marker */ + mybuffer[0] = (JOCTET) 0xFF; + mybuffer[1] = (JOCTET) JPEG_EOI; + + cinfo->src->next_input_byte = mybuffer; + cinfo->src->bytes_in_buffer = 2; + + return TRUE; +} + /* * Skip data --- used to skip over a potentially large amount of @@ -127,22 +154,22 @@ fill_input_buffer (j_decompress_ptr cinfo) METHODDEF(void) skip_input_data (j_decompress_ptr cinfo, long num_bytes) { - my_src_ptr src = (my_src_ptr) cinfo->src; + struct jpeg_source_mgr * src = cinfo->src; /* Just a dumb implementation for now. Could use fseek() except * it doesn't work on pipes. Not clear that being smart is worth * any trouble anyway --- large skips are infrequent. */ if (num_bytes > 0) { - while (num_bytes > (long) src->pub.bytes_in_buffer) { - num_bytes -= (long) src->pub.bytes_in_buffer; - (void) fill_input_buffer(cinfo); + while (num_bytes > (long) src->bytes_in_buffer) { + num_bytes -= (long) src->bytes_in_buffer; + (void) (*src->fill_input_buffer) (cinfo); /* note we assume that fill_input_buffer will never return FALSE, * so suspension need not be handled. */ } - src->pub.next_input_byte += (size_t) num_bytes; - src->pub.bytes_in_buffer -= (size_t) num_bytes; + src->next_input_byte += (size_t) num_bytes; + src->bytes_in_buffer -= (size_t) num_bytes; } } @@ -210,3 +237,38 @@ jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ src->pub.next_input_byte = NULL; /* until buffer loaded */ } + + +/* + * Prepare for input from a supplied memory buffer. + * The buffer must contain the whole JPEG data. + */ + +GLOBAL(void) +jpeg_mem_src (j_decompress_ptr cinfo, + unsigned char * inbuffer, unsigned long insize) +{ + struct jpeg_source_mgr * src; + + if (inbuffer == NULL || insize == 0) /* Treat empty input as fatal error */ + ERREXIT(cinfo, JERR_INPUT_EMPTY); + + /* The source object is made permanent so that a series of JPEG images + * can be read from the same buffer by calling jpeg_mem_src only before + * the first one. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(struct jpeg_source_mgr)); + } + + src = cinfo->src; + src->init_source = init_mem_source; + src->fill_input_buffer = fill_mem_input_buffer; + src->skip_input_data = skip_input_data; + src->resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->term_source = term_source; + src->bytes_in_buffer = (size_t) insize; + src->next_input_byte = (JOCTET *) inbuffer; +} diff --git a/source/Irrlicht/jpeglib/jddctmgr.c b/source/Irrlicht/jpeglib/jddctmgr.c index 07cb06f4..5e4f1dc4 100644 --- a/source/Irrlicht/jpeglib/jddctmgr.c +++ b/source/Irrlicht/jpeglib/jddctmgr.c @@ -2,6 +2,7 @@ * jddctmgr.c * * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2002-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. * @@ -324,6 +325,7 @@ start_pass (j_decompress_ptr cinfo) * coefficients scaled by scalefactor[row]*scalefactor[col], where * scalefactor[0] = 1 * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 1/8. */ FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table; int row, col; @@ -337,7 +339,7 @@ start_pass (j_decompress_ptr cinfo) for (col = 0; col < DCTSIZE; col++) { fmtbl[i] = (FLOAT_MULT_TYPE) ((double) qtbl->quantval[i] * - aanscalefactor[row] * aanscalefactor[col]); + aanscalefactor[row] * aanscalefactor[col] * 0.125); i++; } } diff --git a/source/Irrlicht/jpeglib/jdhuff.c b/source/Irrlicht/jpeglib/jdhuff.c index bad2bc1a..96941179 100644 --- a/source/Irrlicht/jpeglib/jdhuff.c +++ b/source/Irrlicht/jpeglib/jdhuff.c @@ -229,6 +229,7 @@ typedef struct { savable_state saved; /* Other state at start of MCU */ /* These fields are NOT loaded into local working state. */ + boolean insufficient_data; /* set TRUE after emitting warning */ unsigned int restarts_to_go; /* MCUs left in this restart interval */ /* Following two fields used only in progressive mode */ @@ -267,6 +268,51 @@ static const int jpeg_zigzag_order[8][8] = { { 35, 36, 48, 49, 57, 58, 62, 63 } }; +static const int jpeg_zigzag_order7[7][7] = { + { 0, 1, 5, 6, 14, 15, 27 }, + { 2, 4, 7, 13, 16, 26, 28 }, + { 3, 8, 12, 17, 25, 29, 38 }, + { 9, 11, 18, 24, 30, 37, 39 }, + { 10, 19, 23, 31, 36, 40, 45 }, + { 20, 22, 32, 35, 41, 44, 46 }, + { 21, 33, 34, 42, 43, 47, 48 } +}; + +static const int jpeg_zigzag_order6[6][6] = { + { 0, 1, 5, 6, 14, 15 }, + { 2, 4, 7, 13, 16, 25 }, + { 3, 8, 12, 17, 24, 26 }, + { 9, 11, 18, 23, 27, 32 }, + { 10, 19, 22, 28, 31, 33 }, + { 20, 21, 29, 30, 34, 35 } +}; + +static const int jpeg_zigzag_order5[5][5] = { + { 0, 1, 5, 6, 14 }, + { 2, 4, 7, 13, 15 }, + { 3, 8, 12, 16, 21 }, + { 9, 11, 17, 20, 22 }, + { 10, 18, 19, 23, 24 } +}; + +static const int jpeg_zigzag_order4[4][4] = { + { 0, 1, 5, 6 }, + { 2, 4, 7, 12 }, + { 3, 8, 11, 13 }, + { 9, 10, 14, 15 } +}; + +static const int jpeg_zigzag_order3[3][3] = { + { 0, 1, 5 }, + { 2, 4, 6 }, + { 3, 7, 8 } +}; + +static const int jpeg_zigzag_order2[2][2] = { + { 0, 1 }, + { 2, 3 } +}; + /* * Compute the derived values for a Huffman table. @@ -496,9 +542,9 @@ jpeg_fill_bit_buffer (bitread_working_state * state, * We use a nonvolatile flag to ensure that only one warning message * appears per data segment. */ - if (! cinfo->entropy->insufficient_data) { + if (! ((huff_entropy_ptr) cinfo->entropy)->insufficient_data) { WARNMS(cinfo, JWRN_HIT_MARKER); - cinfo->entropy->insufficient_data = TRUE; + ((huff_entropy_ptr) cinfo->entropy)->insufficient_data = TRUE; } /* Fill the buffer with zero bits */ get_buffer <<= MIN_GET_BITS - bits_left; @@ -616,7 +662,7 @@ process_restart (j_decompress_ptr cinfo) * leaving the flag set. */ if (cinfo->unread_marker == 0) - entropy->pub.insufficient_data = FALSE; + entropy->insufficient_data = FALSE; return TRUE; } @@ -668,7 +714,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) /* If we've run out of data, just leave the MCU set to zeroes. * This way, we return uniform gray for the remainder of the segment. */ - if (! entropy->pub.insufficient_data) { + if (! entropy->insufficient_data) { /* Load up working state */ BITREAD_LOAD_STATE(cinfo,entropy->bitstate); @@ -720,10 +766,10 @@ METHODDEF(boolean) decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) { huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int Se = cinfo->Se; - int Al = cinfo->Al; register int s, k, r; unsigned int EOBRUN; + int Se, Al; + const int * natural_order; JBLOCKROW block; BITREAD_STATE_VARS; d_derived_tbl * tbl; @@ -738,7 +784,11 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) /* If we've run out of data, just leave the MCU set to zeroes. * This way, we return uniform gray for the remainder of the segment. */ - if (! entropy->pub.insufficient_data) { + if (! entropy->insufficient_data) { + + Se = cinfo->Se; + Al = cinfo->Al; + natural_order = cinfo->natural_order; /* Load up working state. * We can avoid loading/saving bitread state if in an EOB run. @@ -764,7 +814,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) r = GET_BITS(s); s = HUFF_EXTEND(r, s); /* Scale and output coefficient in natural (dezigzagged) order */ - (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al); + (*block)[natural_order[k]] = (JCOEF) (s << Al); } else { if (r == 15) { /* ZRL */ k += 15; /* skip 15 zeroes in band */ @@ -854,11 +904,10 @@ METHODDEF(boolean) decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) { huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int Se = cinfo->Se; - int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ register int s, k, r; unsigned int EOBRUN; + int Se, p1, m1; + const int * natural_order; JBLOCKROW block; JCOEFPTR thiscoef; BITREAD_STATE_VARS; @@ -875,7 +924,12 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) /* If we've run out of data, don't modify the MCU. */ - if (! entropy->pub.insufficient_data) { + if (! entropy->insufficient_data) { + + Se = cinfo->Se; + p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ + natural_order = cinfo->natural_order; /* Load up working state */ BITREAD_LOAD_STATE(cinfo,entropy->bitstate); @@ -926,7 +980,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) * if the absolute value of the coefficient must be increased. */ do { - thiscoef = *block + jpeg_natural_order[k]; + thiscoef = *block + natural_order[k]; if (*thiscoef != 0) { CHECK_BIT_BUFFER(br_state, 1, goto undoit); if (GET_BITS(1)) { @@ -944,7 +998,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) k++; } while (k <= Se); if (s) { - int pos = jpeg_natural_order[k]; + int pos = natural_order[k]; /* Output newly nonzero coefficient */ (*block)[pos] = (JCOEF) s; /* Remember its position in case we have to suspend */ @@ -960,7 +1014,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) * if the absolute value of the coefficient must be increased. */ for (; k <= Se; k++) { - thiscoef = *block + jpeg_natural_order[k]; + thiscoef = *block + natural_order[k]; if (*thiscoef != 0) { CHECK_BIT_BUFFER(br_state, 1, goto undoit); if (GET_BITS(1)) { @@ -997,7 +1051,136 @@ undoit: /* - * Decode one MCU's worth of Huffman-compressed coefficients. + * Decode one MCU's worth of Huffman-compressed coefficients, + * partial blocks. + */ + +METHODDEF(boolean) +decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + const int * natural_order; + int Se, blkn; + BITREAD_STATE_VARS; + savable_state state; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->insufficient_data) { + + natural_order = cinfo->natural_order; + Se = cinfo->lim_Se; + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + JBLOCKROW block = MCU_data[blkn]; + d_derived_tbl * htbl; + register int s, k, r; + int coef_limit, ci; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + htbl = entropy->dc_cur_tbls[blkn]; + HUFF_DECODE(s, br_state, htbl, return FALSE, label1); + + htbl = entropy->ac_cur_tbls[blkn]; + k = 1; + coef_limit = entropy->coef_limit[blkn]; + if (coef_limit) { + /* Convert DC difference to actual value, update last_dc_val */ + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + ci = cinfo->MCU_membership[blkn]; + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Output the DC coefficient */ + (*block)[0] = (JCOEF) s; + + /* Section F.2.2.2: decode the AC coefficients */ + /* Since zeroes are skipped, output area must be cleared beforehand */ + for (; k < coef_limit; k++) { + HUFF_DECODE(s, br_state, htbl, return FALSE, label2); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Output coefficient in natural (dezigzagged) order. + * Note: the extra entries in natural_order[] will save us + * if k > Se, which could happen if the data is corrupted. + */ + (*block)[natural_order[k]] = (JCOEF) s; + } else { + if (r != 15) + goto EndOfBlock; + k += 15; + } + } + } else { + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } + } + + /* Section F.2.2.2: decode the AC coefficients */ + /* In this path we just discard the values */ + for (; k <= Se; k++) { + HUFF_DECODE(s, br_state, htbl, return FALSE, label3); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } else { + if (r != 15) + break; + k += 15; + } + } + + EndOfBlock: ; + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * Decode one MCU's worth of Huffman-compressed coefficients, + * full-size blocks. */ METHODDEF(boolean) @@ -1018,7 +1201,7 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) /* If we've run out of data, just leave the MCU set to zeroes. * This way, we return uniform gray for the remainder of the segment. */ - if (! entropy->pub.insufficient_data) { + if (! entropy->insufficient_data) { /* Load up working state */ BITREAD_LOAD_STATE(cinfo,entropy->bitstate); @@ -1127,7 +1310,7 @@ METHODDEF(void) start_pass_huff_decoder (j_decompress_ptr cinfo) { huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, blkn, dctbl, actbl, i; + int ci, blkn, tbl, i; jpeg_component_info * compptr; if (cinfo->progressive_mode) { @@ -1137,7 +1320,7 @@ start_pass_huff_decoder (j_decompress_ptr cinfo) goto bad; } else { /* need not check Ss/Se < 0 since they came from unsigned bytes */ - if (cinfo->Se < cinfo->Ss || cinfo->Se >= DCTSIZE2) + if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se) goto bad; /* AC scans may have only one component */ if (cinfo->comps_in_scan != 1) @@ -1196,16 +1379,16 @@ start_pass_huff_decoder (j_decompress_ptr cinfo) */ if (cinfo->Ss == 0) { if (cinfo->Ah == 0) { /* DC refinement needs no table */ - i = compptr->dc_tbl_no; - jpeg_make_d_derived_tbl(cinfo, TRUE, i, - & entropy->derived_tbls[i]); + tbl = compptr->dc_tbl_no; + jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, + & entropy->derived_tbls[tbl]); } } else { - i = compptr->ac_tbl_no; - jpeg_make_d_derived_tbl(cinfo, FALSE, i, - & entropy->derived_tbls[i]); + tbl = compptr->ac_tbl_no; + jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, + & entropy->derived_tbls[tbl]); /* remember the single active table */ - entropy->ac_derived_tbl = entropy->derived_tbls[i]; + entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; } /* Initialize DC predictions to 0 */ entropy->saved.last_dc_val[ci] = 0; @@ -1218,23 +1401,35 @@ start_pass_huff_decoder (j_decompress_ptr cinfo) * This ought to be an error condition, but we make it a warning because * there are some baseline files out there with all zeroes in these bytes. */ - if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 || - cinfo->Ah != 0 || cinfo->Al != 0) + if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 || + ((cinfo->is_baseline || cinfo->Se < DCTSIZE2) && + cinfo->Se != cinfo->lim_Se)) WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); /* Select MCU decoding routine */ - entropy->pub.decode_mcu = decode_mcu; + /* We retain the hard-coded case for full-size blocks. + * This is not necessary, but it appears that this version is slightly + * more performant in the given implementation. + * With an improved implementation we would prefer a single optimized + * function. + */ + if (cinfo->lim_Se != DCTSIZE2-1) + entropy->pub.decode_mcu = decode_mcu_sub; + else + entropy->pub.decode_mcu = decode_mcu; for (ci = 0; ci < cinfo->comps_in_scan; ci++) { compptr = cinfo->cur_comp_info[ci]; - dctbl = compptr->dc_tbl_no; - actbl = compptr->ac_tbl_no; /* Compute derived values for Huffman tables */ /* We may do this more than once for a table, but it's not expensive */ - jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl, - & entropy->dc_derived_tbls[dctbl]); - jpeg_make_d_derived_tbl(cinfo, FALSE, actbl, - & entropy->ac_derived_tbls[actbl]); + tbl = compptr->dc_tbl_no; + jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, + & entropy->dc_derived_tbls[tbl]); + if (cinfo->lim_Se) { /* AC needs no table when not present */ + tbl = compptr->ac_tbl_no; + jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, + & entropy->ac_derived_tbls[tbl]); + } /* Initialize DC predictions to 0 */ entropy->saved.last_dc_val[ci] = 0; } @@ -1249,10 +1444,47 @@ start_pass_huff_decoder (j_decompress_ptr cinfo) /* Decide whether we really care about the coefficient values */ if (compptr->component_needed) { ci = compptr->DCT_v_scaled_size; - if (ci <= 0 || ci > 8) ci = 8; i = compptr->DCT_h_scaled_size; - if (i <= 0 || i > 8) i = 8; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order[ci - 1][i - 1]; + switch (cinfo->lim_Se) { + case (1*1-1): + entropy->coef_limit[blkn] = 1; + break; + case (2*2-1): + if (ci <= 0 || ci > 2) ci = 2; + if (i <= 0 || i > 2) i = 2; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order2[ci - 1][i - 1]; + break; + case (3*3-1): + if (ci <= 0 || ci > 3) ci = 3; + if (i <= 0 || i > 3) i = 3; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order3[ci - 1][i - 1]; + break; + case (4*4-1): + if (ci <= 0 || ci > 4) ci = 4; + if (i <= 0 || i > 4) i = 4; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order4[ci - 1][i - 1]; + break; + case (5*5-1): + if (ci <= 0 || ci > 5) ci = 5; + if (i <= 0 || i > 5) i = 5; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order5[ci - 1][i - 1]; + break; + case (6*6-1): + if (ci <= 0 || ci > 6) ci = 6; + if (i <= 0 || i > 6) i = 6; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order6[ci - 1][i - 1]; + break; + case (7*7-1): + if (ci <= 0 || ci > 7) ci = 7; + if (i <= 0 || i > 7) i = 7; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order7[ci - 1][i - 1]; + break; + default: + if (ci <= 0 || ci > 8) ci = 8; + if (i <= 0 || i > 8) i = 8; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order[ci - 1][i - 1]; + break; + } } else { entropy->coef_limit[blkn] = 0; } @@ -1262,7 +1494,7 @@ start_pass_huff_decoder (j_decompress_ptr cinfo) /* Initialize bitread state variables */ entropy->bitstate.bits_left = 0; entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ - entropy->pub.insufficient_data = FALSE; + entropy->insufficient_data = FALSE; /* Initialize restart counter */ entropy->restarts_to_go = cinfo->restart_interval; diff --git a/source/Irrlicht/jpeglib/jdinput.c b/source/Irrlicht/jpeglib/jdinput.c index 94823dbe..85e7e8f1 100644 --- a/source/Irrlicht/jpeglib/jdinput.c +++ b/source/Irrlicht/jpeglib/jdinput.c @@ -22,7 +22,7 @@ typedef struct { struct jpeg_input_controller pub; /* public fields */ - boolean inheaders; /* TRUE until first SOS is reached */ + int inheaders; /* Nonzero until first SOS is reached */ } my_input_controller; typedef my_input_controller * my_inputctl_ptr; @@ -36,6 +36,174 @@ METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo)); * Routines to calculate various quantities related to the size of the image. */ + +/* + * Compute output image dimensions and related values. + * NOTE: this is exported for possible use by application. + * Hence it mustn't do anything that can't be done twice. + */ + +GLOBAL(void) +jpeg_core_output_dimensions (j_decompress_ptr cinfo) +/* Do computations that are needed before master selection phase. + * This function is used for transcoding and full decompression. + */ +{ +#ifdef IDCT_SCALING_SUPPORTED + int ci; + jpeg_component_info *compptr; + + /* Compute actual output image dimensions and DCT scaling choices. */ + if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom) { + /* Provide 1/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 1; + cinfo->min_DCT_v_scaled_size = 1; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 2) { + /* Provide 2/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 2L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 2L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 2; + cinfo->min_DCT_v_scaled_size = 2; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 3) { + /* Provide 3/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 3L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 3L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 3; + cinfo->min_DCT_v_scaled_size = 3; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 4) { + /* Provide 4/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 4L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 4L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 4; + cinfo->min_DCT_v_scaled_size = 4; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 5) { + /* Provide 5/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 5L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 5L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 5; + cinfo->min_DCT_v_scaled_size = 5; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 6) { + /* Provide 6/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 6L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 6L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 6; + cinfo->min_DCT_v_scaled_size = 6; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 7) { + /* Provide 7/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 7L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 7L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 7; + cinfo->min_DCT_v_scaled_size = 7; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 8) { + /* Provide 8/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 8L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 8L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 8; + cinfo->min_DCT_v_scaled_size = 8; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 9) { + /* Provide 9/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 9L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 9L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 9; + cinfo->min_DCT_v_scaled_size = 9; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 10) { + /* Provide 10/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 10L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 10L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 10; + cinfo->min_DCT_v_scaled_size = 10; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 11) { + /* Provide 11/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 11L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 11L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 11; + cinfo->min_DCT_v_scaled_size = 11; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 12) { + /* Provide 12/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 12L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 12L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 12; + cinfo->min_DCT_v_scaled_size = 12; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 13) { + /* Provide 13/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 13L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 13L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 13; + cinfo->min_DCT_v_scaled_size = 13; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 14) { + /* Provide 14/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 14L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 14L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 14; + cinfo->min_DCT_v_scaled_size = 14; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 15) { + /* Provide 15/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 15L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 15L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 15; + cinfo->min_DCT_v_scaled_size = 15; + } else { + /* Provide 16/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 16L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 16L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 16; + cinfo->min_DCT_v_scaled_size = 16; + } + + /* Recompute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size; + compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size; + } + +#else /* !IDCT_SCALING_SUPPORTED */ + + /* Hardwire it to "no scaling" */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + /* jdinput.c has already initialized DCT_scaled_size, + * and has computed unscaled downsampled_width and downsampled_height. + */ + +#endif /* IDCT_SCALING_SUPPORTED */ +} + + LOCAL(void) initial_setup (j_decompress_ptr cinfo) /* Called once, when first SOS marker is reached */ @@ -71,25 +239,121 @@ initial_setup (j_decompress_ptr cinfo) compptr->v_samp_factor); } - /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE. - * In the full decompressor, this will be overridden by jdmaster.c; - * but in the transcoder, jdmaster.c is not used, so we must do it here. + /* Derive block_size, natural_order, and lim_Se */ + if (cinfo->is_baseline || (cinfo->progressive_mode && + cinfo->comps_in_scan)) { /* no pseudo SOS marker */ + cinfo->block_size = DCTSIZE; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + } else + switch (cinfo->Se) { + case (1*1-1): + cinfo->block_size = 1; + cinfo->natural_order = jpeg_natural_order; /* not needed */ + cinfo->lim_Se = cinfo->Se; + break; + case (2*2-1): + cinfo->block_size = 2; + cinfo->natural_order = jpeg_natural_order2; + cinfo->lim_Se = cinfo->Se; + break; + case (3*3-1): + cinfo->block_size = 3; + cinfo->natural_order = jpeg_natural_order3; + cinfo->lim_Se = cinfo->Se; + break; + case (4*4-1): + cinfo->block_size = 4; + cinfo->natural_order = jpeg_natural_order4; + cinfo->lim_Se = cinfo->Se; + break; + case (5*5-1): + cinfo->block_size = 5; + cinfo->natural_order = jpeg_natural_order5; + cinfo->lim_Se = cinfo->Se; + break; + case (6*6-1): + cinfo->block_size = 6; + cinfo->natural_order = jpeg_natural_order6; + cinfo->lim_Se = cinfo->Se; + break; + case (7*7-1): + cinfo->block_size = 7; + cinfo->natural_order = jpeg_natural_order7; + cinfo->lim_Se = cinfo->Se; + break; + case (8*8-1): + cinfo->block_size = 8; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (9*9-1): + cinfo->block_size = 9; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (10*10-1): + cinfo->block_size = 10; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (11*11-1): + cinfo->block_size = 11; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (12*12-1): + cinfo->block_size = 12; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (13*13-1): + cinfo->block_size = 13; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (14*14-1): + cinfo->block_size = 14; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (15*15-1): + cinfo->block_size = 15; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (16*16-1): + cinfo->block_size = 16; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + default: + ERREXIT4(cinfo, JERR_BAD_PROGRESSION, + cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); + break; + } + + /* We initialize DCT_scaled_size and min_DCT_scaled_size to block_size. + * In the full decompressor, + * this will be overridden by jpeg_calc_output_dimensions in jdmaster.c; + * but in the transcoder, + * jpeg_calc_output_dimensions is not used, so we must do it here. */ - cinfo->min_DCT_h_scaled_size = DCTSIZE; - cinfo->min_DCT_v_scaled_size = DCTSIZE; + cinfo->min_DCT_h_scaled_size = cinfo->block_size; + cinfo->min_DCT_v_scaled_size = cinfo->block_size; /* Compute dimensions of components */ for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; ci++, compptr++) { - compptr->DCT_h_scaled_size = DCTSIZE; - compptr->DCT_v_scaled_size = DCTSIZE; + compptr->DCT_h_scaled_size = cinfo->block_size; + compptr->DCT_v_scaled_size = cinfo->block_size; /* Size in DCT blocks */ compptr->width_in_blocks = (JDIMENSION) jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, - (long) (cinfo->max_h_samp_factor * DCTSIZE)); + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); compptr->height_in_blocks = (JDIMENSION) jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, - (long) (cinfo->max_v_samp_factor * DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); /* downsampled_width and downsampled_height will also be overridden by * jdmaster.c if we are doing full decompression. The transcoder library * doesn't use these values, but the calling application might. @@ -110,7 +374,7 @@ initial_setup (j_decompress_ptr cinfo) /* Compute number of fully interleaved MCU rows. */ cinfo->total_iMCU_rows = (JDIMENSION) jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); /* Decide whether file contains multiple scans */ if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode) @@ -164,10 +428,10 @@ per_scan_setup (j_decompress_ptr cinfo) /* Overall image size in MCUs */ cinfo->MCUs_per_row = (JDIMENSION) jdiv_round_up((long) cinfo->image_width, - (long) (cinfo->max_h_samp_factor*DCTSIZE)); + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); cinfo->MCU_rows_in_scan = (JDIMENSION) jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); cinfo->blocks_in_MCU = 0; @@ -285,6 +549,10 @@ finish_input_pass (j_decompress_ptr cinfo) * The consume_input method pointer points either here or to the * coefficient controller's consume_data routine, depending on whether * we are reading a compressed data segment or inter-segment markers. + * + * Note: This function should NOT return a pseudo SOS marker (with zero + * component number) to the caller. A pseudo marker received by + * read_markers is processed and then skipped for other markers. */ METHODDEF(int) @@ -296,41 +564,50 @@ consume_markers (j_decompress_ptr cinfo) if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ return JPEG_REACHED_EOI; - val = (*cinfo->marker->read_markers) (cinfo); + for (;;) { /* Loop to pass pseudo SOS marker */ + val = (*cinfo->marker->read_markers) (cinfo); - switch (val) { - case JPEG_REACHED_SOS: /* Found SOS */ - if (inputctl->inheaders) { /* 1st SOS */ - initial_setup(cinfo); - inputctl->inheaders = FALSE; - /* Note: start_input_pass must be called by jdmaster.c - * before any more input can be consumed. jdapimin.c is - * responsible for enforcing this sequencing. - */ - } else { /* 2nd or later SOS marker */ - if (! inputctl->pub.has_multiple_scans) - ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ - start_input_pass(cinfo); + switch (val) { + case JPEG_REACHED_SOS: /* Found SOS */ + if (inputctl->inheaders) { /* 1st SOS */ + if (inputctl->inheaders == 1) + initial_setup(cinfo); + if (cinfo->comps_in_scan == 0) { /* pseudo SOS marker */ + inputctl->inheaders = 2; + break; + } + inputctl->inheaders = 0; + /* Note: start_input_pass must be called by jdmaster.c + * before any more input can be consumed. jdapimin.c is + * responsible for enforcing this sequencing. + */ + } else { /* 2nd or later SOS marker */ + if (! inputctl->pub.has_multiple_scans) + ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ + if (cinfo->comps_in_scan == 0) /* unexpected pseudo SOS marker */ + break; + start_input_pass(cinfo); + } + return val; + case JPEG_REACHED_EOI: /* Found EOI */ + inputctl->pub.eoi_reached = TRUE; + if (inputctl->inheaders) { /* Tables-only datastream, apparently */ + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_NO_SOS); + } else { + /* Prevent infinite loop in coef ctlr's decompress_data routine + * if user set output_scan_number larger than number of scans. + */ + if (cinfo->output_scan_number > cinfo->input_scan_number) + cinfo->output_scan_number = cinfo->input_scan_number; + } + return val; + case JPEG_SUSPENDED: + return val; + default: + return val; } - break; - case JPEG_REACHED_EOI: /* Found EOI */ - inputctl->pub.eoi_reached = TRUE; - if (inputctl->inheaders) { /* Tables-only datastream, apparently */ - if (cinfo->marker->saw_SOF) - ERREXIT(cinfo, JERR_SOF_NO_SOS); - } else { - /* Prevent infinite loop in coef ctlr's decompress_data routine - * if user set output_scan_number larger than number of scans. - */ - if (cinfo->output_scan_number > cinfo->input_scan_number) - cinfo->output_scan_number = cinfo->input_scan_number; - } - break; - case JPEG_SUSPENDED: - break; } - - return val; } @@ -346,7 +623,7 @@ reset_input_controller (j_decompress_ptr cinfo) inputctl->pub.consume_input = consume_markers; inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ inputctl->pub.eoi_reached = FALSE; - inputctl->inheaders = TRUE; + inputctl->inheaders = 1; /* Reset other modules */ (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); (*cinfo->marker->reset_marker_reader) (cinfo); @@ -380,5 +657,5 @@ jinit_input_controller (j_decompress_ptr cinfo) */ inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ inputctl->pub.eoi_reached = FALSE; - inputctl->inheaders = TRUE; + inputctl->inheaders = 1; } diff --git a/source/Irrlicht/jpeglib/jdmarker.c b/source/Irrlicht/jpeglib/jdmarker.c index 30182bb0..e0628228 100644 --- a/source/Irrlicht/jpeglib/jdmarker.c +++ b/source/Irrlicht/jpeglib/jdmarker.c @@ -2,6 +2,7 @@ * jdmarker.c * * Copyright (C) 1991-1998, 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. * @@ -234,7 +235,8 @@ get_soi (j_decompress_ptr cinfo) LOCAL(boolean) -get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) +get_sof (j_decompress_ptr cinfo, boolean is_baseline, boolean is_prog, + boolean is_arith) /* Process a SOFn marker */ { INT32 length; @@ -242,6 +244,7 @@ get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) jpeg_component_info * compptr; INPUT_VARS(cinfo); + cinfo->is_baseline = is_baseline; cinfo->progressive_mode = is_prog; cinfo->arith_code = is_arith; @@ -315,7 +318,9 @@ get_sos (j_decompress_ptr cinfo) TRACEMS1(cinfo, 1, JTRC_SOS, n); - if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN) + if (length != (n * 2 + 6) || n > MAX_COMPS_IN_SCAN || + (n == 0 && !cinfo->progressive_mode)) + /* pseudo SOS marker only allowed in progressive mode */ ERREXIT(cinfo, JERR_BAD_LENGTH); cinfo->comps_in_scan = n; @@ -359,8 +364,8 @@ get_sos (j_decompress_ptr cinfo) /* Prepare to scan data & restart markers */ cinfo->marker->next_restart_num = 0; - /* Count another SOS marker */ - cinfo->input_scan_number++; + /* Count another (non-pseudo) SOS marker */ + if (n) cinfo->input_scan_number++; INPUT_SYNC(cinfo); return TRUE; @@ -490,16 +495,18 @@ LOCAL(boolean) get_dqt (j_decompress_ptr cinfo) /* Process a DQT marker */ { - INT32 length; - int n, i, prec; + INT32 length, count, i; + int n, prec; unsigned int tmp; JQUANT_TBL *quant_ptr; + const int *natural_order; INPUT_VARS(cinfo); INPUT_2BYTES(cinfo, length, return FALSE); length -= 2; while (length > 0) { + length--; INPUT_BYTE(cinfo, n, return FALSE); prec = n >> 4; n &= 0x0F; @@ -513,13 +520,43 @@ get_dqt (j_decompress_ptr cinfo) cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo); quant_ptr = cinfo->quant_tbl_ptrs[n]; - for (i = 0; i < DCTSIZE2; i++) { + if (prec) { + if (length < DCTSIZE2 * 2) { + /* Initialize full table for safety. */ + for (i = 0; i < DCTSIZE2; i++) { + quant_ptr->quantval[i] = 1; + } + count = length >> 1; + } else + count = DCTSIZE2; + } else { + if (length < DCTSIZE2) { + /* Initialize full table for safety. */ + for (i = 0; i < DCTSIZE2; i++) { + quant_ptr->quantval[i] = 1; + } + count = length; + } else + count = DCTSIZE2; + } + + switch (count) { + case (2*2): natural_order = jpeg_natural_order2; break; + case (3*3): natural_order = jpeg_natural_order3; break; + case (4*4): natural_order = jpeg_natural_order4; break; + case (5*5): natural_order = jpeg_natural_order5; break; + case (6*6): natural_order = jpeg_natural_order6; break; + case (7*7): natural_order = jpeg_natural_order7; break; + default: natural_order = jpeg_natural_order; break; + } + + for (i = 0; i < count; i++) { if (prec) INPUT_2BYTES(cinfo, tmp, return FALSE); else INPUT_BYTE(cinfo, tmp, return FALSE); /* We convert the zigzag-order table to natural array order. */ - quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp; + quant_ptr->quantval[natural_order[i]] = (UINT16) tmp; } if (cinfo->err->trace_level >= 2) { @@ -532,8 +569,8 @@ get_dqt (j_decompress_ptr cinfo) } } - length -= DCTSIZE2+1; - if (prec) length -= DCTSIZE2; + length -= count; + if (prec) length -= count; } if (length != 0) @@ -946,6 +983,11 @@ first_marker (j_decompress_ptr cinfo) * * Returns same codes as are defined for jpeg_consume_input: * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + * + * Note: This function may return a pseudo SOS marker (with zero + * component number) for treat by input controller's consume_input. + * consume_input itself should filter out (skip) the pseudo marker + * after processing for the caller. */ METHODDEF(int) @@ -975,23 +1017,27 @@ read_markers (j_decompress_ptr cinfo) break; case M_SOF0: /* Baseline */ + if (! get_sof(cinfo, TRUE, FALSE, FALSE)) + return JPEG_SUSPENDED; + break; + case M_SOF1: /* Extended sequential, Huffman */ - if (! get_sof(cinfo, FALSE, FALSE)) + if (! get_sof(cinfo, FALSE, FALSE, FALSE)) return JPEG_SUSPENDED; break; case M_SOF2: /* Progressive, Huffman */ - if (! get_sof(cinfo, TRUE, FALSE)) + if (! get_sof(cinfo, FALSE, TRUE, FALSE)) return JPEG_SUSPENDED; break; case M_SOF9: /* Extended sequential, arithmetic */ - if (! get_sof(cinfo, FALSE, TRUE)) + if (! get_sof(cinfo, FALSE, FALSE, TRUE)) return JPEG_SUSPENDED; break; case M_SOF10: /* Progressive, arithmetic */ - if (! get_sof(cinfo, TRUE, TRUE)) + if (! get_sof(cinfo, FALSE, TRUE, TRUE)) return JPEG_SUSPENDED; break; diff --git a/source/Irrlicht/jpeglib/jdmaster.c b/source/Irrlicht/jpeglib/jdmaster.c index ff82ae05..01feb058 100644 --- a/source/Irrlicht/jpeglib/jdmaster.c +++ b/source/Irrlicht/jpeglib/jdmaster.c @@ -2,7 +2,7 @@ * jdmaster.c * * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2002-2008 by Guido Vollbeding. + * Modified 2002-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. * @@ -86,7 +86,9 @@ use_merged_upsample (j_decompress_ptr cinfo) GLOBAL(void) jpeg_calc_output_dimensions (j_decompress_ptr cinfo) -/* Do computations that are needed before master selection phase */ +/* Do computations that are needed before master selection phase. + * This function is used for full decompression. + */ { #ifdef IDCT_SCALING_SUPPORTED int ci; @@ -97,134 +99,11 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo) if (cinfo->global_state != DSTATE_READY) ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Compute core output image dimensions and DCT scaling choices. */ + jpeg_core_output_dimensions(cinfo); + #ifdef IDCT_SCALING_SUPPORTED - /* Compute actual output image dimensions and DCT scaling choices. */ - if (cinfo->scale_num * 8 <= cinfo->scale_denom) { - /* Provide 1/8 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 8L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 8L); - cinfo->min_DCT_h_scaled_size = 1; - cinfo->min_DCT_v_scaled_size = 1; - } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) { - /* Provide 1/4 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 4L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 4L); - cinfo->min_DCT_h_scaled_size = 2; - cinfo->min_DCT_v_scaled_size = 2; - } else if (cinfo->scale_num * 8 <= cinfo->scale_denom * 3) { - /* Provide 3/8 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 3L, 8L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 3L, 8L); - cinfo->min_DCT_h_scaled_size = 3; - cinfo->min_DCT_v_scaled_size = 3; - } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) { - /* Provide 1/2 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 2L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 2L); - cinfo->min_DCT_h_scaled_size = 4; - cinfo->min_DCT_v_scaled_size = 4; - } else if (cinfo->scale_num * 8 <= cinfo->scale_denom * 5) { - /* Provide 5/8 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 5L, 8L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 5L, 8L); - cinfo->min_DCT_h_scaled_size = 5; - cinfo->min_DCT_v_scaled_size = 5; - } else if (cinfo->scale_num * 4 <= cinfo->scale_denom * 3) { - /* Provide 3/4 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 3L, 4L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 3L, 4L); - cinfo->min_DCT_h_scaled_size = 6; - cinfo->min_DCT_v_scaled_size = 6; - } else if (cinfo->scale_num * 8 <= cinfo->scale_denom * 7) { - /* Provide 7/8 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 7L, 8L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 7L, 8L); - cinfo->min_DCT_h_scaled_size = 7; - cinfo->min_DCT_v_scaled_size = 7; - } else if (cinfo->scale_num <= cinfo->scale_denom) { - /* Provide 1/1 scaling */ - cinfo->output_width = cinfo->image_width; - cinfo->output_height = cinfo->image_height; - cinfo->min_DCT_h_scaled_size = DCTSIZE; - cinfo->min_DCT_v_scaled_size = DCTSIZE; - } else if (cinfo->scale_num * 8 <= cinfo->scale_denom * 9) { - /* Provide 9/8 scaling */ - cinfo->output_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 8L); - cinfo->output_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 8L); - cinfo->min_DCT_h_scaled_size = 9; - cinfo->min_DCT_v_scaled_size = 9; - } else if (cinfo->scale_num * 4 <= cinfo->scale_denom * 5) { - /* Provide 5/4 scaling */ - cinfo->output_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 4L); - cinfo->output_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 4L); - cinfo->min_DCT_h_scaled_size = 10; - cinfo->min_DCT_v_scaled_size = 10; - } else if (cinfo->scale_num * 8 <= cinfo->scale_denom * 11) { - /* Provide 11/8 scaling */ - cinfo->output_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 3L, 8L); - cinfo->output_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 3L, 8L); - cinfo->min_DCT_h_scaled_size = 11; - cinfo->min_DCT_v_scaled_size = 11; - } else if (cinfo->scale_num * 2 <= cinfo->scale_denom * 3) { - /* Provide 3/2 scaling */ - cinfo->output_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 2L); - cinfo->output_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 2L); - cinfo->min_DCT_h_scaled_size = 12; - cinfo->min_DCT_v_scaled_size = 12; - } else if (cinfo->scale_num * 8 <= cinfo->scale_denom * 13) { - /* Provide 13/8 scaling */ - cinfo->output_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 5L, 8L); - cinfo->output_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 5L, 8L); - cinfo->min_DCT_h_scaled_size = 13; - cinfo->min_DCT_v_scaled_size = 13; - } else if (cinfo->scale_num * 4 <= cinfo->scale_denom * 7) { - /* Provide 7/4 scaling */ - cinfo->output_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 3L, 4L); - cinfo->output_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 3L, 4L); - cinfo->min_DCT_h_scaled_size = 14; - cinfo->min_DCT_v_scaled_size = 14; - } else if (cinfo->scale_num * 8 <= cinfo->scale_denom * 15) { - /* Provide 15/8 scaling */ - cinfo->output_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 7L, 8L); - cinfo->output_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 7L, 8L); - cinfo->min_DCT_h_scaled_size = 15; - cinfo->min_DCT_v_scaled_size = 15; - } else { - /* Provide 2/1 scaling */ - cinfo->output_width = cinfo->image_width << 1; - cinfo->output_height = cinfo->image_height << 1; - cinfo->min_DCT_h_scaled_size = 16; - cinfo->min_DCT_v_scaled_size = 16; - } /* In selecting the actual DCT scaling for each component, we try to * scale up the chroma components via IDCT scaling rather than upsampling. * This saves time if the upsampler gets to use 1:1 scaling. @@ -263,22 +142,13 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo) compptr->downsampled_width = (JDIMENSION) jdiv_round_up((long) cinfo->image_width * (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size), - (long) (cinfo->max_h_samp_factor * DCTSIZE)); + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); compptr->downsampled_height = (JDIMENSION) jdiv_round_up((long) cinfo->image_height * (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size), - (long) (cinfo->max_v_samp_factor * DCTSIZE)); + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); } -#else /* !IDCT_SCALING_SUPPORTED */ - - /* Hardwire it to "no scaling" */ - cinfo->output_width = cinfo->image_width; - cinfo->output_height = cinfo->image_height; - /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE, - * and has computed unscaled downsampled_width and downsampled_height. - */ - #endif /* IDCT_SCALING_SUPPORTED */ /* Report number of components in selected colorspace. */ @@ -485,9 +355,9 @@ master_selection (j_decompress_ptr cinfo) /* Inverse DCT */ jinit_inverse_dct(cinfo); /* Entropy decoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) { + if (cinfo->arith_code) jinit_arith_decoder(cinfo); - } else { + else { jinit_huff_decoder(cinfo); } diff --git a/source/Irrlicht/jpeglib/jdtrans.c b/source/Irrlicht/jpeglib/jdtrans.c index 5e42c5bb..a51d69de 100644 --- a/source/Irrlicht/jpeglib/jdtrans.c +++ b/source/Irrlicht/jpeglib/jdtrans.c @@ -2,6 +2,7 @@ * jdtrans.c * * Copyright (C) 1995-1997, Thomas G. Lane. + * Modified 2000-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. * @@ -99,6 +100,9 @@ transdecode_master_selection (j_decompress_ptr cinfo) /* This is effectively a buffered-image operation. */ cinfo->buffered_image = TRUE; + /* Compute output image dimensions and related values. */ + jpeg_core_output_dimensions(cinfo); + /* Entropy decoding: either Huffman or arithmetic coding. */ if (cinfo->arith_code) jinit_arith_decoder(cinfo); diff --git a/source/Irrlicht/jpeglib/jidctflt.c b/source/Irrlicht/jpeglib/jidctflt.c index 5fea54c2..f399600c 100644 --- a/source/Irrlicht/jpeglib/jidctflt.c +++ b/source/Irrlicht/jpeglib/jidctflt.c @@ -2,6 +2,7 @@ * jidctflt.c * * Copyright (C) 1994-1998, Thomas G. Lane. + * Modified 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. * @@ -76,10 +77,9 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, FLOAT_MULT_TYPE * quantptr; FAST_FLOAT * wsptr; JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); + JSAMPLE *range_limit = cinfo->sample_range_limit; int ctr; FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */ - SHIFT_TEMPS /* Pass 1: process columns from input, store into work array. */ @@ -152,12 +152,12 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ - tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ - tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */ + tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */ tmp6 = tmp12 - tmp7; /* phase 2 */ tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; + tmp4 = tmp10 - tmp5; wsptr[DCTSIZE*0] = tmp0 + tmp7; wsptr[DCTSIZE*7] = tmp0 - tmp7; @@ -165,8 +165,8 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, wsptr[DCTSIZE*6] = tmp1 - tmp6; wsptr[DCTSIZE*2] = tmp2 + tmp5; wsptr[DCTSIZE*5] = tmp2 - tmp5; - wsptr[DCTSIZE*4] = tmp3 + tmp4; - wsptr[DCTSIZE*3] = tmp3 - tmp4; + wsptr[DCTSIZE*3] = tmp3 + tmp4; + wsptr[DCTSIZE*4] = tmp3 - tmp4; inptr++; /* advance pointers to next column */ quantptr++; @@ -174,7 +174,6 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, } /* Pass 2: process rows from work array, store into output array. */ - /* Note that we must descale the results by a factor of 8 == 2**3. */ wsptr = workspace; for (ctr = 0; ctr < DCTSIZE; ctr++) { @@ -187,8 +186,10 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, /* Even part */ - tmp10 = wsptr[0] + wsptr[4]; - tmp11 = wsptr[0] - wsptr[4]; + /* Apply signed->unsigned and prepare float->int conversion */ + z5 = wsptr[0] + ((FAST_FLOAT) CENTERJSAMPLE + (FAST_FLOAT) 0.5); + tmp10 = z5 + wsptr[4]; + tmp11 = z5 - wsptr[4]; tmp13 = wsptr[2] + wsptr[6]; tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13; @@ -209,31 +210,23 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ - tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ - tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */ + tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */ tmp6 = tmp12 - tmp7; tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; + tmp4 = tmp10 - tmp5; - /* Final output stage: scale down by a factor of 8 and range-limit */ + /* Final output stage: float->int conversion and range-limit */ - outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3) - & RANGE_MASK]; + outptr[0] = range_limit[((int) (tmp0 + tmp7)) & RANGE_MASK]; + outptr[7] = range_limit[((int) (tmp0 - tmp7)) & RANGE_MASK]; + outptr[1] = range_limit[((int) (tmp1 + tmp6)) & RANGE_MASK]; + outptr[6] = range_limit[((int) (tmp1 - tmp6)) & RANGE_MASK]; + outptr[2] = range_limit[((int) (tmp2 + tmp5)) & RANGE_MASK]; + outptr[5] = range_limit[((int) (tmp2 - tmp5)) & RANGE_MASK]; + outptr[3] = range_limit[((int) (tmp3 + tmp4)) & RANGE_MASK]; + outptr[4] = range_limit[((int) (tmp3 - tmp4)) & RANGE_MASK]; wsptr += DCTSIZE; /* advance pointer to next row */ } diff --git a/source/Irrlicht/jpeglib/jmorecfg.h b/source/Irrlicht/jpeglib/jmorecfg.h index c796a58f..3a741dbf 100644 --- a/source/Irrlicht/jpeglib/jmorecfg.h +++ b/source/Irrlicht/jpeglib/jmorecfg.h @@ -160,11 +160,13 @@ typedef short INT16; #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ +#ifndef _BASETSD_H /* MinGW is slightly different */ #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ typedef int INT32; #endif #endif #endif +#endif /* Datatype used for image dimensions. The JPEG standard only supports * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore diff --git a/source/Irrlicht/jpeglib/jpegint.h b/source/Irrlicht/jpeglib/jpegint.h index 23454d6c..d891b90a 100644 --- a/source/Irrlicht/jpeglib/jpegint.h +++ b/source/Irrlicht/jpeglib/jpegint.h @@ -213,10 +213,6 @@ struct jpeg_entropy_decoder { JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)); - - /* This is here to share code between baseline and progressive decoders; */ - /* other modules probably should not use it */ - boolean insufficient_data; /* set TRUE after emitting warning */ }; /* Inverse DCT (also performs dequantization) */ @@ -330,6 +326,13 @@ struct jpeg_color_quantizer { #define jzero_far jZeroFar #define jpeg_zigzag_order jZIGTable #define jpeg_natural_order jZAGTable +#define jpeg_natural_order7 jZAGTable7 +#define jpeg_natural_order6 jZAGTable6 +#define jpeg_natural_order5 jZAGTable5 +#define jpeg_natural_order4 jZAGTable4 +#define jpeg_natural_order3 jZAGTable3 +#define jpeg_natural_order2 jZAGTable2 +#define jpeg_aritab jAriTab #endif /* NEED_SHORT_EXTERNAL_NAMES */ @@ -384,6 +387,15 @@ EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ #endif extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ +extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */ +extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */ +extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */ +extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */ +extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */ +extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */ + +/* Arithmetic coding probability estimation tables in jaricom.c */ +extern const INT32 jpeg_aritab[]; /* Suppress undefined-structure complaints if necessary. */ diff --git a/source/Irrlicht/jpeglib/jpeglib.h b/source/Irrlicht/jpeglib/jpeglib.h index 0b328722..2b30fbd7 100644 --- a/source/Irrlicht/jpeglib/jpeglib.h +++ b/source/Irrlicht/jpeglib/jpeglib.h @@ -34,10 +34,10 @@ extern "C" { #endif /* Version ID for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 70". + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 80". */ -#define JPEG_LIB_VERSION 70 /* Version 7.0 */ +#define JPEG_LIB_VERSION 80 /* Version 8.0 */ /* Various constants determining the sizes of things. @@ -171,7 +171,7 @@ typedef struct { int MCU_width; /* number of blocks per MCU, horizontally */ int MCU_height; /* number of blocks per MCU, vertically */ int MCU_blocks; /* MCU_width * MCU_height */ - int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ + int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */ int last_col_width; /* # of non-dummy blocks across in last MCU */ int last_row_height; /* # of non-dummy blocks down in last MCU */ @@ -414,6 +414,10 @@ struct jpeg_compress_struct { int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + int block_size; /* the basic DCT block size: 1..16 */ + const int * natural_order; /* natural-order position array */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) */ + /* * Links to compression subobjects (methods and private variables of modules) */ @@ -560,6 +564,7 @@ struct jpeg_decompress_struct { jpeg_component_info * comp_info; /* comp_info[i] describes component that appears i'th in SOF */ + boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ @@ -633,6 +638,12 @@ struct jpeg_decompress_struct { int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + /* These fields are derived from Se of first SOS marker. + */ + int block_size; /* the basic DCT block size: 1..16 */ + const int * natural_order; /* natural-order position array for entropy decode */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ + /* This field is shared between entropy decoder and marker parser. * It is either zero or the code of a JPEG marker that has been * read from the data source, but has not yet been processed. @@ -862,6 +873,8 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); #define jpeg_destroy_decompress jDestDecompress #define jpeg_stdio_dest jStdDest #define jpeg_stdio_src jStdSrc +#define jpeg_mem_dest jMemDest +#define jpeg_mem_src jMemSrc #define jpeg_set_defaults jSetDefaults #define jpeg_set_colorspace jSetColorspace #define jpeg_default_colorspace jDefColorspace @@ -894,6 +907,7 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); #define jpeg_input_complete jInComplete #define jpeg_new_colormap jNewCMap #define jpeg_consume_input jConsumeInput +#define jpeg_core_output_dimensions jCoreDimensions #define jpeg_calc_output_dimensions jCalcDimensions #define jpeg_save_markers jSaveMarkers #define jpeg_set_marker_processor jSetMarker @@ -938,6 +952,14 @@ EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); +/* Data source and destination managers: memory buffers. */ +EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo, + unsigned char ** outbuffer, + unsigned long * outsize)); +EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, + unsigned char * inbuffer, + unsigned long insize)); + /* Default parameter setup for compression */ EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); /* Compression parameter setup aids */ @@ -1032,6 +1054,7 @@ EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); #define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ /* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo)); EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); /* Control saving of COM and APPn markers into marker_list. */ diff --git a/source/Irrlicht/jpeglib/jpegtran.1 b/source/Irrlicht/jpeglib/jpegtran.1 index 737423cf..c3770534 100644 --- a/source/Irrlicht/jpeglib/jpegtran.1 +++ b/source/Irrlicht/jpeglib/jpegtran.1 @@ -1,4 +1,4 @@ -.TH JPEGTRAN 1 "28 March 2009" +.TH JPEGTRAN 1 "28 December 2009" .SH NAME jpegtran \- lossless transformation of JPEG files .SH SYNOPSIS @@ -165,7 +165,7 @@ The image can be losslessly cropped by giving the switch: .B \-crop WxH+X+Y Crop to a rectangular subarea of width W, height H starting at point X,Y. .PP -Another not-strictly-lossless transformation switch is: +Other not-strictly-lossless transformation switches are: .TP .B \-grayscale Force grayscale output. @@ -178,6 +178,19 @@ is particularly handy for fixing a monochrome picture that was mistakenly encoded as a color JPEG. (In such a case, the space savings from getting rid of the near-empty chroma channels won't be large; but the decoding time for a grayscale JPEG is substantially less than that for a color JPEG.) +.TP +.BI \-scale " M/N" +Scale the output image by a factor M/N. +.IP +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. +.B 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. .PP .B jpegtran also recognizes these switches that control what to do with "extra" markers, diff --git a/source/Irrlicht/jpeglib/jpegtran.c b/source/Irrlicht/jpeglib/jpegtran.c index 7004c4e4..3798e0f5 100644 --- a/source/Irrlicht/jpeglib/jpegtran.c +++ b/source/Irrlicht/jpeglib/jpegtran.c @@ -1,14 +1,14 @@ /* * jpegtran.c * - * Copyright (C) 1995-2001, Thomas G. Lane. + * Copyright (C) 1995-2010, Thomas G. Lane, 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 JPEG transcoding. - * It is very similar to cjpeg.c, but provides lossless transcoding between - * different JPEG file formats. It also provides some lossless and sort-of- - * lossless transformations of JPEG data. + * It is very similar to cjpeg.c, and partly to djpeg.c, but provides + * lossless transcoding between different JPEG file formats. It also + * provides some lossless and sort-of-lossless transformations of JPEG data. */ #include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ @@ -37,6 +37,7 @@ static const char * progname; /* program name for error messages */ static char * outfilename; /* for -outfile switch */ +static char * scaleoption; /* -scale switch */ static JCOPY_OPTION copyoption; /* -copy switch */ static jpeg_transform_info transformoption; /* image transformation options */ @@ -62,17 +63,20 @@ usage (void) #ifdef C_PROGRESSIVE_SUPPORTED fprintf(stderr, " -progressive Create progressive JPEG file\n"); #endif -#if TRANSFORMS_SUPPORTED fprintf(stderr, "Switches for modifying the image:\n"); +#if TRANSFORMS_SUPPORTED fprintf(stderr, " -crop WxH+X+Y Crop to a rectangular subarea\n"); fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n"); fprintf(stderr, " -perfect Fail if there is non-transformable edge blocks\n"); fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n"); +#endif + fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); +#if TRANSFORMS_SUPPORTED fprintf(stderr, " -transpose Transpose image\n"); fprintf(stderr, " -transverse Transverse transpose image\n"); fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); -#endif /* TRANSFORMS_SUPPORTED */ +#endif fprintf(stderr, "Switches for advanced users:\n"); fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); @@ -132,10 +136,11 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, /* Set up default JPEG parameters. */ simple_progressive = FALSE; outfilename = NULL; + scaleoption = NULL; copyoption = JCOPYOPT_DEFAULT; transformoption.transform = JXFORM_NONE; - transformoption.trim = FALSE; transformoption.perfect = FALSE; + transformoption.trim = FALSE; transformoption.force_grayscale = FALSE; transformoption.crop = FALSE; cinfo->err->trace_level = 0; @@ -299,6 +304,13 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, else usage(); + } else if (keymatch(arg, "scale", 4)) { + /* Scale the output image by a fraction M/N. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + scaleoption = argv[argn]; + /* We must postpone processing until decompression startup. */ + } else if (keymatch(arg, "scans", 1)) { /* Set scan script. */ #ifdef C_MULTISCAN_FILES_SUPPORTED @@ -453,20 +465,22 @@ main (int argc, char **argv) /* Read file header */ (void) jpeg_read_header(&srcinfo, TRUE); + /* Adjust default decompression parameters */ + if (scaleoption != NULL) + if (sscanf(scaleoption, "%d/%d", + &srcinfo.scale_num, &srcinfo.scale_denom) < 1) + usage(); + /* Any space needed by a transform option must be requested before * jpeg_read_coefficients so that memory allocation will be done right. */ #if TRANSFORMS_SUPPORTED - /* Fails right away if -perfect is given and transformation is not perfect. + /* Fail right away if -perfect is given and transformation is not perfect. */ - if (transformoption.perfect && - !jtransform_perfect_transform(srcinfo.image_width, srcinfo.image_height, - srcinfo.max_h_samp_factor * DCTSIZE, srcinfo.max_v_samp_factor * DCTSIZE, - transformoption.transform)) { + if (!jtransform_request_workspace(&srcinfo, &transformoption)) { fprintf(stderr, "%s: transformation is not perfect\n", progname); exit(EXIT_FAILURE); } - jtransform_request_workspace(&srcinfo, &transformoption); #endif /* Read source file as DCT coefficients */ diff --git a/source/Irrlicht/jpeglib/jutils.c b/source/Irrlicht/jpeglib/jutils.c index 286cda20..62d103a2 100644 --- a/source/Irrlicht/jpeglib/jutils.c +++ b/source/Irrlicht/jpeglib/jutils.c @@ -2,6 +2,7 @@ * jutils.c * * Copyright (C) 1991-1996, 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. * @@ -63,6 +64,57 @@ const int jpeg_natural_order[DCTSIZE2+16] = { 63, 63, 63, 63, 63, 63, 63, 63 }; +const int jpeg_natural_order7[7*7+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 14, 21, 28, 35, + 42, 49, 50, 43, 36, 29, 22, 30, + 37, 44, 51, 52, 45, 38, 46, 53, + 54, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order6[6*6+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 41, 34, 27, + 20, 13, 21, 28, 35, 42, 43, 36, + 29, 37, 44, 45, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order5[5*5+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 12, + 19, 26, 33, 34, 27, 20, 28, 35, + 36, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order4[4*4+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 25, 18, 11, 19, 26, 27, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order3[3*3+16] = { + 0, 1, 8, 16, 9, 2, 10, 17, + 18, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order2[2*2+16] = { + 0, 1, 8, 9, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + /* * Arithmetic utilities diff --git a/source/Irrlicht/jpeglib/jversion.h b/source/Irrlicht/jpeglib/jversion.h index 3a7789f2..daf9db24 100644 --- a/source/Irrlicht/jpeglib/jversion.h +++ b/source/Irrlicht/jpeglib/jversion.h @@ -1,7 +1,7 @@ /* * jversion.h * - * Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. + * Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -9,6 +9,6 @@ */ -#define JVERSION "7 27-Jun-2009" +#define JVERSION "8b 16-May-2010" -#define JCOPYRIGHT "Copyright (C) 2009, Thomas G. Lane, Guido Vollbeding" +#define JCOPYRIGHT "Copyright (C) 2010, Thomas G. Lane, Guido Vollbeding" diff --git a/source/Irrlicht/jpeglib/libjpeg.map b/source/Irrlicht/jpeglib/libjpeg.map index 4c17a060..5f1ea76b 100644 --- a/source/Irrlicht/jpeglib/libjpeg.map +++ b/source/Irrlicht/jpeglib/libjpeg.map @@ -1,4 +1,4 @@ -LIBJPEG_7.0 { +LIBJPEG_8.0 { global: *; }; diff --git a/source/Irrlicht/jpeglib/libjpeg.txt b/source/Irrlicht/jpeglib/libjpeg.txt index e9059c40..b5c930ff 100644 --- a/source/Irrlicht/jpeglib/libjpeg.txt +++ b/source/Irrlicht/jpeglib/libjpeg.txt @@ -1123,16 +1123,17 @@ J_COLOR_SPACE out_color_space unsigned int scale_num, scale_denom Scale the image by the fraction scale_num/scale_denom. Currently, - the supported scaling ratios are N/8 with all N from 1 to 16. (The - library design allows for arbitrary scaling ratios but this is not - likely to be implemented any time soon.) The values are initialized - by jpeg_read_header() with the source DCT size, which is currently - 8/8. If you change only the scale_num value while leaving the other - unchanged, then this specifies the DCT scaled size to be applied on - the given input, which is currently equivalent to N/8 scaling, since - the source DCT size is currently always 8. Smaller scaling ratios - permit significantly faster decoding since fewer pixels need be - processed and a simpler IDCT method can be used. + the supported scaling ratios are M/N with all M from 1 to 16, where + N is the source DCT size, which is 8 for baseline JPEG. (The library + design allows for arbitrary scaling ratios but this is not likely + to be implemented any time soon.) The values are initialized by + jpeg_read_header() with the source DCT size. For baseline JPEG + this is 8/8. If you change only the scale_num value while leaving + the other unchanged, then this 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. + Smaller scaling ratios permit significantly faster decoding since + fewer pixels need be processed and a simpler IDCT method can be used. boolean quantize_colors If set TRUE, colormapped output will be delivered. Default is FALSE, @@ -1432,21 +1433,22 @@ Compressed data handling (source and destination managers) The JPEG compression library sends its compressed data to a "destination manager" module. The default destination manager just writes the data to a -stdio stream, but you can provide your own manager to do something else. -Similarly, the decompression library calls a "source manager" to obtain the -compressed data; you can provide your own source manager if you want the data -to come from somewhere other than a stdio stream. +memory buffer or to a stdio stream, but you can provide your own manager to +do something else. Similarly, the decompression library calls a "source +manager" to obtain the compressed data; you can provide your own source +manager if you want the data to come from somewhere other than a memory +buffer or a stdio stream. In both cases, compressed data is processed a bufferload at a time: the destination or source manager provides a work buffer, and the library invokes the manager only when the buffer is filled or emptied. (You could define a one-character buffer to force the manager to be invoked for each byte, but that would be rather inefficient.) The buffer's size and location are -controlled by the manager, not by the library. For example, if you desired to -decompress a JPEG datastream that was all in memory, you could just make the -buffer pointer and length point to the original data in memory. Then the -buffer-reload procedure would be invoked only if the decompressor ran off the -end of the datastream, which would indicate an erroneous datastream. +controlled by the manager, not by the library. For example, the memory +source manager just makes the buffer pointer and length point to the original +data in memory. In this case the buffer-reload procedure will be invoked +only if the decompressor ran off the end of the datastream, which would +indicate an erroneous datastream. The work buffer is defined as an array of datatype JOCTET, which is generally "char" or "unsigned char". On a machine where char is not exactly 8 bits @@ -1498,7 +1500,8 @@ You will also need code to create a jpeg_destination_mgr struct, fill in its method pointers, and insert a pointer to the struct into the "dest" field of the JPEG compression object. This can be done in-line in your setup code if you like, but it's probably cleaner to provide a separate routine similar to -the jpeg_stdio_dest() routine of the supplied destination manager. +the jpeg_stdio_dest() or jpeg_mem_dest() routines of the supplied destination +managers. Decompression source managers follow a parallel design, but with some additional frammishes. The source manager struct contains a pointer and count @@ -1574,10 +1577,10 @@ You will also need code to create a jpeg_source_mgr struct, fill in its method pointers, and insert a pointer to the struct into the "src" field of the JPEG decompression object. This can be done in-line in your setup code if you like, but it's probably cleaner to provide a separate routine similar to the -jpeg_stdio_src() routine of the supplied source manager. +jpeg_stdio_src() or jpeg_mem_src() routines of the supplied source managers. -For more information, consult the stdio source and destination managers -in jdatasrc.c and jdatadst.c. +For more information, consult the memory and stdio source and destination +managers in jdatasrc.c and jdatadst.c. I/O suspension diff --git a/source/Irrlicht/jpeglib/ltconfig b/source/Irrlicht/jpeglib/ltconfig deleted file mode 100644 index 679dd73d..00000000 --- a/source/Irrlicht/jpeglib/ltconfig +++ /dev/null @@ -1,1512 +0,0 @@ -#! /bin/sh - -# ltconfig - Create a system-specific libtool. -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 -# -# This file is free software; 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 of the License, 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# 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. - -# A lot of this script is taken from autoconf-2.10. - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi - -echo=echo -if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : -else - # The Solaris and AIX default echo program unquotes backslashes. - # This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # So, we emulate echo with printf '%s\n' - echo="printf %s\\n" - if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : - else - # Oops. We have no working printf. Try to find a not-so-buggy echo. - echo=echo - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH /usr/ucb; do - if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then - echo="$dir/echo" - break - fi - done - IFS="$save_ifs" - fi -fi - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# The name of this program. -progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` - -# Constants: -PROGRAM=ltconfig -PACKAGE=libtool -VERSION=1.2 -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' -rm="rm -f" - -help="Try \`$progname --help' for more information." - -# Global variables: -can_build_shared=yes -enable_shared=yes -# All known linkers require a `.a' archive for static linking. -enable_static=yes -ltmain= -silent= -srcdir= -ac_config_guess= -ac_config_sub= -host= -nonopt= -verify_host=yes -with_gcc=no -with_gnu_ld=no - -old_AR="$AR" -old_CC="$CC" -old_CFLAGS="$CFLAGS" -old_CPPFLAGS="$CPPFLAGS" -old_LD="$LD" -old_LN_S="$LN_S" -old_NM="$NM" -old_RANLIB="$RANLIB" - -# Parse the command line options. -args= -prev= -for option -do - case "$option" in - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$option" - prev= - continue - fi - - case "$option" in - --help) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - if test -z "$ltmain"; then - ltmain="$option" - elif test -z "$host"; then -# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 -# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then -# echo "$progname: warning \`$option' is not a valid host type" 1>&2 -# fi - host="$option" - else - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac -done - -if test -z "$ltmain"; then - echo "$progname: you must specify a LTMAIN file" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -if test -f "$ltmain"; then : -else - echo "$progname: \`$ltmain' does not exist" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -# Quote any args containing shell metacharacters. -ltconfig_args= -for arg -do - case "$arg" in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ltconfig_args="$ltconfig_args '$arg'" ;; - *) ltconfig_args="$ltconfig_args $arg" ;; - esac -done - -# A relevant subset of AC_INIT. - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 5 compiler messages saved in config.log -# 6 checking for... messages and results -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>>./config.log - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - -if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to ltmain.sh. - srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` - test "$srcdir" = "$ltmain" && srcdir=. -fi - -trap "$rm conftest*; exit 1" 1 2 15 -if test "$verify_host" = yes; then - # Check for config.guess and config.sub. - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/config.guess; then - ac_aux_dir=$ac_dir - break - fi - done - if test -z "$ac_aux_dir"; then - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 - echo "$help" 1>&2 - exit 1 - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - - # Make sure we can run config.sub. - if $ac_config_sub sun4 >/dev/null 2>&1; then : - else - echo "$progname: cannot run $ac_config_sub" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 - - host_alias=$host - case "$host_alias" in - "") - if host_alias=`$ac_config_guess`; then : - else - echo "$progname: cannot guess host type; you must specify one" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac - host=`$ac_config_sub $host_alias` - echo "$ac_t$host" 1>&6 - - # Make sure the host verified. - test -z "$host" && exit 1 - -elif test -z "$host"; then - echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 - echo "$help" 1>&2 - exit 1 -else - host_alias=$host -fi - -# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -case "$host_os" in -linux-gnu*) ;; -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -esac - -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -case "$host_os" in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "${COLLECT_NAMES+set}" != set; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR cru $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -# Set a sane default for `AR'. -test -z "$AR" && AR=ar - -# If RANLIB is not set, then run the test. -if test "${RANLIB+set}" != "set"; then - result=no - - echo $ac_n "checking for ranlib... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/ranlib; then - RANLIB="ranlib" - result="ranlib" - break - fi - done - IFS="$save_ifs" - - echo "$ac_t$result" 1>&6 -fi - -if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" -fi - -# Check to see if we are using GCC. -if test "$with_gcc" != yes || test -z "$CC"; then - # If CC is not set, then try to find GCC or a usable CC. - if test -z "$CC"; then - echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - IFS="$save_ifs" - test -z "$dir" && dir=. - if test -f $dir/gcc; then - CC="gcc" - break - fi - done - IFS="$save_ifs" - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - fi - - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". - if test -z "$CC"; then - echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - cc_rejected=no - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/cc; then - if test "$dir/cc" = "/usr/ucb/cc"; then - cc_rejected=yes - continue - fi - CC="cc" - break - fi - done - IFS="$save_ifs" - if test $cc_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same name, so the bogon will be chosen - # first if we set CC to just the name; use the full file name. - shift - set dummy "$dir/cc" "$@" - shift - CC="$@" - fi - fi - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$CC"; then - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 - exit 1 - fi - fi - - # Now see if the compiler is really GCC. - with_gcc=no - echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - echo "$progname:424: checking whether we are using GNU C" >&5 - - $rm conftest.c - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - with_gcc=yes - fi - $rm conftest.c - echo "$ac_t$with_gcc" 1>&6 -fi - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler="$2" - -echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 -pic_flag= -special_shlib_compile_flags= -wl= -link_static_flag= -no_builtin_flag= - -if test "$with_gcc" = yes; then - wl='-Wl,' - link_static_flag='-static' - no_builtin_flag=' -fno-builtin' - - case "$host_os" in - aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) - # PIC is the default for these OSes. - ;; - os2*) - # We can build DLLs from non-PIC. - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - pic_flag='-m68020 -resident32 -malways-restore-a4' - ;; - *) - pic_flag='-fPIC' - ;; - esac -else - # PORTME Check for PIC flags for the system compiler. - case "$host_os" in - aix3* | aix4*) - # All AIX code is PIC. - link_static_flag='-bnso -bI:/lib/syscalls.exp' - ;; - - hpux9* | hpux10*) - # Is there a better link_static_flag that works with the bundled CC? - wl='-Wl,' - link_static_flag="${wl}-a ${wl}archive" - pic_flag='+Z' - ;; - - irix5* | irix6*) - wl='-Wl,' - link_static_flag='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - os2*) - # We can build DLLs from non-PIC. - ;; - - osf3* | osf4*) - # All OSF/1 code is PIC. - wl='-Wl,' - link_static_flag='-non_shared' - ;; - - sco3.2v5*) - pic_flag='-Kpic' - link_static_flag='-dn' - special_shlib_compile_flags='-belf' - ;; - - solaris2*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - sunos4*) - pic_flag='-PIC' - link_static_flag='-Bstatic' - wl='-Qoption ld ' - ;; - - sysv4.2uw2*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - uts4*) - pic_flag='-pic' - link_static_flag='-Bstatic' - ;; - - *) - can_build_shared=no - ;; - esac -fi - -if test -n "$pic_flag"; then - echo "$ac_t$pic_flag" 1>&6 - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 - $rm conftest* - echo > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - # On HP-UX, both CC and GCC only warn that PIC is supported... then they - # create non-PIC objects. So, if there were any warnings, we assume that - # PIC is not supported. - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - can_build_shared=no - pic_flag= - else - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - can_build_shared=no - pic_flag= - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - echo "$ac_t"none 1>&6 -fi - -# Check for any special shared library compilation flags. -if test -n "$special_shlib_compile_flags"; then - echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : - else - echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 - can_build_shared=no - fi -fi - -echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 -$rm conftest* -echo 'main(){return(0);}' > conftest.c -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5 -if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - echo "$ac_t$link_static_flag" 1>&6 -else - echo "$ac_t"none 1>&6 - link_static_flag= -fi -LDFLAGS="$save_LDFLAGS" -$rm conftest* - -if test -z "$LN_S"; then - # Check to see if we can use ln -s, or we need hard links. - echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 - $rm conftestdata - if ln -s X conftestdata 2>/dev/null; then - $rm conftestdata - LN_S="ln -s" - else - LN_S=ln - fi - if test "$LN_S" = "ln -s"; then - echo "$ac_t"yes 1>&6 - else - echo "$ac_t"no 1>&6 - fi -fi - -# Make sure LD is an absolute path. -if test -z "$LD"; then - ac_prog=ld - if test "$with_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:624: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - /* | [A-Za-z]:\\*) - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we are not using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:642: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:645: checking for non-GNU ld" >&5 - fi - - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog"; then - LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" - fi - - if test -n "$LD"; then - echo "$ac_t$LD" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$LD"; then - echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 - exit 1 - fi -fi - -# Check to see if it really is or is not GNU ld. -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 -# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - with_gnu_ld=yes -else - with_gnu_ld=no -fi -echo "$ac_t$with_gnu_ld" 1>&6 - -# See if the linker supports building shared libraries. -echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 - -allow_undefined_flag= -no_undefined_flag= -archive_cmds= -old_archive_from_new_cmds= -export_dynamic_flag_spec= -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no -hardcode_shlibpath_var=unsupported -runpath_var= - -case "$host_os" in -amigaos* | sunos4*) - # On these operating systems, we should treat GNU ld like the system ld. - gnu_ld_acts_native=yes - ;; -*) - gnu_ld_acts_native=no - ;; -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then - - # See if GNU ld supports shared libraries. - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' - runpath_var=LD_RUN_PATH - ld_shlibs=yes - else - ld_shlibs=no - fi - - if test "$ld_shlibs" = yes; then - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - fi -else - # PORTME fill in a description of your system's linker (not GNU ld) - case "$host_os" in - aix3*) - allow_undefined_flag=unsupported - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$with_gcc" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4*) - allow_undefined_flag=unsupported - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' - hardcode_direct=yes - hardcode_minus_L=yes - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib$libobjs' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3, at last, uses gcc -shared to do shared libraries. - freebsd3*) - archive_cmds='$CC -shared -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - ;; - - netbsd*) - # Tested with NetBSD 1.2 ld - archive_cmds='$LD -Bshareable -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' - ;; - - osf3* | osf4*) - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - sco3.2v5*) - archive_cmds='$LD -G -o $lib$libobjs' - hardcode_direct=yes - ;; - - solaris2*) - no_undefined_flag=' -z text' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - - # Solaris 2 before 2.5 hardcodes -L paths. - case "$host_os" in - solaris2.[0-4]*) - hardcode_minus_L=yes - ;; - esac - ;; - - sunos4*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared -o $lib$libobjs' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' - fi - - if test "$with_gnu_ld" = yes; then - export_dynamic_flag_spec='${wl}-export-dynamic' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib$libobjs' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - can_build_shared=no - ;; - esac -fi -echo "$ac_t$ld_shlibs" 1>&6 - -if test -z "$NM"; then - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 - case "$NM" in - /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" - else - NM="$ac_dir/nm" - fi - break - fi - done - IFS="$ac_save_ifs" - test -z "$NM" && NM=nm - ;; - esac - echo "$ac_t$NM" 1>&6 -fi - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRSTU]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \1' - -# Define system-specific variables. -case "$host_os" in -aix*) - symcode='[BCDTU]' - ;; -irix*) - # Cannot use undefined symbols on IRIX because inlined functions mess us up. - symcode='[BCDEGRST]' - ;; -solaris2*) - symcode='[BDTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTUW]' -fi - -# Write the raw and C identifiers. -global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" - -# Check to see that the pipe works correctly. -pipe_works=no -$rm conftest* -cat > conftest.c <&5 -if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:975: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - wcout=`wc "$nlist" 2>/dev/null` - count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` - (test "$count" -ge 0) 2>/dev/null || count=-1 - else - rm -f "$nlist"T - count=-1 - fi - - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.c -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c - - cat <> conftest.c -#if defined (__STDC__) && __STDC__ -# define __ptr_t void * -#else -# define __ptr_t char * -#endif - -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ -int dld_preloaded_symbol_count = $count; - -/* The mapping between symbol names and symbols. */ -struct { - char *name; - __ptr_t address; -} -dld_preloaded_symbols[] = -{ -EOF - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c - cat <<\EOF >> conftest.c - {0, (__ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.o conftestm.o - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS='conftestm.o' - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - LIBS="$save_LIBS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $global_symbol_pipe" >&5 - fi -else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 -fi -$rm conftest* - -# Do not use the global_symbol_pipe unless it works. -echo "$ac_t$pipe_works" 1>&6 -test "$pipe_works" = yes || global_symbol_pipe= - -# Check hardcoding attributes. -echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && \ - test "$hardcode_minus_L" != no && \ - test "$hardcode_shlibpath_var" != no; then - - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -elif test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" != yes; then - # We cannot hardcode anything. - hardcode_action=unsupported -else - # We can only hardcode existing directories. - hardcode_action=relink -fi -echo "$ac_t$hardcode_action" 1>&6 -test "$hardcode_action" = unsupported && can_build_shared=no - - -reload_flag= -reload_cmds='$LD$reload_flag -o $output$reload_objs' -echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 -# PORTME Some linker may need a different reload flag. -reload_flag='-r' -echo "$ac_t$reload_flag" -test -n "$reload_flag" && reload_flag=" $reload_flag" - -# PORTME Fill in your ld.so characteristics -library_names_spec= -libname_spec='lib$name' -soname_spec= -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -version_type=none -dynamic_linker="$host_os ld.so" - -echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 -case "$host_os" in -aix3* | aix4*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so.$major' - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - -freebsd2* | freebsd3*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix $libname.so' - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -gnu*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix' - shlibpath_var=LD_LIBRARY_PATH - ;; - -hpux9* | hpux10*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - dynamic_linker="$host_os dld.sl" - version_type=sunos - shlibpath_var=SHLIB_PATH - library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl' - soname_spec='${libname}${release}.sl.$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6*) - version_type=osf - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so.$versuffix $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux-gnu*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - - if test -f /lib/ld.so.1; then - dynamic_linker='GNU ld.so' - else - # Only the GNU ld.so supports shared libraries on MkLinux. - case "$host_cpu" in - powerpc*) dynamic_linker=no ;; - *) dynamic_linker='Linux ld.so' ;; - esac - fi - ;; - -netbsd* | openbsd*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix' - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -os2*) - libname_spec='$name' - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4*) - version_type=osf - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so.$versuffix $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so.$major' - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris2*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix' - finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sysv4.2uw2*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$ac_t$dynamic_linker" -test "$dynamic_linker" = no && can_build_shared=no - -# Report the final consequences. -echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 - -echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds;\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -esac - -echo "$ac_t$enable_shared" 1>&6 - -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes - -echo "checking whether to build static libraries... $enable_static" 1>&6 - -echo $ac_n "checking for objdir... $ac_c" 1>&6 -rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - objdir=_libs -fi -rmdir .libs 2>/dev/null -echo "$ac_t$objdir" 1>&6 - -# Copy echo and quote the copy, instead of the original, because it is -# used later. -ltecho="$echo" - -# Now quote all the things that may contain metacharacters. -for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ - old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ - link_static_flag no_builtin_flag export_dynamic_flag_spec \ - libname_spec library_names_spec soname_spec RANLIB \ - old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ - allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe \ - hardcode_libdir_flag_spec hardcode_libdir_separator; do - - case "$var" in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ - postinstall_cmds | postuninstall_cmds | finish_cmds) - # Double-quote double-evaled strings. - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" - ;; - *) - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" - ;; - esac -done - -ofile=libtool -trap "$rm $ofile; exit 1" 1 2 15 -echo creating $ofile -$rm $ofile -cat < $ofile -#! /bin/sh - -# libtool - Provide generalized library-building support services. -# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION -# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. -# -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 -# -# This program is free software; 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 of the License, 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# 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. - -# This program was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ -# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ -# $0$ltconfig_args -# -# Compiler and other test output produced by $progname, useful for -# debugging $progname, is in ./config.log if it exists. - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="sed -e s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi - -# An echo program that does not interpret backslashes. -echo="$ltecho" - -# The version of $progname that generated this script. -LTCONFIG_VERSION="$VERSION" - -# Shell to use when invoking shell scripts. -SHELL=${CONFIG_SHELL-/bin/sh} - -# Whether or not to build libtool libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build old-style libraries. -build_old_libs=$enable_static - -# The host system. -host_alias="$host_alias" -host="$host" - -# The archiver. -AR="$AR" - -# The default C compiler. -CC="$CC" - -# The linker used to build libraries. -LD="$LD" - -# Whether we need hard or soft links. -LN_S="$LN_S" - -# A BSD-compatible nm program. -NM="$NM" - -# The name of the directory that contains temporary libtool files. -objdir="$objdir" - -# How to create reloadable object files. -reload_flag="$reload_flag" -reload_cmds="$reload_cmds" - -# How to pass a linker flag through the compiler. -wl="$wl" - -# Additional compiler flags for building library objects. -pic_flag="$pic_flag" - -# Compiler flag to prevent dynamic linking. -link_static_flag="$link_static_flag" - -# Compiler flag to turn off builtin functions. -no_builtin_flag="$no_builtin_flag" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="$export_dynamic_flag_spec" - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec="$libname_spec" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="$library_names_spec" - -# The coded name of the library, if different from the real name. -soname_spec="$soname_spec" - -# Commands used to build and install an old-style archive. -RANLIB="$RANLIB" -old_archive_cmds="$old_archive_cmds" -old_postinstall_cmds="$old_postinstall_cmds" -old_postuninstall_cmds="$old_postuninstall_cmds" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="$old_archive_from_new_cmds" - -# Commands used to build and install a shared archive. -archive_cmds="$archive_cmds" -postinstall_cmds="$postinstall_cmds" -postuninstall_cmds="$postuninstall_cmds" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="$allow_undefined_flag" - -# Flag that forces no undefined symbols. -no_undefined_flag="$no_undefined_flag" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="$finish_cmds" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="$finish_eval" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="$global_symbol_pipe" - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="$hardcode_libdir_separator" - -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -EOF - -case "$host_os" in -aix3*) - cat <<\EOF >> $ofile -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "${COLLECT_NAMES+set}" != set; then - COLLECT_NAMES= - export COLLECT_NAMES -fi - -EOF - ;; -esac - -# Append the ltmain.sh script. -cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1) - -chmod +x $ofile -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/source/Irrlicht/jpeglib/ltmain.sh b/source/Irrlicht/jpeglib/ltmain.sh index ff57f28c..316484d8 100644 --- a/source/Irrlicht/jpeglib/ltmain.sh +++ b/source/Irrlicht/jpeglib/ltmain.sh @@ -1,6 +1,6 @@ # Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6 +# ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6 +# $progname: (GNU libtool) 2.2.6b # automake: $automake_version # autoconf: $autoconf_version # @@ -73,9 +73,9 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=2.2.6 +VERSION=2.2.6b TIMESTAMP="" -package_revision=1.3012 +package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -116,15 +116,15 @@ $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} -: ${EGREP="/usr/bin/grep -E"} -: ${FGREP="/usr/bin/grep -F"} -: ${GREP="/usr/bin/grep"} +: ${EGREP="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/opt/local/bin/gsed"} +: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} diff --git a/source/Irrlicht/jpeglib/makeasln.v10 b/source/Irrlicht/jpeglib/makeasln.v10 new file mode 100644 index 00000000..f6873019 --- /dev/null +++ b/source/Irrlicht/jpeglib/makeasln.v10 @@ -0,0 +1,33 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cjpeg", "cjpeg.vcxproj", "{2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "djpeg", "djpeg.vcxproj", "{11043137-B453-4DFA-9010-4D2B9DC1545C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpegtran", "jpegtran.vcxproj", "{025BAC50-51B5-4FFE-BC47-3F920BB4047E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdjpgcom", "rdjpgcom.vcxproj", "{C81513DB-78DC-46BC-BC98-82E745203976}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrjpgcom", "wrjpgcom.vcxproj", "{B57065D4-DDDA-4668-BAF5-2D49270C973C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|Win32.ActiveCfg = Release|Win32 + {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|Win32.Build.0 = Release|Win32 + {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|Win32.ActiveCfg = Release|Win32 + {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|Win32.Build.0 = Release|Win32 + {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|Win32.ActiveCfg = Release|Win32 + {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|Win32.Build.0 = Release|Win32 + {C81513DB-78DC-46BC-BC98-82E745203976}.Release|Win32.ActiveCfg = Release|Win32 + {C81513DB-78DC-46BC-BC98-82E745203976}.Release|Win32.Build.0 = Release|Win32 + {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|Win32.ActiveCfg = Release|Win32 + {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/source/Irrlicht/jpeglib/makeasln.vc9 b/source/Irrlicht/jpeglib/makeasln.vc9 deleted file mode 100644 index 49ed2488..00000000 --- a/source/Irrlicht/jpeglib/makeasln.vc9 +++ /dev/null @@ -1,33 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cjpeg", "cjpeg.vcproj", "{B4F61778-C45D-45C6-9E87-06F03F50519F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "djpeg", "djpeg.vcproj", "{9B7E57AE-31CD-405E-8070-26A8303B9DC9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpegtran", "jpegtran.vcproj", "{813C33AF-9031-49D2-BA19-93D600CDD404}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdjpgcom", "rdjpgcom.vcproj", "{EB107F86-A8CC-4507-8115-88D31DDE4CDF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrjpgcom", "wrjpgcom.vcproj", "{178670D7-FA7F-44A8-96C7-11B1CA14269C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B4F61778-C45D-45C6-9E87-06F03F50519F}.Release|Win32.ActiveCfg = Release|Win32 - {B4F61778-C45D-45C6-9E87-06F03F50519F}.Release|Win32.Build.0 = Release|Win32 - {9B7E57AE-31CD-405E-8070-26A8303B9DC9}.Release|Win32.ActiveCfg = Release|Win32 - {9B7E57AE-31CD-405E-8070-26A8303B9DC9}.Release|Win32.Build.0 = Release|Win32 - {813C33AF-9031-49D2-BA19-93D600CDD404}.Release|Win32.ActiveCfg = Release|Win32 - {813C33AF-9031-49D2-BA19-93D600CDD404}.Release|Win32.Build.0 = Release|Win32 - {EB107F86-A8CC-4507-8115-88D31DDE4CDF}.Release|Win32.ActiveCfg = Release|Win32 - {EB107F86-A8CC-4507-8115-88D31DDE4CDF}.Release|Win32.Build.0 = Release|Win32 - {178670D7-FA7F-44A8-96C7-11B1CA14269C}.Release|Win32.ActiveCfg = Release|Win32 - {178670D7-FA7F-44A8-96C7-11B1CA14269C}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/source/Irrlicht/jpeglib/makecfil.v10 b/source/Irrlicht/jpeglib/makecfil.v10 new file mode 100644 index 00000000..62f13fe2 --- /dev/null +++ b/source/Irrlicht/jpeglib/makecfil.v10 @@ -0,0 +1,69 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makecvcp.vc9 b/source/Irrlicht/jpeglib/makecvcp.vc9 deleted file mode 100644 index 95fefc11..00000000 --- a/source/Irrlicht/jpeglib/makecvcp.vc9 +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/Irrlicht/jpeglib/makecvcx.v10 b/source/Irrlicht/jpeglib/makecvcx.v10 new file mode 100644 index 00000000..c7090799 --- /dev/null +++ b/source/Irrlicht/jpeglib/makecvcx.v10 @@ -0,0 +1,76 @@ + + + + + Release + Win32 + + + + {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57} + Win32Proj + cjpeg + + + + Application + false + true + Unicode + + + + + + + + + + false + $(ProjectName)\$(Configuration)\ + $(ProjectName)\$(Configuration)\ + + + + Level3 + NotUsing + Full + true + false + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS + true + true + 4996 + + + Console + true + true + true + Release\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makedfil.v10 b/source/Irrlicht/jpeglib/makedfil.v10 new file mode 100644 index 00000000..6846e146 --- /dev/null +++ b/source/Irrlicht/jpeglib/makedfil.v10 @@ -0,0 +1,69 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makedvcx.v10 b/source/Irrlicht/jpeglib/makedvcx.v10 new file mode 100644 index 00000000..46aa86e3 --- /dev/null +++ b/source/Irrlicht/jpeglib/makedvcx.v10 @@ -0,0 +1,76 @@ + + + + + Release + Win32 + + + + {11043137-B453-4DFA-9010-4D2B9DC1545C} + Win32Proj + djpeg + + + + Application + false + true + Unicode + + + + + + + + + + false + $(ProjectName)\$(Configuration)\ + $(ProjectName)\$(Configuration)\ + + + + Level3 + NotUsing + Full + true + false + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS + true + true + 4996 + + + Console + true + true + true + Release\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makefile.ansi b/source/Irrlicht/jpeglib/makefile.ansi index aaf9ea16..357029e2 100644 --- a/source/Irrlicht/jpeglib/makefile.ansi +++ b/source/Irrlicht/jpeglib/makefile.ansi @@ -65,11 +65,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.bcc b/source/Irrlicht/jpeglib/makefile.bcc index c6c99615..c297a302 100644 --- a/source/Irrlicht/jpeglib/makefile.bcc +++ b/source/Irrlicht/jpeglib/makefile.bcc @@ -92,11 +92,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.dj b/source/Irrlicht/jpeglib/makefile.dj index 0dcbb02a..363e4363 100644 --- a/source/Irrlicht/jpeglib/makefile.dj +++ b/source/Irrlicht/jpeglib/makefile.dj @@ -65,11 +65,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.manx b/source/Irrlicht/jpeglib/makefile.manx index be40ad13..7fcc00a6 100644 --- a/source/Irrlicht/jpeglib/makefile.manx +++ b/source/Irrlicht/jpeglib/makefile.manx @@ -66,11 +66,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.mc6 b/source/Irrlicht/jpeglib/makefile.mc6 index 65274eee..b083ab67 100644 --- a/source/Irrlicht/jpeglib/makefile.mc6 +++ b/source/Irrlicht/jpeglib/makefile.mc6 @@ -63,11 +63,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.mms b/source/Irrlicht/jpeglib/makefile.mms index aa1a3575..7d828e65 100644 --- a/source/Irrlicht/jpeglib/makefile.mms +++ b/source/Irrlicht/jpeglib/makefile.mms @@ -52,11 +52,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.sas b/source/Irrlicht/jpeglib/makefile.sas index a3bae64e..9ecb066b 100644 --- a/source/Irrlicht/jpeglib/makefile.sas +++ b/source/Irrlicht/jpeglib/makefile.sas @@ -74,11 +74,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.unix b/source/Irrlicht/jpeglib/makefile.unix index 945f61f9..31679076 100644 --- a/source/Irrlicht/jpeglib/makefile.unix +++ b/source/Irrlicht/jpeglib/makefile.unix @@ -69,11 +69,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms diff --git a/source/Irrlicht/jpeglib/makefile.vc b/source/Irrlicht/jpeglib/makefile.vc index 243018ac..c2ba6ff2 100644 --- a/source/Irrlicht/jpeglib/makefile.vc +++ b/source/Irrlicht/jpeglib/makefile.vc @@ -62,11 +62,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 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.vc9 \ - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \ - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \ - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ jconfig.vms @@ -130,8 +131,48 @@ clean: $(RM) *.obj *.exe libjpeg.lib $(RM) testout* -test: cjpeg.exe djpeg.exe jpegtran.exe - $(RM) testout* +setup-vc6: + ren jconfig.vc jconfig.h + ren makejdsw.vc6 jpeg.dsw + ren makeadsw.vc6 apps.dsw + ren makejmak.vc6 jpeg.mak + ren makejdep.vc6 jpeg.dep + ren makejdsp.vc6 jpeg.dsp + ren makecmak.vc6 cjpeg.mak + ren makecdep.vc6 cjpeg.dep + ren makecdsp.vc6 cjpeg.dsp + ren makedmak.vc6 djpeg.mak + ren makeddep.vc6 djpeg.dep + ren makeddsp.vc6 djpeg.dsp + ren maketmak.vc6 jpegtran.mak + ren maketdep.vc6 jpegtran.dep + ren maketdsp.vc6 jpegtran.dsp + ren makermak.vc6 rdjpgcom.mak + ren makerdep.vc6 rdjpgcom.dep + ren makerdsp.vc6 rdjpgcom.dsp + ren makewmak.vc6 wrjpgcom.mak + ren makewdep.vc6 wrjpgcom.dep + ren makewdsp.vc6 wrjpgcom.dsp + +setup-v10: + ren jconfig.vc jconfig.h + ren makejsln.v10 jpeg.sln + ren makeasln.v10 apps.sln + ren makejvcx.v10 jpeg.vcxproj + ren makejfil.v10 jpeg.vcxproj.filters + ren makecvcx.v10 cjpeg.vcxproj + ren makecfil.v10 cjpeg.vcxproj.filters + ren makedvcx.v10 djpeg.vcxproj + ren makedfil.v10 djpeg.vcxproj.filters + ren maketvcx.v10 jpegtran.vcxproj + ren maketfil.v10 jpegtran.vcxproj.filters + ren makervcx.v10 rdjpgcom.vcxproj + ren makerfil.v10 rdjpgcom.vcxproj.filters + ren makewvcx.v10 wrjpgcom.vcxproj + ren makewfil.v10 wrjpgcom.vcxproj.filters + +test: + IF EXIST testout* $(RM) testout* .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg .\cjpeg -dct int -outfile testout.jpg testimg.ppm @@ -145,6 +186,21 @@ test: cjpeg.exe djpeg.exe jpegtran.exe fc /b testimgp.jpg testoutp.jpg fc /b testorig.jpg testoutt.jpg +test-build: + IF EXIST testout* $(RM) testout* + .\djpeg\Release\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + .\djpeg\Release\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + .\cjpeg\Release\cjpeg -dct int -outfile testout.jpg testimg.ppm + .\djpeg\Release\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + .\cjpeg\Release\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + .\jpegtran\Release\jpegtran -outfile testoutt.jpg testprog.jpg + fc /b testimg.ppm testout.ppm + fc /b testimg.bmp testout.bmp + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg + jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h diff --git a/source/Irrlicht/jpeglib/makefile.wat b/source/Irrlicht/jpeglib/makefile.wat index 0bcd50c7..8ba7fe6d 100644 --- a/source/Irrlicht/jpeglib/makefile.wat +++ b/source/Irrlicht/jpeglib/makefile.wat @@ -64,11 +64,12 @@ MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc & 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.vc9 & - makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 & - makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st & - makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms & - makefile.vms makvms.opt + 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 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat & jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas & jconfig.vms diff --git a/source/Irrlicht/jpeglib/makejfil.v10 b/source/Irrlicht/jpeglib/makejfil.v10 new file mode 100644 index 00000000..123c07d1 --- /dev/null +++ b/source/Irrlicht/jpeglib/makejfil.v10 @@ -0,0 +1,186 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makejsln.vc9 b/source/Irrlicht/jpeglib/makejsln.v10 similarity index 59% rename from source/Irrlicht/jpeglib/makejsln.vc9 rename to source/Irrlicht/jpeglib/makejsln.v10 index 093e6864..f85ab502 100644 --- a/source/Irrlicht/jpeglib/makejsln.vc9 +++ b/source/Irrlicht/jpeglib/makejsln.v10 @@ -1,15 +1,15 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "jpeg.vcproj", "{E61592E1-28F4-4AFC-9EE1-9BE833A061C1}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "jpeg.vcxproj", "{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E61592E1-28F4-4AFC-9EE1-9BE833A061C1}.Release|Win32.ActiveCfg = Release|Win32 - {E61592E1-28F4-4AFC-9EE1-9BE833A061C1}.Release|Win32.Build.0 = Release|Win32 + {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|Win32.ActiveCfg = Release|Win32 + {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/source/Irrlicht/jpeglib/makejvcp.vc9 b/source/Irrlicht/jpeglib/makejvcp.vc9 deleted file mode 100644 index df35717c..00000000 --- a/source/Irrlicht/jpeglib/makejvcp.vc9 +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/Irrlicht/jpeglib/makejvcx.v10 b/source/Irrlicht/jpeglib/makejvcx.v10 new file mode 100644 index 00000000..cd8c87b9 --- /dev/null +++ b/source/Irrlicht/jpeglib/makejvcx.v10 @@ -0,0 +1,112 @@ + + + + + Release + Win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Disabled + false + + + + + {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1} + Win32Proj + jpeg + + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + Level3 + NotUsing + Full + true + false + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS + true + true + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makerfil.v10 b/source/Irrlicht/jpeglib/makerfil.v10 new file mode 100644 index 00000000..2b2fcb32 --- /dev/null +++ b/source/Irrlicht/jpeglib/makerfil.v10 @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makervcp.vc9 b/source/Irrlicht/jpeglib/makervcp.vc9 deleted file mode 100644 index a9964812..00000000 --- a/source/Irrlicht/jpeglib/makervcp.vc9 +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/Irrlicht/jpeglib/makervcx.v10 b/source/Irrlicht/jpeglib/makervcx.v10 new file mode 100644 index 00000000..3d8928dd --- /dev/null +++ b/source/Irrlicht/jpeglib/makervcx.v10 @@ -0,0 +1,62 @@ + + + + + Release + Win32 + + + + {C81513DB-78DC-46BC-BC98-82E745203976} + Win32Proj + rdjpgcom + + + + Application + false + true + Unicode + + + + + + + + + + false + $(ProjectName)\$(Configuration)\ + $(ProjectName)\$(Configuration)\ + + + + Level3 + NotUsing + Full + true + false + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS + true + true + 4996 + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/maketfil.v10 b/source/Irrlicht/jpeglib/maketfil.v10 new file mode 100644 index 00000000..52f4b022 --- /dev/null +++ b/source/Irrlicht/jpeglib/maketfil.v10 @@ -0,0 +1,63 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/maketvcp.vc9 b/source/Irrlicht/jpeglib/maketvcp.vc9 deleted file mode 100644 index 6fd2271b..00000000 --- a/source/Irrlicht/jpeglib/maketvcp.vc9 +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/Irrlicht/jpeglib/maketvcx.v10 b/source/Irrlicht/jpeglib/maketvcx.v10 new file mode 100644 index 00000000..f943c90a --- /dev/null +++ b/source/Irrlicht/jpeglib/maketvcx.v10 @@ -0,0 +1,74 @@ + + + + + Release + Win32 + + + + {025BAC50-51B5-4FFE-BC47-3F920BB4047E} + Win32Proj + jpegtran + + + + Application + false + true + Unicode + + + + + + + + + + false + $(ProjectName)\$(Configuration)\ + $(ProjectName)\$(Configuration)\ + + + + Level3 + NotUsing + Full + true + false + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS + true + true + 4996 + + + Console + true + true + true + Release\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makewfil.v10 b/source/Irrlicht/jpeglib/makewfil.v10 new file mode 100644 index 00000000..df6b35dc --- /dev/null +++ b/source/Irrlicht/jpeglib/makewfil.v10 @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/makewvcp.vc9 b/source/Irrlicht/jpeglib/makewvcp.vc9 deleted file mode 100644 index 50a72a06..00000000 --- a/source/Irrlicht/jpeglib/makewvcp.vc9 +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/Irrlicht/jpeglib/makewvcx.v10 b/source/Irrlicht/jpeglib/makewvcx.v10 new file mode 100644 index 00000000..13aa5016 --- /dev/null +++ b/source/Irrlicht/jpeglib/makewvcx.v10 @@ -0,0 +1,62 @@ + + + + + Release + Win32 + + + + {B57065D4-DDDA-4668-BAF5-2D49270C973C} + Win32Proj + wrjpgcom + + + + Application + false + true + Unicode + + + + + + + + + + false + $(ProjectName)\$(Configuration)\ + $(ProjectName)\$(Configuration)\ + + + + Level3 + NotUsing + Full + true + false + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS + true + true + 4996 + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/jpeglib/rdbmp.c b/source/Irrlicht/jpeglib/rdbmp.c index 4f61bcf7..dfdf96ff 100644 --- a/source/Irrlicht/jpeglib/rdbmp.c +++ b/source/Irrlicht/jpeglib/rdbmp.c @@ -2,6 +2,7 @@ * rdbmp.c * * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2009-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. * @@ -177,10 +178,41 @@ get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) } +METHODDEF(JDIMENSION) +get_32bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 32-bit pixels */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + JSAMPARRAY image_ptr; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + + /* Fetch next row from virtual array */ + source->source_row--; + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + source->source_row, (JDIMENSION) 1, FALSE); + /* Transfer data. Note source values are in BGR order + * (even though Microsoft's own documents say the opposite). + */ + inptr = image_ptr[0]; + outptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + inptr++; /* skip the 4th byte (Alpha channel) */ + outptr += 3; + } + + return 1; +} + + /* * This method loads the image into whole_image during the first call on * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call - * get_8bit_row or get_24bit_row on subsequent calls. + * get_8bit_row, get_24bit_row, or get_32bit_row on subsequent calls. */ METHODDEF(JDIMENSION) @@ -223,6 +255,9 @@ preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) case 24: source->pub.get_pixel_rows = get_24bit_row; break; + case 32: + source->pub.get_pixel_rows = get_32bit_row; + break; default: ERREXIT(cinfo, JERR_BMP_BADDEPTH); } @@ -251,8 +286,8 @@ start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) (((INT32) UCH(array[offset+3])) << 24)) INT32 bfOffBits; INT32 headerSize; - INT32 biWidth = 0; /* initialize to avoid compiler warning */ - INT32 biHeight = 0; + INT32 biWidth; + INT32 biHeight; unsigned int biPlanes; INT32 biCompression; INT32 biXPelsPerMeter,biYPelsPerMeter; @@ -300,8 +335,6 @@ start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) ERREXIT(cinfo, JERR_BMP_BADDEPTH); break; } - if (biPlanes != 1) - ERREXIT(cinfo, JERR_BMP_BADPLANES); break; case 40: case 64: @@ -325,12 +358,13 @@ start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) case 24: /* RGB image */ TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight); break; + case 32: /* RGB image + Alpha channel */ + TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight); + break; default: ERREXIT(cinfo, JERR_BMP_BADDEPTH); break; } - if (biPlanes != 1) - ERREXIT(cinfo, JERR_BMP_BADPLANES); if (biCompression != 0) ERREXIT(cinfo, JERR_BMP_COMPRESSED); @@ -343,9 +377,14 @@ start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) break; default: ERREXIT(cinfo, JERR_BMP_BADHEADER); - break; + return; } + if (biWidth <= 0 || biHeight <= 0) + ERREXIT(cinfo, JERR_BMP_EMPTY); + if (biPlanes != 1) + ERREXIT(cinfo, JERR_BMP_BADPLANES); + /* Compute distance to bitmap data --- will adjust for colormap below */ bPad = bfOffBits - (headerSize + 14); @@ -375,6 +414,8 @@ start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) /* Compute row width in file, including padding to 4-byte boundary */ if (source->bits_per_pixel == 24) row_width = (JDIMENSION) (biWidth * 3); + else if (source->bits_per_pixel == 32) + row_width = (JDIMENSION) (biWidth * 4); else row_width = (JDIMENSION) biWidth; while ((row_width & 3) != 0) row_width++; diff --git a/source/Irrlicht/jpeglib/transupp.c b/source/Irrlicht/jpeglib/transupp.c index bc13b06f..986aded9 100644 --- a/source/Irrlicht/jpeglib/transupp.c +++ b/source/Irrlicht/jpeglib/transupp.c @@ -133,7 +133,8 @@ do_flip_h_no_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * mirroring by changing the signs of odd-numbered columns. * Partial iMCUs at the right edge are left untouched. */ - MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -198,7 +199,8 @@ do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * different rows of a single virtual array simultaneously. Otherwise, * this is essentially the same as the routine above. */ - MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -262,7 +264,8 @@ do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * of odd-numbered rows. * Partial iMCUs at the bottom edge are copied verbatim. */ - MCU_rows = srcinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -389,7 +392,8 @@ do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * at the (output) right edge properly. They just get transposed and * not mirrored. */ - MCU_cols = srcinfo->image_height / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_height / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -469,7 +473,8 @@ do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * at the (output) bottom edge properly. They just get transposed and * not mirrored. */ - MCU_rows = srcinfo->image_width / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_rows = srcinfo->output_width / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -536,8 +541,10 @@ do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; - MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); - MCU_rows = srcinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -645,8 +652,10 @@ do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; - MCU_cols = srcinfo->image_height / (dstinfo->max_h_samp_factor * DCTSIZE); - MCU_rows = srcinfo->image_width / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_height / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_width / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -822,10 +831,10 @@ trim_right_edge (jpeg_transform_info *info, JDIMENSION full_width) { JDIMENSION MCU_cols; - MCU_cols = info->output_width / (info->max_h_samp_factor * DCTSIZE); + MCU_cols = info->output_width / info->iMCU_sample_width; if (MCU_cols > 0 && info->x_crop_offset + MCU_cols == - full_width / (info->max_h_samp_factor * DCTSIZE)) - info->output_width = MCU_cols * (info->max_h_samp_factor * DCTSIZE); + full_width / info->iMCU_sample_width) + info->output_width = MCU_cols * info->iMCU_sample_width; } LOCAL(void) @@ -833,10 +842,10 @@ trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height) { JDIMENSION MCU_rows; - MCU_rows = info->output_height / (info->max_v_samp_factor * DCTSIZE); + MCU_rows = info->output_height / info->iMCU_sample_height; if (MCU_rows > 0 && info->y_crop_offset + MCU_rows == - full_height / (info->max_v_samp_factor * DCTSIZE)) - info->output_height = MCU_rows * (info->max_v_samp_factor * DCTSIZE); + full_height / info->iMCU_sample_height) + info->output_height = MCU_rows * info->iMCU_sample_height; } @@ -852,59 +861,89 @@ trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height) * Hence, this routine must be called after jpeg_read_header (which reads * the image dimensions) and before jpeg_read_coefficients (which realizes * the source's virtual arrays). + * + * This function returns FALSE right away if -perfect is given + * and transformation is not perfect. Otherwise returns TRUE. */ -GLOBAL(void) +GLOBAL(boolean) jtransform_request_workspace (j_decompress_ptr srcinfo, jpeg_transform_info *info) { - jvirt_barray_ptr *coef_arrays = NULL; + jvirt_barray_ptr *coef_arrays; boolean need_workspace, transpose_it; jpeg_component_info *compptr; - JDIMENSION xoffset, yoffset, width_in_iMCUs, height_in_iMCUs; + JDIMENSION xoffset, yoffset; + JDIMENSION width_in_iMCUs, height_in_iMCUs; JDIMENSION width_in_blocks, height_in_blocks; int ci, h_samp_factor, v_samp_factor; /* Determine number of components in output image */ if (info->force_grayscale && srcinfo->jpeg_color_space == JCS_YCbCr && - srcinfo->num_components == 3) { + srcinfo->num_components == 3) /* We'll only process the first component */ info->num_components = 1; - } else { + else /* Process all the components */ info->num_components = srcinfo->num_components; + + /* Compute output image dimensions and related values. */ + jpeg_core_output_dimensions(srcinfo); + + /* Return right away if -perfect is given and transformation is not perfect. + */ + if (info->perfect) { + if (info->num_components == 1) { + if (!jtransform_perfect_transform(srcinfo->output_width, + srcinfo->output_height, + srcinfo->min_DCT_h_scaled_size, + srcinfo->min_DCT_v_scaled_size, + info->transform)) + return FALSE; + } else { + if (!jtransform_perfect_transform(srcinfo->output_width, + srcinfo->output_height, + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size, + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size, + info->transform)) + return FALSE; + } } + /* If there is only one output component, force the iMCU size to be 1; * else use the source iMCU size. (This allows us to do the right thing * when reducing color to grayscale, and also provides a handy way of * cleaning up "funny" grayscale images whose sampling factors are not 1x1.) */ - switch (info->transform) { case JXFORM_TRANSPOSE: case JXFORM_TRANSVERSE: case JXFORM_ROT_90: case JXFORM_ROT_270: - info->output_width = srcinfo->image_height; - info->output_height = srcinfo->image_width; + info->output_width = srcinfo->output_height; + info->output_height = srcinfo->output_width; if (info->num_components == 1) { - info->max_h_samp_factor = 1; - info->max_v_samp_factor = 1; + info->iMCU_sample_width = srcinfo->min_DCT_v_scaled_size; + info->iMCU_sample_height = srcinfo->min_DCT_h_scaled_size; } else { - info->max_h_samp_factor = srcinfo->max_v_samp_factor; - info->max_v_samp_factor = srcinfo->max_h_samp_factor; + info->iMCU_sample_width = + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; + info->iMCU_sample_height = + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; } break; default: - info->output_width = srcinfo->image_width; - info->output_height = srcinfo->image_height; + info->output_width = srcinfo->output_width; + info->output_height = srcinfo->output_height; if (info->num_components == 1) { - info->max_h_samp_factor = 1; - info->max_v_samp_factor = 1; + info->iMCU_sample_width = srcinfo->min_DCT_h_scaled_size; + info->iMCU_sample_height = srcinfo->min_DCT_v_scaled_size; } else { - info->max_h_samp_factor = srcinfo->max_h_samp_factor; - info->max_v_samp_factor = srcinfo->max_v_samp_factor; + info->iMCU_sample_width = + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; + info->iMCU_sample_height = + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; } break; } @@ -942,12 +981,12 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, yoffset = info->crop_yoffset; /* Now adjust so that upper left corner falls at an iMCU boundary */ info->output_width = - info->crop_width + (xoffset % (info->max_h_samp_factor * DCTSIZE)); + info->crop_width + (xoffset % info->iMCU_sample_width); info->output_height = - info->crop_height + (yoffset % (info->max_v_samp_factor * DCTSIZE)); + info->crop_height + (yoffset % info->iMCU_sample_height); /* Save x/y offsets measured in iMCUs */ - info->x_crop_offset = xoffset / (info->max_h_samp_factor * DCTSIZE); - info->y_crop_offset = yoffset / (info->max_v_samp_factor * DCTSIZE); + info->x_crop_offset = xoffset / info->iMCU_sample_width; + info->y_crop_offset = yoffset / info->iMCU_sample_height; } else { info->x_crop_offset = 0; info->y_crop_offset = 0; @@ -966,14 +1005,14 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, break; case JXFORM_FLIP_H: if (info->trim) - trim_right_edge(info, srcinfo->image_width); + trim_right_edge(info, srcinfo->output_width); if (info->y_crop_offset != 0) need_workspace = TRUE; /* do_flip_h_no_crop doesn't need a workspace array */ break; case JXFORM_FLIP_V: if (info->trim) - trim_bottom_edge(info, srcinfo->image_height); + trim_bottom_edge(info, srcinfo->output_height); /* Need workspace arrays having same dimensions as source image. */ need_workspace = TRUE; break; @@ -985,8 +1024,8 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, break; case JXFORM_TRANSVERSE: if (info->trim) { - trim_right_edge(info, srcinfo->image_height); - trim_bottom_edge(info, srcinfo->image_width); + trim_right_edge(info, srcinfo->output_height); + trim_bottom_edge(info, srcinfo->output_width); } /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; @@ -994,22 +1033,22 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, break; case JXFORM_ROT_90: if (info->trim) - trim_right_edge(info, srcinfo->image_height); + trim_right_edge(info, srcinfo->output_height); /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; break; case JXFORM_ROT_180: if (info->trim) { - trim_right_edge(info, srcinfo->image_width); - trim_bottom_edge(info, srcinfo->image_height); + trim_right_edge(info, srcinfo->output_width); + trim_bottom_edge(info, srcinfo->output_height); } /* Need workspace arrays having same dimensions as source image. */ need_workspace = TRUE; break; case JXFORM_ROT_270: if (info->trim) - trim_bottom_edge(info, srcinfo->image_width); + trim_bottom_edge(info, srcinfo->output_width); /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; @@ -1026,10 +1065,10 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, SIZEOF(jvirt_barray_ptr) * info->num_components); width_in_iMCUs = (JDIMENSION) jdiv_round_up((long) info->output_width, - (long) (info->max_h_samp_factor * DCTSIZE)); + (long) info->iMCU_sample_width); height_in_iMCUs = (JDIMENSION) jdiv_round_up((long) info->output_height, - (long) (info->max_v_samp_factor * DCTSIZE)); + (long) info->iMCU_sample_height); for (ci = 0; ci < info->num_components; ci++) { compptr = srcinfo->comp_info + ci; if (info->num_components == 1) { @@ -1048,9 +1087,11 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, width_in_blocks, height_in_blocks, (JDIMENSION) v_samp_factor); } - } + info->workspace_coef_arrays = coef_arrays; + } else + info->workspace_coef_arrays = NULL; - info->workspace_coef_arrays = coef_arrays; + return TRUE; } @@ -1062,8 +1103,17 @@ transpose_critical_parameters (j_compress_ptr dstinfo) int tblno, i, j, ci, itemp; jpeg_component_info *compptr; JQUANT_TBL *qtblptr; + JDIMENSION jtemp; UINT16 qtemp; + /* Transpose image dimensions */ + jtemp = dstinfo->image_width; + dstinfo->image_width = dstinfo->image_height; + dstinfo->image_height = jtemp; + itemp = dstinfo->min_DCT_h_scaled_size; + dstinfo->min_DCT_h_scaled_size = dstinfo->min_DCT_v_scaled_size; + dstinfo->min_DCT_v_scaled_size = itemp; + /* Transpose sampling factors */ for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -1296,10 +1346,10 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo, } /* Correct the destination's image dimensions as necessary - * for crop and rotate/flip operations. + * for rotate/flip, resize, and crop operations. */ - dstinfo->image_width = info->output_width; - dstinfo->image_height = info->output_height; + dstinfo->jpeg_width = info->output_width; + dstinfo->jpeg_height = info->output_height; /* Transpose destination image parameters */ switch (info->transform) { @@ -1326,12 +1376,12 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo, /* Suppress output of JFIF marker */ dstinfo->write_JFIF_header = FALSE; /* Adjust Exif image parameters */ - if (dstinfo->image_width != srcinfo->image_width || - dstinfo->image_height != srcinfo->image_height) + if (dstinfo->jpeg_width != srcinfo->image_width || + dstinfo->jpeg_height != srcinfo->image_height) /* Align data segment to start of TIFF structure for parsing */ adjust_exif_parameters(srcinfo->marker_list->data + 6, srcinfo->marker_list->data_length - 6, - dstinfo->image_width, dstinfo->image_height); + dstinfo->jpeg_width, dstinfo->jpeg_height); } /* Return the appropriate output data set */ @@ -1415,8 +1465,8 @@ jtransform_execute_transform (j_decompress_ptr srcinfo, * (after reading source header): * image_width = cinfo.image_width * image_height = cinfo.image_height - * MCU_width = cinfo.max_h_samp_factor * DCTSIZE - * MCU_height = cinfo.max_v_samp_factor * DCTSIZE + * MCU_width = cinfo.max_h_samp_factor * cinfo.block_size + * MCU_height = cinfo.max_v_samp_factor * cinfo.block_size * Result: * TRUE = perfect transformation possible * FALSE = perfect transformation not possible diff --git a/source/Irrlicht/jpeglib/transupp.h b/source/Irrlicht/jpeglib/transupp.h index 858e2f48..5206e1df 100644 --- a/source/Irrlicht/jpeglib/transupp.h +++ b/source/Irrlicht/jpeglib/transupp.h @@ -1,7 +1,7 @@ /* * transupp.h * - * Copyright (C) 1997-2001, Thomas G. Lane. + * Copyright (C) 1997-2009, Thomas G. Lane, Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -58,9 +58,14 @@ * dimensions to keep the lower right crop corner unchanged. (Thus, the * output image covers at least the requested region, but may cover more.) * - * If both crop and a rotate/flip transform are requested, the crop is applied - * last --- that is, the crop region is specified in terms of the destination - * image. + * We also provide a lossless-resize option, which is kind of a lossless-crop + * operation in the DCT coefficient block domain - it discards higher-order + * coefficients and losslessly preserves lower-order coefficients of a + * sub-block. + * + * Rotate/flip transform, resize, and crop can be requested together in a + * single invocation. The crop is applied last --- that is, the crop region + * is specified in terms of the destination image after transform/resize. * * We also offer a "force to grayscale" option, which simply discards the * chrominance channels of a YCbCr image. This is lossless in the sense that @@ -143,8 +148,8 @@ typedef struct { JDIMENSION output_height; JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ JDIMENSION y_crop_offset; - int max_h_samp_factor; /* destination iMCU size */ - int max_v_samp_factor; + int iMCU_sample_width; /* destination iMCU size */ + int iMCU_sample_height; } jpeg_transform_info; @@ -154,7 +159,7 @@ typedef struct { EXTERN(boolean) jtransform_parse_crop_spec JPP((jpeg_transform_info *info, const char *spec)); /* Request any required workspace */ -EXTERN(void) jtransform_request_workspace +EXTERN(boolean) jtransform_request_workspace JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); /* Adjust output image parameters */ EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters diff --git a/source/Irrlicht/jpeglib/usage.txt b/source/Irrlicht/jpeglib/usage.txt index e3465cf1..fde9086f 100644 --- a/source/Irrlicht/jpeglib/usage.txt +++ b/source/Irrlicht/jpeglib/usage.txt @@ -137,7 +137,7 @@ 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 -qtables and assigned to components with -qslots parameter (see the "wizard" switches below). -CAUTION: You must explicitely add -sample 1x1 for efficient separate color +CAUTION: You must explicitly add -sample 1x1 for efficient separate color quality selection, since the default value used by library is 2x2! The -progressive switch creates a "progressive JPEG" file. In this type of @@ -245,14 +245,15 @@ The basic command line switches for djpeg are: djpeg runs noticeably faster in this mode. -scale M/N Scale the output image by a factor M/N. Currently - supported scale factors are M/8 with all M from 1 to - 16. If the /N part is omitted, then M specifies the - DCT scaled size to be applied on the given input, - which is currently equivalent to M/8 scaling, since - the source DCT size is currently always 8. - Scaling is handy if the image is larger than your - screen; also, djpeg runs much faster when scaling - down the output. + 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, djpeg runs much faster when + scaling down the output. -bmp Select BMP output format (Windows flavor). 8-bit colormapped format is emitted if -colors or -grayscale @@ -507,7 +508,8 @@ The image can be losslessly cropped by giving the switch: -crop WxH+X+Y Crop to a rectangular subarea of width W, height H starting at point X,Y. -Another not-strictly-lossless transformation switch is: +Other not-strictly-lossless transformation switches are: + -grayscale Force grayscale output. This option discards the chrominance channels if the input image is YCbCr (ie, a standard color JPEG), resulting in a grayscale JPEG file. The @@ -518,6 +520,16 @@ encoded as a color JPEG. (In such a case, the space savings from getting rid of the near-empty chroma channels won't be large; but the decoding time for a grayscale JPEG is substantially less than that for a color JPEG.) + -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. 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. + jpegtran also recognizes these switches that control what to do with "extra" markers, such as comment blocks: -copy none Copy no extra markers from source file. This setting diff --git a/source/Irrlicht/libpng/ANNOUNCE b/source/Irrlicht/libpng/ANNOUNCE index 1f402dde..cefb26a9 100644 --- a/source/Irrlicht/libpng/ANNOUNCE +++ b/source/Irrlicht/libpng/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.2.39 - August 13, 2009 +Libpng 1.4.3 - June 26, 2010 This is a public release of libpng, intended for use in production codes. @@ -8,57 +8,32 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - libpng-1.2.39.tar.xz (LZMA-compressed, recommended) - libpng-1.2.39.tar.gz - libpng-1.2.39.tar.bz2 - -Source files with LF line endings (for Unix/Linux) without the -"configure" script - - libpng-1.2.39-no-config.tar.xz (LZMA-compressed, recommended) - libpng-1.2.39-no-config.tar.gz - libpng-1.2.39-no-config.tar.bz2 + libpng-1.4.3.tar.xz (LZMA-compressed, recommended) + libpng-1.4.3.tar.gz + libpng-1.4.3.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lpng1239.zip - lpng1239.7z - lpng1239.tar.bz2 - -Project files - - libpng-1.2.39-project-netware.zip - libpng-1.2.39-project-wince.zip + lpng143.zip + lpng143.7z Other information: - libpng-1.2.39-README.txt - libpng-1.2.39-KNOWNBUGS.txt - libpng-1.2.39-LICENSE.txt - libpng-1.2.39-Y2K-compliance.txt - libpng-1.2.39-[previous version]-diff.txt + libpng-1.4.3-README.txt + libpng-1.4.3-LICENSE.txt -Changes since the last public release (1.2.38): +Changes since the last public release (1.4.2): + Added missing quotation marks in the aix block of configure.ac + The new "vstudio" project was missing from the zip and 7z distributions. + Rewrote png_process_IDAT_data to consistently treat extra data as warnings + and handle end conditions more cleanly. + Removed the now-redundant check for out-of-bounds new_row from example.c + Changed char *msg to PNG_CONST char *msg in pngrutil.c + Stop memory leak when reading a malformed sCAL chunk. -version 1.2.39 [August 13, 2009] - - Added a prototype for png_64bit_product() in png.h - Expanded the information about prototypes in the libpng style section of - the documentation. - Rebuilt configure scripts with autoconf-2.64. - Avoid a possible NULL dereference in debug build, in png_set_text_2(). - (bug introduced in libpng-0.95, discovered by Evan Rouault) - Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec - from . - Reject attempt to write iCCP chunk with negative embedded profile length - (JD Chen) - -Send comments/corrections/commendations to png-mng-implement at lists.sf.net - -Send comments/corrections/commendations to png-mng-implement at lists.sf.net -(subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe) or to glennrp at users.sourceforge.net +Send comments/corrections/commendations to glennrp at users.sourceforge.net +or to png-mng-implement at lists.sf.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement). Glenn R-P diff --git a/source/Irrlicht/libpng/CHANGES b/source/Irrlicht/libpng/CHANGES index a0c588fd..be63e408 100644 --- a/source/Irrlicht/libpng/CHANGES +++ b/source/Irrlicht/libpng/CHANGES @@ -1,4 +1,5 @@ -/* +#if 0 +libpng_changes(){ /* CHANGES - changes for libpng version 0.2 @@ -539,7 +540,7 @@ version 1.0.5d [November 29, 1999] Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays. Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available to applications a macro "PNG_USE_LOCAL_ARRAYS". - Remove all the new declarations with #ifdef/#endif when + comment out (with #ifdef) all the new declarations when PNG_USE_GLOBAL_ARRAYS is defined. Added PNG_EXPORT_VAR macro to accommodate making DLL's. version 1.0.5e [November 30, 1999] @@ -1301,7 +1302,7 @@ version 1.2.6beta4 [July 28, 2004] Added PNG_NO_SEQUENTIAL_READ_SUPPORTED macro to conditionally remove sequential read support. Added some "#if PNG_WRITE_SUPPORTED" blocks. - Removed some redundancy with #ifdef/#endif in png_malloc_default(). + Added #ifdef to remove some redundancy in png_malloc_default(). Use png_malloc instead of png_zalloc to allocate the pallete. version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004] Fixed buffer overflow vulnerability in png_handle_tRNS() @@ -1371,8 +1372,8 @@ version 1.2.8beta1 [November 1, 2004] Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during strip alpha operation in png_do_strip_filler(). Added PNG_1_2_X definition in pngconf.h - Comment out with #ifdef/#endif png_info_init in png.c and png_read_init - in pngread.c (as of 1.3.0) + Use #ifdef to comment out png_info_init in png.c and png_read_init in + pngread.c (as of 1.3.0) version 1.2.8beta2 [November 2, 2004] Reduce color_type to a nonalpha type after strip alpha operation in png_do_strip_filler(). @@ -1679,7 +1680,7 @@ version 1.2.15rc4 [December 27, 2006] version 1.2.15rc5 [December 31, 2006] Revised handling of rgb_to_gray. -version 1.0.23, 1.2.15 [January 5, 2007] +version 1.2.15 [January 5, 2007] Added some (unsigned long) typecasts in pngtest.c to avoid printing errors. version 1.2.16beta1 [January 6, 2007] @@ -1688,7 +1689,7 @@ version 1.2.16beta1 [January 6, 2007] version 1.2.16beta2 [January 16, 2007] Revised scripts/CMakeLists.txt -version 1.0.24, 1.2.16 [January 31, 2007] +version 1.2.16 [January 31, 2007] No changes. version 1.2.17beta1 [March 6, 2007] @@ -1759,8 +1760,8 @@ version 1.2.19beta6 [May 22, 2007] version 1.2.19beta7 [May 22, 2007] Squelched png_squelch_warnings() in pnggccrd.c and added - an #ifdef PNG_MMX_CODE_SUPPORTED/#endif block around the declarations - that caused the warnings that png_squelch_warnings was squelching. + an #ifdef PNG_MMX_CODE_SUPPORTED block around the declarations that caused + the warnings that png_squelch_warnings was squelching. version 1.2.19beta8 [May 22, 2007] Removed __MMX__ from test in pngconf.h. @@ -1773,636 +1774,388 @@ version 1.2.19beta9 [May 23, 2007] version 1.2.19beta10 [May 24, 2007] Resquelched png_squelch_warnings(), use "__attribute__((used))" instead. -version 1.2.19beta11 [May 28, 2007] - Return 0 from png_get_sPLT() and png_get_unknown_chunks() if png_ptr is NULL; - changed three remaining instances of png_strcpy() to png_strncpy() (David - Hill). - Make test for NULL row_buf at the beginning of png_do_read_transformations - unconditional. +version 1.4.0beta1 [April 20, 2006] + Enabled iTXt support (changes png_struct, thus requires so-number change). + Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED + Eliminated PNG_1_0_X and PNG_1_2_X macros. + Removed deprecated functions png_read_init, png_write_init, png_info_init, + png_permit_empty_plte, png_set_gray_1_2_4_to_8, png_check_sig, and + removed the deprecated macro PNG_MAX_UINT. + Moved "PNG_INTERNAL" parts of png.h and pngconf.h into pngintrn.h + Removed many WIN32_WCE #ifdefs (Cosmin). + Reduced dependency on C-runtime library when on Windows (Simon-Pierre) + Replaced sprintf() with png_sprintf() (Simon-Pierre) -version 1.2.19beta12 [May 28, 2007] - Revised pnggccrd.c. +version 1.4.0beta2 [April 20, 2006] + Revised makefiles and configure to avoid making links to libpng.so.* + Moved some leftover MMX-related defines from pngconf.h to pngintrn.h + Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def -version 1.2.19beta13 [June 14, 2007] - Prefer PNG_USE_PNGVCRD when _MSC_VER is defined in pngconf.h +version 1.4.0beta3 [May 10, 2006] + Updated scripts/pngw32.def to comment out MMX functions. + Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros. + Scripts/libpng.pc.in contained "configure" style version info and would + not work with makefiles. + Revised pngconf.h and added pngconf.h.in, so makefiles and configure can + pass defines to libpng and applications. -version 1.2.19beta14 [June 16, 2007] - Fix bug with handling of 16-bit transparency, introduced in 1.2.19beta2 +version 1.4.0beta4 [May 11, 2006] + Revised configure.ac, Makefile.am, and many of the makefiles to write + their defines in pngconf.h. -version 1.2.19beta15 [June 17, 2007] - Revised pnggccrd.c. +version 1.4.0beta5 [May 15, 2006] + Added a missing semicolon in Makefile.am and Makefile.in + Deleted extraneous square brackets from configure.ac -version 1.2.19beta16 [June 18, 2007] - Revised pnggccrd.c again. - Updated contrib/gregbook. - Changed '#include "pnggccrd.c"' to 'include "$srcdir/pnggccrd.c"' - in configure.ac +version 1.4.0beta6 [June 2, 2006] + Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid + buffer overflow. + Changed sonum from 0 to 1. + Removed unused prototype for png_check_sig() from png.h -version 1.2.19beta17 [June 19, 2007] - Revised many of the makefiles, to set -DPNG_NO_MMX_CODE where needed - and to not use -O3 unless -DPNG_NO_MMX_CODE is also set. +version 1.4.0beta7 [June 16, 2006] + Exported png_write_sig (Cosmin). + Optimized buffer in png_handle_cHRM() (Cosmin). + Set pHYs = 2835 x 2835 pixels per meter, and added + sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin). + Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error(). + Added typedef for png_int_32 and png_uint_32 on 64-bit systems. + Added "(unsigned long)" typecast on png_uint_32 variables in printf lists. -version 1.2.19beta18 [June 23, 2007] - Replaced some C++ style comments with C style comments in pnggccrd.c. - Copied optimized C code from pnggccrd.c to pngrutil.c, removed dependency - on pnggccrd.o from many makefiles. - Added sl and dylib to list of extensions be installed by Makefile.am +version 1.4.0beta8 [June 22, 2006] + Added demonstration of user chunk support in pngtest.c, to support the + public sTER chunk and a private vpAg chunk. -version 1.2.19beta19 [June 28, 2007] - Fixed testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN in pngrtran.c - More cleanup of pnggccrd.c and pngvcrd.c +version 1.4.0beta9 [July 3, 2006] + Removed ordinals from scripts/pngw32.def and removed png_info_int and + png_set_gray_1_2_4_to_8 entries. + Inline call of png_get_uint_32() in png_get_uint_31(). + Use png_get_uint_31() to get vpAg width and height in pngtest.c + Removed WINCE and Netware projects. + Removed standalone Y2KINFO file. -version 1.2.19beta20 [June 29, 2007] - Rebuilt Makefile.in and configure using libtool-1.5.24. - Fixed typo in pnggccrd.c +version 1.4.0beta10 [July 12, 2006] + Eliminated automatic copy of pngconf.h to pngconf.h.in from configure and + some makefiles, because it was not working reliably. Instead, distribute + pngconf.h.in along with pngconf.h and cause configure and some of the + makefiles to update pngconf.h from pngconf.h.in. + Added pngconf.h to DEPENDENCIES in Makefile.am -version 1.2.19beta21 [June 30, 2007] - More revision of pnggccrd.c - Added "test" target to Makefile.in and Makefile.am +version 1.4.0beta11 [August 19, 2006] + Removed AC_FUNC_MALLOC from configure.ac. + Added a warning when writing iCCP profile with mismatched profile length. + Patched pnggccrd.c to assemble on x86_64 platforms. + Moved chunk header reading into a separate function png_read_chunk_header() + in pngrutil.c. The chunk header (len+sig) is now serialized in a single + operation (Cosmin). + Implemented support for I/O states. Added png_ptr member io_state, and + functions png_get_io_chunk_name() and png_get_io_state() in pngget.c + (Cosmin). + Added png_get_io_chunk_name and png_get_io_state to scripts/*.def (Cosmin). + Renamed scripts/pngw32.* to scripts/pngwin.* (Cosmin). + Removed the include directories and libraries from CFLAGS and LDFLAGS + in scripts/makefile.gcc (Cosmin). + Used png_save_uint_32() to set vpAg width and height in pngtest.c (Cosmin). + Cast to proper type when getting/setting vpAg units in pngtest.c (Cosmin). + Added pngintrn.h to the Visual C++ projects (Cosmin). + Removed scripts/list (Cosmin). + Updated copyright year in scripts/pngwin.def (Cosmin). + Removed PNG_TYPECAST_NULL and used standard NULL consistently (Cosmin). + Disallowed the user to redefine png_size_t, and enforced a consistent use + of png_size_t across libpng (Cosmin). + Changed the type of png_ptr->rowbytes, PNG_ROWBYTES() and friends + to png_size_t (Cosmin). + Removed png_convert_size() and replaced png_sizeof with sizeof (Cosmin). + Removed some unnecessary type casts (Cosmin). + Changed prototype of png_get_compression_buffer_size() and + png_set_compression_buffer_size() to work with png_size_t instead of + png_uint_32 (Cosmin). + Removed png_memcpy_check() and png_memset_check() (Cosmin). + Fixed a typo (png_byte --> png_bytep) in libpng.3 and libpng.txt (Cosmin). + Clarified that png_zalloc() does not clear the allocated memory, + and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin). + Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in + pngconf.h, and used it in all memory allocation functions (Cosmin). + Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file + mentioning that the symbols declared in that file are private, and + updated the scripts and the Visual C++ projects accordingly (Cosmin). + Removed circular references between pngconf.h and pngconf.h.in in + scripts/makefile.vc*win32 (Cosmin). + Removing trailing '.' from the warning and error messages (Cosmin). + Added pngdefs.h that is built by makefile or configure, instead of + pngconf.h.in (Glenn). + Detect and fix attempt to write wrong iCCP profile length. -version 1.2.19beta22 [July 3, 2007] - Added info about pngrutil/pnggccrd/pngvcrd to png_get_header_version() - Fix type definition of dummy_value_a, b in pnggccrd.c +version 1.4.0beta12 [October 19, 2006] + Changed "logical" to "bitwise" in the documentation. + Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h + Add a typecast to stifle compiler warning in pngrutil.c -version 1.2.19beta23 [July 10, 2007] - Revert change to type definition of dummy_value_a, b in pnggccrd.c - Make sure __PIC__ is defined in pnggccrd.c when PIC is defined. - Require gcc-4.1 or better to use PNG_HAVE_MMX_FILTER_ROW on x86_64 platforms +version 1.4.0beta13 [November 10, 2006] + Fix potential buffer overflow in sPLT chunk handler. + Fix Makefile.am to not try to link to noexistent files. -version 1.2.19beta24 [July 14, 2007] - Added PNG_NO_READ_FILTER, PNG_NO_WRITE_FILTER, PNG_NO_WARNING macros. - Added contrib/pngminim to demonstrate building minimal encoder and decoder +version 1.4.0beta14 [November 15, 2006] + Check all exported functions for NULL png_ptr. -version 1.2.19beta25 [July 15, 2007] - Removed the new PNG_NO_READ_FILTER macro since it would make the library - unable to read valid PNG files, and filtering is at the heart of the - PNG format. +version 1.4.0beta15 [November 17, 2006] + Relocated two misplaced tests for NULL png_ptr. + Built Makefile.in with automake-1.9.6 instead of 1.9.2. + Build configure with autoconf-2.60 instead of 2.59 + Add "install: all" in Makefile.am so "configure; make install" will work. -version 1.2.19beta26 [July 16, 2007] - Changed "png_free(str)" to "png_free(png_ptr,str)" in pngrutil.c WinCE - code (Yves Piguet). This bug was introduced in libpng-1.2.14. - Updated scripts/CMakeLists.txt - Relocated a misplaced #endif in pnggccrd.c +version 1.4.0beta16 [November 17, 2006] + Added a typecast in png_zalloc(). -version 1.2.19beta27 [July 17, 2007] - Fixed incorrect stride and number of bytes copied (was 4 instead of - 6 bytes) in the cleanup loop of pnggccrd.c and pngvcrd.c for handling - the end of 48-bit interlaced rows (Glenn R-P). +version 1.4.0beta17 [December 4, 2006] + Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c + Add "png_bytep" typecast to profile while calculating length in pngwutil.c -version 1.2.19beta28 [July 19, 2007] - Removed requirement for gcc-4.1 or better to use PNG_HAVE_MMX_FILTER_ROW - on x86_64 platforms - Added png_warning() in pngrutil.c for short iCCP, iTXt, sPLT, or zTXT chunks. - Revised pngtest.c so warnings are displayed regardless of PNG_NO_STDIO. +version 1.4.0beta18 [December 7, 2006] + Added scripts/CMakeLists.txt -version 1.2.19beta29 [July 20, 2007] - Fix typo in pnggccrd.c (%%eax should be %%ax in secondloop48) - -version 1.2.19beta30 [July 26, 2007] - Revised pnggccrd.c - -version 1.2.19beta31 [July 27, 2007] - Fix typos in pnggccrd.c - -version 1.0.27rc1 and 1.2.19rc1 [July 31, 2007] - Disable PNG_MMX_CODE_SUPPORTED when PNG_ASSEMBLER_CODE_SUPPORTED is off. - Enable PNG_MMX_READ_FILTER_* by default, except when gcc-3.x is being - used (they were inadvertently disabled in libpng-1.2.19beta23). - Fix some debugging statements in pnggccrd.c and pngrutil.c - Added information about disabling the MMX code in libpng documentation. - -version 1.0.27rc2 and 1.2.19rc2 [August 4, 2007] - Removed some "#if 0" blocks. - Made a global struct local in pngvcrd.c to make it thread safe. - Issue a png_error() if application attempts to transform a row tht - has not been initialized. - -version 1.0.27rc3 and 1.2.19rc3 [August 9, 2007] - Slightly revised pngvcrd.c - -version 1.0.27rc4 and 1.2.19rc4 [August 9, 2007] - Revised pnggccrd.c debugging change of rc1, which was broken. +version 1.4.0beta19 [May 16, 2007] Revised scripts/CMakeLists.txt - Change default to PNG_NO_GLOBAL_ARRAYS for MSVC. - Turn off PNG_FLAG_ROW_INIT flag when setting transforms that expand pixels. - -version 1.0.27rc5 and 1.2.19rc5 [August 10, 2007] - Fix typo (missing '"') in pnggccrd.c - Revise handling of png_strtod in recent versions of WINCE - -version 1.0.27rc6 and 1.2.19rc6 [August 15, 2007] - Fix typo (missing ',') in contrib/gregbook/readpng2.c - Undid row initialization error exit added to rc2 and rc4. - -version 1.0.27 and 1.2.19 [August 18, 2007] - Conditionally restored row initialization error exit. - -version 1.2.20beta01 [August 19, 2007] - Fixed problem with compiling pnggccrd.c on Intel-Apple platforms. - Changed png_malloc() to png_malloc_warn() in png_set_sPLT(). - Added PNG_NO_ERROR_TEXT feature, with demo in contrib/pngminim - Removed define PNG_WARN_UNINITIALIZED_ROW 1 /* 0: warning; 1: error */ - because it caused some trouble. - -version 1.2.20beta02 [August 20, 2007] - Avoid compiling pnggccrd.c on Intel-Apple platforms. - -version 1.2.20beta03 [August 20, 2007] - Added "/D PNG_NO_MMX_CODE" to the non-mmx builds of projects/visualc6 - and visualc71. - -version 1.2.20beta04 [August 21, 2007] - Revised pngvcrd.c for improved efficiency (Steve Snyder). - -version 1.2.20rc1 [August 23, 2007] - Revised pngconf.h to set PNG_NO_MMX_CODE for gcc-3.x compilers. - -version 1.2.20rc2 [August 27, 2007] - Revised scripts/CMakeLists.txt - Revised #ifdefs to ensure one and only one of pnggccrd.c, pngvcrd.c, - or part of pngrutil.c is selected. - -version 1.2.20rc3 [August 30, 2007] - Remove a little more code in pngwutil.c when PNG_NO_WRITE_FILTER is selected. - Added /D _CRT_SECURE_NO_WARNINGS to visual6c and visualc71 projects. - Compile png_mmx_support() in png.c even when PNG_NO_MMX_CODE is defined. - Restored a "superfluous" #ifdef that was removed from 1.2.20rc2 pnggccrd.c, - breaking the png_mmx_support() function. - -version 1.2.20rc4 [September 1, 2007] - Removed Intel contributions (MMX, Optimized C). - -version 1.2.20rc5 [September 2, 2007] - Restored configure and Makefile.in to rc3 and put a snippet of code in - pnggccrd.c, to ensure configure makes the same PNG_NO_MMX_CODE selection - -version 1.2.20rc6 [September 2, 2007] - Fixed bugs in scripts/CMakeLists.txt - Removed pngvcrd.c references from msvc projects. - -version 1.0.28 and 1.2.20 [September 8, 2007] - Removed "(NO READ SUPPORT)" from png_get_header_version() string. - -version 1.2.21beta1 [September 14, 2007] - Fixed various mistakes reported by George Cook and Jeff Phillips: - logical vs bitwise NOT in pngrtran.c, bug introduced in 1.2.19rc2 - 16-bit cheap transparency expansion, bug introduced in 1.2.19beta2 - errors with sizeof(unknown_chunk.name), bugs introduced in 1.2.19beta11 - <= compare with unsigned var in pngset.c, should be ==. - -version 1.2.21beta2 [September 18, 2007] - Removed some extraneous typecasts. - -version 1.2.21rc1 [September 25, 2007] - Fixed potential out-of-bounds reads in png_handle_pCAL() and - png_handle_ztXt() ("flayer" results reported by Tavis Ormandy). - -version 1.2.21rc2 [September 26, 2007] - Fixed potential out-of-bounds reads in png_handle_sCAL(), - png_handle_iTXt(), and png_push_read_tEXt(). - Remove some PNG_CONST declarations from pngwutil.c to avoid compiler warnings - Revised makefiles to update paths in libpng.pc properly. - -version 1.2.21rc3 [September 27, 2007] - Revised makefiles to update "Libs" in libpng.pc properly. - -version 1.0.29 and 1.2.21rc3 [October 4, 2007] - No changes. - -version 1.2.22beta1 [October 4, 2007] - Again, fixed logical vs bitwise NOT in pngrtran.c, bug introduced - in 1.2.19rc2 - -version 1.2.22beta2 [October 5, 2007] - Fixed string length error in pngset.c (caused crashes while decoding iCCP) - Add terminating NULL after each instance of png_strncpy(). - -version 1.2.22beta3 [October 6, 2007] - Fix two off-by-one terminating NULL after png_strncpy(). - -version 1.2.22beta4 [October 7, 2007] - Changed some 0 to '\0'. - -version 1.0.30rc1 and 1.2.22rc1 [October 8, 2007] - No changes. - -version 1.0.30 and 1.2.22 [October 13, 2007] - No changes. - -version 1.2.23beta01 [October 15, 2007] - Reduced number of invocations of png_strlen() in pngset.c. - Changed [azAZ09_] to [_abcde...89] in Makefile.am for better localization. - -version 1.2.23beta02 [October 16, 2007] - Eliminated png_strncpy() and png_strcpy() (Pierre Poissinger) - Changed $AN to $(AN) in Makefile.am. - -version 1.2.23beta03 [October 16, 2007] - Fixed off-by-one error in pngset.c - Restore statement to set last character of buffer to \0 in pngerror.c - -version 1.2.23beta04 [October 23, 2007] - Reject attempt to set all-zero cHRM values. - -version 1.2.23beta05 [October 26, 2007] - Add missing quotes in projects/visualc6, lost in version 1.2.20rc3 - -version 1.2.23rc01 [November 2, 2007] - No changes. - -version 1.2.23 [November 6, 2007] - No changes. - -version 1.2.24beta01 [November 19, 2007] - Moved misplaced test for malloc failure in png_set_sPLT(). This bug was - introduced in libpng-1.2.20beta01. - Ifdef out avg_row etc from png.h and pngwrite.c when PNG_NO_WRITE_FILTER - Do not use png_ptr->free_fn and png_ptr->mem_fn in png_destroy_read_struct() - when png_ptr is NULL (Marshall Clow). - Updated handling of symbol prefixes in Makefile.am and configure.ac (Mike - Frysinger). - -version 1.2.24beta02 [November 30, 2007] - Removed a useless test and fixed incorrect test in png_set_cHRM_fixed() - (David Hill). - -version 1.2.24rc01 [December 7, 2007] - No changes. - -version 1.2.24 [December 14, 2007] - Make sure not to redefine _BSD_SOURCE in pngconf.h - Revised gather.sh and makefile.std in contrib/pngminim to avoid compiling - unused files. - -version 1.2.25beta01 [January 7, 2008] - Fixed bug with unknown chunk handling, introduced in version 1.2.17rc2 - -version 1.2.25beta02 [January 10, 2008] - Prevent gamma from being applied twice. - -version 1.2.25rc01 [January 17, 2008] - No changes. - -version 1.2.25beta03 [January 22, 2008] - Fixed some continue-after-malloc-failure errors in pngset.c (David Hill) - Check for info_ptr == NULL in png_read_info() and png_process_data(). - Check for possible use of NULL user_png_ver[] in png_create_read_struct(). - Change "if (swidth == NULL)" to "if (sheight == NULL)" in png_handle_sCAL - (bug introduced in libpng-1.2.4/1.0.13). - Return from png_destroy_read_struct() if png_ptr_ptr is NULL. - Fix overflow of "msg" in png_decompress_chunk(). - -version 1.2.25beta04 [January 26, 2008] - Work around Coverity bug report by slightly refactoring - png_read_push_finish_row() - -version 1.2.25beta05 [January 31, 2008] - Added libpng-1.2.25beta05.tar.lzma to distribution. Get the lzma codec - from . - Added lp1225b05.7z to distribution. Get the 7-zip decoder from - from . - Fixed some broken links in the README file. - -version 1.2.25beta06 [February 6, 2008] - Refactored png_read_push_finish_row() again, trying to satisfy Coverity. - Fixed potential NULL dereference of png_ptr in png_destroy_write_struct(); - clarified potential NULL dereference of png_ptr in png_destroy_read_struct(); - fixed potential NULL dereference of info_ptr in png_handle_bKGD(); - fixed potential NULL dereference of user_png_ver[] in - png_create_write_struct_2(). (Coverity) - -version 1.2.25rc02 [February 10, 2008] - Reset png_ptr->pass in png_read_push_finish_row() before break. - Changed "pass" from png_byte to int. - -version 1.2.25 and 1.0.31 [February 18, 2008] - No changes. - -version 1.2.26beta01 [February 21, 2008] - Added missing "(" in pngmem.c. Bug introduced in libpng-1.2.2/1.0.13 - -version 1.2.26beta02 [March 12, 2008] - Refined error message returned from deflateInit2 in pngwutil.c - Check IHDR length in png_push_read_chunk() before saving it. - -version 1.2.26beta03 [March 16, 2008] - Revised contrib/gregbook to handle premature end-of-file and file - read errors correctly. - -version 1.2.26beta04 [March 18, 2008] - Free png_ptr->big_row_buf and png_ptr->prev_row before allocating - new copies in png_read_start_row(). Bug introduced in libpng-1.2.22. - -version 1.2.26beta05 [March 19, 2008] - Removed extra png_free() added in libpng-1.2.26beta04. - -version 1.2.26beta06 [March 19, 2008] - Avoid reallocating big_row_buf and prev_row when the size does not increase. - -version 1.2.26rc01 [March 26, 2008] - Ifdef out some code that is unused when interlacing is not supported. - -versions 1.0.32 and 1.2.26 [April 2, 2008] - No changes. - -version 1.2.27beta01 [April 12, 2008] - Fixed bug (introduced in libpng-1.0.5h) with handling zero-length - unknown chunks. - Added more information about png_set_keep_unknown_chunks() to the - documentation. - Reject tRNS chunk with out-of-range samples instead of masking off - the invalid high bits as done in since libpng-1.2.19beta5. - -version 1.2.27beta02 [April 13, 2008] - Revised documentation about unknown chunk and user chunk handling. - Keep tRNS chunk with out-of-range samples and issue a png_warning(). - -version 1.2.27beta03 [April 14, 2008] - Added check for NULL ptr in TURBOC version of png_free_default(). - Removed several unnecessary checks for NULL before calling png_free(). - Revised png_set_tRNS() so that calling it twice removes and invalidates - the previous call. - Revised pngtest to check for out-of-range tRNS samples. - -version 1.2.27beta04 [April 18, 2008] - Added AC_LIBTOOL_WIN32_DLL to configure.ac - Rebuilt Makefile.in, aclocal.m4, and configure with autoconf-2.62 - -version 1.2.27beta05 [April 19, 2008] - Added MAINTAINERCLEANFILES variable to Makefile.am - -version 1.2.27beta06 [April 21, 2008] - Avoid changing color_type from GRAY to RGB by - png_set_expand_gray_1_2_4_to_8(). - -version 1.2.27rc01 [April 23, 2008] - Fix broken URL for rfc2083 in png.5 and libpng-*.txt - -version 1.0.33 and 1.2.27 [April 30, 2008] - No changes. - -version 1.0.34 and 1.2.28 [April 30, 2008] - Rebuilt Makefile.in, aclocal.m4, and configure with autoconf-2.61 - due to backward incompatibilities. - Removed a stray object file from contrib/gregbook - -version 1.2.29beta01 [May 1, 2008] - Removed some stray *.diff and *.orig files - -version 1.2.29beta02 [May 1, 2008] - Reverted Makefile.in, aclocal.m4, and configure to the libpng-1.2.26 - versions. - -version 1.2.29beta03 [May 2, 2008] - Added --force to autogen libtoolize options and --force-missing to - automake options. - Changed $(ECHO) to echo in Makefile.am and Makefile.in - Updated all configure files to autoconf-2.62 - Comment out pnggcrd.c code with #ifdef/#endif if using MSC_VER - -version 1.2.29rc01 [May 4, 2008] - No changes. - -version 1.0.35 and 1.2.29 [May 8, 2008] - No changes. - -version 1.0.37 [May 9, 2008] - Updated Makefile.in and configure (omitted version 1.0.36). - -version 1.2.30beta01 [May 29, 2008] - Updated libpng.pc-configure.in and libpng-config.in per debian bug reports. - -version 1.2.30beta02 [June 25, 2008] - Restored png_flush(png_ptr) at the end of png_write_end(), that was - removed from libpng-1.0.9beta03. - -version 1.2.30beta03 [July 6, 2008] - Merged some cosmetic whitespace changes from libpng-1.4.0beta19. - Inline call of png_get_uint_32() in png_get_uint_31(), as in 1.4.0beta19. - Added demo of decoding vpAg and sTER chunks to pngtest.c, from 1.4.0beta19. - Changed PNGMAJ from 0 to 12 in makefile.darwin, which does not like 0. - Added new private function png_read_chunk_header() from 1.4.0beta19. - Merge reading of chunk length and chunk type into a single 8-byte read. - Merge writing of chunk length and chunk type into a single 8-byte write. - -version 1.2.30beta04 [July 10, 2008] - Merged more cosmetic whitespace changes from libpng-1.4.0beta19. - -version 1.0.38rc01, 1.2.30rc01 [July 18, 2008] - No changes. - -version 1.0.38rc02, 1.2.30rc02 [July 21, 2008] + Rebuilt configure and Makefile.in with newer tools. + Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. + Added scripts/makefile.nommx + +version 1.4.0beta20 [July 9, 2008] + Moved several PNG_HAVE_* macros from pngpriv.h to png.h because applications + calling set_unknown_chunk_location() need them. + Moved several macro definitions from pngpriv.h to pngconf.h + Merge with changes to the 1.2.X branch, as of 1.2.30beta04. + Deleted all use of the MMX assembler code and Intel-licensed optimizations. + Revised makefile.mingw + +version 1.4.0beta21 [July 21, 2008] Moved local array "chunkdata" from pngrutil.c to the png_struct, so it will be freed by png_read_destroy() in case of a read error (Kurt Christensen). -version 1.0.38rc03, 1.2.30rc03 [July 21, 2008] - Changed "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking. +version 1.4.0beta22 [July 21, 2008] + Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking. -version 1.0.38rc04, 1.2.30rc04 [July 22, 2008] - Changed "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in +version 1.4.0beta23 [July 22, 2008] + Change "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in png_decompress_chunk(). -version 1.0.38rc05, 1.2.30rc05 [July 25, 2008] - Changed all remaining "chunkdata" to "png_ptr->chunkdata" in - png_decompress_chunk() and remove chunkdata from parameter list. +version 1.4.0beta24 [July 25, 2008] + Change all remaining "chunkdata" to "png_ptr->chunkdata" in + png_decompress_chunk(), and remove "chunkdata" from parameter list. Put a call to png_check_chunk_name() in png_read_chunk_header(). Revised png_check_chunk_name() to reject a name with a lowercase 3rd byte. Removed two calls to png_check_chunk_name() occuring later in the process. + Define PNG_NO_ERROR_NUMBERS by default in pngconf.h -version 1.0.38rc06, 1.2.30rc06 [July 29, 2008] +version 1.4.0beta25 [July 30, 2008] Added a call to png_check_chunk_name() in pngpread.c Reverted png_check_chunk_name() to accept a name with a lowercase 3rd byte. - -version 1.0.38r07, 1.2.30r07 [August 2, 2008] - Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta) - Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings. - Added code in pngset.c to quiet compiler warnings. - Updated contrib/visupng/cexcept.h to version 2.0.1 + Added png_push_have_buffer() function to pngpread.c + Eliminated PNG_BIG_ENDIAN_SUPPORTED and associated png_get_* macros. + Made inline expansion of png_get_*() optional with PNG_USE_READ_MACROS. + Eliminated all PNG_USELESS_TESTS and PNG_CORRECT_PALETTE_SUPPORTED code. + Synced contrib directory and configure files with libpng-1.2.30beta06. + Eliminated no-longer-used pngdefs.h (but it's still built in the makefiles) Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c -version 1.0.38r08, 1.2.30r08 [August 2, 2008] - Enclose "volatile" declarations in #ifdef PNG_SETJMP_SUPPORTED (Cosmin). +version 1.4.0beta26 [August 4, 2008] + Removed png_push_have_buffer() function in pngpread.c. It increased the + compiled library size slightly. + Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta) + Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings. + Updated contrib/visupng/cexcept.h to version 2.0.1 + Added PNG_LITERAL_CHARACTER macros for #, [, and ]. -version 1.0.38, 1.2.30 [August 14, 2008] - No changes. +version 1.4.0beta27 [August 5, 2008] + Revised usage of PNG_LITERAL_SHARP in pngerror.c. + Moved newline character from individual png_debug messages into the + png_debug macros. + Allow user to #define their own png_debug, png_debug1, and png_debug2. -version 1.2.31rc01 [August 19, 2008] +version 1.4.0beta28 [August 5, 2008] + Revised usage of PNG_LITERAL_SHARP in pngerror.c. + Added PNG_STRING_NEWLINE macro + +version 1.4.0beta29 [August 9, 2008] + Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers. + Added PNG_STRING_COPYRIGHT macro. + Added non-ISO versions of png_debug macros. + +version 1.4.0beta30 [August 14, 2008] + Added premultiplied alpha feature (Volker Wiendl). + +version 1.4.0beta31 [August 18, 2008] + Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c Removed extra crc check at the end of png_handle_cHRM(). Bug introduced - in libpng-1.2.30beta03 (Heiko Nitzsche). + in libpng-1.4.0beta20. -version 1.2.31rc02 [August 19, 2008] +version 1.4.0beta32 [August 19, 2008] Added PNG_WRITE_FLUSH_SUPPORTED block around new png_flush() call. + Revised PNG_NO_STDIO version of png_write_flush() -version 1.2.31rc03 [August 19, 2008] - Added PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED block, off by default, around - new png_flush(). +version 1.4.0beta33 [August 20, 2008] + Added png_get|set_chunk_cache_max() to limit the total number of sPLT, + text, and unknown chunks that can be stored. -version 1.0.39, 1.2.31 [August 21, 2008] - No changes. - -version 1.2.32beta01 [September 6, 2008] - Shortened tIME_string to 29 bytes in pngtest.c (bug introduced in - libpng-1.2.22). +version 1.4.0beta34 [September 6, 2008] + Shortened tIME_string to 29 bytes in pngtest.c Fixed off-by-one error introduced in png_push_read_zTXt() function in libpng-1.2.30beta04/pngpread.c (Harald van Dijk) - These bugs have been given the vulnerability id CVE-2008-3964. -version 1.0.40, 1.2.32 [September 18, 2008] - No changes. - -version 1.2.33beta01 [October 6, 2008] +version 1.4.0beta35 [October 6, 2008] + Changed "trans_values" to "trans_color". + Changed so-number from 0 to 14. Some OS do not like 0. Revised makefile.darwin to fix shared library numbering. Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8() in example.c (debian bug report) -version 1.2.33rc01 [October 15, 2008] - No changes. +version 1.4.0beta36 [October 25, 2008] + Sync with tEXt vulnerability fix in libpng-1.2.33rc02. -version 1.0.41rc01, version 1.2.33rc02 [October 23, 2008] - Changed remaining "key" to "png_ptr->chunkdata" in png_handle_tEXt() - to avoid memory leak after memory failure while reading tEXt chunk.` +version 1.4.0beta37 [November 13, 2008] + Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c, + and pngwrite.c -version 1.2.33 [October 31, 2008] - No changes. +version 1.4.0beta38 [November 22, 2008] + Added check for zero-area RGB cHRM triangle in png_check_cHRM() and + png_check_cHRM_fixed(). -version 1.2.34beta01 [November 27, 2008] - Revised png_warning() to write its message on standard output by default - when warning_fn is NULL. This was the behavior prior to libpng-1.2.9beta9. - Fixed string vs pointer-to-string error in png_check_keyword(). - Added png_check_cHRM_fixed() in png.c and moved checking from pngget.c, - pngrutil.c, and pngwrite.c, and eliminated floating point cHRM checking. - Added check for zero-area RGB cHRM triangle in png_check_cHRM_fixed(). - In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant - check for all-zero coordinates that is detected by the triangle check. +version 1.4.0beta39 [November 23, 2008] Revised png_warning() to write its message on standard output by default when warning_fn is NULL. -version 1.2.34beta02 [November 28, 2008] - Corrected off-by-one error in bKGD validity check in png_write_bKGD() - and in png_handle_bKGD(). +version 1.4.0beta40 [November 24, 2008] + Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed(). + In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant + check for all-zero coordinates that is detected by the triangle check. -version 1.2.34beta03 [December 1, 2008] - Revised bKGD validity check to use >= x instead of > x + 1 - Merged with png_debug from libpng-1.4.0 to remove newlines. +version 1.4.0beta41 [November 26, 2008] + Fixed string vs pointer-to-string error in png_check_keyword(). + Rearranged test expressions in png_check_cHRM_fixed() to avoid internal + overflows. + Added PNG_NO_CHECK_cHRM conditional. -version 1.2.34beta04 [December 2, 2008] - More merging with png_debug from libpng-1.4.0 to remove newlines. +version 1.4.0beta42, 43 [December 1, 2008] + Merge png_debug with version 1.2.34beta04. -version 1.2.34beta05 [December 5, 2008] +version 1.4.0beta44 [December 6, 2008] Removed redundant check for key==NULL before calling png_check_keyword() to ensure that new_key gets initialized and removed extra warning - (Arvan Pritchard). + (Merge with version 1.2.34beta05 -- Arvan Pritchard). -version 1.2.34beta06 [December 9, 2008] +version 1.4.0beta45 [December 9, 2008] In png_write_png(), respect the placement of the filler bytes in an earlier call to png_set_filler() (Jim Barry). -version 1.2.34beta07 [December 9, 2008] +version 1.4.0beta46 [December 10, 2008] Undid previous change and added PNG_TRANSFORM_STRIP_FILLER_BEFORE and PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated PNG_TRANSFORM_STRIP_FILLER (Jim Barry). -version 1.0.42rc01, 1.2.34rc01 [December 11, 2008] - No changes. +version 1.4.0beta47 [December 15, 2008] + Support for dithering was disabled by default, because it has never + been well tested and doesn't work very well. The code has not + been removed, however, and can be enabled by building libpng with + PNG_READ_DITHER_SUPPORTED defined. -version 1.0.42, 1.2.34 [December 18, 2008] - No changes. +version 1.4.0beta48 [February 14, 2009] + Added new exported function png_calloc(). + Combined several instances of png_malloc(); png_memset() into png_calloc(). + Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 + but was never defined. -version 1.2.35beta01 [February 4, 2009] - Zero out some arrays of pointers after png_malloc(). (Tavis Ormandy) - -version 1.2.35beta02 [February 4, 2009] - Zero out more arrays of pointers after png_malloc(). - -version 1.2.35beta03 [February 5, 2009] - Use png_memset() instead of a loop to intialize pointers. We realize - this will not work on platforms where the NULL pointer is not all zeroes. - -version 1.2.35rc01 [February 11, 2009] - No changes. - -version 1.2.35rc02 [February 12, 2009] - Fix typo in new png_memset call in pngset.c (png_color should be png_charp) - -version 1.0.43 and 1.2.35 [February 14, 2009] - No changes. - -version 1.2.36beta01 [February 28, 2009] +version 1.4.0beta49 [February 28, 2009] + Added png_fileno() macro to pngconf.h, used in pngwio.c + Corrected order of #ifdef's in png_debug definition in png.h + Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments + for pcal_params. + Fixed order of #ifdef directives in the png_debug defines in png.h + (bug introduced in libpng-1.2.34/1.4.0beta29). Revised comments in png_set_read_fn() and png_set_write_fn(). - Revised order of #ifdef's and indentation in png_debug definitions of png.h - bug introduced in libpng-1.2.34. -version 1.2.36beta02 [March 21, 2009] - Use png_memset() after png_malloc() of big_row_buf when reading an - interlaced file, to avoid a possible UMR. - Undid recent revision of PNG_NO_STDIO version of png_write_flush(). Users - having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined. - Revised libpng*.txt documentation about use of png_write_flush(). +version 1.4.0beta50 [March 18, 2009] + Use png_calloc() instead of png_malloc() to allocate big_row_buf when + reading an interlaced file, to avoid a possible UMR. + Undid revision of PNG_NO_STDIO version of png_write_flush(). Users + having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined + or supply their own flush_fn() replacement. + Revised libpng*.txt and png.h documentation about use of png_write_flush() + and png_set_write_fn(). Removed fflush() from pngtest.c. Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h -version 1.2.36beta03 [March 27, 2009] - Relocated misplaced PNG_1_0_X define in png.h that caused the prototype - for png_set_strip_error_numbers() to be omitted from PNG_NO_ASSEMBLER_CODE - builds. This bug was introduced in libpng-1.2.15beta4. +version 1.4.0beta51 [March 21, 2009] + Removed new png_fileno() macro from pngconf.h . + +version 1.4.0beta52 [March 27, 2009] + Relocated png_do_chop() ahead of building gamma tables in pngrtran.c + This avoids building 16-bit gamma tables unnecessarily. + Removed fflush() from pngtest.c. + Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt -version 1.2.36beta04 [April 5, 2009] +version 1.4.0beta53 [April 1, 2009] + Removed some remaining MMX macros from pngpriv.h Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles) -version 1.2.36beta05 [April 24, 2009] +version 1.4.0beta54 [April 13, 2009] Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow application code writers to bypass the check for multiple inclusion of setjmp.h when they know that it is safe to ignore the situation. - Made some cosmetic changes to whitespace in pngtest output. + Eliminated internal use of setjmp() in pngread.c and pngwrite.c + Reordered ancillary chunks in pngtest.png to be the same as what + pngtest now produces, and made some cosmetic changes to pngtest output. + Eliminated deprecated png_read_init_3() and png_write_init_3() functions. + +version 1.4.0beta55 [April 15, 2009] + Simplified error handling in pngread.c and pngwrite.c by putting + the new png_read_cleanup() and png_write_cleanup() functions inline. + +version 1.4.0beta56 [April 25, 2009] Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress "shadowed declaration" warning from gcc-4.3.3. Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration" warning about a global "gamma" variable in math.h on some platforms. -version 1.2.36rc01 [April 30, 2009] - No changes. +version 1.4.0beta57 [May 2, 2009] + Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 + but was never defined (again). + Rebuilt configure scripts with autoconf-2.63 instead of 2.62 + Removed pngprefs.h and MMX from makefiles -version 1.0.44 and 1.2.36 [May 7, 2009] - No changes. - -version 1.2.37beta01 [May 14, 2009] - Fixed inconsistency in pngrutil.c, introduced in libpng-1.2.36. The - memset() was using "png_ptr->rowbytes" instead of "row_bytes", which - the corresponding png_malloc() uses (Joe Drew). +version 1.4.0beta58 [May 14, 2009] + Changed pngw32.def to pngwin.def in makefile.mingw (typo was introduced + in beta57). Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri) - Updated some of the makefiles in the scripts directory (merged with - those in libpng-1.4.0beta57). -version 1.2.37beta02 [May 19, 2009] - Fixed typo in libpng documentation (FILTER_AVE should be FILTER_AVG) +version 1.4.0beta59 [May 15, 2009] + Reformated sources in libpng style (3-space intentation, comment format) + Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG) + Added sections about the git repository and our coding style to the + documentation Relocated misplaced #endif in pngwrite.c, sCAL chunk handler. + +version 1.4.0beta60 [May 19, 2009] Conditionally compile png_read_finish_row() which is not used by progressive readers. Added contrib/pngminim/preader to demonstrate building minimal progressive decoder, based on contrib/gregbook with embedded libpng and zlib. -version 1.2.37beta03 [May 20, 2009] +version 1.4.0beta61 [May 20, 2009] In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there is only one makefile in those directories, and revised the README files accordingly. - Reformated sources in libpng style (3-space indentation, comment format) + More reformatting of comments, mostly to capitalize sentences. -version 1.2.37rc01 [May 27, 2009] - No changes. - -versions 1.2.37 and 1.0.45 [June 4, 2009] - Reformatted several remaining "else statement;" and "if () statement;" into - two lines. +version 1.4.0beta62 [June 2, 2009] Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h - Added sections about the git repository and our coding style to the - documentation (merged from libpng-1.4.0beta62) + Reformatted several remaining "else statement" into two lines. Added a section to the libpng documentation about using png_get_io_ptr() in configure scripts to detect the presence of libpng. -version 1.2.38beta01 [June 17, 2009] +version 1.4.0beta63 [June 15, 2009] Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR() multiple times and to specify the sample order in the tRNS chunk, because the ISO PNG specification has a typo in the tRNS table. @@ -2411,59 +2164,456 @@ version 1.2.38beta01 [June 17, 2009] available for ignoring known chunks even when not saving unknown chunks. Adopted preference for consistent use of "#ifdef" and "#ifndef" versus "#if defined()" and "if !defined()" where possible. - Added PNG_NO_HANDLE_AS_UNKNOWN in the PNG_LEGACY_SUPPORTED block of - pngconf.h, and moved the various unknown chunk macro definitions - outside of the PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks. -version 1.0.46 [June 18, 2009] - Removed some editing cruft from scripts/libpng.pc.in and some makefiles. +version 1.4.0beta64 [June 24, 2009] + Eliminated PNG_LEGACY_SUPPORTED code. + Moved the various unknown chunk macro definitions outside of the + PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks. -version 1.2.38rc01 [June 24, 2009] - No changes. +version 1.4.0beta65 [June 26, 2009] + Added a reference to the libpng license in each file. -version 1.2.38rc02 [June 29, 2009] - Added a reference to the libpng license in each source file. +version 1.4.0beta66 [June 27, 2009] + Refer to the libpng license instead of the libpng license in each file. -version 1.2.38rc03 [July 11, 2009] - Revised references to the libpng license in pngconf.h and contrib/visupng - source files. - Rebuilt configure scripts with autoconf-2.63. +version 1.4.0beta67 [July 6, 2009] + Relocated INVERT_ALPHA within png_read_png() and png_write_png(). + Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB. + Added an "xcode" project to the projects directory (Alam Arias). -version 1.0.47 and 1.2.38 [July 16, 2009] - No changes. +version 1.4.0beta68 [July 19, 2009] + Avoid some tests in filter selection in pngwutil.c -version 1.2.39beta01 [July 25, 2009] +version 1.4.0beta69 [July 25, 2009] + Simplified the new filter-selection test. This runs faster in the + common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases. + Removed extraneous declaration from the new call to png_read_gray_to_rgb() + (bug introduced in libpng-1.4.0beta67). + Fixed up xcode project (Alam Arias) Added a prototype for png_64bit_product() in png.c -version 1.2.39beta02 [July 27, 2009] +version 1.4.0beta70 [July 27, 2009] Avoid a possible NULL dereference in debug build, in png_set_text_2(). (bug introduced in libpng-0.95, discovered by Evan Rouault) -version 1.2.39beta03 [July 29, 2009] - Relocated new png_64_bit_product() prototype into png.h - Expanded the information about prototypes in the libpng style section of - the documentation. +version 1.4.0beta71 [July 29, 2009] Rebuilt configure scripts with autoconf-2.64. -version 1.2.39beta04 [August 1, 2009] - Replaced *.tar.lzma with *.txz in distribution. Get the xz codec +version 1.4.0beta72 [August 1, 2009] + Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec from . -version 1.2.39beta05 [August 1, 2009] +version 1.4.0beta73 [August 1, 2009] Reject attempt to write iCCP chunk with negative embedded profile length (JD Chen) -version 1.2.39c01 [August 6, 2009] +version 1.4.0beta74 [August 8, 2009] + Changed png_ptr and info_ptr member "trans" to "trans_alpha". + +version 1.4.0beta75 [August 21, 2009] + Removed an extra png_debug() recently added to png_write_find_filter(). + Fixed incorrect #ifdef in pngset.c regarding unknown chunk support. + +version 1.4.0beta76 [August 22, 2009] + Moved an incorrectly located test in png_read_row() in pngread.c + +version 1.4.0beta77 [August 27, 2009] + Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt, + and the "noconfig" files from the distribution. + Moved CMakeLists.txt from scripts into the main libpng directory. + Various bugfixes and improvements to CMakeLists.txt (Philip Lowman) + +version 1.4.0beta78 [August 31, 2009] + Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h + Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros. + Use png_malloc plus a loop instead of png_calloc() to initialize + row_pointers in png_read_png(). + +version 1.4.0beta79 [September 1, 2009] + Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays. + Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc(). + +version 1.4.0beta80 [September 17, 2009] + Removed scripts/libpng.icc + Changed typecast of filler from png_byte to png_uint_16 in png_set_filler(). + (Dennis Gustafsson) + Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ") + +version 1.4.0beta81 [September 23, 2009] + Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h + Expanded TAB characters in pngrtran.c + Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid + compiler complaints about doubly declaring things "const". + Changed all "#if [!]defined(X)" to "if[n]def X" where possible. + Eliminated unused png_ptr->row_buf_size + +version 1.4.0beta82 [September 25, 2009] + Moved redundant IHDR checking into new png_check_IHDR() in png.c + and report all errors found in the IHDR data. + Eliminated useless call to png_check_cHRM() from pngset.c + +version 1.4.0beta83 [September 25, 2009] + Revised png_check_IHDR() to eliminate bogus complaint about filter_type. + +version 1.4.0beta84 [September 30, 2009] + Fixed some inconsistent indentation in pngconf.h + Revised png_check_IHDR() to add a test for width variable less than 32-bit. + +version 1.4.0beta85 [October 1, 2009] + Revised png_check_IHDR() again, to check info_ptr members instead of + the contents of the returned parameters. + +version 1.4.0beta86 [October 9, 2009] + Updated the "xcode" project (Alam Arias). + Eliminated a shadowed declaration of "pp" in png_handle_sPLT(). + +version 1.4.0rc01 [October 19, 2009] + Trivial cosmetic changes. + +version 1.4.0beta87 [October 30, 2009] + Moved version 1.4.0 back into beta. + +version 1.4.0beta88 [October 30, 2009] + Revised libpng*.txt section about differences between 1.2.x and 1.4.0 + because most of the new features have now been ported back to 1.2.41 + +version 1.4.0beta89 [November 1, 2009] + More bugfixes and improvements to CMakeLists.txt (Philip Lowman) + Removed a harmless extra png_set_invert_alpha() from pngwrite.c + Apply png_user_chunk_cache_max within png_decompress_chunk(). + Merged libpng-1.2.41.txt with libpng-1.4.0.txt where appropriate. + +version 1.4.0beta90 [November 2, 2009] + Removed all remaining WIN32_WCE #ifdefs except those involving the + time.h "tm" structure + +version 1.4.0beta91 [November 3, 2009] + Updated scripts/pngw32.def and projects/wince/png32ce.def + Copied projects/wince/png32ce.def to the scripts directory. + Added scripts/makefile.wce + Patched ltmain.sh for wince support. + Added PNG_CONVERT_tIME_SUPPORTED macro. + +version 1.4.0beta92 [November 4, 2009] + Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED + Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED + Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0 (instead + of differences from 1.2.41 to 1.4.0) + +version 1.4.0beta93 [November 7, 2009] + Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and + PNG_ALLOCATED macros to detect deprecated direct access to the + png_struct or info_struct members and other deprecated usage in + applications (John Bowler). + Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS, + to prevent warnings about direct access to png structs by libpng + functions while building libpng. They need to be tested, especially + those using compilers other than gcc. + Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG". + They should work but still need to be updated to remove + references to pnggccrd.c or pngvcrd.c and ASM building. + Added README.txt to the beos, cbuilder5, netware, and xcode projects warning + that they need to be updated, to remove references to pnggccrd.c and + pngvcrd.c and to depend on pngpriv.h + Removed three direct references to read_info_ptr members in pngtest.c + that were detected by the new PNG_DEPSTRUCT macro. + Moved the png_debug macro definitions and the png_read_destroy(), + png_write_destroy() and png_far_to_near() prototypes from png.h + to pngpriv.h (John Bowler) + Moved the synopsis lines for png_read_destroy(), png_write_destroy() + png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3. + +version 1.4.0beta94 [November 9, 2009] + Removed the obsolete, unused pnggccrd.c and pngvcrd.c files. + Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions. + Removed dependency of pngtest.o on pngpriv.h in the makefiles. + Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined. + +version 1.4.0beta95 [November 10, 2009] + Changed png_check_sig() to !png_sig_cmp() in contrib programs. + Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile + Changed png_check_sig() to !png_sig_cmp() in contrib programs. + Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c + Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c + Added dependency on pngpriv.h in contrib/pngminim/*/makefile + +version 1.4.0beta96 [November 12, 2009] + Renamed scripts/makefile.wce to scripts/makefile.cegcc + Revised Makefile.am to use libpng.sys while building libpng.so + so that only PNG_EXPORT functions are exported. + Removed the deprecated png_check_sig() function/macro. + Removed recently removed function names from scripts/*.def + Revised pngtest.png to put chunks in the same order written by pngtest + (evidently the same change made in libpng-1.0beta54 was lost). + Added PNG_PRIVATE macro definition in pngconf.h for possible future use. + +version 1.4.0beta97 [November 13, 2009] + Restored pngtest.png to the libpng-1.4.0beta7 version. + Removed projects/beos and netware.txt; no one seems to be supporting them. + Revised Makefile.in + +version 1.4.0beta98 [November 13, 2009] + Added the "xcode" project to zip distributions, + Fixed a typo in scripts/pngwin.def introduced in beta97. + +version 1.4.0beta99 [November 14, 2009] + Moved libpng-config.in and libpng.pc-configure.in out of the scripts + directory, to libpng-config.in and libpng-pc.in, respectively, and + modified Makefile.am and configure.ac accordingly. Now "configure" + needs nothing from the "scripts" directory. + Avoid redefining PNG_CONST in pngconf.h + +version 1.4.0beta100 [November 14, 2009] + Removed ASM builds from projects/visualc6 and projects/visualc71 + Removed scripts/makefile.nommx and makefile.vcawin32 + Revised CMakeLists.txt to account for new location of libpng-config.in + and libpng-pc.in + Updated INSTALL to reflect removal and relocation of files. + +version 1.4.0beta101 [November 14, 2009] + Restored the binary files (*.jpg, *.png, some project files) that were + accidentally deleted from the zip and 7z distributions when the xcode + project was added. + +version 1.4.0beta102 [November 18, 2009] + Added libpng-config.in and libpng-pc.in to the zip and 7z distributions. + Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100. + Moved descriptions of makefiles and other scripts out of INSTALL into + scripts/README.txt + Updated the copyright year in scripts/pngwin.rc from 2006 to 2009. + +version 1.4.0beta103 [November 21, 2009] + Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt + Align row_buf on 16-byte boundary in memory. + Restored the PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED guard around the call + to png_flush() after png_write_IEND(). See 1.4.0beta32, 1.4.0beta50 + changes above and 1.2.30, 1.2.30rc01 and rc03 in 1.2.41 CHANGES. Someone + needs this feature. + Make the 'png_jmpbuf' macro expand to a call that records the correct + longjmp function as well as returning a pointer to the setjmp + jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'. + (John Bowler) + +version 1.4.0beta104 [November 22, 2009] + Removed png_longjmp_ptr from scripts/*.def and libpng.3 + Rebuilt configure scripts with autoconf-2.65 + +version 1.4.0beta105 [November 25, 2009] + Use fast integer PNG_DIVIDE_BY_255() or PNG_DIVIDE_BY_65535() + to accomplish alpha premultiplication when + PNG_READ_COMPOSITE_NODIV_SUPPORTED is defined. + Changed "/255" to "/255.0" in background calculations to make it clear + that the 255 is used as a double. + +version 1.4.0beta106 [November 27, 2009] + Removed premultiplied alpha feature. + +version 1.4.0beta107 [December 4, 2009] + Updated README + Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files. + Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects. + Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco + to put png.h and pngconf.h in $prefix/include, like the other scripts, + instead of in $prefix/include/libpng. Also revised makefile.sco + to put them in $prefix/include/libpng14 instead of in + $prefix/include/libpng/libpng14. + +version 1.4.0beta108 [December 11, 2009] + Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile + Relocated png_do_chop() to its original position in pngrtran.c; the + change in version 1.2.41beta08 caused transparency to be handled wrong + in some 16-bit datastreams (Yusaku Sugai). + +version 1.4.0beta109 [December 13, 2009] + Added "bit_depth" parameter to the private png_build_gamma_table() function. + Pass bit_depth=8 to png_build_gamma_table() when bit_depth is 16 but the + PNG_16_TO_8 transform has been set, to avoid unnecessary build of 16-bit + tables. + +version 1.4.0rc02 [December 20, 2009] + Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c + +version 1.4.0rc03 [December 22, 2009] + Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt + (revising the change in 1.4.0beta99) + +version 1.4.0rc04 [December 25, 2009] + Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED + in pngset.c to be consistent with other changes in version 1.2.38. + +version 1.4.0rc05 [December 25, 2009] + Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and + Makefile.in to be consistent with changes in libpng-1.4.0rc03 + +version 1.4.0rc06 [December 29, 2009] + Reverted the gamma_table changes from libpng-1.4.0beta109. + Fixed some indentation errors. + +version 1.4.0rc07 [January 1, 2010] + Revised libpng*.txt and libpng.3 about 1.2.x->1.4.x differences. + Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c + Update copyright year to 2010. + +version 1.4.0rc08 [January 2, 2010] + Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr + in pngtest.c + +version 1.4.0 [January 3, 2010] No changes. -version 1.2.39 and 1.0.48 [August 13, 2009] +version 1.4.1beta01 [January 8, 2010] + Updated CMakeLists.txt for consistent indentation and to avoid an + unclosed if-statement warning (Philip Lowman). + Revised Makefile.am and Makefile.in to remove references to Y2KINFO, + KNOWNBUG, and libpng.la (Robert Schwebel). + Revised the makefiles to install the same files and symbolic + links as configure, except for libpng.la and libpng14.la. + Make png_set|get_compression_buffer_size() available even when + PNG_WRITE_SUPPORTED is not enabled. + Revised Makefile.am and Makefile.in to simplify their maintenance. + Revised scripts/makefile.linux to install a link to libpng14.so.14.1 + +version 1.4.1beta02 [January 9, 2010] + Revised the rest of the makefiles to install a link to libpng14.so.14.1 + +version 1.4.1beta03 [January 10, 2010] + Removed png_set_premultiply_alpha() from scripts/*.def + +version 1.4.1rc01 [January 16, 2010] No changes. -Send comments/corrections/commendations to png-mng-implement at lists.sf.net -(subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe) -or to glennrp at users.sourceforge.net +version 1.4.1beta04 [January 23, 2010] + Revised png_decompress_chunk() to improve speed and memory usage when + decoding large chunks. + Added png_set|get_chunk_malloc_max() functions. + +version 1.4.1beta05 [January 26, 2010] + Relocated "int k" declaration in pngtest.c to minimize its scope. + +version 1.4.1beta06 [January 28, 2010] + Revised png_decompress_chunk() to use a two-pass method suggested by + John Bowler. + +version 1.4.1beta07 [February 6, 2010] + Folded some long lines in the source files. + Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX, + and a PNG_USER_LIMITS_SUPPORTED flag. + Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as + png_ptr->png_user_chunk_malloc_max. + Revised png_push_save_buffer() to do fewer but larger png_malloc() calls. + +version 1.4.1beta08 [February 6, 2010] + Minor cleanup and updating of dates and copyright year. + +version 1.4.1beta09 [February 7, 2010] + Reverted to original png_push_save_buffer() code. + +version 1.4.1beta10 [February 9, 2010] + Return allocated "old_buffer" in png_push_save_buffer() before calling + png_error(), to avoid a potential memory leak. + +version 1.4.1beta11 [February 12, 2010] + Relocated misplaced closing curley bracket in png_decompress_chunk(). + Removed unused "buffer_size" variable from png_decompress_chunk(). + Removed the cbuilder5 project, which has not been updated to 1.4.0. + Complete rewrite of two-pass png_decompress_chunk() by John Bowler. + +version 1.4.1beta12 [February 14, 2010] + Fixed type declaration of png_get_user_malloc_max() in pngget.c (Daisuke + Nishikawa) + +version 1.4.1rc02 [January 18, 2010] + No changes. + +version 1.4.1rc03 [February 19, 2010] + Noted in scripts/makefile.mingw that it expects to be run under MSYS. + Removed obsolete unused MMX-querying support from contrib/gregbook + Removed the AIX redefinition of jmpbuf in png.h + Define _ALL_SOURCE in configure.ac, makefile.aix, and CMakeLists.txt + when using AIX compiler. + +version 1.4.1rc04 [February 19, 2010] + Removed unused gzio.c from contrib/pngminim gather and makefile scripts + +version 1.4.1 [February 25, 2010] + +version 1.4.2beta01 [April 1, 2010] + Conditionally compile an "else" statement in png_decompress_chunk(). + Restored the macro definition of png_check_sig(). + +version 1.4.2rc01 [April 10, 2010] + No changes. + +version 1.4.2rc02 [April 16, 2010] + Documented the fact that png_set_dither() was disabled since libpng-1.4.0. + Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect + more accurately what it actually does. At the same time, renamed + the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to + PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS. + +version 1.4.2rc03 [April 24, 2010] + Added some "(long)" typecasts to printf calls in png_handle_cHRM(). + Relaxed the overly-restrictive permissions of some files. + +version 1.4.2rc04 [April 28, 2010] + Added the "vstudio" project to replace "visualc6" and "visualc71" which + will be removed from libpng-1.5.0. + Demonstrate in example.c that lang_key should be initialized. + Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in + contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. + +version 1.4.2rc05 [April 29, 2010] + Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. + Removed dummy_inflate.c and uncompr.c from contrib/pngminim/encoder + Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED + in gregbook/readpng2.c + Corrected protection of png_get_user_transform_ptr. The API declaration in + png.h is removed if both READ and WRITE USER_TRANSFORM are turned off + but was left defined in pngtrans.c + +version 1.4.2rc06 [May 3, 2010] + Moved declarations of umsg[] inside the proper #ifdef blocks in pngrutil.c + +version 1.4.2 [May 6, 2010] + +version 1.4.3beta01 [June 18, 2010] + Added missing quotation marks in the aix block of configure.ac + The new "vstudio" project was missing from the zip and 7z distributions. + In pngpread.c: png_push_have_row() add check for new_row > height + +version 1.4.3beta02 [June 18, 2010] + Removed the now-redundant check for out-of-bounds new_row from example.c + +version 1.4.3beta03 [June 18, 2010] + In pngpread.c: png_push_finish_row() add check for too many rows. + +version 1.4.3beta04 [June 19, 2010] + In pngpread.c: png_push_process_row() add check for too many rows. + Removed the checks added in beta01 and beta03, as they are now redundant. + +version 1.4.3beta05 [June 20, 2010] + Rewrote png_process_IDAT_data to consistently treat extra data as warnings + and handle end conditions more cleanly. + Removed the new (beta04) check in png_push_process_row(). + +version 1.4.3rc01 [June 21, 2010] + Revised some comments in png_process_IDAT_data(). + +version 1.4.3rc02 [June 22, 2010] + Changed char *msg to PNG_CONST char *msg in pngrutil.c + Stop memory leak when reading a malformed sCAL chunk. + Removed some trailing blanks. + +version 1.4.3rc03 [June 23, 2010] + Revised pngpread.c patch of beta05 to avoid an endless loop. + +version 1.4.3 [June 26, 2010] + Updated some of the "last changed" dates. + +Send comments/corrections/commendations to glennrp at users.sourceforge.net +or to png-mng-implement at lists.sf.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement). Glenn R-P -*/ +*/ } +#endif diff --git a/source/Irrlicht/libpng/CMakeLists.txt b/source/Irrlicht/libpng/CMakeLists.txt new file mode 100644 index 00000000..eb561c90 --- /dev/null +++ b/source/Irrlicht/libpng/CMakeLists.txt @@ -0,0 +1,282 @@ +cmake_minimum_required(VERSION 2.4.3) +set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) + +if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING + "Choose the type of build, options are: + None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) + Debug + Release + RelWithDebInfo + MinSizeRel.") +endif() + +project(libpng C) +enable_testing() + +# Copyright (C) 2007-2010 Glenn Randers-Pehrson + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +set(PNGLIB_MAJOR 1) +set(PNGLIB_MINOR 4) +set(PNGLIB_RELEASE 3) +set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) +set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) + +# needed packages +find_package(ZLIB REQUIRED) +include_directories(${ZLIB_INCLUDE_DIR}) + +if(NOT WIN32) + find_library(M_LIBRARY + NAMES m + PATHS /usr/lib /usr/local/lib + ) + if(NOT M_LIBRARY) + message(STATUS + "math library 'libm' not found - floating point support disabled") + endif() +else() + # not needed on windows + set(M_LIBRARY "") +endif() + +# COMMAND LINE OPTIONS +if(DEFINED PNG_SHARED) + option(PNG_SHARED "Build shared lib" ${PNG_SHARED}) +else() + option(PNG_SHARED "Build shared lib" ON) +endif() +if(DEFINED PNG_STATIC) + option(PNG_STATIC "Build static lib" ${PNG_STATIC}) +else() + option(PNG_STATIC "Build static lib" ON) +endif() + +if(MINGW) + option(PNG_TESTS "Build pngtest" NO) +else() + option(PNG_TESTS "Build pngtest" YES) +endif() + +option(PNG_NO_CONSOLE_IO "FIXME" YES) +option(PNG_NO_STDIO "FIXME" YES) +option(PNG_DEBUG "Build with debug output" NO) +option(PNGARG "FIXME" YES) +#TODO: +# PNG_CONSOLE_IO_SUPPORTED + +# maybe needs improving, but currently I don't know when we can enable what :) +set(png_asm_tmp "OFF") +if(NOT WIN32) + find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin) + if(uname_executable) + exec_program(${uname_executable} + ARGS --machine OUTPUT_VARIABLE uname_output) + if("uname_output" MATCHES "^.*i[1-9]86.*$") + set(png_asm_tmp "ON") + else("uname_output" MATCHES "^.*i[1-9]86.*$") + set(png_asm_tmp "OFF") + endif("uname_output" MATCHES "^.*i[1-9]86.*$") + endif(uname_executable) +else() + # this env var is normally only set on win64 + set(TEXT "ProgramFiles(x86)") + if("$ENV{${TEXT}}" STREQUAL "") + set(png_asm_tmp "ON") + endif("$ENV{${TEXT}}" STREQUAL "") +endif() + +# SET LIBNAME +set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR}) + +# to distinguish between debug and release lib +set(CMAKE_DEBUG_POSTFIX "d") + + +# OUR SOURCES +set(libpng_sources + png.h + pngconf.h + pngpriv.h + png.c + pngerror.c + pngget.c + pngmem.c + pngpread.c + pngread.c + pngrio.c + pngrtran.c + pngrutil.c + pngset.c + pngtrans.c + pngwio.c + pngwrite.c + pngwtran.c + pngwutil.c +) +set(pngtest_sources + pngtest.c +) +# SOME NEEDED DEFINITIONS + +add_definitions(-DPNG_CONFIGURE_LIBPNG) + +if(_AIX) + add_definitions(-D_ALL_SOURCE) +endif(_AIX) + +if(MSVC) + add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE) +endif(MSVC) + +if(PNG_SHARED OR NOT MSVC) + #if building msvc static this has NOT to be defined + add_definitions(-DZLIB_DLL) +endif() + + +if(PNG_CONSOLE_IO_SUPPORTED) + add_definitions(-DPNG_CONSOLE_IO_SUPPORTED) +endif() + +if(PNG_NO_CONSOLE_IO) + add_definitions(-DPNG_NO_CONSOLE_IO) +endif() + +if(PNG_NO_STDIO) + add_definitions(-DPNG_NO_STDIO) +endif() + +if(PNG_DEBUG) + add_definitions(-DPNG_DEBUG) +endif() + +if(NOT M_LIBRARY AND NOT WIN32) + add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED) +endif() + +# NOW BUILD OUR TARGET +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR}) + +if(PNG_SHARED) + add_library(${PNG_LIB_NAME} SHARED ${libpng_sources}) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name + set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib") + endif() + target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY}) +endif() + +if(PNG_STATIC) +# does not work without changing name + set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static) + add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources}) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name + set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib") + endif() +endif() + + +if(PNG_SHARED AND WIN32) + set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) +endif() + +if(PNG_TESTS AND PNG_SHARED) + # does not work with msvc due to png_lib_ver issue + add_executable(pngtest ${pngtest_sources}) + target_link_libraries(pngtest ${PNG_LIB_NAME}) + add_test(pngtest pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png) +endif() + + +# CREATE PKGCONFIG FILES +# we use the same files like ./configure, so we have to set its vars +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${CMAKE_INSTALL_PREFIX}/lib) +set(includedir ${CMAKE_INSTALL_PREFIX}/include) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in + ${CMAKE_CURRENT_BINARY_DIR}/libpng-config) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config) + +# SET UP LINKS +if(PNG_SHARED) + set_target_properties(${PNG_LIB_NAME} PROPERTIES +# VERSION 14.${PNGLIB_RELEASE}.1.4.3 + VERSION 14.${PNGLIB_RELEASE}.0 + SOVERSION 14 + CLEAN_DIRECT_OUTPUT 1) +endif() +if(PNG_STATIC) + if(NOT WIN32) + # that's uncool on win32 - it overwrites our static import lib... + set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES + OUTPUT_NAME ${PNG_LIB_NAME} + CLEAN_DIRECT_OUTPUT 1) + endif() +endif() + +# INSTALL +if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) + if(PNG_SHARED) + install(TARGETS ${PNG_LIB_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + endif() + if(PNG_STATIC) + install(TARGETS ${PNG_LIB_NAME_STATIC} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + endif() +endif() + +if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) + install(FILES png.h pngconf.h DESTINATION include) + install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME}) +endif() +if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL ) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config + DESTINATION bin) +endif() +if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) + # Install man pages + install(FILES libpng.3 libpngpf.3 DESTINATION man/man3) + install(FILES png.5 DESTINATION man/man5) + # Install pkg-config files + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc + DESTINATION lib/pkgconfig) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng-config + DESTINATION bin) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc + DESTINATION lib/pkgconfig) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config + DESTINATION bin) +endif() + +# what's with libpng.txt and all the extra files? + + +# UNINSTALL +# do we need this? + + +# DIST +# do we need this? + +# to create msvc import lib for mingw compiled shared lib +# pexports libpng.dll > libpng.def +# lib /def:libpng.def /machine:x86 + diff --git a/source/Irrlicht/libpng/INSTALL b/source/Irrlicht/libpng/INSTALL index 8393f3d5..3e2c0386 100644 --- a/source/Irrlicht/libpng/INSTALL +++ b/source/Irrlicht/libpng/INSTALL @@ -1,5 +1,5 @@ -Installing libpng version 1.2.39 - August 13, 2009 +Installing libpng version 1.4.3 - June 26, 2010 On Unix/Linux and similar systems, you can simply type @@ -25,27 +25,29 @@ Instead, you can use one of the custom-built makefiles in the make test make install +The files that are presently available in the scripts directory +are listed and described in scripts/README.txt. + Or you can use one of the "projects" in the "projects" directory. -If you want to use "cmake" (see www.cmake.org), copy CMakeLists.txt -from the "scripts" directory to this directory and type - - cmake . [-DPNG_MMX=YES] -DCMAKE_INSTALL_PREFIX=/path - make - make install - Before installing libpng, you must first install zlib, if it is not already on your system. zlib can usually be found wherever you got libpng. zlib can be placed in another directory, at the same level as libpng. +If you want to use "cmake" (see www.cmake.org), type + + cmake . -DCMAKE_INSTALL_PREFIX=/path + make + make install + If your system already has a preinstalled zlib you will still need to have access to the zlib.h and zconf.h include files that correspond to the version of zlib that's installed. You can rename the directories that you downloaded (they -might be called "libpng-1.2.39" or "lpng109" and "zlib-1.2.1" -or "zlib121") so that you have directories called "zlib" and "libpng". +might be called "libpng-1.4.3" or "libpng14" and "zlib-1.2.3" +or "zlib123") so that you have directories called "zlib" and "libpng". Your directory structure should look like this: @@ -55,19 +57,26 @@ Your directory structure should look like this: README *.h *.c + CMakeLists.txt => "cmake" script + configuration files: + configure.ac, configure, Makefile.am, Makefile.in, + autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in, + libpng-config.in, aclocal.m4, config.h.in, config.sub, + depcomp, install-sh, mkinstalldirs, test-pngtest.sh contrib gregbook + pngminim pngminus pngsuite visupng projects - beos - c5builder (Borland) + cbuilder5 (Borland) visualc6 (msvc) - netware.txt - wince.txt + visualc71 + xcode scripts makefile.* + *.def (module definition files) pngtest.png etc. zlib @@ -82,80 +91,13 @@ distribution of libpng. It is available in both tar.gz (UNIX style line endings) and zip (DOS style line endings) formats. If you are building libpng with MSVC, you can enter the -libpng projects\visualc6 directory and follow the instructions in -projects\visualc6\README.txt. +libpng projects\visualc6 or visualc71 directory and follow the instructions +in README.txt. -You can build libpng for WindowsCE by downloading and installing -the projects\wince directory as instructed in the projects\wince.txt file, and -then following the instructions in the README* files. Similarly, you can -build libpng for Netware or Beos as instructed in projects\netware.txt -or projects\beos. - -Else enter the zlib directory and follow the instructions in zlib/README, +Otherwise enter the zlib directory and follow the instructions in zlib/README, then come back here and run "configure" or choose the appropriate makefile.sys in the scripts directory. -The files that are presently available in the scripts directory -include - - CMakeLists.txt => "cmake" script - makefile.std => Generic UNIX makefile (cc, creates static libpng.a) - makefile.elf => Linux/ELF makefile symbol versioning, - gcc, creates libpng12.so.0.1.2.39) - makefile.linux => Linux/ELF makefile - (gcc, creates libpng12.so.0.1.2.39) - makefile.gcc => Generic makefile (gcc, creates static libpng.a) - makefile.knr => Archaic UNIX Makefile that converts files with - ansi2knr (Requires ansi2knr.c from - ftp://ftp.cs.wisc.edu/ghost) - makefile.aix => AIX/gcc makefile - makefile.cygwin => Cygwin/gcc makefile - makefile.darwin => Darwin makefile, can use on MacosX - makefile.dec => DEC Alpha UNIX makefile - makefile.freebsd => FreeBSD makefile - makefile.hpgcc => HPUX makefile using gcc - makefile.hpux => HPUX (10.20 and 11.00) makefile - makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit - makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) - makefile.intel => Intel C/C++ version 4.0 and later - libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later - makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so. - makefile.ne12bsd => NetBSD/cc makefile, uses PNGGCCRD, - makes libpng12.so - makefile.openbsd => OpenBSD makefile - makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) - makefile.sggcc => Silicon Graphics (gcc, - creates libpng12.so.0.1.2.39) - makefile.sunos => Sun makefile - makefile.solaris => Solaris 2.X makefile (gcc, - creates libpng12.so.0.1.2.39) - makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc, - creates libpng12.so.0.1.2.39) - makefile.so9 => Solaris 9 makefile (gcc, - creates libpng12.so.0.1.2.39) - makefile.32sunu => Sun Ultra 32-bit makefile - makefile.64sunu => Sun Ultra 64-bit makefile - makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc - makefile.mips => MIPS makefile - makefile.acorn => Acorn makefile - makefile.amiga => Amiga makefile - smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler - (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc) - makefile.atari => Atari makefile - makefile.beos => BEOS makefile for X86 - makefile.bor => Borland makefile (uses bcc) - makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) - makefile.tc3 => Turbo C 3.0 makefile - makefile.dj2 => DJGPP 2 makefile - makefile.msc => Microsoft C makefile - makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later - makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) - pngos2.def => OS/2 module definition file used by makefile.os2 - makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model - makevms.com => VMS build script - descrip.mms => VMS makefile for MMS or MMK - SCOPTIONS.ppc => Used with smakefile.ppc - Copy the file (or files) that you need from the scripts directory into this directory, for example @@ -185,9 +127,11 @@ run "make install". If you encounter a compiler error message complaining about the lines + __png.h__ already includes setjmp.h; __dont__ include it again.; -This means you have compiled another module that includes setjmp.h, + +this means you have compiled another module that includes setjmp.h, which is hazardous because the two modules might not include exactly the same setjmp.h. If you are sure that you know what you are doing and that they are exactly the same, then you can comment out or diff --git a/source/Irrlicht/libpng/KNOWNBUG b/source/Irrlicht/libpng/KNOWNBUG deleted file mode 100644 index 2b3b4394..00000000 --- a/source/Irrlicht/libpng/KNOWNBUG +++ /dev/null @@ -1,22 +0,0 @@ - -Known bugs in libpng version 1.2.39 - -1. February 23, 2006: The custom makefiles don't build libpng with -lz. - - STATUS: This is a subject of debate. The change will probably be made - as a part of a major overhaul of the makefiles in libpng version 1.4.0. - -2. February 24, 2006: The Makefile generated by the "configure" script - fails to install symbolic links - libpng12.so => libpng12.so.0.1.2.9betaN - that are generated by the custom makefiles. - -3. September 4, 2007: There is a report that pngtest crashes on MacOS 10. - - STATUS: workarounds are - 1) Compile without optimization (crashes are observed with - -arch i386 and -O2 or -O3, using gcc-4.0.1). - 2) Compile pngtest.c with PNG_DEBUG defined (the bug goes away if - you try to look at it). - 3) Ignore the crash. The library itself seems to be OK. - diff --git a/source/Irrlicht/libpng/LICENSE b/source/Irrlicht/libpng/LICENSE index 97d066c2..06ce0301 100644 --- a/source/Irrlicht/libpng/LICENSE +++ b/source/Irrlicht/libpng/LICENSE @@ -10,8 +10,8 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.2.39, August 13, 2009, are -Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are +libpng versions 1.2.6, August 15, 2004, through 1.4.3, June 26, 2010, are +Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -108,4 +108,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -August 13, 2009 +June 26, 2010 diff --git a/source/Irrlicht/libpng/README b/source/Irrlicht/libpng/README index 6ad9e172..4cf825fd 100644 --- a/source/Irrlicht/libpng/README +++ b/source/Irrlicht/libpng/README @@ -1,15 +1,11 @@ -README for libpng version 1.2.39 - August 13, 2009 (shared library 12.0) +README for libpng version 1.4.3 - June 26, 2010 (shared library 14.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. Libpng comes in several distribution formats. Get libpng-*.tar.gz, -libpng-*.tar.lzma, or libpng-*.tar.bz2 if you want UNIX-style line -endings in the text files, or lpng*.7z or lpng*.zip if you want DOS-style -line endings. You can get UNIX-style line endings from the *.zip file -by using "unzip -a" but there seems to be no simple way to recover -UNIX-style line endings from the *.7z file. The *.tar.lzma file is -recommended for *NIX users instead. +libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings +in the text files, or lpng*.zip if you want DOS-style line endings. Version 0.89 was the first official release of libpng. Don't let the fact that it's the first release fool you. The libpng library has been in @@ -58,9 +54,9 @@ to set different actions based on whether the CRC error occurred in a critical or an ancillary chunk. The changes made to the library, and bugs fixed are based on discussions -on the png-mng-implement mailing list -and not on material submitted privately to Guy, Andreas, or Glenn. They will -forward any good suggestions to the list. +on the PNG-implement mailing list and not on material submitted +privately to Guy, Andreas, or Glenn. They will forward any good +suggestions to the list. For a detailed description on using libpng, read libpng.txt. For examples of libpng in a program, see example.c and pngtest.c. For usage @@ -81,12 +77,12 @@ compression library that is useful for more things than just PNG files. You can use zlib as a drop-in replacement for fread() and fwrite() if you are so inclined. -zlib should be available at the same place that libpng is, or at -ftp://ftp.simplesystems.org/pub/png/src/ +zlib should be available at the same place that libpng is, or at. +ftp://ftp.info-zip.org/pub/infozip/zlib You may also want a copy of the PNG specification. It is available as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find -these at http://www.libpng.org/pub/png/pngdocs.html +these at http://www.libpng.org/pub/png/documents/ This code is currently being archived at libpng.sf.net in the [DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT) @@ -105,23 +101,24 @@ Finally, if you get any warning messages when compiling libpng fix. Please mention "libpng" somewhere in the subject line. Thanks. This release was created and will be supported by myself (of course -based in a large way on Guy's and Andreas' earlier work), and the PNG group. +based in a large way on Guy's and Andreas' earlier work), and the PNG +development group. -Send comments/corrections/commendations to png-mng-implement at lists.sf.net -(subscription required; visit +Send comments/corrections/commendations to png-mng-implement at +lists.sourceforge.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe) or to glennrp at users.sourceforge.net You can't reach Guy, the original libpng author, at the addresses -given in previous versions of this document. He and Andreas will read mail -addressed to the png-mng-implement list, however. +given in previous versions of this document. He and Andreas will +read mail addressed to the png-implement list, however. Please do not send general questions about PNG. Send them to -the (png-mng-misc at lists.sourceforge.net, subscription required, visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe) +the (png-list at ccrc.wustl.edu, subscription required, write to +majordomo at ccrc.wustl.edu with "subscribe png-list" in your message). On the other hand, please do not send libpng questions to that address, send them to me -or to the png-mng-implement list. I'll +or to the png-implement list. I'll get them in the end anyway. If you have a question about something in the PNG specification that is related to using libpng, send it to me. Send me any questions that start with "I was using libpng, @@ -129,7 +126,7 @@ and ...". If in doubt, send questions to me. I'll bounce them to others, if necessary. Please do not send suggestions on how to change PNG. We have -been discussing PNG for twelve years now, and it is official and +been discussing PNG for nine years now, and it is official and finished. If you have suggestions for libpng, however, I'll gladly listen. Even if your suggestion is not used immediately, it may be used later. @@ -144,7 +141,6 @@ Files in this distribution: TODO => Things not implemented in the current library Y2KINFO => Statement of Y2K compliance example.c => Example code for using libpng functions - libpng-*-*-diff.txt => Diff from previous release libpng.3 => manual page for libpng (includes libpng.txt) libpng.txt => Description of libpng and its functions libpngpf.3 => manual page for libpng's private functions @@ -178,28 +174,20 @@ Files in this distribution: pngminus => Simple pnm2png and png2pnm programs pngsuite => Test images visupng => Contains a MSVC workspace for VisualPng - projects => Contains project files and workspaces for building DLL - beos => Contains a Beos workspace for building libpng - c5builder => Contains a Borland workspace for building libpng - and zlib - visualc6 => Contains a Microsoft Visual C++ (MSVC) workspace - for building libpng and zlib - netware.txt => Contains instructions for downloading a set of - project files for building libpng and zlib on - Netware. - wince.txt => Contains instructions for downloading a Microsoft - Visual C++ (Windows CD Toolkit) workspace for - building libpng and zlib on WindowsCE + projects => Contains project files and workspaces for + building a DLL + c5builder => Contains a Borland workspace for building + libpng and zlib + visualc6 => Contains a Microsoft Visual C++ (MSVC) + workspace for building libpng and zlib scripts => Directory containing scripts for building libpng: descrip.mms => VMS makefile for MMS or MMK - makefile.std => Generic UNIX makefile (cc, creates static libpng.a) + makefile.std => Generic UNIX makefile (cc, creates static + libpng.a) makefile.elf => Linux/ELF makefile symbol versioning, - gcc, creates libpng12.so.0.1.2.39) + gcc, creates libpng14.so.14.1.4.3) makefile.linux => Linux/ELF makefile - (gcc, creates libpng12.so.0.1.2.39) - makefile.gcmmx => Linux/ELF makefile - (gcc, creates libpng12.so.0.1.2.39, - uses assembler code tuned for Intel MMX platform) + (gcc, creates libpng14.so.14.1.4.3) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with ansi2knr (Requires ansi2knr.c from @@ -214,18 +202,19 @@ Files in this distribution: makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) makefile.intel => Intel C/C++ version 4.0 and later - libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later - makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so. - makefile.ne12bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng12.so + makefile.mingw => Mingw/gcc makefile + makefile.netbsd => NetBSD/cc makefile, makes libpng.so. + makefile.ne14bsd => NetBSD/cc makefile, makes + libpng14.so makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) makefile.sggcc => Silicon Graphics - (gcc, creates libpng12.so.0.1.2.39) + (gcc, creates libpng14.so.14.1.4.3) makefile.sunos => Sun makefile makefile.solaris => Solaris 2.X makefile - (gcc, creates libpng12.so.0.1.2.39) + (gcc, creates libpng14.so.14.1.4.3) makefile.so9 => Solaris 9 makefile - (gcc, creates libpng12.so.0.1.2.39) + (gcc, creates libpng14.so.14.1.4.3) makefile.32sunu => Sun Ultra 32-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc @@ -242,25 +231,26 @@ Files in this distribution: makefile.tc3 => Turbo C 3.0 makefile makefile.dj2 => DJGPP 2 makefile makefile.msc => Microsoft C makefile - makefile.vcawin32=> makefile for Microsoft Visual C++ 5.0 and - later (uses assembler code tuned for Intel MMX - platform) makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later (does not use assembler code) makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) - pngos2.def => OS/2 module definition file used by makefile.os2 + png32ce.def => module definition for makefile.cegccg + pngos2.def => OS/2 module definition file used by + makefile.os2 + pngwin.def => module definition file used by + makefile.cygwin and makefile.mingw makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model makevms.com => VMS build script SCOPTIONS.ppc => Used with smakefile.ppc Good luck, and happy coding. --Glenn Randers-Pehrson (current maintainer) +-Glenn Randers-Pehrson (current maintainer, since 1998) Internet: glennrp at users.sourceforge.net -Andreas Eric Dilger (former maintainer, 1996-1997) Internet: adilger at enel.ucalgary.ca - Web: http://members.shaw.ca/adilger/ + Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ -Guy Eric Schalnat (original author and former maintainer, 1995-1996) (formerly of Group 42, Inc) diff --git a/source/Irrlicht/libpng/TODO b/source/Irrlicht/libpng/TODO index e2cdcaff..a578a9cc 100644 --- a/source/Irrlicht/libpng/TODO +++ b/source/Irrlicht/libpng/TODO @@ -1,3 +1,4 @@ +/* TODO - list of things to do for libpng: Final bug fixes. @@ -8,7 +9,7 @@ Fix problem with C++ and EXTERN "C". cHRM transformation. Improve setjmp/longjmp usage or remove it in favor of returning error codes. Add "grayscale->palette" transformation and "palette->grayscale" detection. -Improved dithering. +Improved quantizing and dithering. Multi-lingual error and warning message support. Complete sRGB transformation (presently it simply uses gamma=0.45455). Man pages for function calls. @@ -17,9 +18,14 @@ Better filter selection (counting huffman bits/precompression? filter inertia? filter costs?). Histogram creation. Text conversion between different code pages (Latin-1 -> Mac and DOS). -Should we always malloc 2^bit_depth PLTE/tRNS/hIST entries for safety? Build gamma tables using fixed point (and do away with floating point entirely). +Avoid building gamma tables whenever possible. Use greater precision when changing to linear gamma for compositing against background and doing rgb-to-gray transformation. Investigate pre-incremented loop counters and other loop constructions. Add interpolated method of handling interlacing. +Provide for conditional compilation of 16-bit support (except for the + initial stripping down to 8-bits when reading a 16-bit PNG datastream). +Switch to the simpler zlib (zlib/libpng) license if legally possible. + +*/ diff --git a/source/Irrlicht/libpng/Y2KINFO b/source/Irrlicht/libpng/Y2KINFO deleted file mode 100644 index 857ab09a..00000000 --- a/source/Irrlicht/libpng/Y2KINFO +++ /dev/null @@ -1,55 +0,0 @@ - Y2K compliance in libpng: - ========================= - - August 13, 2009 - - Since the PNG Development group is an ad-hoc body, we can't make - an official declaration. - - This is your unofficial assurance that libpng from version 0.71 and - upward through 1.2.39 are Y2K compliant. It is my belief that earlier - versions were also Y2K compliant. - - Libpng only has three year fields. One is a 2-byte unsigned integer - that will hold years up to 65535. The other two hold the date in text - format, and will hold years up to 9999. - - The integer is - "png_uint_16 year" in png_time_struct. - - The strings are - "png_charp time_buffer" in png_struct and - "near_time_buffer", which is a local character string in png.c. - - There are seven time-related functions: - - png_convert_to_rfc_1123() in png.c - (formerly png_convert_to_rfc_1152() in error) - png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c - png_convert_from_time_t() in pngwrite.c - png_get_tIME() in pngget.c - png_handle_tIME() in pngrutil.c, called in pngread.c - png_set_tIME() in pngset.c - png_write_tIME() in pngwutil.c, called in pngwrite.c - - All appear to handle dates properly in a Y2K environment. The - png_convert_from_time_t() function calls gmtime() to convert from system - clock time, which returns (year - 1900), which we properly convert to - the full 4-digit year. There is a possibility that applications using - libpng are not passing 4-digit years into the png_convert_to_rfc_1123() - function, or that they are incorrectly passing only a 2-digit year - instead of "year - 1900" into the png_convert_from_struct_tm() function, - but this is not under our control. The libpng documentation has always - stated that it works with 4-digit years, and the APIs have been - documented as such. - - The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned - integer to hold the year, and can hold years as large as 65535. - - zlib, upon which libpng depends, is also Y2K compliant. It contains - no date-related code. - - - Glenn Randers-Pehrson - libpng maintainer - PNG Development Group diff --git a/source/Irrlicht/libpng/configure b/source/Irrlicht/libpng/configure index 7e38d64a..7027f28d 100644 --- a/source/Irrlicht/libpng/configure +++ b/source/Irrlicht/libpng/configure @@ -1,13 +1,13 @@ #!/bin/sh echo " There is no \"configure\" script in this distribution of - libpng-1.2.39. + libpng-1.4.3. Instead, please copy the appropriate makefile for your system from the \"scripts\" directory. Read the INSTALL file for more details. Update, July 2004: you can get a \"configure\" based distribution from the libpng distribution sites. Download the file - libpng-1.2.39.tar.gz, libpng-1.2.39.tar.lzma, or libpng-1.2.39.tar.bz2 + libpng-1.4.3.tar.gz, libpng-1.4.3.tar.xz, or libpng-1.4.3.tar.bz2 " diff --git a/source/Irrlicht/libpng/contrib/gregbook/Makefile.sgi b/source/Irrlicht/libpng/contrib/gregbook/Makefile.sgi index f8f22f92..81285495 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/Makefile.sgi +++ b/source/Irrlicht/libpng/contrib/gregbook/Makefile.sgi @@ -23,9 +23,9 @@ # macros -------------------------------------------------------------------- -PNGINC = -I/usr/local/include/libpng12 -PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng -#PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng +PNGINC = -I/usr/local/include/libpng14 +PNGLIB = -L/usr/local/lib -lpng14 # dynamically linked against libpng +#PNGLIB = /usr/local/lib/libpng14.a # statically linked against libpng # or: #PNGINC = -I../.. #PNGLIB = -L../.. -lpng diff --git a/source/Irrlicht/libpng/contrib/gregbook/Makefile.unx b/source/Irrlicht/libpng/contrib/gregbook/Makefile.unx index 3a5ff4b7..6ae0065b 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/Makefile.unx +++ b/source/Irrlicht/libpng/contrib/gregbook/Makefile.unx @@ -26,14 +26,14 @@ # macros -------------------------------------------------------------------- #PNGDIR = /usr/local/lib -#PNGINC = -I/usr/local/include/libpng12 -#PNGLIBd = -L$(PNGDIR) -lpng12 # dynamically linked, installed libpng -#PNGLIBs = $(PNGDIR)/libpng12.a # statically linked, installed libpng +#PNGINC = -I/usr/local/include/libpng14 +#PNGLIBd = -L$(PNGDIR) -lpng14 # dynamically linked, installed libpng +#PNGLIBs = $(PNGDIR)/libpng14.a # statically linked, installed libpng # or: PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds #PNGDIR = ../libpng PNGINC = -I$(PNGDIR) -PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng12 # dynamically linked +PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng14 # dynamically linked PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng ZDIR = /usr/local/lib diff --git a/source/Irrlicht/libpng/contrib/gregbook/readpng.c b/source/Irrlicht/libpng/contrib/gregbook/readpng.c index c459120a..dd6f92d2 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/readpng.c +++ b/source/Irrlicht/libpng/contrib/gregbook/readpng.c @@ -93,7 +93,7 @@ int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight) * have used slightly more general png_sig_cmp() function instead */ fread(sig, 1, 8, infile); - if (!png_check_sig(sig, 8)) + if (png_sig_cmp(sig, 0, 8)) return 1; /* bad signature */ diff --git a/source/Irrlicht/libpng/contrib/gregbook/readpng2.c b/source/Irrlicht/libpng/contrib/gregbook/readpng2.c index 22dddcdb..26acee57 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/readpng2.c +++ b/source/Irrlicht/libpng/contrib/gregbook/readpng2.c @@ -73,84 +73,10 @@ static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg); void readpng2_version_info(void) { -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \ - (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) && \ - defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - /* - * WARNING: This preprocessor approach means that the following code - * cannot be used with a libpng DLL older than 1.2.0--the - * compiled-in symbols for the new functions will not exist. - * (Could use dlopen() and dlsym() on Unix and corresponding - * calls for Windows, but not portable...) - */ - { - int mmxsupport = png_mmx_support(); - if (mmxsupport < 0) - fprintf(stderr, " Compiled with libpng %s; using libpng %s " - "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver); - else { - int compilerID; - png_uint_32 mmx_mask = png_get_mmx_flagmask( - PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); + fprintf(stderr, " Compiled with libpng %s; using libpng %s\n", + PNG_LIBPNG_VER_STRING, png_libpng_ver); - fprintf(stderr, " Compiled with libpng %s; using libpng %s " - "with MMX support\n (%s version).", PNG_LIBPNG_VER_STRING, - png_libpng_ver, compilerID == 1? "MSVC++" : - (compilerID == 2? "GNU C" : "unknown")); - fprintf(stderr, " Processor (x86%s) %s MMX instructions.\n", -#if defined(__x86_64__) - "_64", -#else - "", -#endif - mmxsupport? "supports" : "does not support"); - if (mmxsupport > 0) { - int num_optims = 0; - - fprintf(stderr, - " Potential MMX optimizations supported by libpng:\n"); - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) - ++num_optims; - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_UP) - ++num_optims; - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) - ++num_optims; - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) - ++num_optims; - if (num_optims) - fprintf(stderr, - " decoding %s row filters (reading)\n", - (num_optims == 4)? "all non-trivial" : "some"); - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) { - fprintf(stderr, " combining rows (reading)\n"); - ++num_optims; - } - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_INTERLACE) { - fprintf(stderr, - " expanding interlacing (reading)\n"); - ++num_optims; - } - mmx_mask &= ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); - if (mmx_mask) { - fprintf(stderr, " other (unknown)\n"); - ++num_optims; - } - if (num_optims == 0) - fprintf(stderr, " (none)\n"); - } - } - } -#else - fprintf(stderr, " Compiled with libpng %s; using libpng %s " - "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver); -#endif - - fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", + fprintf(stderr, " and with zlib %s; using zlib %s.\n", ZLIB_VERSION, zlib_version); } @@ -159,7 +85,7 @@ void readpng2_version_info(void) int readpng2_check_sig(uch *sig, int num) { - return png_check_sig(sig, num); + return !png_sig_cmp(sig, 0, num); } @@ -203,7 +129,7 @@ int readpng2_init(mainprog_info *mainprog_ptr) } -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED /* prepare the reader to ignore all recognized chunks whose data won't be * used, i.e., all chunks recognized by libpng except for IHDR, PLTE, IDAT, * IEND, tRNS, bKGD, gAMA, and sRGB (small performance improvement) */ @@ -232,7 +158,7 @@ int readpng2_init(mainprog_info *mainprog_ptr) png_set_keep_unknown_chunks(png_ptr, 1 /* PNG_HANDLE_CHUNK_NEVER */, chunks_to_ignore, sizeof(chunks_to_ignore)/5); } -#endif /* PNG_UNKNOWN_CHUNKS_SUPPORTED */ +#endif /* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */ /* instead of doing png_init_io() here, now we set up our callback @@ -242,96 +168,6 @@ int readpng2_init(mainprog_info *mainprog_ptr) readpng2_info_callback, readpng2_row_callback, readpng2_end_callback); - /* - * may as well enable or disable MMX routines here, if supported; - * - * to enable all: mask = png_get_mmx_flagmask ( - * PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); - * flags = png_get_asm_flags (png_ptr); - * flags |= mask; - * png_set_asm_flags (png_ptr, flags); - * - * to disable all: mask = png_get_mmx_flagmask ( - * PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); - * flags = png_get_asm_flags (png_ptr); - * flags &= ~mask; - * png_set_asm_flags (png_ptr, flags); - */ - -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) && \ - defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - /* - * WARNING: This preprocessor approach means that the following code - * cannot be used with a libpng DLL older than 1.2.0--the - * compiled-in symbols for the new functions will not exist. - * (Could use dlopen() and dlsym() on Unix and corresponding - * calls for Windows, but not portable...) - */ - { -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED - png_uint_32 mmx_disable_mask = 0; - png_uint_32 asm_flags, mmx_mask; - int compilerID; - - if (mainprog_ptr->nommxfilters) - mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); - if (mainprog_ptr->nommxcombine) - mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_COMBINE_ROW; - if (mainprog_ptr->nommxinterlace) - mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_INTERLACE; - asm_flags = png_get_asm_flags(png_ptr); - png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask); - - - /* Now query libpng's asm settings, just for yuks. Note that this - * differs from the querying of its *potential* MMX capabilities - * in readpng2_version_info(); this is true runtime verification. */ - - asm_flags = png_get_asm_flags(png_ptr); - mmx_mask = png_get_mmx_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE, - &compilerID); - if (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED) - fprintf(stderr, - " MMX support (%s version) is compiled into libpng\n", - compilerID == 1? "MSVC++" : - (compilerID == 2? "GNU C" : "unknown")); - else - fprintf(stderr, " MMX support is not compiled into libpng\n"); - fprintf(stderr, " MMX instructions are %ssupported by CPU\n", - (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)? "" : "not "); - fprintf(stderr, " MMX read support for combining rows is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)? "en" : "dis"); - fprintf(stderr, - " MMX read support for expanding interlacing is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"sub\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"up\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"avg\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"Paeth\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "en" : "dis"); - asm_flags &= (mmx_mask & ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )); - if (asm_flags) - fprintf(stderr, - " additional MMX support is also enabled (0x%02lx)\n", - asm_flags); -#else /* !PNG_ASSEMBLER_CODE_SUPPORTED */ - fprintf(stderr, " MMX querying is disabled in libpng.\n"); -#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ - } -#endif - - /* make sure we save our pointers for use in readpng2_decode_data() */ mainprog_ptr->png_ptr = png_ptr; @@ -379,6 +215,7 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) { mainprog_info *mainprog_ptr; int color_type, bit_depth; + png_uint_32 width, height; double gamma; @@ -414,8 +251,10 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) /* this is just like in the non-progressive case */ - png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width, - &mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL); + png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + NULL, NULL, NULL); + mainprog_ptr->width = (ulg)width; + mainprog_ptr->height = (ulg)height; /* since we know we've read all of the PNG file's "header" (i.e., up diff --git a/source/Irrlicht/libpng/contrib/gregbook/readpng2.h b/source/Irrlicht/libpng/contrib/gregbook/readpng2.h index a5f32e57..7a592637 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/readpng2.h +++ b/source/Irrlicht/libpng/contrib/gregbook/readpng2.h @@ -96,11 +96,6 @@ typedef struct _mainprog_info { int rowbytes; int channels; int need_bgcolor; -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) - int nommxfilters; - int nommxcombine; - int nommxinterlace; -#endif int state; uch bg_red; uch bg_green; diff --git a/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c b/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c index 38d3ff1f..7824c41f 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c +++ b/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c @@ -32,6 +32,7 @@ - 2.01: fixed 64-bit typo in readpng2.c - 2.02: fixed improper display of usage screen on PNG error(s); fixed unexpected-EOF and file-read-error cases + - 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options --------------------------------------------------------------------------- @@ -395,18 +396,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) } } else if (!strncmp(*argv, "-timing", 2)) { timing = TRUE; -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) - } else if (!strncmp(*argv, "-nommxfilters", 7)) { - rpng2_info.nommxfilters = TRUE; - } else if (!strncmp(*argv, "-nommxcombine", 7)) { - rpng2_info.nommxcombine = TRUE; - } else if (!strncmp(*argv, "-nommxinterlace", 7)) { - rpng2_info.nommxinterlace = TRUE; - } else if (!strcmp(*argv, "-nommx")) { - rpng2_info.nommxfilters = TRUE; - rpng2_info.nommxcombine = TRUE; - rpng2_info.nommxinterlace = TRUE; -#endif } else { if (**argv != '-') { filename = *argv; @@ -430,9 +419,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) readpng2_version_info(); fprintf(stderr, "\n" "Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n" -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) - " %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n" -#endif " %*s file.png\n\n" " exp \ttransfer-function exponent (``gamma'') of the display\n" "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" @@ -445,10 +431,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) "\t\t transparent images; overrides -bgcolor option\n" " -timing\tenables delay for every block read, to simulate modem\n" "\t\t download of image (~36 Kbps)\n" -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) - " -nommx*\tdisable optimized MMX routines for decoding row filters,\n" - "\t\t combining rows, and expanding interlacing, respectively\n" -#endif "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" "Press Q or Esc to quit this usage screen. ", PROGNAME, diff --git a/source/Irrlicht/libpng/contrib/gregbook/rpng2-x.c b/source/Irrlicht/libpng/contrib/gregbook/rpng2-x.c index b50a77b1..be055535 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/rpng2-x.c +++ b/source/Irrlicht/libpng/contrib/gregbook/rpng2-x.c @@ -40,6 +40,7 @@ - 2.02: fixed improper display of usage screen on PNG error(s); fixed unexpected-EOF and file-read-error cases; fixed Trace() cut-and- paste bugs + - 2.03: deleted runtime MMX-enabling/disabling and obsolete -mmx* options --------------------------------------------------------------------------- @@ -94,7 +95,7 @@ #define PROGNAME "rpng2-x" #define LONGNAME "Progressive PNG Viewer for X" -#define VERSION "2.02 of 16 March 2008" +#define VERSION "2.03 of 25 February 2010" #define RESNAME "rpng2" /* our X resource application name */ #define RESCLASS "Rpng" /* our X resource class name */ @@ -434,18 +435,6 @@ int main(int argc, char **argv) else if (loop_interval > 100000) /* bit more than one day */ loop_interval = 100000; } -#endif -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) - } else if (!strncmp(*argv, "-nommxfilters", 7)) { - rpng2_info.nommxfilters = TRUE; - } else if (!strncmp(*argv, "-nommxcombine", 7)) { - rpng2_info.nommxcombine = TRUE; - } else if (!strncmp(*argv, "-nommxinterlace", 7)) { - rpng2_info.nommxinterlace = TRUE; - } else if (!strcmp(*argv, "-nommx")) { - rpng2_info.nommxfilters = TRUE; - rpng2_info.nommxcombine = TRUE; - rpng2_info.nommxinterlace = TRUE; #endif } else { if (**argv != '-') { @@ -468,9 +457,6 @@ int main(int argc, char **argv) readpng2_version_info(); fprintf(stderr, "\n" "Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n" -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) - " %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n" -#endif #ifdef FEATURE_LOOP " %*s [-usleep dur | -timing] [-pause] [-loop [sec]] file.png\n\n" #else @@ -490,10 +476,6 @@ int main(int argc, char **argv) " -loop\tloops through background images after initial display\n" "\t\t is complete (depends on -bgpat)\n" " sec \tseconds to display each background image (default = 2)\n" -#endif -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) - " -nommx*\tdisable optimized MMX routines for decoding row filters,\n" - "\t\t combining rows, and expanding interlacing, respectively\n" #endif " dur \tduration in microseconds to wait after displaying each\n" "\t\t row (for demo purposes)\n" diff --git a/source/Irrlicht/libpng/contrib/pngminim/decoder/gather.sh b/source/Irrlicht/libpng/contrib/pngminim/decoder/gather.sh index 750cfc5b..cded419c 100755 --- a/source/Irrlicht/libpng/contrib/pngminim/decoder/gather.sh +++ b/source/Irrlicht/libpng/contrib/pngminim/decoder/gather.sh @@ -1,8 +1,8 @@ cp ../../pngminus/png2pnm.c pngm2pnm.c cp ../../../*.h . cp ../../../*.c . -rm example.c pnggccrd.c pngvcrd.c pngtest.c pngpread.c pngw*.c +rm example.c pngtest.c pngpread.c pngw*.c # change the following 2 lines if zlib is somewhere else cp ../../../../zlib/*.h . cp ../../../../zlib/*.c . -rm minigzip.c example.c compress.c deflate.c +rm minigzip.c example.c compress.c deflate.c gz* diff --git a/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile b/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile index 3e1189d6..74a27e23 100644 --- a/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile +++ b/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile @@ -15,7 +15,7 @@ O=.o L=.a E= -ZOBJS = adler32$(O) crc32$(O) gzio$(O) \ +ZOBJS = adler32$(O) crc32$(O) \ infback$(O) inffast$(O) inflate$(O) inftrees$(O) \ trees$(O) uncompr$(O) zutil$(O) @@ -25,7 +25,7 @@ OBJS = pngm2pnm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \ # implicit make rules ------------------------------------------------------- -.c$(O): png.h pngconf.h pngusr.h zlib.h +.c$(O): png.h pngconf.h pngpriv.h pngusr.h zlib.h $(CC) -c $(CFLAGS) $< # dependencies diff --git a/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h b/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h index 4b64dc66..ed10ea88 100644 --- a/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h +++ b/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h @@ -2,7 +2,7 @@ * * Copyright (c) 2007, 2009 Glenn Randers-Pehrson * - * This code is released under the zlib/libpng license. + * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h * @@ -16,8 +16,6 @@ /* No 16-bit support beyond reading with strip_16 */ #endif -#define PNG_NO_GLOBAL_ARRAYS - #define PNG_NO_WARNINGS #define png_warning(s1,s2) "" #define png_chunk_warning(s1,s2) "" @@ -25,11 +23,10 @@ #define png_error(s1,s2) png_err(s1) #define png_chunk_error(s1,s2) png_err(s1) -#define PNG_NO_ASSEMBLER_CODE -#define PNG_NO_OPTIMIZED_CODE +#define PNG_NO_READ_BGR #define PNG_NO_READ_GAMMA #define PNG_NO_READ_BACKGROUND -#define PNG_NO_READ_DITHER +#define PNG_NO_READ_QUANTIZE #define PNG_NO_READ_INVERT #define PNG_NO_READ_SHIFT #define PNG_NO_READ_PACK @@ -59,11 +56,11 @@ #define PNG_NO_READ_OPT_PLTE #define PNG_NO_READ_STRIP_ALPHA #define PNG_NO_READ_oFFs -#define PNG_NO_WARN_UNINITIALIZED_ROW #define PNG_NO_WRITE_SUPPORTED #define PNG_NO_INFO_IMAGE +#define PNG_NO_IO_STATE #define PNG_NO_USER_MEM #define PNG_NO_FIXED_POINT_SUPPORTED #define PNG_NO_MNG_FEATURES @@ -74,5 +71,9 @@ #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS #define PNG_NO_PROGRESSIVE_READ +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS +#define PNG_NO_TIME_RFC1123 #endif /* MINRDPNGCONF_H */ + diff --git a/source/Irrlicht/libpng/contrib/pngminim/encoder/dummy_inflate.c b/source/Irrlicht/libpng/contrib/pngminim/encoder/dummy_inflate.c deleted file mode 100644 index 5d711e7c..00000000 --- a/source/Irrlicht/libpng/contrib/pngminim/encoder/dummy_inflate.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "zlib.h" - -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; -{ return Z_OK ; } - -int ZEXPORT inflateReset(strm) -z_streamp strm; -{ return Z_OK ; } - -int ZEXPORT inflateEnd(strm) -z_streamp strm; -{ return Z_STREAM_ERROR ; } - -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; -{ return Z_OK ; } - -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; -{ return Z_STREAM_ERROR ; } diff --git a/source/Irrlicht/libpng/contrib/pngminim/encoder/gather.sh b/source/Irrlicht/libpng/contrib/pngminim/encoder/gather.sh index 06c9347c..5421f54f 100755 --- a/source/Irrlicht/libpng/contrib/pngminim/encoder/gather.sh +++ b/source/Irrlicht/libpng/contrib/pngminim/encoder/gather.sh @@ -1,9 +1,9 @@ cp ../../pngminus/pnm2png.c pnm2pngm.c cp ../../../*.h . cp ../../../*.c . -rm example.c pnggccrd.c pngvcrd.c pngtest.c pngr*.c pngpread.c +rm example.c pngtest.c pngr*.c pngpread.c # Change the next 2 lines if zlib is somewhere else. cp ../../../../zlib/*.h . cp ../../../../zlib/*.c . rm inf*.[ch] -rm minigzip.c example.c +rm uncompr.c minigzip.c example.c gz* diff --git a/source/Irrlicht/libpng/contrib/pngminim/encoder/makefile b/source/Irrlicht/libpng/contrib/pngminim/encoder/makefile index 0ca0c8b2..6a17852f 100644 --- a/source/Irrlicht/libpng/contrib/pngminim/encoder/makefile +++ b/source/Irrlicht/libpng/contrib/pngminim/encoder/makefile @@ -14,9 +14,8 @@ O=.o L=.a E= -ZOBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzio$(O) \ - dummy_inflate$(O) \ - trees$(O) uncompr$(O) zutil$(O) +ZOBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) \ + trees$(O) zutil$(O) OBJS = pnm2pngm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \ pngset$(O) pngtrans$(O) pngwio$(O) pngwrite$(O) \ @@ -24,7 +23,7 @@ OBJS = pnm2pngm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \ # implicit make rules ------------------------------------------------------- -.c$(O): png.h pngconf.h pngusr.h zlib.h +.c$(O): png.h pngconf.h pngpriv.h pngusr.h zlib.h $(CC) -c $(CFLAGS) $< # dependencies diff --git a/source/Irrlicht/libpng/contrib/pngminim/encoder/pngusr.h b/source/Irrlicht/libpng/contrib/pngminim/encoder/pngusr.h index 1bef5a91..632dd15e 100644 --- a/source/Irrlicht/libpng/contrib/pngminim/encoder/pngusr.h +++ b/source/Irrlicht/libpng/contrib/pngminim/encoder/pngusr.h @@ -2,7 +2,7 @@ * * Copyright (c) 2007, 2009 Glenn Randers-Pehrson * - * This code is released under the zlib/libpng license. + * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h * @@ -12,8 +12,6 @@ #ifndef MINWRPNGCONF_H #define MINWRPNGCONF_H -#define PNG_NO_GLOBAL_ARRAYS - #define PNG_NO_READ_SUPPORTED #define PNG_NO_WARNINGS @@ -24,8 +22,9 @@ #define png_chunk_error(s1,s2) png_err(s1) #define PNG_NO_WRITE_BACKGROUND +#define PNG_NO_WRITE_BGR #define PNG_NO_WRITE_GAMMA -#define PNG_NO_WRITE_DITHER +#define PNG_NO_WRITE_QUANTIZE #define PNG_NO_WRITE_INVERT #define PNG_NO_WRITE_SHIFT #define PNG_NO_WRITE_PACK @@ -60,6 +59,7 @@ #define PNG_NO_WRITE_FLUSH #define PNG_NO_INFO_IMAGE +#define PNG_NO_IO_STATE #define PNG_NO_USER_MEM #define PNG_NO_FIXED_POINT_SUPPORTED #define PNG_NO_MNG_FEATURES @@ -69,5 +69,8 @@ #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS +#define PNG_NO_TIME_RFC1143 #endif /* MINWRPNGCONF_H */ diff --git a/source/Irrlicht/libpng/contrib/pngminim/preader/gather.sh b/source/Irrlicht/libpng/contrib/pngminim/preader/gather.sh index e89d566c..ec8f3af6 100755 --- a/source/Irrlicht/libpng/contrib/pngminim/preader/gather.sh +++ b/source/Irrlicht/libpng/contrib/pngminim/preader/gather.sh @@ -2,8 +2,8 @@ cp ../../gregbook/rpng2-x.c ../../gregbook/readpng2.[ch] . cp ../../gregbook/COPYING ../../gregbook/LICENSE . cp ../../../*.h . cp ../../../*.c . -rm example.c pnggccrd.c pngvcrd.c pngtest.c pngw*.c +rm example.c pngtest.c pngw*.c # change the following 2 lines if zlib is somewhere else cp ../../../../zlib/*.h . cp ../../../../zlib/*.c . -rm minigzip.c example.c compress.c deflate.c +rm minigzip.c example.c compress.c deflate.c gz* diff --git a/source/Irrlicht/libpng/contrib/pngminim/preader/makefile b/source/Irrlicht/libpng/contrib/pngminim/preader/makefile index 9f7e41de..3892669a 100644 --- a/source/Irrlicht/libpng/contrib/pngminim/preader/makefile +++ b/source/Irrlicht/libpng/contrib/pngminim/preader/makefile @@ -31,7 +31,7 @@ O=.o L=.a E= -ZOBJS = adler32$(O) crc32$(O) gzio$(O) \ +ZOBJS = adler32$(O) crc32$(O) \ infback$(O) inffast$(O) inflate$(O) inftrees$(O) \ trees$(O) uncompr$(O) zutil$(O) @@ -41,7 +41,7 @@ OBJS = rpng2-x$(O) readpng2$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \ # implicit make rules ------------------------------------------------------- -.c$(O): png.h pngconf.h readpng2.h pngusr.h zlib.h +.c$(O): png.h pngconf.h pngpriv.h readpng2.h pngusr.h zlib.h $(CC) -c $(CFLAGS) $< # dependencies diff --git a/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h b/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h index d976bac3..dec38a21 100644 --- a/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h +++ b/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h @@ -2,7 +2,7 @@ * * Copyright (c) 2009 Glenn Randers-Pehrson * - * This code is released under the zlib/libpng license. + * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h * @@ -12,8 +12,6 @@ #ifndef MINPRDPNGCONF_H #define MINPRDPNGCONF_H -#define PNG_NO_GLOBAL_ARRAYS - #define PNG_NO_WARNINGS #define png_warning(s1,s2) "" #define png_chunk_warning(s1,s2) "" @@ -21,8 +19,7 @@ #define png_error(s1,s2) png_err(s1) #define png_chunk_error(s1,s2) png_err(s1) -#define PNG_NO_ASSEMBLER_CODE -#define PNG_NO_OPTIMIZED_CODE +#define PNG_NO_READ_BGR #define PNG_NO_READ_DITHER #define PNG_NO_READ_INVERT #define PNG_NO_READ_SHIFT @@ -50,11 +47,11 @@ #define PNG_NO_READ_OPT_PLTE #define PNG_NO_READ_STRIP_ALPHA #define PNG_NO_READ_oFFs -#define PNG_NO_WARN_UNINITIALIZED_ROW #define PNG_NO_WRITE_SUPPORTED #define PNG_NO_INFO_IMAGE +#define PNG_NO_IO_STATE #define PNG_NO_USER_MEM #define PNG_NO_FIXED_POINT_SUPPORTED #define PNG_NO_MNG_FEATURES @@ -64,5 +61,8 @@ #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS +#define PNG_NO_TIME_RFC1143 #endif /* MINPRDPNGCONF_H */ diff --git a/source/Irrlicht/libpng/contrib/pngminus/png2pnm.c b/source/Irrlicht/libpng/contrib/pngminus/png2pnm.c index 6ed477bf..6cca4cfd 100644 --- a/source/Irrlicht/libpng/contrib/pngminus/png2pnm.c +++ b/source/Irrlicht/libpng/contrib/pngminus/png2pnm.c @@ -211,8 +211,8 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a if (ret != 8) return FALSE; - ret = png_check_sig (buf, 8); - if (!ret) + ret = png_sig_cmp (buf, 0, 8); + if (ret) return FALSE; /* create png and info structures */ diff --git a/source/Irrlicht/libpng/contrib/pngsuite/ftbbn1g04.png b/source/Irrlicht/libpng/contrib/pngsuite/ftbbn1g04.png new file mode 100644 index 0000000000000000000000000000000000000000..39a7050d27af28f3bcb7bfc6b071cae91f8c091b GIT binary patch literal 429 zcmV;e0aE^nP)eGf1AoYPn=%bN?oV&q3&xZP#{- zd#wGeV8okcyH@o)cboHb1rrf^jB^?sG2T2?@G1n)CJc@hyhCf)&E8%^0~1oF;v>7S z;6sBJiji@r0Yq=mmR;)Ojr>$W46R-Sau7HO7xZFtI1{|4z%-nLbW=B z3o0EAC)h$;8WIR1rohQ#w444G0#1m$Dj66xet|L#R>4C36e7xMM0T)(aSAa2XfV)D zcEU#my$(kCaRx~QL^LgQ_;=)3gHxFOXBZJd{maEJLqY3H<>rDuET^1Yth7z0>+1gi X{l69U>r1pj4E?y3$fw z3LPC~5Eu?Ow>bx*PBc1kWIARHF=os}<8u$TxvBB}f1oy5P`W{kzl6)>j^6kGfA2f- z`~RHyuLHPP3zER+gr^$apTp%;SiD#R;vJ2Rd{S@z+-2p1bTZD!RV+NOifLIU&uTs zaE81?yrhgg@q`IfRXqTjnr;GKFNW3KjX}4zVxZ4FgXd*s(ZFE9a5b7MKz26X)$9LG z&+U!?)zyVy3pqr7Bq1d50~sfsq>_}A+FGpRrY7tX9#13)1Tctg+c1b-yYP7603Ht= z!sEyY-tFzh#G0G016J#8z+$-u)Ys$P_ICWwmKHpkOd3!^xI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Hf{`Do)y8Y}67x>Fw{qlr}T!YF_4_IUZux-oC*~jH=jeIQPaX!`r{y1WzBl z(m6wK7D&e$Zg(V>@2C;Wf~LRR?X8$9#=q?zc-|P5aetE9NbV#QTKGtM8suGqBBx#3 zxo@Q}hx+TEERS}!iYl~OZDE->d_uXdy?`@|M5G4?j`=QYAGR)#`a zvNJkHwy@!`Y;;2I`Sq)+{L9pEnB}|hM@{;rXnr^QKIxlagyn~gH+uDas6JD-A_hPD*sh|5-pZZezZNI zTBjQ-?c5``GX0PwW_dm>8`Y+1#_9&A`Q}k652Y3f(u)LcJ9%$iuabnh9D6vUApEqF nBzr1Qcj<%PHtn77gx$)ZQM<+~5{$JW7KKwMop80bl;r;b+-;m} literal 0 HcmV?d00001 diff --git a/source/Irrlicht/libpng/contrib/pngsuite/ftbrn2c08.png b/source/Irrlicht/libpng/contrib/pngsuite/ftbrn2c08.png new file mode 100644 index 0000000000000000000000000000000000000000..5cca0d621047cacf1637cf7d77e997d51cc6b15a GIT binary patch literal 1633 zcmV-n2A=teP))6_}Akuqmh*5X4X^rIbM;BH-v?$kU01p_ErCl=u4~ zL7fbz&H-~9!(}3aFu`RZW&unzb50QkgK2!RYsr=o3t~2tT^d3tzx&+X@9uj)%)Vj6 z{|IpB&Yj-g-pR?y{}^!Z-o3WAwzRagh=_<-fB!T`$I~7jJzDL9k&%A|7#|<+>gvkP z&5eqRQiO&cb#=`%Gt&SnAO*+-su`xq!J$j392p#Z_UzeG0aH^`SFc_zD=UkSkAGjG zNZGY3d;R({hG_tbfDeIqE;r1MUWVZftDkNW!h zs;jG$lamt?5{`w2W;;5Ta5(kAS>OWD3k(34fhLB@x3Eyz+ozkGX8`3uA)t^*Vq;_J zARVu%si6?50P_I-{r&0b>GXAy-pZYvJ_kMn+JSRiZt1pd#bWVg8=D~(>oza}`~v)> zM}7e)8HRFA`iDhFM^mix0K>z>DwQfHCnqyAGc`3;6%f#2ZhqFvO5^8uBq=H7FUwFU zT6XLhvbG*uwdz+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Y3 zY|zhwfLVQ0wY0S8#Df-Q7G&8n5<6nh7)vA)kx0bn+nAbqczMM?d^oX?lf?jYc4O#< zON|S4tujMN`;Hh?Jz7|PetuiGZY4pbYg^pItKUTv6B8tGw0Wp##Go?l literal 0 HcmV?d00001 diff --git a/source/Irrlicht/libpng/contrib/pngsuite/ftbwn1g16.png b/source/Irrlicht/libpng/contrib/pngsuite/ftbwn1g16.png new file mode 100644 index 0000000000000000000000000000000000000000..99bdeed2b3b8564302d449e6578c4aca0f6261f5 GIT binary patch literal 1313 zcmV++1>X9JP)QBlsk;7PU%bhGrgYd5Q9YAv@pu5?I(QEIFDO9PIa zv;_;!pa1a#&4BOUPo0`ItE{ZJIBk{3V?$2;ETe5E7iFAugap!!JvpW;c(dAAQ8V< zZ&BY>NjD*)1qCrNK|y=>!VP%!s->l|vE8$;ud}nhz7j7eD@#re2?+@B@p<+PZorQp zO@$fmNmnXtCft}jxxc@;xf%mh0YPPDR#td8NVBJBWF$%~baiE3DVf#RJVAESq^VP< zPoFZSy}bqv6c$Ev8{HHsktow$V{lB`di z{%hX6Idl5@>guwxqN2jr>pYX5E|kJ^f&DqRx(f5PYbXXRS(0v=B3pVK=!U{clUf+^ zwk5aa8O@zLfBu36RaH?@k&$+SvH@a;con5$c|}DEZ2$iLjbgyIZE5`R>8TI9Qu-<< z%&Jo_i;I%V`!i?Gym|BImy|?C27OhSEj^vT%kqkchm?%||Dqzaq5gD9C*CIj-6lTnrHEYhC#6(Y5*#J=&#dFf1`ILEld3=?QfBAxDz@I+}XOr8) z_eUHoTv5Ut_PcOJ$k~z>P;}0k6%}PEBIC}VVH_mAk5_}&Lhw>xFqZ6`_b6dX!jw?c z%!-;Dfwv2)g69`EgOb#=Y2o48uO(Z#zd9_?))qGsnatzc{v3+|Jw5UA=}QBbWjreT z8u2D?TToHq>&cU+PVMgx3sZ_0b>T~KcQE76X3$TAY#mJXtlpDYGZ7 zBIi@!?b7Or6DLpZ>}crfArf4l~O;$zjSbkp>uelLq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^+A9)vRdw?6dm2DISq&OPK>F&h1k13hobIB8bE8-4UHJ{j2p>b2F>0 zJdV^CNUpQ^W2IoSo@jsl&fn+!_ExusG&(RFWck*%JvP(>Qj{5ANTt5dn`)V0Od8)V z``FITX~_FXsZSxZemf;qUmltp&}R`NpM{2n4OqS@w(~pLu_37DZPJ+CDa;Gz%|^=` zd}}Z1EV?EO_b%I<>>cOJ>%y2#_#mN!^x5<= zjJGmcy%bg9Z>un%{403Uo~AEOp-q|0FAO&Q_payLN^pd^v$8v; z_2>K%L+MXinj+%k=b2%{MBZdz?a#ncO7`Gc#`N2t?P<&Y2}MhElSclGW+d9ySV&Fv zGKiPYu6ryW8ddns&8aEAjSocHe299~xUJNH-^IF5oEHo-12IXaZ(jD7Y*g*OxWCk> zdX(C`xVuAdD@xt0@z}-jnCHJQ?m)YSJhyBS`I7e;H@#X2l;c&(f7KW>kjTeAJ04Z5 z)r*jI>{i%Xd`gip{hpQ$=}bQ!O lGajP1^htlK&dv|QE>+O1S>+WAhFg({f~%7!w#Jd1`acy)otOXs literal 0 HcmV?d00001 diff --git a/source/Irrlicht/libpng/contrib/pngsuite/ftp0n1g08.png b/source/Irrlicht/libpng/contrib/pngsuite/ftp0n1g08.png new file mode 100644 index 0000000000000000000000000000000000000000..333465fcdc9f10f7f25b2d999b558f5421983ecc GIT binary patch literal 719 zcmV;=0xe{x-64Dw5ISbDJfGPNXYF1fsnx~?7~M3eMD*m6rOMo0;2$rUW>-c(^**S*Ycd0zuX+u!1|S9WB+#F78QX<>lo? ziQz$h-hRnIWoQ!H=elq>2fX`s$g4Md}>$Ugu1e*ygBpcmqZ3DNb_5HNEsBtg8Fz$MsRgsRcUEt!R)#7 z@*=Hdg|%Ijgaqfp6x>M8@W|(*DezA>78ATBV zGiJ?6^pq7`pj8TmNNXtGQ7M(fr#kNOGpUKtO+a# zE}lAlTDXoRkAt?j2v0jgK~H>oU`AO)UQprWsr_L}qI~YALPA1E5ej}SPEJnGOv?!@ zojAEOR7Ob9QdC4?8%mP9keiy8ksVOlKd~`Xk)KCEK=mA2ntaoimYx|<+}mFjqR+?8 zZTJ8q(f(PLp6*}V-CGiDD=qBv7F)8vQWR0&(VZLQZ(jZjd%k$Tpt-FhJuqOwUu^jT z1pXapZA%Q=jx2U BP!RwC literal 0 HcmV?d00001 diff --git a/source/Irrlicht/libpng/contrib/pngsuite/ftp0n2c08.png b/source/Irrlicht/libpng/contrib/pngsuite/ftp0n2c08.png new file mode 100644 index 0000000000000000000000000000000000000000..fc6e42cb420fd08ecd78340256157fa5f8a22934 GIT binary patch literal 1594 zcmV-A2F3Y_P)u542F>)wJ;-zU<0Ta5X4X^rIbM; zBH-v?$kU01p_ErCl=u4~L7fbz&H-~9!(}3aFu`RZW&unzb50QkgK2zirzKlPEQpyV zJ88Z&UwhB*+;h+QpNot)Z1^7mZr{G$*Vi{SHT9YSckkY9Z*NaePmhd@j0*@zcXT}E z>DjB%+#enNPk@PuiSF+1yu7^V=xBLZ*b!IPd^0mOpafEZETD#AngxPxg<^DQ=;_m^ zO9f0%PhYumrM$d6AtB*?xjc2}&YX4Y${D5+CG4W_vSdOD(DVN&-oB_@QeZU}a320`R0!vG! zgF}Y7c_vT+6ajLvI4&-Z7Si(C+FA;c5-<-iFfc$*`Z-x=6;4i{1D^pMz*&|p+q$(x zB)Vj4J8WQZ3z!6c0e;dUzW@{rLwimBm&L@yP^|L+BO@b9r7|}+H!CYEEiFwM7}#lU ze#Y8b?eBj$IXU%j%aqGow{IV|u^C^v@>iA}GBZ1AZ=V(%{LdfavLmWItxn1d>CixU>w z(z&H&q%@~cmeiGMuLdu#(_V!Qg$)f2b#--gLIj|kgoK1hr6FtAeh>TxG#MD|V;DCe z+}c_;JUpxi(9+VfzG^*Mf$y{cVZV^}t ze*#wx4d1b}e2ZmQv#dlY6hC?LL=T{&qk~_>M>ADEa39m2fL{qvo7rko-xdG82;t3ZKJ~Z{8fjKg!o$ON?8wlCe~HHnv#{{d1tq7Cl~vHp z%#3~jNv`NUkyhKvAxIVA8=wbFDWm}$)k06v92)E2}b{Rj#QTCt*&@?&Ti zD zl4Z+2B9B~dgtK!fhf@n&;PLjfw||-Og6SEVLqkKcv9UCP1w{gUs+$RUkfbMoF`VR)x@ASCQaVB z(Z|4m%7&5?v0+2f&6_{#^|K%#LswL-t*u(|pn;hUX^xb{ju_O&VzJoG&5g&iH8u70 z_D*>4U~(ZRivi~B`tWs^S{JHXMW%x09Wf|-G_d^r{kLq{LV`-iwz!9v--{+ECrRLF z@=(%OV07*qoM6N<$f`h#14gdfE literal 0 HcmV?d00001 diff --git a/source/Irrlicht/libpng/contrib/pngsuite/ftp0n3p08.png b/source/Irrlicht/libpng/contrib/pngsuite/ftp0n3p08.png new file mode 100644 index 0000000000000000000000000000000000000000..69a69e5872234d96cab4cbb017a0933fbfedba81 GIT binary patch literal 1476 zcmWlXc~H^`6vv-Om}J3dn5OOMOgg5aIm=3#R_~R8*9gm+#ueDlIJqsFg@0;tH{|b8}HqQ5Jw$Ebasl zi9{wQqx{s={QP`?_T1du%K+m5+1c6W&Yc6O&&;#KYi za0xyG{0*U@p&=n5OeT{~rxS7s!NI{ht9Awk26}jqu-LA432IQH$P*->1%a<=E7fhf7KmpiNEL?|$g$1|@ z&=;ZU0fm$KWEP7BFz+mN_CD$D>KXyBfJUPQ1qHz$U@Noz`t>V3 z0Y5*#_4Rf5=AAr|%l))v3zbTRZXmD;`udA>dIa18XhRr(3s9%iK@&&<11kswKn|(| zCKfuzi4TRu*jp4GWDgcp#{666_U|?<$;@lL6fyrT=v@~MF43;U zZ$6b_)kkb?TQRlFx@L1DFHuvCdiGRV@qSb5o3SyX=dqWIo~SD}lgtU8-0hinIc|l^ zwZpyIy{+Kp3qku~jyuQS{wOJTffqk}ylg!rGf@@8WYp~qRTEe@i_6M#f}U2WR@4MfM)1HJRjPCMx~ z7uM(-p3*y>&A)fhi1A3;cS(L+J1;&pqWL&it>CX0-+eBqO{=g-lKzNGvG(`sNqtRF zeg3%mDzvL|F3Eho_0DyETn8H%dc!?dA!#0>Q=Vr9#{-Ga&|1#6CAW+Q0sfY$`N-&; z^0c=#@%4)8jy6X3lL6u3JAW=?c#tm>K2a$#(Q?|Uz}T^+pWADD@MB|q8>&Xr948aj zsY1|Z7&ad@u4wr4W%TE{WS7U&Rh^yI#(OsCtq$vQ3|A*M_uLm%-A~M)I@BiVUyS#YR$&g!`CNx58tIE z|3D@=NLJY$Q%;J12ZU?1w#&^2c5EzDN05DZLoa2szJ*SEwwg0|Mem<$Yn1cWcz^cq z-}lxrB6iz%k1R&3=>`|KS%};k)l(YskH!jI!g#-(&O>3hx)5(GX8X3fe_&q16?&Zr z)72bEymR&OySDOI3mZ0C3tSEiO=8X3u^BG}uBukDWrMyZ$LQ%Y4sr7@il=hRi%!IK N0G~qvls0mN@PBi2fm#3n literal 0 HcmV?d00001 diff --git a/source/Irrlicht/libpng/contrib/pngsuite/ftp1n3p08.png b/source/Irrlicht/libpng/contrib/pngsuite/ftp1n3p08.png new file mode 100644 index 0000000000000000000000000000000000000000..a6c9f35a86271c056e955f637a8769381eb03827 GIT binary patch literal 1483 zcmWlXdpOez7{_0ijw~Xj6ZLfH5mEEBP|@KrEtkTuS}m>SI;>1?8{6D(v$V!$$}kk^ z;zXQM92O%H=ShmnbXw(ZQ8_r3^Xq+{_x=9)zVGMz<@$KL>7tBL0HEvPj`Ks*k)Uu?Q@xn6z>Z3lMM-Q#6tfUZ$jg9xOySS8oYSdsZ?58S}Ku90Gh5`xl#{MR8%wt zP*_-43Lq2;*RS7_pPzr}(xrd%E)}>Vg+~H{0|EmB;S209 z+JEZQsgoy9!bij)vJ2CNNF)M$vKCsqg}Grc6c_?OKR+KIALs+qBGU~U&cS2w^z{7x z{X6{3T?w5=n_Ror-Q69U!8X)ZUHvP8K!G~|wFu*%2C7slr~p15FS4}-9)W zgA1TkDj@~(fB8jCjUG%S0R(${)B5}SM@HTPu)4duH*Un5nj+Sda5!dbYwOg=2pWA9 zg`xngv~oCl+wa{*R;b1Lc@x0-<4`CPvRn@w_UQh+Ac}Mk^OKb>f7-E19*W;}xs}~! zRlIciNyF__FM9f7*5I)-+cbPa1|k-TrQvsONlsb*)pnz$h0|UcNA3@z)MNfwE}Uv0 zIbFH+_Zk14HEp3y&g@1-ft^E-J#CK+WhE5TXruYlt&^-N^P3g#I=H!w`R}L=sT9s{ zCuD1uhCdG)aY*zhVd3F}HZMyY{g2C62iLwz8h1Q_?PFhSvbid>^O4P?YqRlh((eZd z#_aspCH=EBx%*CRO=qIG-J;L_AlZKBgiu)@&Tb|Ii=AapW?Zqp>gYA)sH#J5XB+h; zk9wYVqsyC_bvIrV9&w7WX>VWUAVpP~na{j&$UYNXX^m&}Uyx5RnnjA&4L3VdD!1H_ zD#Iq{ZueA8l;TIb`kpn$X5SsBHj?FpV!HrYcY~@^RN}pDGk;X^V&G~0qorYaOP*rv z^qN~4t3n!C(Ta6lUVkRto3S5$_!4xZm;=Uxwl-UlXk<^TD! zwrXx-kZ%7r>OqrnxrwlgbC>i*G{g?VCRx6GHc+-!v-|w+aMq(Z)3<$!sgDrNgW zt{66;txYft&kQV}Qtm74k`-qO{C2WMU5|#0wUn?oyC~|ghKx56YPk5`Xp_O#x8g2M X(5+n&l!#upArS?SL*BSr7fRay;V71Q literal 0 HcmV?d00001 diff --git a/source/Irrlicht/libpng/contrib/visupng/PngFile.c b/source/Irrlicht/libpng/contrib/visupng/PngFile.c index c33056d8..1cde3a06 100644 --- a/source/Irrlicht/libpng/contrib/visupng/PngFile.c +++ b/source/Irrlicht/libpng/contrib/visupng/PngFile.c @@ -35,7 +35,7 @@ png_cexcept_error(png_structp png_ptr, png_const_charp msg) { if(png_ptr) ; -#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_CONSOLE_IO_SUPPORTED fprintf(stderr, "libpng error: %s\n", msg); #endif { @@ -126,7 +126,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, // first check the eight byte PNG signature fread(pbSig, 1, 8, pfFile); - if (!png_check_sig(pbSig, 8)) + if (png_sig_cmp(pbSig, 0, 8)) { *ppbImageData = pbImageData = NULL; return FALSE; @@ -155,7 +155,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, // initialize the png structure -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED png_init_io(png_ptr, pfFile); #else png_set_read_fn(png_ptr, (png_voidp)pfFile, png_read_data); @@ -324,7 +324,7 @@ BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, { // initialize the png structure -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED png_init_io(png_ptr, pfFile); #else png_set_write_fn(png_ptr, (png_voidp)pfFile, png_write_data, png_flush); @@ -395,7 +395,7 @@ BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, return TRUE; } -#ifdef PNG_NO_STDIO +#ifndef PNG_STDIO_SUPPORTED static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) diff --git a/source/Irrlicht/libpng/contrib/visupng/PngFile.h b/source/Irrlicht/libpng/contrib/visupng/PngFile.h index de1bb9c4..55b15174 100644 --- a/source/Irrlicht/libpng/contrib/visupng/PngFile.h +++ b/source/Irrlicht/libpng/contrib/visupng/PngFile.h @@ -22,7 +22,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, int iWidth, int iHeight, png_color BkgColor); -#if defined(PNG_NO_STDIO) +#ifndef PNG_STDIO_SUPPORTED static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length); static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length); static void png_flush(png_structp png_ptr); diff --git a/source/Irrlicht/libpng/example.c b/source/Irrlicht/libpng/example.c index 6ee5a0f0..b7733c8e 100644 --- a/source/Irrlicht/libpng/example.c +++ b/source/Irrlicht/libpng/example.c @@ -2,9 +2,9 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.2.37 [June 4, 2009] + * Last changed in libpng 1.4.2 [May 6, 2010] * This file has been placed in the public domain by the authors. - * Maintained 1998-2009 Glenn Randers-Pehrson + * Maintained 1998-2010 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -121,7 +121,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ if (info_ptr == NULL) { fclose(fp); - png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); + png_destroy_read_struct(&png_ptr, NULL, NULL); return (ERROR); } @@ -133,7 +133,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ if (setjmp(png_jmpbuf(png_ptr))) { /* Free all of the memory associated with the png_ptr and info_ptr */ - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); fclose(fp); /* If we get here, we had a problem reading the file */ return (ERROR); @@ -160,11 +160,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ * If you have enough memory to read in the entire image at once, * and you need to specify only transforms that can be controlled * with one of the PNG_TRANSFORM_* bits (this presently excludes - * dithering, filling, setting background, and doing gamma + * quantizing, filling, setting background, and doing gamma * adjustment), then you can read the entire image (including * pixels) into the info structure with this call: */ - png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL); + png_read_png(png_ptr, info_ptr, png_transforms, NULL); #else /* OK, you're doing it the hard way, with the lower-level functions */ @@ -175,7 +175,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, int_p_NULL, int_p_NULL); + &interlace_type, NULL, NULL); /* Set up the data transformations you want. Note that these are all * optional. Only call them if you want/need them. Many of the @@ -271,7 +271,8 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ png_set_gamma(png_ptr, screen_gamma, 0.45455); } - /* Dither RGB files down to 8 bit palette or reduce palettes +#ifdef PNG_READ_QUANTIZE_SUPPORTED + /* Quantize RGB files down to 8 bit palette or reduce palettes * to the number of colors available on your screen. */ if (color_type & PNG_COLOR_MASK_COLOR) @@ -282,11 +283,12 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ /* This reduces the image to the application supplied palette */ if (/* We have our own palette */) { - /* An array of colors to which the image should be dithered */ + /* An array of colors to which the image should be quantized */ png_color std_color_cube[MAX_SCREEN_COLORS]; - png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS, - MAX_SCREEN_COLORS, png_uint_16p_NULL, 0); + /* Prior to libpng-1.4.2, this was png_set_dither(). */ + png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS, + MAX_SCREEN_COLORS, NULL, 0); } /* This reduces the image to the palette supplied in the file */ else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) @@ -295,10 +297,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ png_get_hIST(png_ptr, info_ptr, &histogram); - png_set_dither(png_ptr, palette, num_palette, + png_set_quantize(png_ptr, palette, num_palette, max_screen_colors, histogram, 0); } } +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ /* Invert monochrome files to have 0 as white and 1 as black */ png_set_invert_mono(png_ptr); @@ -365,17 +368,17 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ #ifdef single /* Read the image a single row at a time */ for (y = 0; y < height; y++) { - png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1); + png_read_rows(png_ptr, &row_pointers[y], NULL, 1); } #else no_single /* Read the image several rows at a time */ for (y = 0; y < height; y += number_of_rows) { #ifdef sparkle /* Read the image using the "sparkle" effect. */ - png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, + png_read_rows(png_ptr, &row_pointers[y], NULL, number_of_rows); #else no_sparkle /* Read the image using the "rectangle" effect */ - png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y], + png_read_rows(png_ptr, NULL, &row_pointers[y], number_of_rows); #endif no_sparkle /* Use only one of these two methods */ } @@ -392,7 +395,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ /* At this point you have read the entire image */ /* Clean up after the read, and free any memory allocated - REQUIRED */ - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); /* Close the file */ fclose(fp); @@ -425,13 +428,13 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) if (*info_ptr == NULL) { - png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); + png_destroy_read_struct(png_ptr, info_ptr, NULL); return (ERROR); } if (setjmp(png_jmpbuf((*png_ptr)))) { - png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); + png_destroy_read_struct(png_ptr, info_ptr, NULL); return (ERROR); } @@ -460,7 +463,7 @@ process_data(png_structp *png_ptr, png_infop *info_ptr, if (setjmp(png_jmpbuf((*png_ptr)))) { /* Free the png_ptr and info_ptr memory on error */ - png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); + png_destroy_read_struct(png_ptr, info_ptr, NULL); return (ERROR); } @@ -509,20 +512,17 @@ row_callback(png_structp png_ptr, png_bytep new_row, * shown below: */ - /* Check if row_num is in bounds. */ - if ((row_num >= 0) && (row_num < height)) - { - /* Get pointer to corresponding row in our - * PNG read buffer. - */ - png_bytep old_row = ((png_bytep *)our_data)[row_num]; + /* Get pointer to corresponding row in our + * PNG read buffer. + */ + png_bytep old_row = ((png_bytep *)our_data)[row_num]; + + /* If both rows are allocated then copy the new row + * data to the corresponding row data. + */ + if ((old_row != NULL) && (new_row != NULL)) + png_progressive_combine_row(png_ptr, old_row, new_row); - /* If both rows are allocated then copy the new row - * data to the corresponding row data. - */ - if ((old_row != NULL) && (new_row != NULL)) - png_progressive_combine_row(png_ptr, old_row, new_row); - } /* * The rows and passes are called in order, so you don't really * need the row_num and pass, but I'm supplying them because it @@ -593,7 +593,7 @@ void write_png(char *file_name /* , ... other image information ... */) if (info_ptr == NULL) { fclose(fp); - png_destroy_write_struct(&png_ptr, png_infopp_NULL); + png_destroy_write_struct(&png_ptr, NULL); return (ERROR); } @@ -628,7 +628,7 @@ void write_png(char *file_name /* , ... other image information ... */) * image info living in the structure. You could "|" many * PNG_TRANSFORM flags into the png_transforms integer here. */ - png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL); + png_write_png(png_ptr, info_ptr, png_transforms, NULL); #else /* This is the hard way */ @@ -684,8 +684,11 @@ void write_png(char *file_name /* , ... other image information ... */) text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; #ifdef PNG_iTXt_SUPPORTED text_ptr[0].lang = NULL; + text_ptr[0].lang_key = NULL; text_ptr[1].lang = NULL; + text_ptr[1].lang_key = NULL; text_ptr[2].lang = NULL; + text_ptr[2].lang_key = NULL; #endif png_set_text(png_ptr, info_ptr, text_ptr, 3); diff --git a/source/Irrlicht/libpng/libpng-1.2.39.txt b/source/Irrlicht/libpng/libpng-1.4.3.txt similarity index 87% rename from source/Irrlicht/libpng/libpng-1.2.39.txt rename to source/Irrlicht/libpng/libpng-1.4.3.txt index 8e2a62e5..f1eefbbb 100644 --- a/source/Irrlicht/libpng/libpng-1.2.39.txt +++ b/source/Irrlicht/libpng/libpng-1.4.3.txt @@ -1,6 +1,6 @@ libpng.txt - A description on how to use and modify libpng - libpng version 1.2.39 - August 13, 2009 + libpng version 1.4.3 - June 26, 2010 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.2.39 - August 13, 2009 + libpng versions 0.97, January 1998, through 1.4.3 - June 26, 2010 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -40,8 +40,8 @@ will need. We assume that libpng is already installed; see the INSTALL file for instructions on how to install libpng. For examples of libpng usage, see the files "example.c", "pngtest.c", -and the files in the "contrib" directory, all of which are included in the -libpng distribution. +and the files in the "contrib" directory, all of which are included in +the libpng distribution. Libpng was written as a companion to the PNG specification, as a way of reducing the amount of time and effort it takes to support the PNG @@ -241,9 +241,13 @@ free any memory. } If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +you can compile libpng with PNG_NO_SETJMP, in which case errors will result in a call to PNG_ABORT() which defaults to abort(). +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + Now you need to set up the input code. The default for libpng is to use the C function fread(). If you use this, you will need to pass a valid FILE * in the function png_init_io(). Be sure that the file is @@ -260,6 +264,15 @@ libpng know that there are some bytes missing from the start of the file. png_set_sig_bytes(png_ptr, number); +You can change the zlib compression buffer size to be used while +reading compressed data with + + png_set_compression_buffer_size(png_ptr, buffer_size); + +where the default size is 8192 bytes. Note that the buffer size +is changed immediately and the buffer is reallocated immediately, +instead of setting a flag to be acted upon later. + Setting up callback code You can set up a callback function to handle any unknown chunks in the @@ -410,6 +423,31 @@ If you need to retrieve the limits that are being applied, use width_max = png_get_user_width_max(png_ptr); height_max = png_get_user_height_max(png_ptr); +The PNG specification sets no limit on the number of ancillary chunks +allowed in a PNG datastream. You can impose a limit on the total number +of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with + + png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); + +where 0x7fffffffL means unlimited. You can retrieve this limit with + + chunk_cache_max = png_get_chunk_cache_max(png_ptr); + +This limit also applies to the number of buffers that can be allocated +by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks. + +You can also set a limit on the amount of memory that a compressed chunk +other than IDAT can occupy, with + + png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); + +and you can retrieve the limit with + + chunk_malloc_max = png_get_chunk_malloc_max(png_ptr); + +Any chunks that would cause either of these limits to be exceeded will +be ignored. + The high-level read interface At this point there are two ways to proceed; through the high-level @@ -437,14 +475,16 @@ you want to do are limited to the following set: PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity to transparency PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples + to RGB (or GA to RGBA) (This excludes setting a background color, doing gamma transformation, -dithering, and setting filler.) If this is the case, simply do this: +quantizing, and setting filler.) If this is the case, simply do this: png_read_png(png_ptr, info_ptr, png_transforms, NULL) -where png_transforms is an integer containing the bitwise OR of -some set of transformation flags. This call is equivalent to png_read_info(), +where png_transforms is an integer containing the bitwise OR of some +set of transformation flags. This call is equivalent to png_read_info(), followed the set of transformations indicated by the transform mask, then png_read_image(), and finally png_read_end(). @@ -545,10 +585,33 @@ in until png_read_end() has read the chunk data following the image. for PNG 1.0) interlace_type - (PNG_INTERLACE_NONE or PNG_INTERLACE_ADAM7) - Any or all of interlace_type, compression_type, of + + Any or all of interlace_type, compression_type, or filter_method can be NULL if you are not interested in their values. + Note that png_get_IHDR() returns 32-bit data into + the application's width and height variables. + This is an unsafe situation if these are 16-bit + variables. In such situations, the + png_get_image_width() and png_get_image_height() + functions described below are safer. + + width = png_get_image_width(png_ptr, + info_ptr); + height = png_get_image_height(png_ptr, + info_ptr); + bit_depth = png_get_bit_depth(png_ptr, + info_ptr); + color_type = png_get_color_type(png_ptr, + info_ptr); + filter_method = png_get_filter_type(png_ptr, + info_ptr); + compression_type = png_get_compression_type(png_ptr, + info_ptr); + interlace_type = png_get_interlace_type(png_ptr, + info_ptr); + channels = png_get_channels(png_ptr, info_ptr); channels - number of channels of info for the color type (valid values are 1 (GRAY, @@ -568,29 +631,12 @@ in until png_read_end() has read the chunk data following the image. be in signature[4] through signature[7] (see png_set_sig_bytes())). - - width = png_get_image_width(png_ptr, - info_ptr); - height = png_get_image_height(png_ptr, - info_ptr); - bit_depth = png_get_bit_depth(png_ptr, - info_ptr); - color_type = png_get_color_type(png_ptr, - info_ptr); - filter_method = png_get_filter_type(png_ptr, - info_ptr); - compression_type = png_get_compression_type(png_ptr, - info_ptr); - interlace_type = png_get_interlace_type(png_ptr, - info_ptr); - - These are also important, but their validity depends on whether the chunk has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_) and png_get_(png_ptr, info_ptr, ...) functions return non-zero if the data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a pointer -into the info_ptr is returned for any complex types. +png_get_ are set directly if they are simple data types, or a +pointer into the info_ptr is returned for any complex types. png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette); @@ -628,11 +674,11 @@ into the info_ptr is returned for any complex types. whichever are appropriate for the given color type (png_color_16) - png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, - &trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values of + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, + &num_trans, &trans_color); + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + trans_color - graylevel or color sample values of the single transparent color for non-paletted images (PNG_INFO_tRNS) num_trans - number of transparent entries @@ -674,6 +720,10 @@ into the info_ptr is returned for any complex types. string for unknown). text_ptr[i].lang_key - keyword in UTF-8 (empty string for unknown). + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist + when the library is built with iTXt chunk support. + num_text - number of comments (same as num_comments; you can put NULL here to avoid the duplication) @@ -853,6 +903,43 @@ things. As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was added. It expands the sample depth without changing tRNS to alpha. +As of libpng version 1.4.3, not all possible expansions are supported. + +In the following table, the 01 means grayscale with depth<8, 31 means +indexed with depth<8, other numerals represent the color type, "T" means +the tRNS chunk is present, A means an alpha channel is present, and O +means tRNS or alpha is present but all pixels in the image are opaque. + + FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O + TO + 01 - + 31 - + 0 1 - + 0T - + 0O - + 2 GX - + 2T - + 2O - + 3 1 - + 3T - + 3O - + 4A T - + 4O - + 6A GX TX TX - + 6O GX TX - + +Within the matrix, + "-" means the transformation is not supported. + "X" means the transformation is obtained by png_set_expand(). + "1" means the transformation is obtained by + png_set_expand_gray_1_2_4_to_8 + "G" means the transformation is obtained by + png_set_gray_to_rgb(). + "P" means the transformation is obtained by + png_set_expand_palette_to_rgb(). + "T" means the transformation is obtained by + png_set_tRNS_to_alpha(). + PNG can have files with 16 bits per channel. If you only can handle 8 bits per channel, this will strip the pixels down to 8 bit. @@ -886,10 +973,10 @@ values of the pixels: PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to -8 bits/sample in the range [0, 255]). However, it is also possible to -convert the PNG pixel data back to the original bit depth of the image. -This call reduces the pixels back down to the original bit depth: +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] +to 8 bits/sample in the range [0, 255]). However, it is also possible +to convert the PNG pixel data back to the original bit depth of the +image. This call reduces the pixels back down to the original bit depth: png_color_8p sig_bit; @@ -1077,7 +1164,7 @@ recommended that PNG viewers support gamma correction. png_set_gamma(png_ptr, screen_gamma, 0.45455); If you need to reduce an RGB file to a paletted file, or if a paletted -file has more entries then will fit on your screen, png_set_dither() +file has more entries then will fit on your screen, png_set_quantize() will do that. Note that this is a simple match dither that merely finds the closest color available. This should work fairly well with optimized palettes, and fairly badly with linear color cubes. If you @@ -1096,7 +1183,7 @@ histogram, it may not do as good a job. png_get_hIST(png_ptr, info_ptr, &histogram); - png_set_dither(png_ptr, palette, num_palette, + png_set_quantize(png_ptr, palette, num_palette, max_screen_colors, histogram, 1); } else @@ -1104,7 +1191,7 @@ histogram, it may not do as good a job. png_color std_color_cube[MAX_SCREEN_COLORS] = { ... colors ... }; - png_set_dither(png_ptr, std_color_cube, + png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, NULL,0); } @@ -1336,12 +1423,11 @@ point to libpng-allocated storage with the following function: This function may be safely called when the relevant storage has already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". The default behavior is only to free data that was allocated internally by libpng. This can be changed, so that libpng will not free the data, @@ -1380,8 +1466,8 @@ if you transfer responsibility for free'ing text_ptr from libpng to your application, your application must not separately free those members. The png_free_data() function will turn off the "valid" flag for anything -it frees. If you need to turn the flag off for a chunk that was freed by your -application instead of by libpng, you can use +it frees. If you need to turn the flag off for a chunk that was freed by +your application instead of by libpng, you can use png_set_invalid(png_ptr, info_ptr, mask); mask - identifies the chunks to be made invalid, @@ -1640,9 +1726,13 @@ section below for more information on the libpng error handling. return; If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +you can compile libpng with PNG_NO_SETJMP, in which case errors will result in a call to PNG_ABORT() which defaults to abort(). +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + Now you need to set up the output code. The default for libpng is to use the C function fwrite(). If you use this, you will need to pass a valid FILE * in the function png_init_io(). Be sure that the file is @@ -1691,8 +1781,8 @@ the filter method, for which the only valid values are 0 (as of the July 1999 PNG specification, version 1.2) or 64 (if you are writing a PNG datastream that is to be embedded in a MNG datastream). The third parameter is a flag that indicates which filter type(s) are to be tested -for each scanline. See the PNG specification for details on the specific filter -types. +for each scanline. See the PNG specification for details on the specific +filter types. /* turn on or off filtering, and/or choose @@ -1858,11 +1948,11 @@ width, height, bit_depth, and color_type must be the same in each call. appropriate for the given color type (png_color_16) - png_set_tRNS(png_ptr, info_ptr, trans, num_trans, - trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values + png_set_tRNS(png_ptr, info_ptr, trans_alpha, + num_trans, trans_color); + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + trans_color - graylevel or color sample values (in order red, green, blue) of the single transparent color for non-paletted images (PNG_INFO_tRNS) @@ -1901,6 +1991,10 @@ width, height, bit_depth, and color_type must be the same in each call. empty for unknown). text_ptr[i].translated_keyword - keyword in UTF-8 (NULL or empty for unknown). + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist + when the library is built with iTXt chunk support. + num_text - number of comments png_set_sPLT(png_ptr, info_ptr, &palette_ptr, @@ -2106,10 +2200,10 @@ this with a call to png_write_info(). Note that there is one transformation you may need to do before png_write_info(). In PNG files, the alpha channel in an image is the -level of opacity. If your data is supplied as a level of -transparency, you can invert the alpha channel before you write it, so -that 0 is fully transparent and 255 (in 8-bit or paletted images) or -65535 (in 16-bit images) is fully opaque, with +level of opacity. If your data is supplied as a level of transparency, +you can invert the alpha channel before you write it, so that 0 is +fully transparent and 255 (in 8-bit or paletted images) or 65535 +(in 16-bit images) is fully opaque, with png_set_invert_alpha(png_ptr); @@ -2296,14 +2390,13 @@ a single row_pointer instead of an array of row_pointers: png_write_row(png_ptr, row_pointer); -When the file is interlaced, things can get a good deal more -complicated. The only currently (as of the PNG Specification -version 1.2, dated July 1999) defined interlacing scheme for PNG files -is the "Adam7" interlace scheme, that breaks down an -image into seven smaller images of varying size. libpng will build -these images for you, or you can do them yourself. If you want to -build them yourself, see the PNG specification for details of which -pixels to write when. +When the file is interlaced, things can get a good deal more complicated. +The only currently (as of the PNG Specification version 1.2, dated July +1999) defined interlacing scheme for PNG files is the "Adam7" interlace +scheme, that breaks down an image into seven smaller images of varying +size. libpng will build these images for you, or you can do them +yourself. If you want to build them yourself, see the PNG specification +for details of which pixels to write when. If you don't want libpng to handle the interlacing details, just use png_set_interlace_handling() and call png_write_rows() the @@ -2315,17 +2408,17 @@ writing any rows: number_of_passes = png_set_interlace_handling(png_ptr); -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. Then write the complete image number_of_passes times. png_write_rows(png_ptr, row_pointers, number_of_rows); -As some of these rows are not used, and thus return immediately, -you may want to read about interlacing in the PNG specification, -and only update the rows that are actually used. +As some of these rows are not used, and thus return immediately, you may +want to read about interlacing in the PNG specification, and only update +the rows that are actually used. Finishing a sequential write @@ -2358,15 +2451,14 @@ point to libpng-allocated storage with the following function: This function may be safely called when the relevant storage has already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". -If you allocated data such as a palette that you passed -in to libpng with png_set_*, you must not free it until just before the call to +If you allocated data such as a palette that you passed in to libpng +with png_set_*, you must not free it until just before the call to png_destroy_write_struct(). The default behavior is only to free data that was allocated internally @@ -2432,23 +2524,25 @@ goes through callbacks that are user-settable. The default routines are in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change these functions, call the appropriate png_set_*_fn() function. -Memory allocation is done through the functions png_malloc() -and png_free(). These currently just call the standard C functions. If -your pointers can't access more then 64K at a time, you will want to set -MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling -memory allocation on a platform will change between applications, these -functions must be modified in the library at compile time. If you prefer -to use a different method of allocating and freeing data, you can use -png_create_read_struct_2() or png_create_write_struct_2() to register -your own functions as described above. -These functions also provide a void pointer that can be retrieved via +Memory allocation is done through the functions png_malloc(), png_calloc(), +and png_free(). These currently just call the standard C functions. +png_calloc() calls png_malloc() and then png_memset() to clear the newly +allocated memory to zero. If your pointers can't access more then 64K +at a time, you will want to set MAXSEG_64K in zlib.h. Since it is +unlikely that the method of handling memory allocation on a platform +will change between applications, these functions must be modified in +the library at compile time. If you prefer to use a different method +of allocating and freeing data, you can use png_create_read_struct_2() or +png_create_write_struct_2() to register your own functions as described +above. These functions also provide a void pointer that can be retrieved +via mem_ptr=png_get_mem_ptr(png_ptr); Your replacement memory functions must have prototypes as follows: png_voidp malloc_fn(png_structp png_ptr, - png_size_t size); + png_alloc_size_t size); void free_fn(png_structp png_ptr, png_voidp ptr); Your malloc_fn() must return NULL in case of failure. The png_malloc() @@ -2499,8 +2593,9 @@ Error handling in libpng is done through png_error() and png_warning(). Errors handled through png_error() are fatal, meaning that png_error() should never return to its caller. Currently, this is handled via setjmp() and longjmp() (unless you have compiled libpng with -PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()), -but you could change this to do things like exit() if you should wish. +PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), +but you could change this to do things like exit() if you should wish, +as long as your function does not return. On non-fatal errors, png_warning() is called to print a warning message, and then control returns to the calling code. @@ -2533,10 +2628,10 @@ The motivation behind using setjmp() and longjmp() is the C++ throw and catch exception handling methods. This makes the code much easier to write, as there is no need to check every return code of every function call. However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything after -setjmp returns non-zero besides returning itself. Consult your compiler -documentation for more details. For an alternative approach, you may wish -to use the "cexcept" facility (see http://cexcept.sourceforge.net). +after a longjmp, so the user may want to be careful about doing anything +after setjmp returns non-zero besides returning itself. Consult your +compiler documentation for more details. For an alternative approach, you +may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net). Custom chunks @@ -2548,15 +2643,14 @@ library code itself needs to know about interactions between your chunk and existing `intrinsic' chunks. If you need to write a new intrinsic chunk, first read the PNG -specification. Acquire a first level of -understanding of how it works. Pay particular attention to the -sections that describe chunk names, and look at how other chunks were -designed, so you can do things similarly. Second, check out the -sections of libpng that read and write chunks. Try to find a chunk -that is similar to yours and use it as a template. More details can -be found in the comments inside the code. It is best to handle unknown -chunks in a generic method, via callback functions, instead of by -modifying libpng functions. +specification. Acquire a first level of understanding of how it works. +Pay particular attention to the sections that describe chunk names, +and look at how other chunks were designed, so you can do things +similarly. Second, check out the sections of libpng that read and +write chunks. Try to find a chunk that is similar to yours and use +it as a template. More details can be found in the comments inside +the code. It is best to handle unknown chunks in a generic method, +via callback functions, instead of by modifying libpng functions. If you wish to write your own transformation for the data, look through the part of the code that does the transformations, and check out some of @@ -2600,10 +2694,10 @@ Configuring for compiler xxx: All includes for libpng are in pngconf.h. If you need to add, change or delete an include, this is the place to do it. -The includes that are not needed outside libpng are protected by the -PNG_INTERNAL definition, which is only defined for those routines inside -libpng itself. The files in libpng proper only include png.h, which -includes pngconf.h. +The includes that are not needed outside libpng are placed in pngpriv.h, +which is only used by the routines inside libpng itself. +The files in libpng proper only include pngpriv.h and png.h, which +in turn includes pngconf.h. Configuring zlib: @@ -2733,14 +2827,14 @@ off en masse with compiler directives that define PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, or all four, along with directives to turn on any of the capabilities that you do -want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable -the extra transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks -Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive -produces a library that is incapable of reading or writing ancillary chunks. -If you are not using the progressive reading capability, you can -turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse -this with the INTERLACING capability, which you'll still have). +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra +transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks. Use of the +PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library +that is incapable of reading or writing ancillary chunks. If you are +not using the progressive reading capability, you can turn that off +with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING +capability, which you'll still have). All the reading and writing specific code are in separate files, so the linker should only grab the files it needs. However, if you want to @@ -2875,6 +2969,9 @@ accomplish this, the functions png_create_read_struct_2(), png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), png_malloc_default(), and png_free_default() were added. +Support for the iTXt chunk has been enabled by default as of +version 1.2.41. + Support for certain MNG features was enabled. Support for numbered error messages was added. However, we never got @@ -2929,7 +3026,138 @@ selection of assembler code features: We replaced all of these functions with simple stubs in libpng-1.2.20, when the Intel assembler code was removed due to a licensing issue. -IX. (Omitted) +These macros are deprecated: + + PNG_READ_TRANSFORMS_NOT_SUPPORTED + PNG_PROGRESSIVE_READ_NOT_SUPPORTED + PNG_NO_SEQUENTIAL_READ_SUPPORTED + PNG_WRITE_TRANSFORMS_NOT_SUPPORTED + PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED + PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED + +They have been replaced, respectively, by: + + PNG_NO_READ_TRANSFORMS + PNG_NO_PROGRESSIVE_READ + PNG_NO_SEQUENTIAL_READ + PNG_NO_WRITE_TRANSFORMS + PNG_NO_READ_ANCILLARY_CHUNKS + PNG_NO_WRITE_ANCILLARY_CHUNKS + +PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been +deprecated since libpng-1.0.16 and libpng-1.2.6. + +The function + png_check_sig(sig, num) +was replaced with + !png_sig_cmp(sig, 0, num) +It has been deprecated since libpng-0.90. + +The function + png_set_gray_1_2_4_to_8() +which also expands tRNS to alpha was replaced with + png_set_expand_gray_1_2_4_to_8() +which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. + +IX. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x + +Private libpng prototypes and macro definitions were moved from +png.h and pngconf.h into a new pngpriv.h header file. + +Functions png_set_benign_errors(), png_benign_error(), and +png_chunk_benign_error() were added. + +Support for setting the maximum amount of memory that the application +will allocate for reading chunks was added, as a security measure. +The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() +were added to the library. + +We implemented support for I/O states by adding png_ptr member io_state +and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c + +We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level +input transforms. + +Checking for and reporting of errors in the IHDR chunk is more thorough. + +Support for global arrays was removed, to improve thread safety. + +Some obsolete/deprecated macros and functions have been removed. + +Typecasted NULL definitions such as + #define png_voidp_NULL (png_voidp)NULL +were eliminated. If you used these in your application, just use +NULL instead. + +The png_struct and info_struct members "trans" and "trans_values" were +changed to "trans_alpha" and "trans_color", respectively. + +The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles +were removed. + +The PNG_1_0_X and PNG_1_2_X macros were eliminated. + +The PNG_LEGACY_SUPPORTED macro was eliminated. + +Many WIN32_WCE #ifdefs were removed. + +The functions png_read_init(info_ptr), png_write_init(info_ptr), +png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() +have been removed. They have been deprecated since libpng-0.95. + +The png_permit_empty_plte() was removed. It has been deprecated +since libpng-1.0.9. Use png_permit_mng_features() instead. + +We removed the obsolete stub functions png_get_mmx_flagmask(), +png_set_mmx_thresholds(), png_get_asm_flags(), +png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), +png_set_asm_flags(), and png_mmx_supported() + +We removed the obsolete png_check_sig(), png_memcpy_check(), and +png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(), +and png_memset(), respectively. + +The function png_set_gray_1_2_4_to_8() was removed. It has been +deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with +png_set_expand_gray_1_2_4_to_8() because the former function also +expanded palette images. + +We changed the prototype for png_malloc() from + png_malloc(png_structp png_ptr, png_uint_32 size) +to + png_malloc(png_structp png_ptr, png_alloc_size_t size) + +This also applies to the prototype for the user replacement malloc_fn(). + +The png_calloc() function was added and is used in place of +of "png_malloc(); png_memset();" except in the case in png_read_png() +where the array consists of pointers; in this case a "for" loop is used +after the png_malloc() to set the pointers to NULL, to give robust. +behavior in case the application runs out of memory part-way through +the process. + +We changed the prototypes of png_get_compression_buffer_size() and +png_set_compression_buffer_size() to work with png_size_t instead of +png_uint_32. + +Support for numbered error messages was removed by default, since we +never got around to actually numbering the error messages. The function +png_set_strip_error_numbers() was removed from the library by default. + +The png_zalloc() and png_zfree() functions are no longer exported. +The png_zalloc() function no longer zeroes out the memory that it +allocates. + +Support for dithering was disabled by default in libpng-1.4.0, because +been well tested and doesn't actually "dither". The code was not +removed, however, and could be enabled by building libpng with +PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support +was reenabled, but the function was renamed png_set_quantize() to +reflect more accurately what it actually does. At the same time, +the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to +PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS. + +We removed the trailing '.' from the warning and error messages. X. Detecting libpng @@ -2983,18 +3211,27 @@ We use 3-space indentation, except for continued statements which are usually indented the same as the first line of the statement plus four more spaces. +For macro definitions we use 2-space indentation, always leaving the "#" +in the first column. + + #ifndef PNG_NO_FEATURE + # ifndef PNG_FEATURE_SUPPORTED + # define PNG_FEATURE_SUPPORTED + # endif + #endif + Comments appear with the leading "/*" at the same indentation as the statement that follows the comment: /* Single-line comment */ statement; - /* Multiple-line - * comment + /* This is a multiple-line + * comment. */ statement; -Very short comments can be placed at the end of the statement +Very short comments can be placed after the end of the statement to which they pertain: statement; /* comment */ @@ -3030,7 +3267,7 @@ We mark all non-exported functions with "/* PRIVATE */"": The prototypes for non-exported functions (except for those in pngtest) appear in -the PNG_INTERNAL section of png.h +pngpriv.h above the comment that says /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ @@ -3041,29 +3278,32 @@ macros begin with "PNG_". We put a space after each comma and after each semicolon in "for" statments, and we put spaces before and after each -C binary operator and after "for" or "while". We don't -put a space between a typecast and the expression being -cast, nor do we put one between a function name and the +C binary operator and after "for" or "while", and before +"?". We don't put a space between a typecast and the expression +being cast, nor do we put one between a function name and the left parenthesis that follows it: for (i = 2; i > 0; --i) - x[i] = a(x) + (int)b; + y[i] = a(x) + (int)b; We prefer #ifdef and #ifndef to #if defined() and if !defined() when there is only one macro being tested. -Other rules can be inferred by inspecting the libpng -source. +We do not use the TAB character for indentation in the C sources. + +Lines do not exceed 80 characters. + +Other rules can be inferred by inspecting the libpng source. XIII. Y2K Compliance in libpng -August 13, 2009 +June 26, 2010 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.39 are Y2K compliant. It is my belief that earlier +upward through 1.4.3 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that diff --git a/source/Irrlicht/libpng/scripts/libpng-config.in b/source/Irrlicht/libpng/libpng-config.in old mode 100755 new mode 100644 similarity index 93% rename from source/Irrlicht/libpng/scripts/libpng-config.in rename to source/Irrlicht/libpng/libpng-config.in index 7b99bfc3..0669c5fe --- a/source/Irrlicht/libpng/scripts/libpng-config.in +++ b/source/Irrlicht/libpng/libpng-config.in @@ -22,7 +22,7 @@ I_opts="-I${includedir}" L_opts="-L${libdir}" R_opts="" cppflags="" -ccopts="@LIBPNG_NO_MMX@" +ccopts="" ldopts="" usage() diff --git a/source/Irrlicht/libpng/libpng.3 b/source/Irrlicht/libpng/libpng.3 index 756e5a6c..049df515 100644 --- a/source/Irrlicht/libpng/libpng.3 +++ b/source/Irrlicht/libpng/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "August 13, 2009" +.TH LIBPNG 3 "June 26, 2010" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 +libpng \- Portable Network Graphics (PNG) Reference Library 1.4.3 .SH SYNOPSIS \fI\fB @@ -12,7 +12,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBint png_check_sig (png_bytep \fP\fIsig\fP\fB, int \fInum\fP\fB);\fP +\fBvoid png_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP + +\fI\fB + +\fBvoid png_chunk_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP \fI\fB @@ -56,18 +60,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fI\fB - -\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP - -\fI\fB - -\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP - -\fI\fB - \fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP \fI\fB @@ -120,10 +112,18 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBpng_uint_32 png_get_chunk_cache_max (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + \fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fI\fB +\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + \fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fI\fB @@ -176,12 +176,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fB#if \fI!defined(PNG_1_0_X) - \fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP -\fI\fB#endif - \fI\fB \fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP @@ -196,6 +192,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBpng_alloc_size_t png_get_chunk_malloc_max (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + \fBpng_voidp png_get_mem_ptr(png_structp \fIpng_ptr\fP\fB);\fP \fI\fB @@ -262,11 +262,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_values\fP\fB);\fP +\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP \fI\fB -\fB#if \fI!defined(PNG_1_0_X) +\fB/* This function is really an inline macro. \fI*/ \fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP @@ -276,9 +276,9 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP +\fB/* This function is really an inline macro. \fI*/ -\fI\fB#endif +\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP \fI\fB @@ -330,10 +330,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - \fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP \fI\fB @@ -342,19 +338,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP +\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP \fI\fB -\fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP +\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP \fI\fB @@ -362,22 +350,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBpng_voidp png_memcpy_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - \fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP \fI\fB -\fBpng_voidp png_memset_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP - -\fI\fB - \fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP \fI\fB @@ -386,10 +362,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP - -\fI\fB - \fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fI\fB @@ -398,14 +370,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBDEPRECATED: void png_read_init (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP - -\fI\fB - \fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fI\fB @@ -426,8 +390,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fB#if \fI!defined(PNG_1_0_X) - \fBpng_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP \fI\fB @@ -442,8 +404,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP -\fI\fB#endif - \fI\fB \fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP @@ -466,6 +426,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBvoid png_set_chunk_cache_max (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIuser_chunk_cache_max\fP\fB);\fP + +\fI\fB + \fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP \fI\fB @@ -490,10 +454,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBvoid png_set_dither (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_dither\fP\fB);\fP - -\fI\fB - \fBvoid png_set_error_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarning_fn\fP\fB);\fP \fI\fB @@ -574,6 +534,14 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBjmp_buf* png_set_longjmp_fn (png_structp \fP\fIpng_ptr\fP\fB, png_longjmp_ptr \fP\fIlongjmp_fn\fP\fB, size_t \fIjmp_buf_size\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_chunk_malloc_max (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIuser_chunk_cache_max\fP\fB);\fP + +\fI\fB + \fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP \fI\fB @@ -610,6 +578,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBvoid png_set_quantize (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_quantize\fP\fB);\fP + +\fI\fB + \fBvoid png_set_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fIread_data_fn\fP\fB);\fP \fI\fB @@ -686,7 +658,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_values\fP\fB);\fP +\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP \fI\fB @@ -758,10 +730,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - \fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fI\fB @@ -774,14 +742,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBDEPRECATED: void png_write_init (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP - -\fI\fB - \fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fI\fB @@ -802,6 +762,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + \fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP \fI\fB @@ -821,7 +785,7 @@ Following is a copy of the libpng.txt file that accompanies libpng. .SH LIBPNG.TXT libpng.txt - A description on how to use and modify libpng - libpng version 1.2.39 - August 13, 2009 + libpng version 1.4.3 - June 26, 2010 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -832,7 +796,7 @@ libpng.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.2.39 - August 13, 2009 + libpng versions 0.97, January 1998, through 1.4.3 - June 26, 2010 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -861,8 +825,8 @@ will need. We assume that libpng is already installed; see the INSTALL file for instructions on how to install libpng. For examples of libpng usage, see the files "example.c", "pngtest.c", -and the files in the "contrib" directory, all of which are included in the -libpng distribution. +and the files in the "contrib" directory, all of which are included in +the libpng distribution. Libpng was written as a companion to the PNG specification, as a way of reducing the amount of time and effort it takes to support the PNG @@ -1062,9 +1026,13 @@ free any memory. } If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +you can compile libpng with PNG_NO_SETJMP, in which case errors will result in a call to PNG_ABORT() which defaults to abort(). +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + Now you need to set up the input code. The default for libpng is to use the C function fread(). If you use this, you will need to pass a valid FILE * in the function png_init_io(). Be sure that the file is @@ -1081,6 +1049,15 @@ libpng know that there are some bytes missing from the start of the file. png_set_sig_bytes(png_ptr, number); +You can change the zlib compression buffer size to be used while +reading compressed data with + + png_set_compression_buffer_size(png_ptr, buffer_size); + +where the default size is 8192 bytes. Note that the buffer size +is changed immediately and the buffer is reallocated immediately, +instead of setting a flag to be acted upon later. + .SS Setting up callback code You can set up a callback function to handle any unknown chunks in the @@ -1231,6 +1208,31 @@ If you need to retrieve the limits that are being applied, use width_max = png_get_user_width_max(png_ptr); height_max = png_get_user_height_max(png_ptr); +The PNG specification sets no limit on the number of ancillary chunks +allowed in a PNG datastream. You can impose a limit on the total number +of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with + + png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); + +where 0x7fffffffL means unlimited. You can retrieve this limit with + + chunk_cache_max = png_get_chunk_cache_max(png_ptr); + +This limit also applies to the number of buffers that can be allocated +by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks. + +You can also set a limit on the amount of memory that a compressed chunk +other than IDAT can occupy, with + + png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); + +and you can retrieve the limit with + + chunk_malloc_max = png_get_chunk_malloc_max(png_ptr); + +Any chunks that would cause either of these limits to be exceeded will +be ignored. + .SS The high-level read interface At this point there are two ways to proceed; through the high-level @@ -1258,14 +1260,16 @@ you want to do are limited to the following set: PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity to transparency PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples + to RGB (or GA to RGBA) (This excludes setting a background color, doing gamma transformation, -dithering, and setting filler.) If this is the case, simply do this: +quantizing, and setting filler.) If this is the case, simply do this: png_read_png(png_ptr, info_ptr, png_transforms, NULL) -where png_transforms is an integer containing the bitwise OR of -some set of transformation flags. This call is equivalent to png_read_info(), +where png_transforms is an integer containing the bitwise OR of some +set of transformation flags. This call is equivalent to png_read_info(), followed the set of transformations indicated by the transform mask, then png_read_image(), and finally png_read_end(). @@ -1366,10 +1370,33 @@ in until png_read_end() has read the chunk data following the image. for PNG 1.0) interlace_type - (PNG_INTERLACE_NONE or PNG_INTERLACE_ADAM7) - Any or all of interlace_type, compression_type, of + + Any or all of interlace_type, compression_type, or filter_method can be NULL if you are not interested in their values. + Note that png_get_IHDR() returns 32-bit data into + the application's width and height variables. + This is an unsafe situation if these are 16-bit + variables. In such situations, the + png_get_image_width() and png_get_image_height() + functions described below are safer. + + width = png_get_image_width(png_ptr, + info_ptr); + height = png_get_image_height(png_ptr, + info_ptr); + bit_depth = png_get_bit_depth(png_ptr, + info_ptr); + color_type = png_get_color_type(png_ptr, + info_ptr); + filter_method = png_get_filter_type(png_ptr, + info_ptr); + compression_type = png_get_compression_type(png_ptr, + info_ptr); + interlace_type = png_get_interlace_type(png_ptr, + info_ptr); + channels = png_get_channels(png_ptr, info_ptr); channels - number of channels of info for the color type (valid values are 1 (GRAY, @@ -1389,29 +1416,12 @@ in until png_read_end() has read the chunk data following the image. be in signature[4] through signature[7] (see png_set_sig_bytes())). - - width = png_get_image_width(png_ptr, - info_ptr); - height = png_get_image_height(png_ptr, - info_ptr); - bit_depth = png_get_bit_depth(png_ptr, - info_ptr); - color_type = png_get_color_type(png_ptr, - info_ptr); - filter_method = png_get_filter_type(png_ptr, - info_ptr); - compression_type = png_get_compression_type(png_ptr, - info_ptr); - interlace_type = png_get_interlace_type(png_ptr, - info_ptr); - - These are also important, but their validity depends on whether the chunk has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_) and png_get_(png_ptr, info_ptr, ...) functions return non-zero if the data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a pointer -into the info_ptr is returned for any complex types. +png_get_ are set directly if they are simple data types, or a +pointer into the info_ptr is returned for any complex types. png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette); @@ -1449,11 +1459,11 @@ into the info_ptr is returned for any complex types. whichever are appropriate for the given color type (png_color_16) - png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, - &trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values of + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, + &num_trans, &trans_color); + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + trans_color - graylevel or color sample values of the single transparent color for non-paletted images (PNG_INFO_tRNS) num_trans - number of transparent entries @@ -1495,6 +1505,10 @@ into the info_ptr is returned for any complex types. string for unknown). text_ptr[i].lang_key - keyword in UTF-8 (empty string for unknown). + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist + when the library is built with iTXt chunk support. + num_text - number of comments (same as num_comments; you can put NULL here to avoid the duplication) @@ -1674,6 +1688,43 @@ things. As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was added. It expands the sample depth without changing tRNS to alpha. +As of libpng version 1.4.3, not all possible expansions are supported. + +In the following table, the 01 means grayscale with depth<8, 31 means +indexed with depth<8, other numerals represent the color type, "T" means +the tRNS chunk is present, A means an alpha channel is present, and O +means tRNS or alpha is present but all pixels in the image are opaque. + + FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O + TO + 01 - + 31 - + 0 1 - + 0T - + 0O - + 2 GX - + 2T - + 2O - + 3 1 - + 3T - + 3O - + 4A T - + 4O - + 6A GX TX TX - + 6O GX TX - + +Within the matrix, + "-" means the transformation is not supported. + "X" means the transformation is obtained by png_set_expand(). + "1" means the transformation is obtained by + png_set_expand_gray_1_2_4_to_8 + "G" means the transformation is obtained by + png_set_gray_to_rgb(). + "P" means the transformation is obtained by + png_set_expand_palette_to_rgb(). + "T" means the transformation is obtained by + png_set_tRNS_to_alpha(). + PNG can have files with 16 bits per channel. If you only can handle 8 bits per channel, this will strip the pixels down to 8 bit. @@ -1707,10 +1758,10 @@ values of the pixels: PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to -8 bits/sample in the range [0, 255]). However, it is also possible to -convert the PNG pixel data back to the original bit depth of the image. -This call reduces the pixels back down to the original bit depth: +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] +to 8 bits/sample in the range [0, 255]). However, it is also possible +to convert the PNG pixel data back to the original bit depth of the +image. This call reduces the pixels back down to the original bit depth: png_color_8p sig_bit; @@ -1898,7 +1949,7 @@ recommended that PNG viewers support gamma correction. png_set_gamma(png_ptr, screen_gamma, 0.45455); If you need to reduce an RGB file to a paletted file, or if a paletted -file has more entries then will fit on your screen, png_set_dither() +file has more entries then will fit on your screen, png_set_quantize() will do that. Note that this is a simple match dither that merely finds the closest color available. This should work fairly well with optimized palettes, and fairly badly with linear color cubes. If you @@ -1917,7 +1968,7 @@ histogram, it may not do as good a job. png_get_hIST(png_ptr, info_ptr, &histogram); - png_set_dither(png_ptr, palette, num_palette, + png_set_quantize(png_ptr, palette, num_palette, max_screen_colors, histogram, 1); } else @@ -1925,7 +1976,7 @@ histogram, it may not do as good a job. png_color std_color_cube[MAX_SCREEN_COLORS] = { ... colors ... }; - png_set_dither(png_ptr, std_color_cube, + png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, NULL,0); } @@ -2157,12 +2208,11 @@ point to libpng-allocated storage with the following function: This function may be safely called when the relevant storage has already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". The default behavior is only to free data that was allocated internally by libpng. This can be changed, so that libpng will not free the data, @@ -2201,8 +2251,8 @@ if you transfer responsibility for free'ing text_ptr from libpng to your application, your application must not separately free those members. The png_free_data() function will turn off the "valid" flag for anything -it frees. If you need to turn the flag off for a chunk that was freed by your -application instead of by libpng, you can use +it frees. If you need to turn the flag off for a chunk that was freed by +your application instead of by libpng, you can use png_set_invalid(png_ptr, info_ptr, mask); mask - identifies the chunks to be made invalid, @@ -2461,9 +2511,13 @@ section below for more information on the libpng error handling. return; If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +you can compile libpng with PNG_NO_SETJMP, in which case errors will result in a call to PNG_ABORT() which defaults to abort(). +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + Now you need to set up the output code. The default for libpng is to use the C function fwrite(). If you use this, you will need to pass a valid FILE * in the function png_init_io(). Be sure that the file is @@ -2512,8 +2566,8 @@ the filter method, for which the only valid values are 0 (as of the July 1999 PNG specification, version 1.2) or 64 (if you are writing a PNG datastream that is to be embedded in a MNG datastream). The third parameter is a flag that indicates which filter type(s) are to be tested -for each scanline. See the PNG specification for details on the specific filter -types. +for each scanline. See the PNG specification for details on the specific +filter types. /* turn on or off filtering, and/or choose @@ -2679,11 +2733,11 @@ width, height, bit_depth, and color_type must be the same in each call. appropriate for the given color type (png_color_16) - png_set_tRNS(png_ptr, info_ptr, trans, num_trans, - trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values + png_set_tRNS(png_ptr, info_ptr, trans_alpha, + num_trans, trans_color); + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + trans_color - graylevel or color sample values (in order red, green, blue) of the single transparent color for non-paletted images (PNG_INFO_tRNS) @@ -2722,6 +2776,10 @@ width, height, bit_depth, and color_type must be the same in each call. empty for unknown). text_ptr[i].translated_keyword - keyword in UTF-8 (NULL or empty for unknown). + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist + when the library is built with iTXt chunk support. + num_text - number of comments png_set_sPLT(png_ptr, info_ptr, &palette_ptr, @@ -2927,10 +2985,10 @@ this with a call to png_write_info(). Note that there is one transformation you may need to do before png_write_info(). In PNG files, the alpha channel in an image is the -level of opacity. If your data is supplied as a level of -transparency, you can invert the alpha channel before you write it, so -that 0 is fully transparent and 255 (in 8-bit or paletted images) or -65535 (in 16-bit images) is fully opaque, with +level of opacity. If your data is supplied as a level of transparency, +you can invert the alpha channel before you write it, so that 0 is +fully transparent and 255 (in 8-bit or paletted images) or 65535 +(in 16-bit images) is fully opaque, with png_set_invert_alpha(png_ptr); @@ -3117,14 +3175,13 @@ a single row_pointer instead of an array of row_pointers: png_write_row(png_ptr, row_pointer); -When the file is interlaced, things can get a good deal more -complicated. The only currently (as of the PNG Specification -version 1.2, dated July 1999) defined interlacing scheme for PNG files -is the "Adam7" interlace scheme, that breaks down an -image into seven smaller images of varying size. libpng will build -these images for you, or you can do them yourself. If you want to -build them yourself, see the PNG specification for details of which -pixels to write when. +When the file is interlaced, things can get a good deal more complicated. +The only currently (as of the PNG Specification version 1.2, dated July +1999) defined interlacing scheme for PNG files is the "Adam7" interlace +scheme, that breaks down an image into seven smaller images of varying +size. libpng will build these images for you, or you can do them +yourself. If you want to build them yourself, see the PNG specification +for details of which pixels to write when. If you don't want libpng to handle the interlacing details, just use png_set_interlace_handling() and call png_write_rows() the @@ -3136,17 +3193,17 @@ writing any rows: number_of_passes = png_set_interlace_handling(png_ptr); -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. Then write the complete image number_of_passes times. png_write_rows(png_ptr, row_pointers, number_of_rows); -As some of these rows are not used, and thus return immediately, -you may want to read about interlacing in the PNG specification, -and only update the rows that are actually used. +As some of these rows are not used, and thus return immediately, you may +want to read about interlacing in the PNG specification, and only update +the rows that are actually used. .SS Finishing a sequential write @@ -3179,15 +3236,14 @@ point to libpng-allocated storage with the following function: This function may be safely called when the relevant storage has already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". -If you allocated data such as a palette that you passed -in to libpng with png_set_*, you must not free it until just before the call to +If you allocated data such as a palette that you passed in to libpng +with png_set_*, you must not free it until just before the call to png_destroy_write_struct(). The default behavior is only to free data that was allocated internally @@ -3253,23 +3309,25 @@ goes through callbacks that are user-settable. The default routines are in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change these functions, call the appropriate png_set_*_fn() function. -Memory allocation is done through the functions png_malloc() -and png_free(). These currently just call the standard C functions. If -your pointers can't access more then 64K at a time, you will want to set -MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling -memory allocation on a platform will change between applications, these -functions must be modified in the library at compile time. If you prefer -to use a different method of allocating and freeing data, you can use -png_create_read_struct_2() or png_create_write_struct_2() to register -your own functions as described above. -These functions also provide a void pointer that can be retrieved via +Memory allocation is done through the functions png_malloc(), png_calloc(), +and png_free(). These currently just call the standard C functions. +png_calloc() calls png_malloc() and then png_memset() to clear the newly +allocated memory to zero. If your pointers can't access more then 64K +at a time, you will want to set MAXSEG_64K in zlib.h. Since it is +unlikely that the method of handling memory allocation on a platform +will change between applications, these functions must be modified in +the library at compile time. If you prefer to use a different method +of allocating and freeing data, you can use png_create_read_struct_2() or +png_create_write_struct_2() to register your own functions as described +above. These functions also provide a void pointer that can be retrieved +via mem_ptr=png_get_mem_ptr(png_ptr); Your replacement memory functions must have prototypes as follows: png_voidp malloc_fn(png_structp png_ptr, - png_size_t size); + png_alloc_size_t size); void free_fn(png_structp png_ptr, png_voidp ptr); Your malloc_fn() must return NULL in case of failure. The png_malloc() @@ -3320,8 +3378,9 @@ Error handling in libpng is done through png_error() and png_warning(). Errors handled through png_error() are fatal, meaning that png_error() should never return to its caller. Currently, this is handled via setjmp() and longjmp() (unless you have compiled libpng with -PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()), -but you could change this to do things like exit() if you should wish. +PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), +but you could change this to do things like exit() if you should wish, +as long as your function does not return. On non-fatal errors, png_warning() is called to print a warning message, and then control returns to the calling code. @@ -3354,10 +3413,10 @@ The motivation behind using setjmp() and longjmp() is the C++ throw and catch exception handling methods. This makes the code much easier to write, as there is no need to check every return code of every function call. However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything after -setjmp returns non-zero besides returning itself. Consult your compiler -documentation for more details. For an alternative approach, you may wish -to use the "cexcept" facility (see http://cexcept.sourceforge.net). +after a longjmp, so the user may want to be careful about doing anything +after setjmp returns non-zero besides returning itself. Consult your +compiler documentation for more details. For an alternative approach, you +may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net). .SS Custom chunks @@ -3369,15 +3428,14 @@ library code itself needs to know about interactions between your chunk and existing `intrinsic' chunks. If you need to write a new intrinsic chunk, first read the PNG -specification. Acquire a first level of -understanding of how it works. Pay particular attention to the -sections that describe chunk names, and look at how other chunks were -designed, so you can do things similarly. Second, check out the -sections of libpng that read and write chunks. Try to find a chunk -that is similar to yours and use it as a template. More details can -be found in the comments inside the code. It is best to handle unknown -chunks in a generic method, via callback functions, instead of by -modifying libpng functions. +specification. Acquire a first level of understanding of how it works. +Pay particular attention to the sections that describe chunk names, +and look at how other chunks were designed, so you can do things +similarly. Second, check out the sections of libpng that read and +write chunks. Try to find a chunk that is similar to yours and use +it as a template. More details can be found in the comments inside +the code. It is best to handle unknown chunks in a generic method, +via callback functions, instead of by modifying libpng functions. If you wish to write your own transformation for the data, look through the part of the code that does the transformations, and check out some of @@ -3421,10 +3479,10 @@ you may also have to change the memory allocators (png_malloc, etc.). All includes for libpng are in pngconf.h. If you need to add, change or delete an include, this is the place to do it. -The includes that are not needed outside libpng are protected by the -PNG_INTERNAL definition, which is only defined for those routines inside -libpng itself. The files in libpng proper only include png.h, which -includes pngconf.h. +The includes that are not needed outside libpng are placed in pngpriv.h, +which is only used by the routines inside libpng itself. +The files in libpng proper only include pngpriv.h and png.h, which +in turn includes pngconf.h. .SS Configuring zlib: @@ -3554,14 +3612,14 @@ off en masse with compiler directives that define PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, or all four, along with directives to turn on any of the capabilities that you do -want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable -the extra transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks -Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive -produces a library that is incapable of reading or writing ancillary chunks. -If you are not using the progressive reading capability, you can -turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse -this with the INTERLACING capability, which you'll still have). +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra +transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks. Use of the +PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library +that is incapable of reading or writing ancillary chunks. If you are +not using the progressive reading capability, you can turn that off +with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING +capability, which you'll still have). All the reading and writing specific code are in separate files, so the linker should only grab the files it needs. However, if you want to @@ -3696,6 +3754,9 @@ accomplish this, the functions png_create_read_struct_2(), png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), png_malloc_default(), and png_free_default() were added. +Support for the iTXt chunk has been enabled by default as of +version 1.2.41. + Support for certain MNG features was enabled. Support for numbered error messages was added. However, we never got @@ -3750,7 +3811,138 @@ selection of assembler code features: We replaced all of these functions with simple stubs in libpng-1.2.20, when the Intel assembler code was removed due to a licensing issue. -.SH IX. (Omitted) +These macros are deprecated: + + PNG_READ_TRANSFORMS_NOT_SUPPORTED + PNG_PROGRESSIVE_READ_NOT_SUPPORTED + PNG_NO_SEQUENTIAL_READ_SUPPORTED + PNG_WRITE_TRANSFORMS_NOT_SUPPORTED + PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED + PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED + +They have been replaced, respectively, by: + + PNG_NO_READ_TRANSFORMS + PNG_NO_PROGRESSIVE_READ + PNG_NO_SEQUENTIAL_READ + PNG_NO_WRITE_TRANSFORMS + PNG_NO_READ_ANCILLARY_CHUNKS + PNG_NO_WRITE_ANCILLARY_CHUNKS + +PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been +deprecated since libpng-1.0.16 and libpng-1.2.6. + +The function + png_check_sig(sig, num) +was replaced with + !png_sig_cmp(sig, 0, num) +It has been deprecated since libpng-0.90. + +The function + png_set_gray_1_2_4_to_8() +which also expands tRNS to alpha was replaced with + png_set_expand_gray_1_2_4_to_8() +which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. + +.SH IX. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x + +Private libpng prototypes and macro definitions were moved from +png.h and pngconf.h into a new pngpriv.h header file. + +Functions png_set_benign_errors(), png_benign_error(), and +png_chunk_benign_error() were added. + +Support for setting the maximum amount of memory that the application +will allocate for reading chunks was added, as a security measure. +The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() +were added to the library. + +We implemented support for I/O states by adding png_ptr member io_state +and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c + +We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level +input transforms. + +Checking for and reporting of errors in the IHDR chunk is more thorough. + +Support for global arrays was removed, to improve thread safety. + +Some obsolete/deprecated macros and functions have been removed. + +Typecasted NULL definitions such as + #define png_voidp_NULL (png_voidp)NULL +were eliminated. If you used these in your application, just use +NULL instead. + +The png_struct and info_struct members "trans" and "trans_values" were +changed to "trans_alpha" and "trans_color", respectively. + +The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles +were removed. + +The PNG_1_0_X and PNG_1_2_X macros were eliminated. + +The PNG_LEGACY_SUPPORTED macro was eliminated. + +Many WIN32_WCE #ifdefs were removed. + +The functions png_read_init(info_ptr), png_write_init(info_ptr), +png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() +have been removed. They have been deprecated since libpng-0.95. + +The png_permit_empty_plte() was removed. It has been deprecated +since libpng-1.0.9. Use png_permit_mng_features() instead. + +We removed the obsolete stub functions png_get_mmx_flagmask(), +png_set_mmx_thresholds(), png_get_asm_flags(), +png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), +png_set_asm_flags(), and png_mmx_supported() + +We removed the obsolete png_check_sig(), png_memcpy_check(), and +png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(), +and png_memset(), respectively. + +The function png_set_gray_1_2_4_to_8() was removed. It has been +deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with +png_set_expand_gray_1_2_4_to_8() because the former function also +expanded palette images. + +We changed the prototype for png_malloc() from + png_malloc(png_structp png_ptr, png_uint_32 size) +to + png_malloc(png_structp png_ptr, png_alloc_size_t size) + +This also applies to the prototype for the user replacement malloc_fn(). + +The png_calloc() function was added and is used in place of +of "png_malloc(); png_memset();" except in the case in png_read_png() +where the array consists of pointers; in this case a "for" loop is used +after the png_malloc() to set the pointers to NULL, to give robust. +behavior in case the application runs out of memory part-way through +the process. + +We changed the prototypes of png_get_compression_buffer_size() and +png_set_compression_buffer_size() to work with png_size_t instead of +png_uint_32. + +Support for numbered error messages was removed by default, since we +never got around to actually numbering the error messages. The function +png_set_strip_error_numbers() was removed from the library by default. + +The png_zalloc() and png_zfree() functions are no longer exported. +The png_zalloc() function no longer zeroes out the memory that it +allocates. + +Support for dithering was disabled by default in libpng-1.4.0, because +been well tested and doesn't actually "dither". The code was not +removed, however, and could be enabled by building libpng with +PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support +was reenabled, but the function was renamed png_set_quantize() to +reflect more accurately what it actually does. At the same time, +the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to +PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS. + +We removed the trailing '.' from the warning and error messages. .SH X. Detecting libpng @@ -3804,18 +3996,27 @@ We use 3-space indentation, except for continued statements which are usually indented the same as the first line of the statement plus four more spaces. +For macro definitions we use 2-space indentation, always leaving the "#" +in the first column. + + #ifndef PNG_NO_FEATURE + # ifndef PNG_FEATURE_SUPPORTED + # define PNG_FEATURE_SUPPORTED + # endif + #endif + Comments appear with the leading "/*" at the same indentation as the statement that follows the comment: /* Single-line comment */ statement; - /* Multiple-line - * comment + /* This is a multiple-line + * comment. */ statement; -Very short comments can be placed at the end of the statement +Very short comments can be placed after the end of the statement to which they pertain: statement; /* comment */ @@ -3851,7 +4052,7 @@ We mark all non-exported functions with "/* PRIVATE */"": The prototypes for non-exported functions (except for those in pngtest) appear in -the PNG_INTERNAL section of png.h +pngpriv.h above the comment that says /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ @@ -3862,29 +4063,32 @@ macros begin with "PNG_". We put a space after each comma and after each semicolon in "for" statments, and we put spaces before and after each -C binary operator and after "for" or "while". We don't -put a space between a typecast and the expression being -cast, nor do we put one between a function name and the +C binary operator and after "for" or "while", and before +"?". We don't put a space between a typecast and the expression +being cast, nor do we put one between a function name and the left parenthesis that follows it: for (i = 2; i > 0; --i) - x[i] = a(x) + (int)b; + y[i] = a(x) + (int)b; We prefer #ifdef and #ifndef to #if defined() and if !defined() when there is only one macro being tested. -Other rules can be inferred by inspecting the libpng -source. +We do not use the TAB character for indentation in the C sources. + +Lines do not exceed 80 characters. + +Other rules can be inferred by inspecting the libpng source. .SH XIII. Y2K Compliance in libpng -August 13, 2009 +June 26, 2010 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.39 are Y2K compliant. It is my belief that earlier +upward through 1.4.3 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that @@ -4028,141 +4232,46 @@ the first widely used release: 1.0.16 10 10016 10.so.0.1.0.16 1.2.6 13 10206 12.so.0.1.2.6 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 - 1.0.17rc1 10 10017 10.so.0.1.0.17rc1 + 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 - 1.0.17 10 10017 10.so.0.1.0.17 + 1.0.17 10 10017 12.so.0.1.0.17 1.2.7 13 10207 12.so.0.1.2.7 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 - 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5 + 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 - 1.0.18 10 10018 10.so.0.1.0.18 + 1.0.18 10 10018 12.so.0.1.0.18 1.2.8 13 10208 12.so.0.1.2.8 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 1.2.9beta4-11 13 10209 12.so.0.9[.0] 1.2.9rc1 13 10209 12.so.0.9[.0] 1.2.9 13 10209 12.so.0.9[.0] - 1.2.10beta1-8 13 10210 12.so.0.10[.0] - 1.2.10rc1-3 13 10210 12.so.0.10[.0] + 1.2.10beta1-7 13 10210 12.so.0.10[.0] + 1.2.10rc1-2 13 10210 12.so.0.10[.0] 1.2.10 13 10210 12.so.0.10[.0] - 1.2.11beta1-4 13 10211 12.so.0.11[.0] - 1.0.19rc1-5 10 10019 10.so.0.19[.0] - 1.2.11rc1-5 13 10211 12.so.0.11[.0] - 1.0.19 10 10019 10.so.0.19[.0] + 1.4.0beta1-6 14 10400 14.so.0.0[.0] + 1.2.11beta1-4 13 10210 12.so.0.11[.0] + 1.4.0beta7-8 14 10400 14.so.0.0[.0] 1.2.11 13 10211 12.so.0.11[.0] - 1.0.20 10 10020 10.so.0.20[.0] 1.2.12 13 10212 12.so.0.12[.0] - 1.2.13beta1 13 10213 12.so.0.13[.0] - 1.0.21 10 10021 10.so.0.21[.0] + 1.4.0beta9-14 14 10400 14.so.0.0[.0] 1.2.13 13 10213 12.so.0.13[.0] - 1.2.14beta1-2 13 10214 12.so.0.14[.0] - 1.0.22rc1 10 10022 10.so.0.22[.0] - 1.2.14rc1 13 10214 12.so.0.14[.0] - 1.2.15beta1-6 13 10215 12.so.0.15[.0] - 1.0.23rc1-5 10 10023 10.so.0.23[.0] - 1.2.15rc1-5 13 10215 12.so.0.15[.0] - 1.0.23 10 10023 10.so.0.23[.0] - 1.2.15 13 10215 12.so.0.15[.0] - 1.2.16beta1-2 13 10216 12.so.0.16[.0] - 1.2.16rc1 13 10216 12.so.0.16[.0] - 1.0.24 10 10024 10.so.0.24[.0] - 1.2.16 13 10216 12.so.0.16[.0] - 1.2.17beta1-2 13 10217 12.so.0.17[.0] - 1.0.25rc1 10 10025 10.so.0.25[.0] - 1.2.17rc1-3 13 10217 12.so.0.17[.0] - 1.0.25 10 10025 10.so.0.25[.0] - 1.2.17 13 10217 12.so.0.17[.0] - 1.0.26 10 10026 10.so.0.26[.0] - 1.2.18 13 10218 12.so.0.18[.0] - 1.2.19beta1-31 13 10219 12.so.0.19[.0] - 1.0.27rc1-6 10 10027 10.so.0.27[.0] - 1.2.19rc1-6 13 10219 12.so.0.19[.0] - 1.0.27 10 10027 10.so.0.27[.0] - 1.2.19 13 10219 12.so.0.19[.0] - 1.2.20beta01-04 13 10220 12.so.0.20[.0] - 1.0.28rc1-6 10 10028 10.so.0.28[.0] - 1.2.20rc1-6 13 10220 12.so.0.20[.0] - 1.0.28 10 10028 10.so.0.28[.0] - 1.2.20 13 10220 12.so.0.20[.0] - 1.2.21beta1-2 13 10221 12.so.0.21[.0] - 1.2.21rc1-3 13 10221 12.so.0.21[.0] - 1.0.29 10 10029 10.so.0.29[.0] - 1.2.21 13 10221 12.so.0.21[.0] - 1.2.22beta1-4 13 10222 12.so.0.22[.0] - 1.0.30rc1 13 10030 10.so.0.30[.0] - 1.2.22rc1 13 10222 12.so.0.22[.0] - 1.0.30 10 10030 10.so.0.30[.0] - 1.2.22 13 10222 12.so.0.22[.0] - 1.2.23beta01-05 13 10223 12.so.0.23[.0] - 1.2.23rc01 13 10223 12.so.0.23[.0] - 1.2.23 13 10223 12.so.0.23[.0] - 1.2.24beta01-02 13 10224 12.so.0.24[.0] - 1.2.24rc01 13 10224 12.so.0.24[.0] - 1.2.24 13 10224 12.so.0.24[.0] - 1.2.25beta01-06 13 10225 12.so.0.25[.0] - 1.2.25rc01-02 13 10225 12.so.0.25[.0] - 1.0.31 10 10031 10.so.0.31[.0] - 1.2.25 13 10225 12.so.0.25[.0] - 1.2.26beta01-06 13 10226 12.so.0.26[.0] - 1.2.26rc01 13 10226 12.so.0.26[.0] - 1.2.26 13 10226 12.so.0.26[.0] - 1.0.32 10 10032 10.so.0.32[.0] - 1.2.27beta01-06 13 10227 12.so.0.27[.0] - 1.2.27rc01 13 10227 12.so.0.27[.0] - 1.0.33 10 10033 10.so.0.33[.0] - 1.2.27 13 10227 12.so.0.27[.0] - 1.0.34 10 10034 10.so.0.34[.0] - 1.2.28 13 10228 12.so.0.28[.0] - 1.2.29beta01-03 13 10229 12.so.0.29[.0] - 1.2.29rc01 13 10229 12.so.0.29[.0] - 1.0.35 10 10035 10.so.0.35[.0] - 1.2.29 13 10229 12.so.0.29[.0] - 1.0.37 10 10037 10.so.0.37[.0] - 1.2.30beta01-04 13 10230 12.so.0.30[.0] - 1.0.38rc01-08 10 10038 10.so.0.38[.0] - 1.2.30rc01-08 13 10230 12.so.0.30[.0] - 1.0.38 10 10038 10.so.0.38[.0] - 1.2.30 13 10230 12.so.0.30[.0] - 1.0.39rc01-03 10 10039 10.so.0.39[.0] - 1.2.31rc01-03 13 10231 12.so.0.31[.0] - 1.0.39 10 10039 10.so.0.39[.0] - 1.2.31 13 10231 12.so.0.31[.0] - 1.2.32beta01-02 13 10232 12.so.0.32[.0] - 1.0.40rc01 10 10040 10.so.0.40[.0] - 1.2.32rc01 13 10232 12.so.0.32[.0] - 1.0.40 10 10040 10.so.0.40[.0] - 1.2.32 13 10232 12.so.0.32[.0] - 1.2.33beta01-02 13 10233 12.so.0.33[.0] - 1.2.33rc01-02 13 10233 12.so.0.33[.0] - 1.0.41rc01 10 10041 10.so.0.41[.0] - 1.2.33 13 10233 12.so.0.33[.0] - 1.0.41 10 10041 10.so.0.41[.0] - 1.2.34beta01-07 13 10234 12.so.0.34[.0] - 1.0.42rc01 10 10042 10.so.0.42[.0] - 1.2.34rc01 13 10234 12.so.0.34[.0] - 1.0.42 10 10042 10.so.0.42[.0] - 1.2.34 13 10234 12.so.0.34[.0] - 1.2.35beta01-03 13 10235 12.so.0.35[.0] - 1.0.43rc01-02 10 10043 10.so.0.43[.0] - 1.2.35rc01-02 13 10235 12.so.0.35[.0] - 1.0.43 10 10043 10.so.0.43[.0] - 1.2.35 13 10235 12.so.0.35[.0] - 1.2.36beta01-05 13 10236 12.so.0.36[.0] - 1.2.36rc01 13 10236 12.so.0.36[.0] - 1.0.44 10 10044 10.so.0.44[.0] - 1.2.36 13 10236 12.so.0.36[.0] - 1.2.37beta01-03 13 10237 12.so.0.37[.0] - 1.2.37rc01 13 10237 12.so.0.37[.0] - 1.2.37 13 10237 12.so.0.37[.0] - 1.2.45 10 10045 12.so.0.45[.0] - 1.0.46 10 10046 10.so.0.46[.0] - 1.2.38beta01 13 10238 12.so.0.38[.0] - 1.2.38rc01-03 13 10238 12.so.0.38[.0] - 1.0.47 10 10047 10.so.0.47[.0] - 1.2.38 13 10238 12.so.0.38[.0] - 1.2.39beta01-05 13 10239 12.so.0.39[.0] - 1.2.39rc01 13 10239 12.so.0.39[.0] - 1.0.48 10 10048 10.so.0.48[.0] - 1.2.39 13 10239 12.so.0.39[.0] + 1.4.0beta15-36 14 10400 14.so.0.0[.0] + 1.4.0beta37-87 14 10400 14.so.14.0[.0] + 1.4.0rc01 14 10400 14.so.14.0[.0] + 1.4.0beta88-109 14 10400 14.so.14.0[.0] + 1.4.0rc02-08 14 10400 14.so.14.0[.0] + 1.4.0 14 10400 14.so.14.0[.0] + 1.4.1beta01-03 14 10401 14.so.14.1[.0] + 1.4.1rc01 14 10401 14.so.14.1[.0] + 1.4.1beta04-12 14 10401 14.so.14.1[.0] + 1.4.1rc02-04 14 10401 14.so.14.1[.0] + 1.4.1 14 10401 14.so.14.1[.0] + 1.4.2beta01 14 10402 14.so.14.2[.0] + 1.4.2rc02-06 14 10402 14.so.14.2[.0] + 1.4.2 14 10402 14.so.14.2[.0] + 1.4.3beta01-05 14 10403 14.so.14.3[.0] + 1.4.3rc01-03 14 10403 14.so.14.3[.0] + 1.4.3 14 10403 14.so.14.3[.0] Henceforth the source version will match the shared-library minor and patch numbers; the shared-library major version number will be @@ -4175,7 +4284,7 @@ version 1.0.6j; from then on they were given the upcoming public release number plus "betaNN" or "rcN". .SH "SEE ALSO" -.IR libpngpf(3) ", " png(5) +libpngpf(3), png(5) .LP .IR libpng : .IP @@ -4198,7 +4307,7 @@ ftp://ftp.info-zip.org/pub/infozip/zlib .I libpng or at .br -ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt +ftp://ds.internic.net/rfc/rfc2083.txt .br or (as a W3C Recommendation) at .br @@ -4218,7 +4327,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.2.39 - August 13, 2009: +Libpng version 1.4.3 - June 26, 2010: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -4241,8 +4350,8 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.2.39, August 13, 2009, are -Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are +libpng versions 1.2.6, August 15, 2004, through 1.4.3, June 26, 2010, are +Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -4340,7 +4449,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -August 13, 2009 +June 26, 2010 .\" end of man page diff --git a/source/Irrlicht/libpng/scripts/libpng.pc-configure.in b/source/Irrlicht/libpng/libpng.pc.in similarity index 84% rename from source/Irrlicht/libpng/scripts/libpng.pc-configure.in rename to source/Irrlicht/libpng/libpng.pc.in index a8cd10a9..05ad81ee 100644 --- a/source/Irrlicht/libpng/scripts/libpng.pc-configure.in +++ b/source/Irrlicht/libpng/libpng.pc.in @@ -8,4 +8,4 @@ Description: Loads and saves PNG files Version: @PNGLIB_VERSION@ Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ Libs.private: @LIBS@ -Cflags: -I${includedir} @LIBPNG_NO_MMX@ +Cflags: -I${includedir} diff --git a/source/Irrlicht/libpng/libpngpf.3 b/source/Irrlicht/libpng/libpngpf.3 index 70b769e0..d627b956 100644 --- a/source/Irrlicht/libpng/libpngpf.3 +++ b/source/Irrlicht/libpng/libpngpf.3 @@ -1,15 +1,21 @@ -.TH LIBPNGPF 3 "August 13, 2009" +.TH LIBPNGPF 3 "June 26, 2010" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 +libpng \- Portable Network Graphics (PNG) Reference Library 1.4.3 (private functions) .SH SYNOPSIS \fB#include \fP -\fI\fB +\fB#include \fI"pngpriv.h" \fI\fB -\fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP +\fBvoid png_64bit_product (long \fP\fIv1\fP\fB, long \fP\fIv2\fP\fB, unsigned long \fI*hi_product, + +\fBunsigned long \fI*lo_product\fP\fB);\fP + +\fI\fB + +\fBvoid png_build_gamma_table (png_structp \fP\fIpng_ptr\fP\fB, png_byte \fIbit_depth\fP\fB);\fP \fI\fB @@ -27,6 +33,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBint png_check_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_fixed_point \fP\fIint_white_x\fP\fB, png_fixed_point \fP\fIint_white_y\fP\fB, png_fixed_point \fP\fIint_red_x\fP\fB, png_fixed_point \fP\fIint_red_y\fP\fB, png_fixed_point \fP\fIint_green_x\fP\fB, png_fixed_point \fP\fIint_green_y\fP\fB, png_fixed_point \fP\fIint_blue_x\fP\fB, png_fixed_point \fIint_blue_y\fP\fB);\fP + +\fI\fB + +\fI\fB + \fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP \fI\fB @@ -39,6 +51,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBvoid png_check_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP + +\fI\fB + +\fI\fB + \fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP \fI\fB @@ -81,7 +99,19 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBvoid png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP +\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP + +\fI\fB + +\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP + +\fI\fB + +\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP + +\fI\fB + +\fBvoid png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP \fI\fB @@ -99,7 +129,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP +\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_color\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP \fI\fB @@ -115,14 +145,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fI\fB - -\fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP - -\fI\fB - -\fI\fB - \fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP \fI\fB @@ -165,6 +187,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBvoid png_do_quantize (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIquantize_lookup\fP\fB);\fP + +\fI\fB + +\fI\fB + \fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP \fI\fB @@ -181,8 +209,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fI\fB - \fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fI\fB @@ -537,16 +563,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBpng_uint_32 png_read_chunk_header (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fI\fB - \fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP \fI\fB +\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP + \fI\fB \fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP @@ -607,6 +629,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB +\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP + \fI\fB \fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP @@ -717,12 +741,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.39 \fI\fB -\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fI\fB - \fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP \fI\fB @@ -785,6 +803,6 @@ are listed alphabetically here as an aid to libpng maintainers. See png.h for more information on these functions. .SH SEE ALSO -.IR libpng(3) ", " png(5) +libpng(3), png(5) .SH AUTHOR Glenn Randers-Pehrson diff --git a/source/Irrlicht/libpng/new_push_process_row.c b/source/Irrlicht/libpng/new_push_process_row.c new file mode 100644 index 00000000..8f4ef721 --- /dev/null +++ b/source/Irrlicht/libpng/new_push_process_row.c @@ -0,0 +1,204 @@ +void /* PRIVATE */ +png_push_process_row(png_structp png_ptr) +{ + png_ptr->row_info.color_type = png_ptr->color_type; + png_ptr->row_info.width = png_ptr->iwidth; + png_ptr->row_info.channels = png_ptr->channels; + png_ptr->row_info.bit_depth = png_ptr->bit_depth; + png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; + + png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth, + png_ptr->row_info.width); + + png_read_filter_row(png_ptr, &(png_ptr->row_info), + png_ptr->row_buf + 1, png_ptr->prev_row + 1, + (int)(png_ptr->row_buf[0])); + + png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); + + if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) + png_do_read_transformations(png_ptr); + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Blow up interlaced rows to full size */ + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) + { + if (png_ptr->pass < 6) +/* old interface (pre-1.0.9): + png_do_read_interlace(&(png_ptr->row_info), + png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); + */ + png_do_read_interlace(png_ptr); + + switch (png_ptr->pass) + { + case 0: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 0; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); /* Updates png_ptr->pass */ + } + + if (png_ptr->pass == 2) /* Pass 1 might be empty */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + if (png_ptr->pass == 4 && png_ptr->height <= 4) + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + if (png_ptr->pass == 6 && png_ptr->height <= 4) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + case 1: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 1; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 2) /* Skip top 4 generated rows */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 2: + { + int i; + + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 4) /* Pass 3 might be empty */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 3: + { + int i; + + for (i = 0; i < 4 && png_ptr->pass == 3; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 4) /* Skip top two generated rows */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 4: + { + int i; + + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 6) /* Pass 5 might be empty */ + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + case 5: + { + int i; + + for (i = 0; i < 2 && png_ptr->pass == 5; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 6) /* Skip top generated row */ + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + case 6: + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + + if (png_ptr->pass != 6) + break; + + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + } + else +#endif + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } +} diff --git a/source/Irrlicht/libpng/png.5 b/source/Irrlicht/libpng/png.5 index e190b6ee..ea219b92 100644 --- a/source/Irrlicht/libpng/png.5 +++ b/source/Irrlicht/libpng/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "August 13, 2009" +.TH PNG 5 "June 26, 2010" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION @@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous platforms. .SH "SEE ALSO" -.IR libpng(3) ", " zlib(3) ", " deflate(5) ", and " zlib(5) +.IR libpng(3), zlib(3), deflate(5), and zlib(5) .LP PNG specification (second edition), November 2003: .IP @@ -35,7 +35,7 @@ PNG 1.0 specification, October 1996: RFC 2083 .IP .br -ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt +ftp://ds.internic.net/rfc/rfc2083.txt .br or (as a W3C Recommendation) at .br diff --git a/source/Irrlicht/libpng/png.c b/source/Irrlicht/libpng/png.c index 93bad7c2..239615da 100644 --- a/source/Irrlicht/libpng/png.c +++ b/source/Irrlicht/libpng/png.c @@ -1,8 +1,8 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.2.39 [August 13, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.2 [May 6, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,79 +11,17 @@ * and license in png.h */ -#define PNG_INTERNAL #define PNG_NO_EXTERN +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" +#include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_2_39 Your_png_h_is_not_version_1_2_39; +typedef version_1_4_3 Your_png_h_is_not_version_1_4_3; /* Version information for C files. This had better match the version - * string defined in png.h. */ - -#ifdef PNG_USE_GLOBAL_ARRAYS -/* png_libpng_ver was changed to a function in version 1.0.5c */ -PNG_CONST char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING; - -#ifdef PNG_READ_SUPPORTED - -/* png_sig was changed to a function in version 1.0.5c */ -/* Place to hold the signature string for a PNG file. */ -PNG_CONST png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; -#endif /* PNG_READ_SUPPORTED */ - -/* Invoke global declarations for constant strings for known chunk types */ -PNG_IHDR; -PNG_IDAT; -PNG_IEND; -PNG_PLTE; -PNG_bKGD; -PNG_cHRM; -PNG_gAMA; -PNG_hIST; -PNG_iCCP; -PNG_iTXt; -PNG_oFFs; -PNG_pCAL; -PNG_sCAL; -PNG_pHYs; -PNG_sBIT; -PNG_sPLT; -PNG_sRGB; -PNG_tEXt; -PNG_tIME; -PNG_tRNS; -PNG_zTXt; - -#ifdef PNG_READ_SUPPORTED -/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - -/* Start of interlace block */ -PNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; - -/* Offset to next interlace block */ -PNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; - -/* Start of interlace block in the y direction */ -PNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; - -/* Offset to next interlace block in the y direction */ -PNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; - -/* Height of interlace block. This is not currently used - if you need - * it, uncomment it here and in png.h -PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; -*/ - -/* Mask to determine which pixels are valid in a pass */ -PNG_CONST int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; - -/* Mask to determine which pixels to overwrite while displaying */ -PNG_CONST int FARDATA png_pass_dsp_mask[] - = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; - -#endif /* PNG_READ_SUPPORTED */ -#endif /* PNG_USE_GLOBAL_ARRAYS */ + * string defined in png.h. + */ /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -95,11 +33,13 @@ PNG_CONST int FARDATA png_pass_dsp_mask[] void PNGAPI png_set_sig_bytes(png_structp png_ptr, int num_bytes) { + png_debug(1, "in png_set_sig_bytes"); + if (png_ptr == NULL) return; - png_debug(1, "in png_set_sig_bytes"); + if (num_bytes > 8) - png_error(png_ptr, "Too many bytes for PNG signature."); + png_error(png_ptr, "Too many bytes for PNG signature"); png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes); } @@ -130,32 +70,17 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check))); } -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) -/* (Obsolete) function to check signature bytes. It does not allow one - * to check a partial signature. This function might be removed in the - * future - use png_sig_cmp(). Returns true (nonzero) if the file is PNG. - */ -int PNGAPI -png_check_sig(png_bytep sig, int num) -{ - return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num)); -} -#endif #endif /* PNG_READ_SUPPORTED */ #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) /* Function to allocate memory for zlib and clear it to 0. */ -#ifdef PNG_1_0_X -voidpf PNGAPI -#else voidpf /* PRIVATE */ -#endif png_zalloc(voidpf png_ptr, uInt items, uInt size) { png_voidp ptr; png_structp p=(png_structp)png_ptr; png_uint_32 save_flags=p->flags; - png_uint_32 num_bytes; + png_alloc_size_t num_bytes; if (png_ptr == NULL) return (NULL); @@ -164,36 +89,17 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size) png_warning (p, "Potential overflow in png_zalloc()"); return (NULL); } - num_bytes = (png_uint_32)items * size; + num_bytes = (png_alloc_size_t)items * size; p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK; ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes); p->flags=save_flags; -#if defined(PNG_1_0_X) && !defined(PNG_NO_ZALLOC_ZERO) - if (ptr == NULL) - return ((voidpf)ptr); - - if (num_bytes > (png_uint_32)0x8000L) - { - png_memset(ptr, 0, (png_size_t)0x8000L); - png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0, - (png_size_t)(num_bytes - (png_uint_32)0x8000L)); - } - else - { - png_memset(ptr, 0, (png_size_t)num_bytes); - } -#endif return ((voidpf)ptr); } /* Function to free memory for zlib */ -#ifdef PNG_1_0_X -void PNGAPI -#else void /* PRIVATE */ -#endif png_zfree(voidpf png_ptr, voidpf ptr) { png_free((png_structp)png_ptr, (png_voidp)ptr); @@ -246,8 +152,10 @@ png_create_info_struct(png_structp png_ptr) png_infop info_ptr; png_debug(1, "in png_create_info_struct"); + if (png_ptr == NULL) return (NULL); + #ifdef PNG_USER_MEM_SUPPORTED info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO, png_ptr->malloc_fn, png_ptr->mem_ptr); @@ -269,10 +177,12 @@ void PNGAPI png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr) { png_infop info_ptr = NULL; + + png_debug(1, "in png_destroy_info_struct"); + if (png_ptr == NULL) return; - png_debug(1, "in png_destroy_info_struct"); if (info_ptr_ptr != NULL) info_ptr = *info_ptr_ptr; @@ -294,26 +204,17 @@ png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr) * and applications using it are urged to use png_create_info_struct() * instead. */ -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) -#undef png_info_init -void PNGAPI -png_info_init(png_infop info_ptr) -{ - /* We only come here via pre-1.0.12-compiled applications */ - png_info_init_3(&info_ptr, 0); -} -#endif void PNGAPI png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size) { png_infop info_ptr = *ptr_ptr; + png_debug(1, "in png_info_init_3"); + if (info_ptr == NULL) return; - png_debug(1, "in png_info_init_3"); - if (png_sizeof(png_info) > png_info_struct_size) { png_destroy_struct(info_ptr); @@ -325,39 +226,36 @@ png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size) png_memset(info_ptr, 0, png_sizeof(png_info)); } -#ifdef PNG_FREE_ME_SUPPORTED void PNGAPI png_data_freer(png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask) { png_debug(1, "in png_data_freer"); + if (png_ptr == NULL || info_ptr == NULL) return; + if (freer == PNG_DESTROY_WILL_FREE_DATA) info_ptr->free_me |= mask; else if (freer == PNG_USER_WILL_FREE_DATA) info_ptr->free_me &= ~mask; else png_warning(png_ptr, - "Unknown freer parameter in png_data_freer."); + "Unknown freer parameter in png_data_freer"); } -#endif void PNGAPI png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, int num) { png_debug(1, "in png_free_data"); + if (png_ptr == NULL || info_ptr == NULL) return; -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED /* Free text item num or (if num == -1) all text items */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_TEXT) & info_ptr->free_me) -#else - if (mask & PNG_FREE_TEXT) -#endif { if (num != -1) { @@ -379,30 +277,19 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif -#if defined(PNG_tRNS_SUPPORTED) +#ifdef PNG_tRNS_SUPPORTED /* Free any tRNS entry */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_TRNS) & info_ptr->free_me) -#else - if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS)) -#endif { - png_free(png_ptr, info_ptr->trans); - info_ptr->trans = NULL; + png_free(png_ptr, info_ptr->trans_alpha); + info_ptr->trans_alpha = NULL; info_ptr->valid &= ~PNG_INFO_tRNS; -#ifndef PNG_FREE_ME_SUPPORTED - png_ptr->flags &= ~PNG_FLAG_FREE_TRNS; -#endif } #endif -#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_sCAL_SUPPORTED /* Free any sCAL entry */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_SCAL) & info_ptr->free_me) -#else - if (mask & PNG_FREE_SCAL) -#endif { #if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) png_free(png_ptr, info_ptr->scal_s_width); @@ -414,13 +301,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif -#if defined(PNG_pCAL_SUPPORTED) +#ifdef PNG_pCAL_SUPPORTED /* Free any pCAL entry */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_PCAL) & info_ptr->free_me) -#else - if (mask & PNG_FREE_PCAL) -#endif { png_free(png_ptr, info_ptr->pcal_purpose); png_free(png_ptr, info_ptr->pcal_units); @@ -432,7 +315,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, for (i = 0; i < (int)info_ptr->pcal_nparams; i++) { png_free(png_ptr, info_ptr->pcal_params[i]); - info_ptr->pcal_params[i]=NULL; + info_ptr->pcal_params[i] = NULL; } png_free(png_ptr, info_ptr->pcal_params); info_ptr->pcal_params = NULL; @@ -441,13 +324,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif -#if defined(PNG_iCCP_SUPPORTED) +#ifdef PNG_iCCP_SUPPORTED /* Free any iCCP entry */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_ICCP) & info_ptr->free_me) -#else - if (mask & PNG_FREE_ICCP) -#endif { png_free(png_ptr, info_ptr->iccp_name); png_free(png_ptr, info_ptr->iccp_profile); @@ -457,13 +336,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif -#if defined(PNG_sPLT_SUPPORTED) +#ifdef PNG_sPLT_SUPPORTED /* Free a given sPLT entry, or (if num == -1) all sPLT entries */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_SPLT) & info_ptr->free_me) -#else - if (mask & PNG_FREE_SPLT) -#endif { if (num != -1) { @@ -492,18 +367,14 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED if (png_ptr->unknown_chunk.data) { png_free(png_ptr, png_ptr->unknown_chunk.data); png_ptr->unknown_chunk.data = NULL; } -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_UNKN) & info_ptr->free_me) -#else - if (mask & PNG_FREE_UNKN) -#endif { if (num != -1) { @@ -530,46 +401,28 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif -#if defined(PNG_hIST_SUPPORTED) +#ifdef PNG_hIST_SUPPORTED /* Free any hIST entry */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_HIST) & info_ptr->free_me) -#else - if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST)) -#endif { png_free(png_ptr, info_ptr->hist); info_ptr->hist = NULL; info_ptr->valid &= ~PNG_INFO_hIST; -#ifndef PNG_FREE_ME_SUPPORTED - png_ptr->flags &= ~PNG_FLAG_FREE_HIST; -#endif } #endif /* Free any PLTE entry that was internally allocated */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_PLTE) & info_ptr->free_me) -#else - if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE)) -#endif { png_zfree(png_ptr, info_ptr->palette); info_ptr->palette = NULL; info_ptr->valid &= ~PNG_INFO_PLTE; -#ifndef PNG_FREE_ME_SUPPORTED - png_ptr->flags &= ~PNG_FLAG_FREE_PLTE; -#endif info_ptr->num_palette = 0; } -#if defined(PNG_INFO_IMAGE_SUPPORTED) +#ifdef PNG_INFO_IMAGE_SUPPORTED /* Free any image bits attached to the info structure */ -#ifdef PNG_FREE_ME_SUPPORTED if ((mask & PNG_FREE_ROWS) & info_ptr->free_me) -#else - if (mask & PNG_FREE_ROWS) -#endif { if (info_ptr->row_pointers) { @@ -577,21 +430,19 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, for (row = 0; row < (int)info_ptr->height; row++) { png_free(png_ptr, info_ptr->row_pointers[row]); - info_ptr->row_pointers[row]=NULL; + info_ptr->row_pointers[row] = NULL; } png_free(png_ptr, info_ptr->row_pointers); - info_ptr->row_pointers=NULL; + info_ptr->row_pointers = NULL; } info_ptr->valid &= ~PNG_INFO_IDAT; } #endif -#ifdef PNG_FREE_ME_SUPPORTED if (num == -1) info_ptr->free_me &= ~mask; else info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL); -#endif } /* This is an internal routine to free any memory that the info struct is @@ -605,11 +456,11 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr) png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); -#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED if (png_ptr->num_chunk_list) { png_free(png_ptr, png_ptr->chunk_list); - png_ptr->chunk_list=NULL; + png_ptr->chunk_list = NULL; png_ptr->num_chunk_list = 0; } #endif @@ -631,7 +482,7 @@ png_get_io_ptr(png_structp png_ptr) } #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED /* Initialize the default input/output functions for the PNG file. If you * use your own read or write routines, you can call either png_set_read_fn() * or png_set_write_fn() instead of png_init_io(). If you have defined @@ -642,13 +493,15 @@ void PNGAPI png_init_io(png_structp png_ptr, png_FILE_p fp) { png_debug(1, "in png_init_io"); + if (png_ptr == NULL) return; + png_ptr->io_ptr = (png_voidp)fp; } #endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) +#ifdef PNG_TIME_RFC1123_SUPPORTED /* Convert the supplied time into an RFC 1123 string suitable for use in * a "Creation Time" or other text-based time string. */ @@ -667,17 +520,6 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) png_sizeof(char))); } -#if defined(_WIN32_WCE) - { - wchar_t time_buf[29]; - wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"), - ptime->day % 32, short_months[(ptime->month - 1) % 12], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); - WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29, - NULL, NULL); - } -#else #ifdef USE_FAR_KEYWORD { char near_time_buf[29]; @@ -694,7 +536,6 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) ptime->year, ptime->hour % 24, ptime->minute % 60, ptime->second % 61); #endif -#endif /* _WIN32_WCE */ return ((png_charp)png_ptr->time_buffer); } #endif /* PNG_TIME_RFC1123_SUPPORTED */ @@ -705,10 +546,23 @@ png_charp PNGAPI png_get_copyright(png_structp png_ptr) { png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ - return ((png_charp) "\n libpng version 1.2.39 - August 13, 2009\n\ - Copyright (c) 1998-2009 Glenn Randers-Pehrson\n\ - Copyright (c) 1996-1997 Andreas Dilger\n\ - Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n"); +#ifdef PNG_STRING_COPYRIGHT + return PNG_STRING_COPYRIGHT +#else +#ifdef __STDC__ + return ((png_charp) PNG_STRING_NEWLINE \ + "libpng version 1.4.3 - June 26, 2010" PNG_STRING_NEWLINE \ + "Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ + "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ + "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ + PNG_STRING_NEWLINE); +#else + return ((png_charp) "libpng version 1.4.3 - June 26, 2010\ + Copyright (c) 1998-2010 Glenn Randers-Pehrson\ + Copyright (c) 1996-1997 Andreas Dilger\ + Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); +#endif +#endif } /* The following return the library version as a short string in the @@ -740,11 +594,15 @@ png_get_header_version(png_structp png_ptr) { /* Returns longer string containing both version and date */ png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ +#ifdef __STDC__ return ((png_charp) PNG_HEADER_VERSION_STRING #ifndef PNG_READ_SUPPORTED " (NO READ SUPPORT)" #endif - "\n"); + PNG_STRING_NEWLINE); +#else + return ((png_charp) PNG_HEADER_VERSION_STRING); +#endif } #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) @@ -764,7 +622,9 @@ png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name) return 0; } #endif +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ +#ifdef PNG_READ_SUPPORTED /* This function, added to libpng-1.0.6g, is untested. */ int PNGAPI png_reset_zstream(png_structp png_ptr) @@ -773,7 +633,7 @@ png_reset_zstream(png_structp png_ptr) return Z_STREAM_ERROR; return (inflateReset(&png_ptr->zstream)); } -#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ +#endif /* PNG_READ_SUPPORTED */ /* This function was added to libpng-1.0.7 */ png_uint_32 PNGAPI @@ -784,17 +644,6 @@ png_access_version_number(void) } -#if defined(PNG_READ_SUPPORTED) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) -#if !defined(PNG_1_0_X) -/* This function was added to libpng 1.2.0 */ -int PNGAPI -png_mmx_support(void) -{ - /* Obsolete, to be removed from libpng-1.4.0 */ - return -1; -} -#endif /* PNG_1_0_X */ -#endif /* PNG_READ_SUPPORTED && PNG_ASSEMBLER_CODE_SUPPORTED */ #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #ifdef PNG_SIZE_T @@ -810,8 +659,8 @@ png_convert_size(size_t size) #endif /* PNG_SIZE_T */ /* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */ -#if defined(PNG_cHRM_SUPPORTED) -#if !defined(PNG_NO_CHECK_cHRM) +#ifdef PNG_cHRM_SUPPORTED +#ifdef PNG_CHECK_cHRM_SUPPORTED /* * Multiply two 32-bit numbers, V1 and V2, using 32-bit @@ -863,6 +712,7 @@ png_check_cHRM_fixed(png_structp png_ptr, unsigned long xy_hi,xy_lo,yx_hi,yx_lo; png_debug(1, "in function png_check_cHRM_fixed"); + if (png_ptr == NULL) return 0; @@ -921,6 +771,148 @@ png_check_cHRM_fixed(png_structp png_ptr, return ret; } -#endif /* NO_PNG_CHECK_cHRM */ +#endif /* PNG_CHECK_cHRM_SUPPORTED */ #endif /* PNG_cHRM_SUPPORTED */ + +void /* PRIVATE */ +png_check_IHDR(png_structp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type) +{ + int error = 0; + + /* Check for width and height valid values */ + if (width == 0) + { + png_warning(png_ptr, "Image width is zero in IHDR"); + error = 1; + } + + if (height == 0) + { + png_warning(png_ptr, "Image height is zero in IHDR"); + error = 1; + } + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (width > png_ptr->user_width_max || width > PNG_USER_WIDTH_MAX) +#else + if (width > PNG_USER_WIDTH_MAX) +#endif + { + png_warning(png_ptr, "Image width exceeds user limit in IHDR"); + error = 1; + } + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (height > png_ptr->user_height_max || height > PNG_USER_HEIGHT_MAX) +#else + if (height > PNG_USER_HEIGHT_MAX) +#endif + { + png_warning(png_ptr, "Image height exceeds user limit in IHDR"); + error = 1; + } + + if (width > PNG_UINT_31_MAX) + { + png_warning(png_ptr, "Invalid image width in IHDR"); + error = 1; + } + + if ( height > PNG_UINT_31_MAX) + { + png_warning(png_ptr, "Invalid image height in IHDR"); + error = 1; + } + + if ( width > (PNG_UINT_32_MAX + >> 3) /* 8-byte RGBA pixels */ + - 64 /* bigrowbuf hack */ + - 1 /* filter byte */ + - 7*8 /* rounding of width to multiple of 8 pixels */ + - 8) /* extra max_pixel_depth pad */ + png_warning(png_ptr, "Width is too large for libpng to process pixels"); + + /* Check other values */ + if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && + bit_depth != 8 && bit_depth != 16) + { + png_warning(png_ptr, "Invalid bit depth in IHDR"); + error = 1; + } + + if (color_type < 0 || color_type == 1 || + color_type == 5 || color_type > 6) + { + png_warning(png_ptr, "Invalid color type in IHDR"); + error = 1; + } + + if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) || + ((color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8)) + { + png_warning(png_ptr, "Invalid color type/bit depth combination in IHDR"); + error = 1; + } + + if (interlace_type >= PNG_INTERLACE_LAST) + { + png_warning(png_ptr, "Unknown interlace method in IHDR"); + error = 1; + } + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + { + png_warning(png_ptr, "Unknown compression method in IHDR"); + error = 1; + } + +#ifdef PNG_MNG_FEATURES_SUPPORTED + /* Accept filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not read a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) && + png_ptr->mng_features_permitted) + png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); + + if (filter_type != PNG_FILTER_TYPE_BASE) + { + if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && + ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA))) + { + png_warning(png_ptr, "Unknown filter method in IHDR"); + error = 1; + } + + if (png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) + { + png_warning(png_ptr, "Invalid filter method in IHDR"); + error = 1; + } + } + +#else + if (filter_type != PNG_FILTER_TYPE_BASE) + { + png_warning(png_ptr, "Unknown filter method in IHDR"); + error = 1; + } +#endif + + if (error == 1) + png_error(png_ptr, "Invalid IHDR data"); +} #endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ diff --git a/source/Irrlicht/libpng/png.h b/source/Irrlicht/libpng/png.h index aa53e239..ef6dc8e4 100644 --- a/source/Irrlicht/libpng/png.h +++ b/source/Irrlicht/libpng/png.h @@ -1,7 +1,8 @@ + /* png.h - header file for PNG reference library * - * libpng version 1.2.39 - August 13, 2009 - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * libpng version 1.4.3 - June 26, 2010 + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -10,7 +11,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.2.39 - August 13, 2009: Glenn + * libpng versions 0.97, January 1998, through 1.4.3 - June 26, 2010: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -104,143 +105,46 @@ * 1.0.16 10 10016 10.so.0.1.0.16 * 1.2.6 13 10206 12.so.0.1.2.6 * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 - * 1.0.17rc1 10 10017 10.so.0.1.0.17rc1 + * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 - * 1.0.17 10 10017 10.so.0.1.0.17 + * 1.0.17 10 10017 12.so.0.1.0.17 * 1.2.7 13 10207 12.so.0.1.2.7 * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 - * 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5 + * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 - * 1.0.18 10 10018 10.so.0.1.0.18 + * 1.0.18 10 10018 12.so.0.1.0.18 * 1.2.8 13 10208 12.so.0.1.2.8 * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 * 1.2.9beta4-11 13 10209 12.so.0.9[.0] * 1.2.9rc1 13 10209 12.so.0.9[.0] * 1.2.9 13 10209 12.so.0.9[.0] - * 1.2.10beta1-8 13 10210 12.so.0.10[.0] - * 1.2.10rc1-3 13 10210 12.so.0.10[.0] + * 1.2.10beta1-7 13 10210 12.so.0.10[.0] + * 1.2.10rc1-2 13 10210 12.so.0.10[.0] * 1.2.10 13 10210 12.so.0.10[.0] + * 1.4.0beta1-5 14 10400 14.so.0.0[.0] * 1.2.11beta1-4 13 10211 12.so.0.11[.0] - * 1.0.19rc1-5 10 10019 10.so.0.19[.0] - * 1.2.11rc1-5 13 10211 12.so.0.11[.0] - * 1.0.19 10 10019 10.so.0.19[.0] + * 1.4.0beta7-8 14 10400 14.so.0.0[.0] * 1.2.11 13 10211 12.so.0.11[.0] - * 1.0.20 10 10020 10.so.0.20[.0] * 1.2.12 13 10212 12.so.0.12[.0] - * 1.2.13beta1 13 10213 12.so.0.13[.0] - * 1.0.21 10 10021 10.so.0.21[.0] + * 1.4.0beta9-14 14 10400 14.so.0.0[.0] * 1.2.13 13 10213 12.so.0.13[.0] - * 1.2.14beta1-2 13 10214 12.so.0.14[.0] - * 1.0.22rc1 10 10022 10.so.0.22[.0] - * 1.2.14rc1 13 10214 12.so.0.14[.0] - * 1.0.22 10 10022 10.so.0.22[.0] - * 1.2.14 13 10214 12.so.0.14[.0] - * 1.2.15beta1-6 13 10215 12.so.0.15[.0] - * 1.0.23rc1-5 10 10023 10.so.0.23[.0] - * 1.2.15rc1-5 13 10215 12.so.0.15[.0] - * 1.0.23 10 10023 10.so.0.23[.0] - * 1.2.15 13 10215 12.so.0.15[.0] - * 1.2.16beta1-2 13 10216 12.so.0.16[.0] - * 1.2.16rc1 13 10216 12.so.0.16[.0] - * 1.0.24 10 10024 10.so.0.24[.0] - * 1.2.16 13 10216 12.so.0.16[.0] - * 1.2.17beta1-2 13 10217 12.so.0.17[.0] - * 1.0.25rc1 10 10025 10.so.0.25[.0] - * 1.2.17rc1-3 13 10217 12.so.0.17[.0] - * 1.0.25 10 10025 10.so.0.25[.0] - * 1.2.17 13 10217 12.so.0.17[.0] - * 1.0.26 10 10026 10.so.0.26[.0] - * 1.2.18 13 10218 12.so.0.18[.0] - * 1.2.19beta1-31 13 10219 12.so.0.19[.0] - * 1.0.27rc1-6 10 10027 10.so.0.27[.0] - * 1.2.19rc1-6 13 10219 12.so.0.19[.0] - * 1.0.27 10 10027 10.so.0.27[.0] - * 1.2.19 13 10219 12.so.0.19[.0] - * 1.2.20beta01-04 13 10220 12.so.0.20[.0] - * 1.0.28rc1-6 10 10028 10.so.0.28[.0] - * 1.2.20rc1-6 13 10220 12.so.0.20[.0] - * 1.0.28 10 10028 10.so.0.28[.0] - * 1.2.20 13 10220 12.so.0.20[.0] - * 1.2.21beta1-2 13 10221 12.so.0.21[.0] - * 1.2.21rc1-3 13 10221 12.so.0.21[.0] - * 1.0.29 10 10029 10.so.0.29[.0] - * 1.2.21 13 10221 12.so.0.21[.0] - * 1.2.22beta1-4 13 10222 12.so.0.22[.0] - * 1.0.30rc1 10 10030 10.so.0.30[.0] - * 1.2.22rc1 13 10222 12.so.0.22[.0] - * 1.0.30 10 10030 10.so.0.30[.0] - * 1.2.22 13 10222 12.so.0.22[.0] - * 1.2.23beta01-05 13 10223 12.so.0.23[.0] - * 1.2.23rc01 13 10223 12.so.0.23[.0] - * 1.2.23 13 10223 12.so.0.23[.0] - * 1.2.24beta01-02 13 10224 12.so.0.24[.0] - * 1.2.24rc01 13 10224 12.so.0.24[.0] - * 1.2.24 13 10224 12.so.0.24[.0] - * 1.2.25beta01-06 13 10225 12.so.0.25[.0] - * 1.2.25rc01-02 13 10225 12.so.0.25[.0] - * 1.0.31 10 10031 10.so.0.31[.0] - * 1.2.25 13 10225 12.so.0.25[.0] - * 1.2.26beta01-06 13 10226 12.so.0.26[.0] - * 1.2.26rc01 13 10226 12.so.0.26[.0] - * 1.2.26 13 10226 12.so.0.26[.0] - * 1.0.32 10 10032 10.so.0.32[.0] - * 1.2.27beta01-06 13 10227 12.so.0.27[.0] - * 1.2.27rc01 13 10227 12.so.0.27[.0] - * 1.0.33 10 10033 10.so.0.33[.0] - * 1.2.27 13 10227 12.so.0.27[.0] - * 1.0.34 10 10034 10.so.0.34[.0] - * 1.2.28 13 10228 12.so.0.28[.0] - * 1.2.29beta01-03 13 10229 12.so.0.29[.0] - * 1.2.29rc01 13 10229 12.so.0.29[.0] - * 1.0.35 10 10035 10.so.0.35[.0] - * 1.2.29 13 10229 12.so.0.29[.0] - * 1.0.37 10 10037 10.so.0.37[.0] - * 1.2.30beta01-04 13 10230 12.so.0.30[.0] - * 1.0.38rc01-08 10 10038 10.so.0.38[.0] - * 1.2.30rc01-08 13 10230 12.so.0.30[.0] - * 1.0.38 10 10038 10.so.0.38[.0] - * 1.2.30 13 10230 12.so.0.30[.0] - * 1.0.39rc01-03 10 10039 10.so.0.39[.0] - * 1.2.31rc01-03 13 10231 12.so.0.31[.0] - * 1.0.39 10 10039 10.so.0.39[.0] - * 1.2.31 13 10231 12.so.0.31[.0] - * 1.2.32beta01-02 13 10232 12.so.0.32[.0] - * 1.0.40rc01 10 10040 10.so.0.40[.0] - * 1.2.32rc01 13 10232 12.so.0.32[.0] - * 1.0.40 10 10040 10.so.0.40[.0] - * 1.2.32 13 10232 12.so.0.32[.0] - * 1.2.33beta01-02 13 10233 12.so.0.33[.0] - * 1.2.33rc01-02 13 10233 12.so.0.33[.0] - * 1.0.41rc01 10 10041 10.so.0.41[.0] - * 1.2.33 13 10233 12.so.0.33[.0] - * 1.0.41 10 10041 10.so.0.41[.0] - * 1.2.34beta01-07 13 10234 12.so.0.34[.0] - * 1.0.42rc01 10 10042 10.so.0.42[.0] - * 1.2.34rc01 13 10234 12.so.0.34[.0] - * 1.0.42 10 10042 10.so.0.42[.0] - * 1.2.34 13 10234 12.so.0.34[.0] - * 1.2.35beta01-03 13 10235 12.so.0.35[.0] - * 1.0.43rc01-02 10 10043 10.so.0.43[.0] - * 1.2.35rc01-02 13 10235 12.so.0.35[.0] - * 1.0.43 10 10043 10.so.0.43[.0] - * 1.2.35 13 10235 12.so.0.35[.0] - * 1.2.36beta01-05 13 10236 12.so.0.36[.0] - * 1.2.36rc01 13 10236 12.so.0.36[.0] - * 1.0.44 10 10044 10.so.0.44[.0] - * 1.2.36 13 10236 12.so.0.36[.0] - * 1.2.37beta01-03 13 10237 12.so.0.37[.0] - * 1.2.37rc01 13 10237 12.so.0.37[.0] - * 1.2.37 13 10237 12.so.0.37[.0] - * 1.2.45 10 10045 12.so.0.45[.0] - * 1.0.46 10 10046 10.so.0.46[.0] - * 1.2.38beta01 13 10238 12.so.0.38[.0] - * 1.2.38rc01-03 13 10238 12.so.0.38[.0] - * 1.0.47 10 10047 10.so.0.47[.0] - * 1.2.38 13 10238 12.so.0.38[.0] - * 1.2.39beta01-05 13 10239 12.so.0.39[.0] - * 1.2.39rc01 13 10239 12.so.0.39[.0] - * 1.0.48 10 10048 10.so.0.48[.0] - * 1.2.39 13 10239 12.so.0.39[.0] + * 1.4.0beta15-36 14 10400 14.so.0.0[.0] + * 1.4.0beta37-87 14 10400 14.so.14.0[.0] + * 1.4.0rc01 14 10400 14.so.14.0[.0] + * 1.4.0beta88-109 14 10400 14.so.14.0[.0] + * 1.4.0rc02-08 14 10400 14.so.14.0[.0] + * 1.4.0 14 10400 14.so.14.0[.0] + * 1.4.1beta01-03 14 10401 14.so.14.1[.0] + * 1.4.1rc01 14 10401 14.so.14.1[.0] + * 1.4.1beta04-12 14 10401 14.so.14.1[.0] + * 1.4.1rc02-04 14 10401 14.so.14.1[.0] + * 1.4.1 14 10401 14.so.14.1[.0] + * 1.4.2beta01 14 10402 14.so.14.2[.0] + * 1.4.2rc02-06 14 10402 14.so.14.2[.0] + * 1.4.2 14 10402 14.so.14.2[.0] + * 1.4.3beta01-05 14 10403 14.so.14.3[.0] + * 1.4.3rc01-03 14 10403 14.so.14.3[.0] + * 1.4.3 14 10403 14.so.14.3[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -250,7 +154,7 @@ * to the source version x.y.z (leading zeros in y and z). Beta versions * were given the previous public release number plus a letter, until * version 1.0.6j; from then on they were given the upcoming public - * release number plus "betaNN" or "rcNN". + * release number plus "betaNN" or "rcN". * * Binary incompatibility exists only when applications make direct access * to the info_ptr or png_ptr members through png.h, and the compiled @@ -272,8 +176,8 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.2.39, August 13, 2009, are - * Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are + * libpng versions 1.2.6, August 15, 2004, through 1.4.3, June 26, 2010, are + * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: * @@ -361,7 +265,7 @@ * A "png_get_copyright" function is available, for convenient use in "about" * boxes and the like: * - * printf("%s",png_get_copyright(NULL)); + * printf("%s",png_get_copyright(NULL)); * * Also, the PNG logo (in PNG format, of course) is supplied in the * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). @@ -384,13 +288,13 @@ * Y2K compliance in libpng: * ========================= * - * August 13, 2009 + * June 26, 2010 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.2.39 are Y2K compliant. It is my belief that earlier + * upward through 1.4.3 are Y2K compliant. It is my belief that earlier * versions were also Y2K compliant. * * Libpng only has three year fields. One is a 2-byte unsigned integer @@ -446,17 +350,17 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.2.39" +#define PNG_LIBPNG_VER_STRING "1.4.3" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.2.39 - August 13, 2009\n" + " libpng version 1.4.3 - June 26, 2010\n" -#define PNG_LIBPNG_VER_SONUM 0 -#define PNG_LIBPNG_VER_DLLNUM 13 +#define PNG_LIBPNG_VER_SONUM 14 +#define PNG_LIBPNG_VER_DLLNUM 14 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 -#define PNG_LIBPNG_VER_MINOR 2 -#define PNG_LIBPNG_VER_RELEASE 39 +#define PNG_LIBPNG_VER_MINOR 4 +#define PNG_LIBPNG_VER_RELEASE 3 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ @@ -478,7 +382,7 @@ #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with PNG_LIBPNG_BUILD_PRIVATE */ -#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA /* Careful here. At one time, Guy wanted to use 082, but that would be octal. * We must not include leading zeros. @@ -486,19 +390,20 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10239 /* 1.2.39 */ +#define PNG_LIBPNG_VER 10403 /* 1.4.3 */ #ifndef PNG_VERSION_INFO_ONLY -/* include the compression library's header */ +/* Include the compression library's header */ #include "zlib.h" #endif -/* include all user configurable info, including optional assembler routines */ +/* Include all user configurable info, including optional assembler routines */ #include "pngconf.h" /* - * Added at libpng-1.2.8 */ -/* Ref MSDN: Private as priority over Special + * Added at libpng-1.2.8 + * + * Ref MSDN: Private as priority over Special * VS_FF_PRIVATEBUILD File *was not* built using standard release * procedures. If this value is given, the StringFileInfo block must * contain a PrivateBuild string. @@ -509,11 +414,11 @@ * StringFileInfo block must contain a SpecialBuild string. */ -#if defined(PNG_USER_PRIVATEBUILD) +#ifdef PNG_USER_PRIVATEBUILD # define PNG_LIBPNG_BUILD_TYPE \ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) #else -# if defined(PNG_LIBPNG_SPECIALBUILD) +# ifdef PNG_LIBPNG_SPECIALBUILD # define PNG_LIBPNG_BUILD_TYPE \ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) # else @@ -534,65 +439,12 @@ extern "C" { * which applications aren't expected to use directly. */ -#ifndef PNG_NO_TYPECAST_NULL -#define int_p_NULL (int *)NULL -#define png_bytep_NULL (png_bytep)NULL -#define png_bytepp_NULL (png_bytepp)NULL -#define png_doublep_NULL (png_doublep)NULL -#define png_error_ptr_NULL (png_error_ptr)NULL -#define png_flush_ptr_NULL (png_flush_ptr)NULL -#define png_free_ptr_NULL (png_free_ptr)NULL -#define png_infopp_NULL (png_infopp)NULL -#define png_malloc_ptr_NULL (png_malloc_ptr)NULL -#define png_read_status_ptr_NULL (png_read_status_ptr)NULL -#define png_rw_ptr_NULL (png_rw_ptr)NULL -#define png_structp_NULL (png_structp)NULL -#define png_uint_16p_NULL (png_uint_16p)NULL -#define png_voidp_NULL (png_voidp)NULL -#define png_write_status_ptr_NULL (png_write_status_ptr)NULL -#else -#define int_p_NULL NULL -#define png_bytep_NULL NULL -#define png_bytepp_NULL NULL -#define png_doublep_NULL NULL -#define png_error_ptr_NULL NULL -#define png_flush_ptr_NULL NULL -#define png_free_ptr_NULL NULL -#define png_infopp_NULL NULL -#define png_malloc_ptr_NULL NULL -#define png_read_status_ptr_NULL NULL -#define png_rw_ptr_NULL NULL -#define png_structp_NULL NULL -#define png_uint_16p_NULL NULL -#define png_voidp_NULL NULL -#define png_write_status_ptr_NULL NULL -#endif - /* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */ #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) /* Version information for C files, stored in png.c. This had better match * the version above. */ -#ifdef PNG_USE_GLOBAL_ARRAYS -PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18]; - /* need room for 99.99.99beta99z */ -#else #define png_libpng_ver png_get_header_ver(NULL) -#endif - -#ifdef PNG_USE_GLOBAL_ARRAYS -/* This was removed in version 1.0.5c */ -/* Structures to facilitate easy interlacing. See png.c for more details */ -PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_start[7]; -PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_inc[7]; -PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_ystart[7]; -PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_yinc[7]; -PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_mask[7]; -PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_dsp_mask[7]; -/* This isn't currently used. If you need it, see png.c for more details. -PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_height[7]; -*/ -#endif #endif /* PNG_NO_EXTERN */ @@ -694,8 +546,7 @@ typedef png_text FAR * FAR * png_textpp; #endif /* Supported compression types for text in PNG files (tEXt, and zTXt). - * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. - */ + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ #define PNG_TEXT_COMPRESSION_NONE_WR -3 #define PNG_TEXT_COMPRESSION_zTXt_WR -2 #define PNG_TEXT_COMPRESSION_NONE -1 @@ -729,10 +580,9 @@ typedef png_time FAR * FAR * png_timepp; * up private chunks for output even though the library doesn't actually * know about their semantics. */ -#define PNG_CHUNK_NAME_LENGTH 5 typedef struct png_unknown_chunk_t { - png_byte name[PNG_CHUNK_NAME_LENGTH]; + png_byte name[5]; png_byte *data; png_size_t size; @@ -786,25 +636,38 @@ typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; typedef struct png_info_struct { /* the following are necessary for every PNG file */ - png_uint_32 width; /* width of image in pixels (from IHDR) */ - png_uint_32 height; /* height of image in pixels (from IHDR) */ - png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ - png_uint_32 rowbytes; /* bytes needed to hold an untransformed row */ - png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ - png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ - png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ - png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ - png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ + png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ + png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ + below) */ + png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed + row */ + png_colorp palette PNG_DEPSTRUCT; /* array of color values + (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in + "palette" (PLTE) */ + png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette + color (tRNS) */ + png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel + (from IHDR) */ + png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below + (from IHDR) */ /* The following three should have been named *_method not *_type */ - png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ - png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ - png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte compression_type PNG_DEPSTRUCT; /* must be + PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE + (from IHDR) */ + png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, + PNG_INTERLACE_ADAM7 */ /* The following is informational only on read, and not used on writes. */ - png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ - png_byte pixel_depth; /* number of bits per pixel */ - png_byte spare_byte; /* to align the data, and for future use */ - png_byte signature[8]; /* magic bytes read by libpng from start of file */ + png_byte channels PNG_DEPSTRUCT; /* number of data channels per + pixel (1, 2, 3, 4) */ + png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ + png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for + future use */ + png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng + from start of file */ /* The rest of the data is optional. If you are reading, check the * valid field to see if the information in these are valid. If you @@ -817,16 +680,18 @@ typedef struct png_info_struct * on which the image was created, normally in the range [1.0, 2.5]. * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. */ - float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ + float gamma PNG_DEPSTRUCT; /* gamma value of image, + if (valid & PNG_INFO_gAMA) */ #endif -#if defined(PNG_sRGB_SUPPORTED) +#ifdef PNG_sRGB_SUPPORTED /* GR-P, 0.96a */ /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ + png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent + [0, 1, 2, or 3] */ #endif -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED /* The tEXt, and zTXt chunks contain human-readable textual data in * uncompressed, compressed, and optionally compressed forms, respectively. * The data in "text" is an array of pointers to uncompressed, @@ -835,26 +700,26 @@ typedef struct png_info_struct * unique, and the text string may be empty. Any number of text chunks may * be in an image. */ - int num_text; /* number of comments read/to write */ - int max_text; /* current size of text array */ - png_textp text; /* array of comments read/to write */ + int num_text PNG_DEPSTRUCT; /* number of comments read/to write */ + int max_text PNG_DEPSTRUCT; /* current size of text array */ + png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */ #endif /* PNG_TEXT_SUPPORTED */ -#if defined(PNG_tIME_SUPPORTED) +#ifdef PNG_tIME_SUPPORTED /* The tIME chunk holds the last time the displayed image data was * modified. See the png_time struct for the contents of this struct. */ - png_time mod_time; + png_time mod_time PNG_DEPSTRUCT; #endif -#if defined(PNG_sBIT_SUPPORTED) +#ifdef PNG_sBIT_SUPPORTED /* The sBIT chunk specifies the number of significant high-order bits * in the pixel data. Values are in the range [1, bit_depth], and are * only specified for the channels in the pixel data. The contents of * the low-order bits is not specified. Data is valid if * (valid & PNG_INFO_sBIT) is non-zero. */ - png_color_8 sig_bit; /* significant bits in color channels */ + png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */ #endif #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ @@ -868,8 +733,10 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) * single color specified that should be treated as fully transparent. * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. */ - png_bytep trans; /* transparent values for paletted image */ - png_color_16 trans_values; /* transparent color for non-palette image */ + png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted + image */ + png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for + non-palette image */ #endif #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) @@ -879,38 +746,39 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) * in "background" are normally in the same color space/depth as the * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. */ - png_color_16 background; + png_color_16 background PNG_DEPSTRUCT; #endif -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards * and downwards from the top-left corner of the display, page, or other * application-specific co-ordinate space. See the PNG_OFFSET_ defines * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. */ - png_int_32 x_offset; /* x offset on page */ - png_int_32 y_offset; /* y offset on page */ - png_byte offset_unit_type; /* offset units type */ + png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */ + png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */ + png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */ #endif -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED /* The pHYs chunk gives the physical pixel density of the image for * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. */ - png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ - png_uint_32 y_pixels_per_unit; /* vertical pixel density */ - png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ + png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ + png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see + PNG_RESOLUTION_ below) */ #endif -#if defined(PNG_hIST_SUPPORTED) +#ifdef PNG_hIST_SUPPORTED /* The hIST chunk contains the relative frequency or importance of the * various palette entries, so that a viewer can intelligently select a * reduced-color palette, if required. Data is an array of "num_palette" * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) * is non-zero. */ - png_uint_16p hist; + png_uint_16p hist PNG_DEPSTRUCT; #endif #ifdef PNG_cHRM_SUPPORTED @@ -921,18 +789,18 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. */ #ifdef PNG_FLOATING_POINT_SUPPORTED - float x_white; - float y_white; - float x_red; - float y_red; - float x_green; - float y_green; - float x_blue; - float y_blue; + float x_white PNG_DEPSTRUCT; + float y_white PNG_DEPSTRUCT; + float x_red PNG_DEPSTRUCT; + float y_red PNG_DEPSTRUCT; + float x_green PNG_DEPSTRUCT; + float y_green PNG_DEPSTRUCT; + float x_blue PNG_DEPSTRUCT; + float y_blue PNG_DEPSTRUCT; #endif #endif -#if defined(PNG_pCAL_SUPPORTED) +#ifdef PNG_pCAL_SUPPORTED /* The pCAL chunk describes a transformation between the stored pixel * values and original physical data values used to create the image. * The integer range [0, 2^bit_depth - 1] maps to the floating-point @@ -944,43 +812,47 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) * implemented, and for a description of the ASCII parameter strings. * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. */ - png_charp pcal_purpose; /* pCAL chunk description string */ - png_int_32 pcal_X0; /* minimum value */ - png_int_32 pcal_X1; /* maximum value */ - png_charp pcal_units; /* Latin-1 string giving physical units */ - png_charpp pcal_params; /* ASCII strings containing parameter values */ - png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ - png_byte pcal_nparams; /* number of parameters given in pcal_params */ + png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ + png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ + png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ + png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical + units */ + png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing + parameter values */ + png_byte pcal_type PNG_DEPSTRUCT; /* equation type + (see PNG_EQUATION_ below) */ + png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given + in pcal_params */ #endif /* New members added in libpng-1.0.6 */ -#ifdef PNG_FREE_ME_SUPPORTED - png_uint_32 free_me; /* flags items libpng is responsible for freeing */ -#endif + png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is + responsible for freeing */ #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) /* Storage for unknown chunks that the library doesn't recognize. */ - png_unknown_chunkp unknown_chunks; - png_size_t unknown_chunks_num; + png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; + png_size_t unknown_chunks_num PNG_DEPSTRUCT; #endif -#if defined(PNG_iCCP_SUPPORTED) +#ifdef PNG_iCCP_SUPPORTED /* iCCP chunk data. */ - png_charp iccp_name; /* profile name */ - png_charp iccp_profile; /* International Color Consortium profile data */ + png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ + png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium + profile data */ /* Note to maintainer: should be png_bytep */ - png_uint_32 iccp_proflen; /* ICC profile data length */ - png_byte iccp_compression; /* Always zero */ + png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ + png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ #endif -#if defined(PNG_sPLT_SUPPORTED) +#ifdef PNG_sPLT_SUPPORTED /* Data on sPLT chunks (there may be more than one). */ - png_sPLT_tp splt_palettes; - png_uint_32 splt_palettes_num; + png_sPLT_tp splt_palettes PNG_DEPSTRUCT; + png_uint_32 splt_palettes_num PNG_DEPSTRUCT; #endif -#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_sCAL_SUPPORTED /* The sCAL chunk describes the actual physical dimensions of the * subject matter of the graphic. The chunk contains a unit specification * a byte value, and two ASCII strings representing floating-point @@ -988,36 +860,38 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) * in the image. This external representation is converted to double * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. */ - png_byte scal_unit; /* unit of physical scale */ + png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */ #ifdef PNG_FLOATING_POINT_SUPPORTED - double scal_pixel_width; /* width of one pixel */ - double scal_pixel_height; /* height of one pixel */ + double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */ + double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */ #endif #ifdef PNG_FIXED_POINT_SUPPORTED - png_charp scal_s_width; /* string containing height */ - png_charp scal_s_height; /* string containing width */ + png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */ + png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */ #endif #endif -#if defined(PNG_INFO_IMAGE_SUPPORTED) - /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ - png_bytepp row_pointers; /* the image bits */ + png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ #endif #if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) - png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */ + png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, + if (valid & PNG_INFO_gAMA) */ #endif #if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) - png_fixed_point int_x_white; - png_fixed_point int_y_white; - png_fixed_point int_x_red; - png_fixed_point int_y_red; - png_fixed_point int_x_green; - png_fixed_point int_y_green; - png_fixed_point int_x_blue; - png_fixed_point int_y_blue; + png_fixed_point int_x_white PNG_DEPSTRUCT; + png_fixed_point int_y_white PNG_DEPSTRUCT; + png_fixed_point int_x_red PNG_DEPSTRUCT; + png_fixed_point int_y_red PNG_DEPSTRUCT; + png_fixed_point int_x_green PNG_DEPSTRUCT; + png_fixed_point int_y_green PNG_DEPSTRUCT; + png_fixed_point int_x_blue PNG_DEPSTRUCT; + png_fixed_point int_y_blue PNG_DEPSTRUCT; #endif } png_info; @@ -1029,10 +903,6 @@ typedef png_info FAR * FAR * png_infopp; #define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) #define PNG_UINT_32_MAX ((png_uint_32)(-1)) #define PNG_SIZE_MAX ((png_size_t)(-1)) -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */ -#define PNG_MAX_UINT PNG_UINT_31_MAX -#endif /* These describe the color_type field in png_info. */ /* color type masks */ @@ -1129,7 +999,7 @@ typedef png_info FAR * FAR * png_infopp; typedef struct png_row_info_struct { png_uint_32 width; /* width of row */ - png_uint_32 rowbytes; /* number of bytes in row */ + png_size_t rowbytes; /* number of bytes in row */ png_byte color_type; /* color type of row */ png_byte bit_depth; /* bit depth of row */ png_byte channels; /* number of channels (1, 2, 3, or 4) */ @@ -1157,25 +1027,33 @@ typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop)); +typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, + png_infop)); typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, png_uint_32, int)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp, png_row_infop, png_bytep)); #endif -#if defined(PNG_USER_CHUNKS_SUPPORTED) -typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, + png_unknown_chunkp)); #endif -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); #endif +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in , and the + * application must include this before png.h to obtain the definition + * of jmp_buf. + */ +typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int)); +#endif /* Transform masks for the high-level interface */ #define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ @@ -1190,17 +1068,19 @@ typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); #define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ #define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ #define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ -#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* WRITE only, deprecated */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ /* Added to libpng-1.2.34 */ -#define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800 /* WRITE only */ -#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* WRITE only */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ /* Flags for MNG supported features */ #define PNG_FLAG_MNG_EMPTY_PLTE 0x01 #define PNG_FLAG_MNG_FILTER_64 0x04 #define PNG_ALL_MNG_FEATURES 0x05 -typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t)); +typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_alloc_size_t)); typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); /* The structure that holds the information to read and write PNG files. @@ -1213,307 +1093,388 @@ typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); struct png_struct_def { #ifdef PNG_SETJMP_SUPPORTED - jmp_buf jmpbuf; /* used in png_error */ + jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */ + png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto + function. */ #endif - png_error_ptr error_fn; /* function for printing errors and aborting */ - png_error_ptr warning_fn; /* function for printing warnings */ - png_voidp error_ptr; /* user supplied struct for error functions */ - png_rw_ptr write_data_fn; /* function for writing output data */ - png_rw_ptr read_data_fn; /* function for reading input data */ - png_voidp io_ptr; /* ptr to application struct for I/O functions */ + png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing + errors and aborting */ + png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing + warnings */ + png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for + error functions */ + png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing + output data */ + png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading + input data */ + png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct + for I/O functions */ -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read + transform */ #endif -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write + transform */ #endif /* These were added in libpng-1.0.2 */ -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_voidp user_transform_ptr; /* user supplied struct for user transform */ - png_byte user_transform_depth; /* bit depth of user transformed pixels */ - png_byte user_transform_channels; /* channels in user transformed pixels */ + png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct + for user transform */ + png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user + transformed pixels */ + png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user + transformed pixels */ #endif #endif - png_uint_32 mode; /* tells us where we are in the PNG file */ - png_uint_32 flags; /* flags indicating various things to libpng */ - png_uint_32 transformations; /* which transformations to perform */ + png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in + the PNG file */ + png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various + things to libpng */ + png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations + to perform */ - z_stream zstream; /* pointer to decompression structure (below) */ - png_bytep zbuf; /* buffer for zlib */ - png_size_t zbuf_size; /* size of zbuf */ - int zlib_level; /* holds zlib compression level */ - int zlib_method; /* holds zlib compression method */ - int zlib_window_bits; /* holds zlib compression window bits */ - int zlib_mem_level; /* holds zlib compression memory level */ - int zlib_strategy; /* holds zlib compression strategy */ + z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression + structure (below) */ + png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ + png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ + int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ + int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ + int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window + bits */ + int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory + level */ + int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression + strategy */ - png_uint_32 width; /* width of image in pixels */ - png_uint_32 height; /* height of image in pixels */ - png_uint_32 num_rows; /* number of rows in current pass */ - png_uint_32 usr_width; /* width of row at start of write */ - png_uint_32 rowbytes; /* size of row in bytes */ - png_uint_32 irowbytes; /* size of current interlaced row in bytes */ - png_uint_32 iwidth; /* width of current interlaced row in pixels */ - png_uint_32 row_number; /* current row in interlace pass */ - png_bytep prev_row; /* buffer to save previous (unfiltered) row */ - png_bytep row_buf; /* buffer to save current (unfiltered) row */ -#ifndef PNG_NO_WRITE_FILTER - png_bytep sub_row; /* buffer to save "sub" row when filtering */ - png_bytep up_row; /* buffer to save "up" row when filtering */ - png_bytep avg_row; /* buffer to save "avg" row when filtering */ - png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ + png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ + png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ + png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ + png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ + png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ +#if 0 /* Replaced with the following in libpng-1.4.1 */ + png_size_t irowbytes PNG_DEPSTRUCT; #endif - png_row_info row_info; /* used for transformation routines */ +/* Added in libpng-1.4.1 */ +#ifdef PNG_USER_LIMITS_SUPPORTED + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + * We will change the typedef from png_size_t to png_alloc_size_t + * in libpng-1.6.0 + */ + png_alloc_size_t user_chunk_malloc_max PNG_DEPSTRUCT; +#endif + png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced + row in pixels */ + png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ + png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous + (unfiltered) row */ + png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current + (unfiltered) row */ + png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row + when filtering */ + png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row + when filtering */ + png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row + when filtering */ + png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row + when filtering */ + png_row_info row_info PNG_DEPSTRUCT; /* used for transformation + routines */ - png_uint_32 idat_size; /* current IDAT size for read */ - png_uint_32 crc; /* current chunk CRC value */ - png_colorp palette; /* palette from the input file */ - png_uint_16 num_palette; /* number of color entries in palette */ - png_uint_16 num_trans; /* number of transparency values */ - png_byte chunk_name[5]; /* null-terminated name of current chunk */ - png_byte compression; /* file compression type (always 0) */ - png_byte filter; /* file filter type (always 0) */ - png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - png_byte pass; /* current interlace pass (0 - 6) */ - png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ - png_byte color_type; /* color type of file */ - png_byte bit_depth; /* bit depth of file */ - png_byte usr_bit_depth; /* bit depth of users row */ - png_byte pixel_depth; /* number of bits per pixel */ - png_byte channels; /* number of channels in file */ - png_byte usr_channels; /* channels at start of write */ - png_byte sig_bytes; /* magic bytes read/written from start of file */ + png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ + png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ + png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ + png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in + palette */ + png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ + png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current + chunk */ + png_byte compression PNG_DEPSTRUCT; /* file compression type + (always 0) */ + png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ + png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, + PNG_INTERLACE_ADAM7 */ + png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ + png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see + PNG_FILTER_ below ) */ + png_byte color_type PNG_DEPSTRUCT; /* color type of file */ + png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ + png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ + png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ + png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ + png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ + png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from + start of file */ #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -#ifdef PNG_LEGACY_SUPPORTED - png_byte filler; /* filler byte for pixel expansion */ -#else - png_uint_16 filler; /* filler bytes for pixel expansion */ -#endif + png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel + expansion */ #endif -#if defined(PNG_bKGD_SUPPORTED) - png_byte background_gamma_type; +#ifdef PNG_bKGD_SUPPORTED + png_byte background_gamma_type PNG_DEPSTRUCT; # ifdef PNG_FLOATING_POINT_SUPPORTED - float background_gamma; + float background_gamma PNG_DEPSTRUCT; # endif - png_color_16 background; /* background color in screen gamma space */ -#if defined(PNG_READ_GAMMA_SUPPORTED) - png_color_16 background_1; /* background normalized to gamma 1.0 */ + png_color_16 background PNG_DEPSTRUCT; /* background color in + screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized + to gamma 1.0 */ #endif #endif /* PNG_bKGD_SUPPORTED */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_flush_ptr output_flush_fn; /* Function for flushing output */ - png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ - png_uint_32 flush_rows; /* number of rows written since last flush */ +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing + output */ + png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, + 0 - no flush */ + png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since + last flush */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - int gamma_shift; /* number of "insignificant" bits 16-bit gamma */ + int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits + 16-bit gamma */ #ifdef PNG_FLOATING_POINT_SUPPORTED - float gamma; /* file gamma value */ - float screen_gamma; /* screen gamma value (display_exponent) */ + float gamma PNG_DEPSTRUCT; /* file gamma value */ + float screen_gamma PNG_DEPSTRUCT; /* screen gamma value + (display_exponent) */ #endif #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep gamma_table; /* gamma table for 8-bit depth files */ - png_bytep gamma_from_1; /* converts from 1.0 to screen */ - png_bytep gamma_to_1; /* converts from file to 1.0 */ - png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ - png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ - png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ + png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit + depth files */ + png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ + png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit + depth files */ + png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to + screen */ + png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) - png_color_8 sig_bit; /* significant bits in each available channel */ + png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each + available channel */ #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) - png_color_8 shift; /* shift for significant bit tranformation */ + png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit + tranformation */ #endif #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep trans; /* transparency values for paletted files */ - png_color_16 trans_values; /* transparency values for non-paletted files */ + png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for + paletted files */ + png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for + non-paletted files */ #endif - png_read_status_ptr read_row_fn; /* called after each row is decoded */ - png_write_status_ptr write_row_fn; /* called after each row is encoded */ + png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each + row is decoded */ + png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each + row is encoded */ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_progressive_info_ptr info_fn; /* called after header data fully read */ - png_progressive_row_ptr row_fn; /* called after each prog. row is decoded */ - png_progressive_end_ptr end_fn; /* called after image is complete */ - png_bytep save_buffer_ptr; /* current location in save_buffer */ - png_bytep save_buffer; /* buffer for previously read data */ - png_bytep current_buffer_ptr; /* current location in current_buffer */ - png_bytep current_buffer; /* buffer for recently used data */ - png_uint_32 push_length; /* size of current input chunk */ - png_uint_32 skip_length; /* bytes to skip in input data */ - png_size_t save_buffer_size; /* amount of data now in save_buffer */ - png_size_t save_buffer_max; /* total size of save_buffer */ - png_size_t buffer_size; /* total amount of available input data */ - png_size_t current_buffer_size; /* amount of data now in current_buffer */ - int process_mode; /* what push library is currently doing */ - int cur_palette; /* current push library palette index */ + png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header + data fully read */ + png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each + prog. row is decoded */ + png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image + is complete */ + png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in + save_buffer */ + png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously + read data */ + png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in + current_buffer */ + png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently + used data */ + png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input + chunk */ + png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in + input data */ + png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now + in save_buffer */ + png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of + save_buffer */ + png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of + available input data */ + png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now + in current_buffer */ + int process_mode PNG_DEPSTRUCT; /* what push library + is currently doing */ + int cur_palette PNG_DEPSTRUCT; /* current push library + palette index */ + +# ifdef PNG_TEXT_SUPPORTED + png_size_t current_text_size PNG_DEPSTRUCT; /* current size of + text input data */ + png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left + to read in input */ + png_charp current_text PNG_DEPSTRUCT; /* current text chunk + buffer */ + png_charp current_text_ptr PNG_DEPSTRUCT; /* current location + in current_text */ +# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ -# if defined(PNG_TEXT_SUPPORTED) - png_size_t current_text_size; /* current size of text input data */ - png_size_t current_text_left; /* how much text left to read in input */ - png_charp current_text; /* current text chunk buffer */ - png_charp current_text_ptr; /* current location in current_text */ -# endif /* PNG_TEXT_SUPPORTED */ #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* for the Borland special 64K segment handler */ - png_bytepp offset_table_ptr; - png_bytep offset_table; - png_uint_16 offset_table_number; - png_uint_16 offset_table_count; - png_uint_16 offset_table_count_free; +/* For the Borland special 64K segment handler */ + png_bytepp offset_table_ptr PNG_DEPSTRUCT; + png_bytep offset_table PNG_DEPSTRUCT; + png_uint_16 offset_table_number PNG_DEPSTRUCT; + png_uint_16 offset_table_count PNG_DEPSTRUCT; + png_uint_16 offset_table_count_free PNG_DEPSTRUCT; #endif -#if defined(PNG_READ_DITHER_SUPPORTED) - png_bytep palette_lookup; /* lookup table for dithering */ - png_bytep dither_index; /* index translation for palette files */ +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for quantizing */ + png_bytep quantize_index PNG_DEPSTRUCT; /* index translation for palette + files */ #endif -#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) - png_uint_16p hist; /* histogram */ +#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) + png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ #endif -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_byte heuristic_method; /* heuristic for row filter selection */ - png_byte num_prev_filters; /* number of weights for previous rows */ - png_bytep prev_filters; /* filter type(s) of previous row(s) */ - png_uint_16p filter_weights; /* weight(s) for previous line(s) */ - png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ - png_uint_16p filter_costs; /* relative filter calculation cost */ - png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row + filter selection */ + png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights + for previous rows */ + png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of + previous row(s) */ + png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous + line(s) */ + png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for + previous line(s) */ + png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter + calculation cost */ + png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter + calculation cost */ #endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) - png_charp time_buffer; /* String to hold RFC 1123 time text */ +#ifdef PNG_TIME_RFC1123_SUPPORTED + png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ #endif /* New members added in libpng-1.0.6 */ -#ifdef PNG_FREE_ME_SUPPORTED - png_uint_32 free_me; /* flags items libpng is responsible for freeing */ -#endif + png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is + responsible for freeing */ -#if defined(PNG_USER_CHUNKS_SUPPORTED) - png_voidp user_chunk_ptr; - png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr PNG_DEPSTRUCT; + png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read + chunk handler */ #endif #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - int num_chunk_list; - png_bytep chunk_list; + int num_chunk_list PNG_DEPSTRUCT; + png_bytep chunk_list PNG_DEPSTRUCT; #endif /* New members added in libpng-1.0.3 */ -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - png_byte rgb_to_gray_status; +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status PNG_DEPSTRUCT; /* These were changed from png_byte in libpng-1.0.6 */ - png_uint_16 rgb_to_gray_red_coeff; - png_uint_16 rgb_to_gray_green_coeff; - png_uint_16 rgb_to_gray_blue_coeff; + png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; + png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; + png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; #endif /* New member added in libpng-1.0.4 (renamed in 1.0.9) */ #if defined(PNG_MNG_FEATURES_SUPPORTED) || \ defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -/* changed from png_byte to png_uint_32 at version 1.2.0 */ -#ifdef PNG_1_0_X - png_byte mng_features_permitted; -#else - png_uint_32 mng_features_permitted; -#endif /* PNG_1_0_X */ +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted PNG_DEPSTRUCT; #endif /* New member added in libpng-1.0.7 */ #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_fixed_point int_gamma; + png_fixed_point int_gamma PNG_DEPSTRUCT; #endif /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ -#if defined(PNG_MNG_FEATURES_SUPPORTED) - png_byte filter_type; -#endif - -#if defined(PNG_1_0_X) -/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */ - png_uint_32 row_buf_size; +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type PNG_DEPSTRUCT; #endif /* New members added in libpng-1.2.0 */ -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -# if !defined(PNG_1_0_X) -# if defined(PNG_MMX_CODE_SUPPORTED) - png_byte mmx_bitdepth_threshold; - png_uint_32 mmx_rowbytes_threshold; -# endif - png_uint_32 asm_flags; -# endif -#endif /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ #ifdef PNG_USER_MEM_SUPPORTED - png_voidp mem_ptr; /* user supplied struct for mem functions */ - png_malloc_ptr malloc_fn; /* function for allocating memory */ - png_free_ptr free_fn; /* function for freeing memory */ + png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for + mem functions */ + png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for + allocating memory */ + png_free_ptr free_fn PNG_DEPSTRUCT; /* function for + freeing memory */ #endif /* New member added in libpng-1.0.13 and 1.2.0 */ - png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current + (unfiltered) row */ -#if defined(PNG_READ_DITHER_SUPPORTED) +#ifdef PNG_READ_QUANTIZE_SUPPORTED /* The following three members were added at version 1.0.14 and 1.2.4 */ - png_bytep dither_sort; /* working sort array */ - png_bytep index_to_palette; /* where the original index currently is */ - /* in the palette */ - png_bytep palette_to_index; /* which original index points to this */ - /* palette color */ + png_bytep quantize_sort PNG_DEPSTRUCT; /* working sort array */ + png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original + index currently is + in the palette */ + png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index + points to this + palette color */ #endif /* New members added in libpng-1.0.16 and 1.2.6 */ - png_byte compression_type; + png_byte compression_type PNG_DEPSTRUCT; -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_uint_32 user_width_max; - png_uint_32 user_height_max; +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max PNG_DEPSTRUCT; + png_uint_32 user_height_max PNG_DEPSTRUCT; + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; #endif /* New member added in libpng-1.0.25 and 1.2.17 */ -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED /* Storage for unknown chunk that the library doesn't recognize. */ - png_unknown_chunk unknown_chunk; + png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; #endif /* New members added in libpng-1.2.26 */ - png_uint_32 old_big_row_buf_size, old_prev_row_size; + png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; + png_uint_32 old_prev_row_size PNG_DEPSTRUCT; /* New member added in libpng-1.2.30 */ - png_charp chunkdata; /* buffer for reading chunk data */ + png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state PNG_DEPSTRUCT; +#endif }; /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef png_structp version_1_2_39; +typedef png_structp version_1_4_3; typedef png_struct FAR * FAR * png_structpp; @@ -1543,43 +1504,65 @@ extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, /* Simple signature checking function. This is the same as calling * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). */ -extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)); +#define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n)) /* Allocate and initialize png_ptr struct for reading, and any other memory. */ extern PNG_EXPORT(png_structp,png_create_read_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)); + png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; /* Allocate and initialize png_ptr struct for writing, and any other memory */ extern PNG_EXPORT(png_structp,png_create_write_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)); + png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; -#ifdef PNG_WRITE_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size) +extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size) PNGARG((png_structp png_ptr)); -#endif -#ifdef PNG_WRITE_SUPPORTED extern PNG_EXPORT(void,png_set_compression_buffer_size) - PNGARG((png_structp png_ptr, png_uint_32 size)); + PNGARG((png_structp png_ptr, png_size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) + PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t + jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) #endif +#ifdef PNG_READ_SUPPORTED /* Reset the compression stream */ extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); +#endif /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ #ifdef PNG_USER_MEM_SUPPORTED extern PNG_EXPORT(png_structp,png_create_read_struct_2) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)); + png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; extern PNG_EXPORT(png_structp,png_create_write_struct_2) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)); + png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; #endif +/* Write the PNG file signature. */ +extern PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr)); + /* Write a PNG chunk - size, type, (optional) data, CRC. */ extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, png_bytep chunk_name, png_bytep data, png_size_t length)); @@ -1597,15 +1580,7 @@ extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); /* Allocate and initialize the info structure */ extern PNG_EXPORT(png_infop,png_create_info_struct) - PNGARG((png_structp png_ptr)); - -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -/* Initialize the info structure (old interface - DEPRECATED) */ -extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr)); -#undef png_info_init -#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\ - png_sizeof(png_info)); -#endif + PNGARG((png_structp png_ptr)) PNG_ALLOCATED; extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, png_size_t png_info_struct_size)); @@ -1616,20 +1591,18 @@ extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the information before the actual image data. */ extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) +#ifdef PNG_TIME_RFC1123_SUPPORTED extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) PNGARG((png_structp png_ptr, png_timep ptime)); #endif -#if !defined(_WIN32_WCE) -/* "time.h" functions are not supported on WindowsCE */ -#if defined(PNG_WRITE_tIME_SUPPORTED) +#ifdef PNG_CONVERT_tIME_SUPPORTED /* Convert from a struct tm to png_time */ extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, struct tm FAR * ttime)); @@ -1637,22 +1610,15 @@ extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, /* Convert from time_t to png_time. Uses gmtime() */ extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, time_t ttime)); -#endif /* PNG_WRITE_tIME_SUPPORTED */ -#endif /* _WIN32_WCE */ +#endif /* PNG_CONVERT_tIME_SUPPORTED */ -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); -#if !defined(PNG_1_0_X) extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); -#endif extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -/* Deprecated */ -extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); -#endif #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) @@ -1660,12 +1626,12 @@ extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Expand the grayscale to 24-bit RGB if necessary. */ extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* Reduce RGB to grayscale. */ #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, @@ -1680,7 +1646,7 @@ extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, png_colorp palette)); -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); #endif @@ -1702,10 +1668,8 @@ extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, #define PNG_FILLER_BEFORE 0 #define PNG_FILLER_AFTER 1 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ -#if !defined(PNG_1_0_X) extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr, png_uint_32 filler, int flags)); -#endif #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) @@ -1718,7 +1682,8 @@ extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); #endif @@ -1740,7 +1705,7 @@ extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED /* Handle alpha and tRNS by replacing with a background color. */ #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, @@ -1753,19 +1718,23 @@ extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, #define PNG_BACKGROUND_GAMMA_UNIQUE 3 #endif -#if defined(PNG_READ_16_TO_8_SUPPORTED) +#ifdef PNG_READ_16_TO_8_SUPPORTED /* Strip the second byte of information from a 16-bit depth file. */ extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_DITHER_SUPPORTED) -/* Turn on dithering, and reduce the palette to the number of colors available. */ -extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. Prior to libpng-1.4.2, this was png_set_dither(). + */ +extern PNG_EXPORT(void,png_set_quantize) PNGARG((png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, - png_uint_16p histogram, int full_dither)); + png_uint_16p histogram, int full_quantize)); #endif +/* This migration aid will be removed from libpng-1.5.0 */ +#define png_set_dither png_set_quantize -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED /* Handle gamma correction. Screen_gamma=(display_exponent) */ #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, @@ -1773,17 +1742,8 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, #endif #endif -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ - defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */ -/* Deprecated and will be removed. Use png_permit_mng_features() instead. */ -extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr, - int empty_plte_permitted)); -#endif -#endif -#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED /* Set how many lines between output flushes - 0 for no flushing */ extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); /* Flush the current PNG output buffer */ @@ -1797,20 +1757,20 @@ extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. */ extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); #endif -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read a row of data. */ extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, png_bytep row, png_bytep display_row)); #endif -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the whole image into memory at once. */ extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, png_bytepp image)); @@ -1828,11 +1788,11 @@ extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, png_bytepp image)); -/* Writes the end of the PNG file. */ +/* Write the end of the PNG file. */ extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, png_infop info_ptr)); -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the end of the PNG file. */ extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, png_infop info_ptr)); @@ -1846,17 +1806,10 @@ extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); -/* Free all memory used by the read (old method - NOT DLL EXPORTED) */ -extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, - png_infop end_info_ptr)); - /* Free any memory associated with the png_struct and the png_info_structs */ extern PNG_EXPORT(void,png_destroy_write_struct) PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); -/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ -extern void png_write_destroy PNGARG((png_structp png_ptr)); - /* Set the libpng method of handling chunk CRC errors */ extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, int crit_action, int ancil_action)); @@ -1915,7 +1868,7 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, #define PNG_FILTER_VALUE_PAETH 4 #define PNG_FILTER_VALUE_LAST 5 -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */ +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */ /* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ * defines, either the default (minimum-sum-of-absolute-differences), or * the experimental method (weighted-minimum-sum-of-absolute-differences). @@ -1990,9 +1943,10 @@ extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, * more information. */ -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); +extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, + png_FILE_p fp)); #endif /* Replace the (error and abort), and warning functions with user @@ -2043,21 +1997,18 @@ extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp png_ptr, png_user_transform_ptr read_user_transform_fn)); #endif -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp png_ptr, png_user_transform_ptr write_user_transform_fn)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels)); @@ -2090,7 +2041,7 @@ extern PNG_EXPORT(png_voidp,png_get_progressive_ptr) extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); -/* function that combines rows. Not very much different than the +/* Function that combines rows. Not very much different than the * png_combine_row() call. Is this even used????? */ extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, @@ -2098,38 +2049,25 @@ extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, - png_uint_32 size)); + png_alloc_size_t size)) PNG_ALLOCATED; +/* Added at libpng version 1.4.0 */ +extern PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr, + png_alloc_size_t size)) PNG_ALLOCATED; -#if defined(PNG_1_0_X) -# define png_malloc_warn png_malloc -#else /* Added at libpng version 1.2.4 */ extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, - png_uint_32 size)); -#endif + png_alloc_size_t size)) PNG_ALLOCATED; /* Frees a pointer allocated by png_malloc() */ extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); -#if defined(PNG_1_0_X) -/* Function to allocate memory for zlib. */ -extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items, - uInt size)); - -/* Function to free memory for zlib */ -extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr)); -#endif - /* Free data that was allocated internally */ extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)); -#ifdef PNG_FREE_ME_SUPPORTED /* Reassign responsibility for freeing existing data, whether allocated - * by libpng or by the application - */ + * by libpng or by the application */ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask)); -#endif /* Assignments for png_data_freer */ #define PNG_DESTROY_WILL_FREE_DATA 1 #define PNG_SET_WILL_FREE_DATA 1 @@ -2151,46 +2089,46 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, #ifdef PNG_USER_MEM_SUPPORTED extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, - png_uint_32 size)); + png_alloc_size_t size)) PNG_ALLOCATED; extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, png_voidp ptr)); #endif -extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr, - png_voidp s1, png_voidp s2, png_uint_32 size)); - -extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr, - png_voidp s1, int value, png_uint_32 size)); - -#if defined(USE_FAR_KEYWORD) /* memory model conversion function */ -extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, - int check)); -#endif /* USE_FAR_KEYWORD */ - #ifndef PNG_NO_ERROR_TEXT /* Fatal error in PNG image of libpng - can't continue */ extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)); + png_const_charp error_message)) PNG_NORETURN; /* The same, but the chunk name is prepended to the error string. */ extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)); + png_const_charp error_message)) PNG_NORETURN; + #else /* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; #endif -#ifndef PNG_NO_WARNINGS /* Non-fatal error in libpng. Can continue, but may have a problem. */ extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, png_const_charp warning_message)); -#ifdef PNG_READ_SUPPORTED /* Non-fatal error in libpng, chunk name is prepended to message. */ extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, png_const_charp warning_message)); -#endif /* PNG_READ_SUPPORTED */ -#endif /* PNG_NO_WARNINGS */ + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +extern PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr, + png_const_charp warning_message)); + +/* Same, chunk name is prepended to message. */ +extern PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr, + png_const_charp warning_message)); + +extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp + png_ptr, int allowed)); +#endif /* The png_set_ functions are for storing values in the png_info_struct. * Similarly, the png_get_ calls are used to read values from the @@ -2209,10 +2147,10 @@ extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)); /* Returns number of bytes needed to hold a transformed row. */ -extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr, +extern PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr, png_infop info_ptr)); -#if defined(PNG_INFO_IMAGE_SUPPORTED) +#ifdef PNG_INFO_IMAGE_SUPPORTED /* Returns row_pointers, which is an array of pointers to scanlines that was * returned from png_read_png(). */ @@ -2288,17 +2226,17 @@ png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, png_infop info_ptr)); -#if defined(PNG_bKGD_SUPPORTED) +#ifdef PNG_bKGD_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_16p *background)); #endif -#if defined(PNG_bKGD_SUPPORTED) +#ifdef PNG_bKGD_SUPPORTED extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_16p background)); #endif -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, double *white_x, double *white_y, double *red_x, @@ -2314,7 +2252,7 @@ extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, #endif #endif -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, double white_x, double white_y, double red_x, @@ -2329,7 +2267,7 @@ extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, #endif #endif -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, png_infop info_ptr, double *file_gamma)); @@ -2338,7 +2276,7 @@ extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_file_gamma)); #endif -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, png_infop info_ptr, double file_gamma)); @@ -2347,12 +2285,12 @@ extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma)); #endif -#if defined(PNG_hIST_SUPPORTED) +#ifdef PNG_hIST_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)); #endif -#if defined(PNG_hIST_SUPPORTED) +#ifdef PNG_hIST_SUPPORTED extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)); #endif @@ -2367,36 +2305,36 @@ extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, int color_type, int interlace_method, int compression_method, int filter_method)); -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)); #endif -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)); #endif -#if defined(PNG_pCAL_SUPPORTED) +#ifdef PNG_pCAL_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params)); #endif -#if defined(PNG_pCAL_SUPPORTED) +#ifdef PNG_pCAL_SUPPORTED extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)); #endif -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); #endif @@ -2407,97 +2345,96 @@ extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette)); -#if defined(PNG_sBIT_SUPPORTED) +#ifdef PNG_sBIT_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)); #endif -#if defined(PNG_sBIT_SUPPORTED) +#ifdef PNG_sBIT_SUPPORTED extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit)); #endif -#if defined(PNG_sRGB_SUPPORTED) +#ifdef PNG_sRGB_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, png_infop info_ptr, int *intent)); #endif -#if defined(PNG_sRGB_SUPPORTED) +#ifdef PNG_sRGB_SUPPORTED extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, png_infop info_ptr, int intent)); extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, int intent)); #endif -#if defined(PNG_iCCP_SUPPORTED) +#ifdef PNG_iCCP_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charpp name, int *compression_type, png_charpp profile, png_uint_32 *proflen)); /* Note to maintainer: profile should be png_bytepp */ #endif -#if defined(PNG_iCCP_SUPPORTED) +#ifdef PNG_iCCP_SUPPORTED extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, png_charp profile, png_uint_32 proflen)); /* Note to maintainer: profile should be png_bytep */ #endif -#if defined(PNG_sPLT_SUPPORTED) +#ifdef PNG_sPLT_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp entries)); #endif -#if defined(PNG_sPLT_SUPPORTED) +#ifdef PNG_sPLT_SUPPORTED extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries)); #endif -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED /* png_get_text also returns the number of text chunks in *num_text */ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text)); #endif -/* - * Note while png_set_text() will accept a structure whose text, - * language, and translated keywords are NULL pointers, the structure - * returned by png_get_text will always contain regular - * zero-terminated C strings. They might be empty strings but - * they will never be NULL pointers. +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. */ -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)); #endif -#if defined(PNG_tIME_SUPPORTED) +#ifdef PNG_tIME_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)); #endif -#if defined(PNG_tIME_SUPPORTED) +#ifdef PNG_tIME_SUPPORTED extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, png_infop info_ptr, png_timep mod_time)); #endif -#if defined(PNG_tRNS_SUPPORTED) +#ifdef PNG_tRNS_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep *trans, int *num_trans, - png_color_16p *trans_values)); + png_infop info_ptr, png_bytep *trans_alpha, int *num_trans, + png_color_16p *trans_color)); #endif -#if defined(PNG_tRNS_SUPPORTED) +#ifdef PNG_tRNS_SUPPORTED extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep trans, int num_trans, - png_color_16p trans_values)); + png_infop info_ptr, png_bytep trans_alpha, int num_trans, + png_color_16p trans_color)); #endif -#if defined(PNG_tRNS_SUPPORTED) +#ifdef PNG_tRNS_SUPPORTED #endif -#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, int *unit, double *width, double *height)); @@ -2509,7 +2446,7 @@ extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, #endif #endif /* PNG_sCAL_SUPPORTED */ -#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, int unit, double width, double height)); @@ -2536,7 +2473,7 @@ extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep chunk_name)); #endif -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); extern PNG_EXPORT(void, png_set_unknown_chunk_location) @@ -2552,7 +2489,7 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, png_infop info_ptr, int mask)); -#if defined(PNG_INFO_IMAGE_SUPPORTED) +#ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, png_infop info_ptr, @@ -2564,116 +2501,10 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, png_voidp params)); #endif -/* Define PNG_DEBUG at compile time for debugging information. Higher - * numbers for PNG_DEBUG mean more debugging information. This has - * only been added since version 0.95 so it is not implemented throughout - * libpng yet, but more support will be added as needed. - */ -#ifdef PNG_DEBUG -#if (PNG_DEBUG > 0) -#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) -#include -#if (PNG_DEBUG > 1) -#ifndef _DEBUG -# define _DEBUG -#endif -#ifndef png_debug -#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) -#endif -#ifndef png_debug1 -#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) -#endif -#ifndef png_debug2 -#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) -#endif -#endif -#else /* PNG_DEBUG_FILE || !_MSC_VER */ -#ifndef PNG_DEBUG_FILE -#define PNG_DEBUG_FILE stderr -#endif /* PNG_DEBUG_FILE */ - -#if (PNG_DEBUG > 1) -/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on non-ISO - * compilers. - */ -# ifdef __STDC__ -# ifndef png_debug -# define png_debug(l,m) \ - { \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ - } -# endif -# ifndef png_debug1 -# define png_debug1(l,m,p1) \ - { \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ - } -# endif -# ifndef png_debug2 -# define png_debug2(l,m,p1,p2) \ - { \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ - } -# endif -# else /* __STDC __ */ -# ifndef png_debug -# define png_debug(l,m) \ - { \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format); \ - } -# endif -# ifndef png_debug1 -# define png_debug1(l,m,p1) \ - { \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format,p1); \ - } -# endif -# ifndef png_debug2 -# define png_debug2(l,m,p1,p2) \ - { \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format,p1,p2); \ - } -# endif -# endif /* __STDC __ */ -#endif /* (PNG_DEBUG > 1) */ - -#endif /* _MSC_VER */ -#endif /* (PNG_DEBUG > 0) */ -#endif /* PNG_DEBUG */ -#ifndef png_debug -#define png_debug(l, m) -#endif -#ifndef png_debug1 -#define png_debug1(l, m, p1) -#endif -#ifndef png_debug2 -#define png_debug2(l, m, p1, p2) -#endif - extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp + png_ptr)); extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED @@ -2687,74 +2518,6 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp #define PNG_HANDLE_CHUNK_IF_SAFE 2 #define PNG_HANDLE_CHUNK_ALWAYS 3 -/* Added to version 1.2.0 */ -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -#if defined(PNG_MMX_CODE_SUPPORTED) -#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */ -#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */ -#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW 0x04 -#define PNG_ASM_FLAG_MMX_READ_INTERLACE 0x08 -#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB 0x10 -#define PNG_ASM_FLAG_MMX_READ_FILTER_UP 0x20 -#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG 0x40 -#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80 -#define PNG_ASM_FLAGS_INITIALIZED 0x80000000 /* not user-settable */ - -#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ) -#define PNG_MMX_WRITE_FLAGS ( 0 ) - -#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \ - | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU \ - | PNG_MMX_READ_FLAGS \ - | PNG_MMX_WRITE_FLAGS ) - -#define PNG_SELECT_READ 1 -#define PNG_SELECT_WRITE 2 -#endif /* PNG_MMX_CODE_SUPPORTED */ - -#if !defined(PNG_1_0_X) -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask) - PNGARG((int flag_select, int *compilerID)); - -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask) - PNGARG((int flag_select)); - -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_asm_flags) - PNGARG((png_structp png_ptr)); - -/* pngget.c */ -extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold) - PNGARG((png_structp png_ptr)); - -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold) - PNGARG((png_structp png_ptr)); - -/* pngset.c */ -extern PNG_EXPORT(void,png_set_asm_flags) - PNGARG((png_structp png_ptr, png_uint_32 asm_flags)); - -/* pngset.c */ -extern PNG_EXPORT(void,png_set_mmx_thresholds) - PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold, - png_uint_32 mmx_rowbytes_threshold)); - -#endif /* PNG_1_0_X */ - -#if !defined(PNG_1_0_X) -/* png.c, pnggccrd.c, or pngvcrd.c */ -extern PNG_EXPORT(int,png_mmx_support) PNGARG((void)); -#endif /* PNG_1_0_X */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - /* Strip the prepended error numbers ("#nnn ") from error and warning * messages before passing them to the error or warning handler. */ @@ -2763,7 +2526,7 @@ extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp png_ptr, png_uint_32 strip_mode)); #endif -/* Added at libpng-1.2.6 */ +/* Added in libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); @@ -2771,11 +2534,61 @@ extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp png_ptr)); +/* Added in libpng-1.4.0 */ +extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp + png_ptr, png_uint_32 user_chunk_cache_max)); +extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max) + PNGARG((png_structp png_ptr)); +/* Added in libpng-1.4.1 */ +extern PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp + png_ptr, png_alloc_size_t user_chunk_cache_max)); +extern PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max) + PNGARG((png_structp png_ptr)); #endif +#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) +PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr, +png_infop info_ptr)); -/* Maintainer: Put new public prototypes here ^, in libpng.3, and in - * project defs +PNG_EXPORT(png_uint_32,png_get_x_pixels_per_inch) PNGARG((png_structp png_ptr, +png_infop info_ptr)); + +PNG_EXPORT(png_uint_32,png_get_y_pixels_per_inch) PNGARG((png_structp png_ptr, +png_infop info_ptr)); + +PNG_EXPORT(float,png_get_x_offset_inches) PNGARG((png_structp png_ptr, +png_infop info_ptr)); + +PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr, +png_infop info_ptr)); + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr, +png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); +#endif /* PNG_pHYs_SUPPORTED */ +#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +extern PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr)); + +extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) + PNGARG((png_structp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +#define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +#define PNG_IO_READING 0x0001 /* currently reading */ +#define PNG_IO_WRITING 0x0002 /* currently writing */ +#define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +#define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +#define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +#define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +#define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +#define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* ?PNG_IO_STATE_SUPPORTED */ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, and project + * defs */ #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED @@ -2793,16 +2606,18 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ -# define png_composite(composite, fg, alpha, bg) \ - { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \ - + (png_uint_16)(bg)*(png_uint_16)(255 - \ - (png_uint_16)(alpha)) + (png_uint_16)128); \ +# define png_composite(composite, fg, alpha, bg) \ + { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + (png_uint_16)128); \ (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } -# define png_composite_16(composite, fg, alpha, bg) \ - { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \ - + (png_uint_32)(bg)*(png_uint_32)(65535L - \ - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ +# define png_composite_16(composite, fg, alpha, bg) \ + { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(png_uint_32)(65535L \ + - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } #else /* Standard method using integer division */ @@ -2816,32 +2631,41 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ (png_uint_32)32767) / (png_uint_32)65535L) - #endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ -/* Inline macros to do direct reads of bytes from the input buffer. These - * require that you are using an architecture that uses PNG byte ordering - * (MSB first) and supports unaligned data storage. I think that PowerPC - * in big-endian mode and 680x0 are the only ones that will support this. - * The x86 line of processors definitely do not. The png_get_int_32() - * routine also assumes we are using two's complement format for negative - * values, which is almost certainly true. +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. */ -#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED) -# define png_get_uint_32(buf) ( *((png_uint_32p) (buf))) -# define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) -# define png_get_int_32(buf) ( *((png_int_32p) (buf))) +/* We could make special-case BIG_ENDIAN macros that do direct reads here */ +# define png_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) +# define png_get_uint_16(buf) \ + (((png_uint_32)(*(buf)) << 8) + \ + ((png_uint_32)(*((buf) + 1)))) +#ifdef PNG_GET_INT_32_SUPPORTED +# define png_get_int_32(buf) \ + (((png_int_32)(*(buf)) << 24) + \ + ((png_int_32)(*((buf) + 1)) << 16) + \ + ((png_int_32)(*((buf) + 2)) << 8) + \ + ((png_int_32)(*((buf) + 3)))) +#endif #else extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); +#ifdef PNG_GET_INT_32_SUPPORTED extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); -#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */ +#endif +#endif extern PNG_EXPORT(png_uint_32,png_get_uint_31) PNGARG((png_structp png_ptr, png_bytep buf)); /* No png_get_int_16 -- may be added if there's a real need for it. */ -/* Place a 32-bit number into a buffer in PNG byte order (big-endian). - */ +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ extern PNG_EXPORT(void,png_save_uint_32) PNGARG((png_bytep buf, png_uint_32 i)); extern PNG_EXPORT(void,png_save_int_32) @@ -2857,861 +2681,16 @@ extern PNG_EXPORT(void,png_save_uint_16) /* ************************************************************************* */ -/* These next functions are used internally in the code. They generally - * shouldn't be used unless you are writing code to add or replace some - * functionality in libpng. More information about most functions can - * be found in the files where the functions are located. - */ - - -/* Various modes of operation, that are visible to applications because - * they are used for unknown chunk location. +/* Various modes of operation. Note that after an init, mode is set to + * zero automatically when the structure is created. */ #define PNG_HAVE_IHDR 0x01 #define PNG_HAVE_PLTE 0x02 #define PNG_HAVE_IDAT 0x04 #define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */ #define PNG_HAVE_IEND 0x10 - -#if defined(PNG_INTERNAL) - -/* More modes of operation. Note that after an init, mode is set to - * zero automatically when the structure is created. - */ #define PNG_HAVE_gAMA 0x20 #define PNG_HAVE_cHRM 0x40 -#define PNG_HAVE_sRGB 0x80 -#define PNG_HAVE_CHUNK_HEADER 0x100 -#define PNG_WROTE_tIME 0x200 -#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 -#define PNG_BACKGROUND_IS_GRAY 0x800 -#define PNG_HAVE_PNG_SIGNATURE 0x1000 -#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ - -/* Flags for the transformations the PNG library does on the image data */ -#define PNG_BGR 0x0001 -#define PNG_INTERLACE 0x0002 -#define PNG_PACK 0x0004 -#define PNG_SHIFT 0x0008 -#define PNG_SWAP_BYTES 0x0010 -#define PNG_INVERT_MONO 0x0020 -#define PNG_DITHER 0x0040 -#define PNG_BACKGROUND 0x0080 -#define PNG_BACKGROUND_EXPAND 0x0100 - /* 0x0200 unused */ -#define PNG_16_TO_8 0x0400 -#define PNG_RGBA 0x0800 -#define PNG_EXPAND 0x1000 -#define PNG_GAMMA 0x2000 -#define PNG_GRAY_TO_RGB 0x4000 -#define PNG_FILLER 0x8000L -#define PNG_PACKSWAP 0x10000L -#define PNG_SWAP_ALPHA 0x20000L -#define PNG_STRIP_ALPHA 0x40000L -#define PNG_INVERT_ALPHA 0x80000L -#define PNG_USER_TRANSFORM 0x100000L -#define PNG_RGB_TO_GRAY_ERR 0x200000L -#define PNG_RGB_TO_GRAY_WARN 0x400000L -#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ - /* 0x800000L Unused */ -#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */ -#define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */ - /* 0x4000000L unused */ - /* 0x8000000L unused */ - /* 0x10000000L unused */ - /* 0x20000000L unused */ - /* 0x40000000L unused */ - -/* Flags for png_create_struct */ -#define PNG_STRUCT_PNG 0x0001 -#define PNG_STRUCT_INFO 0x0002 - -/* Scaling factor for filter heuristic weighting calculations */ -#define PNG_WEIGHT_SHIFT 8 -#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) -#define PNG_COST_SHIFT 3 -#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) - -/* Flags for the png_ptr->flags rather than declaring a byte for each one */ -#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 -#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 -#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 -#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 -#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 -#define PNG_FLAG_ZLIB_FINISHED 0x0020 -#define PNG_FLAG_ROW_INIT 0x0040 -#define PNG_FLAG_FILLER_AFTER 0x0080 -#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 -#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 -#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 -#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 -#define PNG_FLAG_FREE_PLTE 0x1000 -#define PNG_FLAG_FREE_TRNS 0x2000 -#define PNG_FLAG_FREE_HIST 0x4000 -#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L -#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L -#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L -#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L -#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L -#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L -#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ -#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ - /* 0x800000L unused */ - /* 0x1000000L unused */ - /* 0x2000000L unused */ - /* 0x4000000L unused */ - /* 0x8000000L unused */ - /* 0x10000000L unused */ - /* 0x20000000L unused */ - /* 0x40000000L unused */ - -#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ - PNG_FLAG_CRC_ANCILLARY_NOWARN) - -#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ - PNG_FLAG_CRC_CRITICAL_IGNORE) - -#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ - PNG_FLAG_CRC_CRITICAL_MASK) - -/* Save typing and make code easier to understand */ - -#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ - abs((int)((c1).green) - (int)((c2).green)) + \ - abs((int)((c1).blue) - (int)((c2).blue))) - -/* Added to libpng-1.2.6 JB */ -#define PNG_ROWBYTES(pixel_bits, width) \ - ((pixel_bits) >= 8 ? \ - ((width) * (((png_uint_32)(pixel_bits)) >> 3)) : \ - (( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) ) - -/* PNG_OUT_OF_RANGE returns true if value is outside the range - * ideal-delta..ideal+delta. Each argument is evaluated twice. - * "ideal" and "delta" should be constants, normally simple - * integers, "value" a variable. Added to libpng-1.2.6 JB - */ -#define PNG_OUT_OF_RANGE(value, ideal, delta) \ - ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) - -/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */ -#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) -/* place to hold the signature string for a PNG file. */ -#ifdef PNG_USE_GLOBAL_ARRAYS - PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8]; -#else -#endif -#endif /* PNG_NO_EXTERN */ - -/* Constant strings for known chunk types. If you need to add a chunk, - * define the name here, and add an invocation of the macro in png.c and - * wherever it's needed. - */ -#define PNG_IHDR png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'} -#define PNG_IDAT png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'} -#define PNG_IEND png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'} -#define PNG_PLTE png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'} -#define PNG_bKGD png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'} -#define PNG_cHRM png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'} -#define PNG_gAMA png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'} -#define PNG_hIST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'} -#define PNG_iCCP png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'} -#define PNG_iTXt png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'} -#define PNG_oFFs png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'} -#define PNG_pCAL png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'} -#define PNG_sCAL png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'} -#define PNG_pHYs png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'} -#define PNG_sBIT png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'} -#define PNG_sPLT png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'} -#define PNG_sRGB png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'} -#define PNG_tEXt png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'} -#define PNG_tIME png_byte png_tIME[5] = {116, 73, 77, 69, '\0'} -#define PNG_tRNS png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'} -#define PNG_zTXt png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'} - -#ifdef PNG_USE_GLOBAL_ARRAYS -PNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_IDAT[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_IEND[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_PLTE[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_bKGD[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_cHRM[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_gAMA[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_hIST[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_iCCP[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_iTXt[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_oFFs[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_pCAL[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_sCAL[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_pHYs[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_sBIT[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_sPLT[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_sRGB[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_tEXt[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5]; -PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5]; -#endif /* PNG_USE_GLOBAL_ARRAYS */ - -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -/* Initialize png_ptr struct for reading, and allocate any other memory. - * (old interface - DEPRECATED - use png_create_read_struct instead). - */ -extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr)); -#undef png_read_init -#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \ - PNG_LIBPNG_VER_STRING, png_sizeof(png_struct)); -#endif - -extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size)); -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t - png_info_size)); -#endif - -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -/* Initialize png_ptr struct for writing, and allocate any other memory. - * (old interface - DEPRECATED - use png_create_write_struct instead). - */ -extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr)); -#undef png_write_init -#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \ - PNG_LIBPNG_VER_STRING, png_sizeof(png_struct)); -#endif - -extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size)); -extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t - png_info_size)); - -/* Allocate memory for an internal libpng struct */ -PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); - -/* Free memory from internal libpng struct */ -PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); - -PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr - malloc_fn, png_voidp mem_ptr)); -PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, - png_free_ptr free_fn, png_voidp mem_ptr)); - -/* Free any memory that info_ptr points to and reset struct. */ -PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -#ifndef PNG_1_0_X -/* Function to allocate memory for zlib. */ -PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); - -/* Function to free memory for zlib */ -PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); - -#ifdef PNG_SIZE_T -/* Function to convert a sizeof an item to png_sizeof item */ - PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)); -#endif - -/* Next four functions are used internally as callbacks. PNGAPI is required - * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. - */ - -PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); -#endif - -PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -#if !defined(PNG_NO_STDIO) -PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); -#endif -#endif -#else /* PNG_1_0_X */ -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); -#endif -#endif /* PNG_1_0_X */ - -/* Reset the CRC variable */ -PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); - -/* Write the "data" buffer to whatever output you are using. */ -PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -/* Read data from whatever input you are using into the "data" buffer */ -PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -/* Read bytes into buf, and update png_ptr->crc */ -PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, - png_size_t length)); - -/* Decompress data in a chunk that uses compression */ -#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ - defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) -PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, - int comp_type, png_size_t chunklength, - png_size_t prefix_length, png_size_t *data_length)); -#endif - -/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ -PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); - -/* Read the CRC from the file and compare it to the libpng calculated CRC */ -PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); - -/* Calculate the CRC over a section of data. Note that we are only - * passing a maximum of 64K on systems that have this as a memory limit, - * since this is the maximum buffer size we can specify. - */ -PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, - png_size_t length)); - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); -#endif - -/* Simple function to write the signature */ -PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); - -/* Write various chunks */ - -/* Write the IHDR chunk, and update the png_struct with the necessary - * information. - */ -PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, - png_uint_32 height, - int bit_depth, int color_type, int compression_method, int filter_method, - int interlace_method)); - -PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, - png_uint_32 num_pal)); - -PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); - -#if defined(PNG_WRITE_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point - file_gamma)); -#endif -#endif - -#if defined(PNG_WRITE_sBIT_SUPPORTED) -PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, - int color_type)); -#endif - -#if defined(PNG_WRITE_cHRM_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, - double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, - png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); -#endif -#endif - -#if defined(PNG_WRITE_sRGB_SUPPORTED) -PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, - int intent)); -#endif - -#if defined(PNG_WRITE_iCCP_SUPPORTED) -PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, - png_charp name, int compression_type, - png_charp profile, int proflen)); - /* Note to maintainer: profile should be png_bytep */ -#endif - -#if defined(PNG_WRITE_sPLT_SUPPORTED) -PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, - png_sPLT_tp palette)); -#endif - -#if defined(PNG_WRITE_tRNS_SUPPORTED) -PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, - png_color_16p values, int number, int color_type)); -#endif - -#if defined(PNG_WRITE_bKGD_SUPPORTED) -PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, - png_color_16p values, int color_type)); -#endif - -#if defined(PNG_WRITE_hIST_SUPPORTED) -PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, - int num_hist)); -#endif - -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ - defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) -PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, - png_charp key, png_charpp new_key)); -#endif - -#if defined(PNG_WRITE_tEXt_SUPPORTED) -PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len)); -#endif - -#if defined(PNG_WRITE_zTXt_SUPPORTED) -PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len, int compression)); -#endif - -#if defined(PNG_WRITE_iTXt_SUPPORTED) -PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, - int compression, png_charp key, png_charp lang, png_charp lang_key, - png_charp text)); -#endif - -#if defined(PNG_TEXT_SUPPORTED) /* Added at version 1.0.14 and 1.2.4 */ -PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)); -#endif - -#if defined(PNG_WRITE_oFFs_SUPPORTED) -PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, - png_int_32 x_offset, png_int_32 y_offset, int unit_type)); -#endif - -#if defined(PNG_WRITE_pCAL_SUPPORTED) -PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, - png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params)); -#endif - -#if defined(PNG_WRITE_pHYs_SUPPORTED) -PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, - png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, - int unit_type)); -#endif - -#if defined(PNG_WRITE_tIME_SUPPORTED) -PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, - png_timep mod_time)); -#endif - -#if defined(PNG_WRITE_sCAL_SUPPORTED) -#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) -PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, - int unit, double width, double height)); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, - int unit, png_charp width, png_charp height)); -#endif -#endif -#endif - -/* Called when finished processing a row of data */ -PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); - -/* Internal use only. Called before first row of data */ -PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); - -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)); -#endif - -/* Combine a row of data, dealing with alpha, etc. if requested */ -PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, - int mask)); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) -/* Expand an interlaced row */ -/* OLD pre-1.0.9 interface: -PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass, png_uint_32 transformations)); - */ -PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); -#endif - -/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* Grab pixels out of a row for an interlaced pass */ -PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass)); -#endif - -/* Unfilter a row */ -PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, - png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); - -/* Choose the best filter to use and filter the row data */ -PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, - png_row_infop row_info)); - -/* Write out the filtered row. */ -PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, - png_bytep filtered_row)); -/* Finish a row while reading, dealing with interlacing passes, etc. */ -PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); - -/* Initialize the row buffers, etc. */ -PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); -/* Optional call to update the users info structure */ -PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* These are the functions that do the transformations */ -#if defined(PNG_READ_FILLER_SUPPORTED) -PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 filler, png_uint_32 flags)); -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ - defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 flags)); -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) -PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop - row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) -PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) -PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p sig_bits)); -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info, - png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)); - -# if defined(PNG_CORRECT_PALETTE_SUPPORTED) -PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette)); -# endif -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_WRITE_PACK_SUPPORTED) -PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 bit_depth)); -#endif - -#if defined(PNG_WRITE_SHIFT_SUPPORTED) -PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p bit_depth)); -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background, - png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift)); -#else -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background)); -#endif -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift)); -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) -PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, - png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); -PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, - png_bytep row, png_color_16p trans_value)); -#endif - -/* The following decodes the appropriate chunks, and does error correction, - * then calls the appropriate callback for the chunk if it is valid. - */ - -/* Decode the IHDR chunk */ -PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); - -#if defined(PNG_READ_bKGD_SUPPORTED) -PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) -PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_gAMA_SUPPORTED) -PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_hIST_SUPPORTED) -PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_iCCP_SUPPORTED) -extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif /* PNG_READ_iCCP_SUPPORTED */ - -#if defined(PNG_READ_iTXt_SUPPORTED) -PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_oFFs_SUPPORTED) -PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_pCAL_SUPPORTED) -PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_pHYs_SUPPORTED) -PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sBIT_SUPPORTED) -PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sCAL_SUPPORTED) -PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sPLT_SUPPORTED) -extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif /* PNG_READ_sPLT_SUPPORTED */ - -#if defined(PNG_READ_sRGB_SUPPORTED) -PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tEXt_SUPPORTED) -PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tIME_SUPPORTED) -PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tRNS_SUPPORTED) -PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_zTXt_SUPPORTED) -PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); - -PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, - png_bytep chunk_name)); - -/* Handle the transformations for reading and writing */ -PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); - -PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, - png_uint_32 length)); -PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); -PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); -#if defined(PNG_READ_tEXt_SUPPORTED) -PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) -PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) -PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#ifdef PNG_MNG_FEATURES_SUPPORTED -PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); -PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -#if defined(PNG_MMX_CODE_SUPPORTED) -/* png.c */ /* PRIVATE */ -PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)); -#endif -#endif - -#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) -PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -#if defined(PNG_pHYs_SUPPORTED) -PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr, -png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); -#endif /* PNG_pHYs_SUPPORTED */ -#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ - -/* Read the chunk header (length + type name) */ -PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); - -/* Added at libpng version 1.2.34 */ -#if defined(PNG_cHRM_SUPPORTED) -PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, - png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); -#endif - -#if defined(PNG_cHRM_SUPPORTED) -#if !defined(PNG_NO_CHECK_cHRM) -/* Added at libpng version 1.2.34 */ -PNG_EXTERN void png_64bit_product (long v1, long v2, unsigned long *hi_product, - unsigned long *lo_product); -#endif -#endif - -/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ - -#endif /* PNG_INTERNAL */ #ifdef __cplusplus } diff --git a/source/Irrlicht/libpng/pngconf.h b/source/Irrlicht/libpng/pngconf.h index a4f27d71..2ebe72d0 100644 --- a/source/Irrlicht/libpng/pngconf.h +++ b/source/Irrlicht/libpng/pngconf.h @@ -1,14 +1,16 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.2.39 - August 13, 2009 - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * libpng version 1.4.3 - June 26, 2010 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h + * */ /* Any machine specific code is near the front of this file, so if you @@ -20,9 +22,24 @@ #ifndef PNGCONF_H #define PNGCONF_H -#define PNG_1_2_X +#ifndef PNG_NO_LIMITS_H +# include +#endif + +/* Added at libpng-1.2.9 */ + +/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" + * script. + */ +#ifdef PNG_CONFIGURE_LIBPNG +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif +#endif /* + * Added at libpng-1.2.8 + * * PNG_USER_CONFIG has to be defined on the compiler command line. This * includes the resource compiler for Windows DLL configurations. */ @@ -30,19 +47,10 @@ # ifndef PNG_USER_PRIVATEBUILD # define PNG_USER_PRIVATEBUILD # endif -#include "pngusr.h" -#endif - -/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */ -#ifdef PNG_CONFIGURE_LIBPNG -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +# include "pngusr.h" #endif /* - * Added at libpng-1.2.8 - * * If you create a private DLL you need to define in "pngusr.h" the followings: * #define PNG_USER_PRIVATEBUILD @@ -62,29 +70,21 @@ */ #ifdef __STDC__ -#ifdef SPECIALBUILD -# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\ - are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.") -#endif +# ifdef SPECIALBUILD +# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\ + are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.") +# endif -#ifdef PRIVATEBUILD -# pragma message("PRIVATEBUILD is deprecated.\ - Use PNG_USER_PRIVATEBUILD instead.") -# define PNG_USER_PRIVATEBUILD PRIVATEBUILD -#endif +# ifdef PRIVATEBUILD +# pragma message("PRIVATEBUILD is deprecated.\ + Use PNG_USER_PRIVATEBUILD instead.") +# define PNG_USER_PRIVATEBUILD PRIVATEBUILD +# endif #endif /* __STDC__ */ -#ifndef PNG_VERSION_INFO_ONLY - /* End of material added to libpng-1.2.8 */ -/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble - Restored at libpng-1.2.21 */ -#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \ - !defined(PNG_WARN_UNINITIALIZED_ROW) -# define PNG_WARN_UNINITIALIZED_ROW 1 -#endif -/* End of material added at libpng-1.2.19/1.2.21 */ +#ifndef PNG_VERSION_INFO_ONLY /* This is the size of the compression buffer, and thus the size of * an IDAT chunk. Make this whatever size you feel is best for your @@ -115,20 +115,57 @@ # define PNG_WRITE_SUPPORTED #endif +/* Enabled in 1.4.0. */ +#ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +#else +# ifndef PNG_BENIGN_ERRORS_SUPPORTED +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* Added at libpng version 1.4.0 */ +#if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED) +# define PNG_WARNINGS_SUPPORTED +#endif + +/* Added at libpng version 1.4.0 */ +#if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED) +# define PNG_ERROR_TEXT_SUPPORTED +#endif + +/* Added at libpng version 1.4.0 */ +#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED) +# define PNG_CHECK_cHRM_SUPPORTED +#endif + +/* Added at libpng version 1.4.0 */ +#if !defined(PNG_NO_ALIGNED_MEMORY) && !defined(PNG_ALIGNED_MEMORY_SUPPORTED) +# define PNG_ALIGNED_MEMORY_SUPPORTED +#endif + /* Enabled by default in 1.2.0. You can disable this if you don't need to support PNGs that are embedded in MNG datastreams */ -#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES) +#ifndef PNG_NO_MNG_FEATURES # ifndef PNG_MNG_FEATURES_SUPPORTED # define PNG_MNG_FEATURES_SUPPORTED # endif #endif +/* Added at libpng version 1.4.0 */ #ifndef PNG_NO_FLOATING_POINT_SUPPORTED # ifndef PNG_FLOATING_POINT_SUPPORTED # define PNG_FLOATING_POINT_SUPPORTED # endif #endif +/* Added at libpng-1.4.0beta49 for testing (this test is no longer used + in libpng and png_calloc() is always present) + */ +#define PNG_CALLOC_SUPPORTED + /* If you are running on a machine where you cannot allocate more * than 64K of memory at once, uncomment this. While libpng will not * normally need that much memory in a chunk (unless you load up a very @@ -172,46 +209,46 @@ * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes * to __declspec() stuff. However, we DO need to worry about * PNG_BUILD_DLL and PNG_STATIC because those change some defaults - * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. + * such as CONSOLE_IO. */ -#if defined(__CYGWIN__) -# if defined(ALL_STATIC) -# if defined(PNG_BUILD_DLL) +#ifdef __CYGWIN__ +# ifdef ALL_STATIC +# ifdef PNG_BUILD_DLL # undef PNG_BUILD_DLL # endif -# if defined(PNG_USE_DLL) +# ifdef PNG_USE_DLL # undef PNG_USE_DLL # endif -# if defined(PNG_DLL) +# ifdef PNG_DLL # undef PNG_DLL # endif -# if !defined(PNG_STATIC) +# ifndef PNG_STATIC # define PNG_STATIC # endif # else -# if defined (PNG_BUILD_DLL) -# if defined(PNG_STATIC) +# ifdef PNG_BUILD_DLL +# ifdef PNG_STATIC # undef PNG_STATIC # endif -# if defined(PNG_USE_DLL) +# ifdef PNG_USE_DLL # undef PNG_USE_DLL # endif -# if !defined(PNG_DLL) +# ifndef PNG_DLL # define PNG_DLL # endif # else -# if defined(PNG_STATIC) -# if defined(PNG_USE_DLL) +# ifdef PNG_STATIC +# ifdef PNG_USE_DLL # undef PNG_USE_DLL # endif -# if defined(PNG_DLL) +# ifdef PNG_DLL # undef PNG_DLL # endif # else -# if !defined(PNG_USE_DLL) +# ifndef PNG_USE_DLL # define PNG_USE_DLL # endif -# if !defined(PNG_DLL) +# ifndef PNG_DLL # define PNG_DLL # endif # endif @@ -232,22 +269,14 @@ * #define PNG_NO_STDIO */ -#if defined(_WIN32_WCE) -# include - /* Console I/O functions are not supported on WindowsCE */ -# define PNG_NO_CONSOLE_IO - /* abort() may not be supported on some/all Windows CE platforms */ -# define PNG_ABORT() exit(-1) -# ifdef PNG_DEBUG -# undef PNG_DEBUG -# endif +#if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED) +# define PNG_STDIO_SUPPORTED #endif + #ifdef PNG_BUILD_DLL -# ifndef PNG_CONSOLE_IO_SUPPORTED -# ifndef PNG_NO_CONSOLE_IO -# define PNG_NO_CONSOLE_IO -# endif +# if !defined(PNG_CONSOLE_IO_SUPPORTED) && !defined(PNG_NO_CONSOLE_IO) +# define PNG_NO_CONSOLE_IO # endif #endif @@ -261,12 +290,13 @@ # endif # endif # else -# if !defined(_WIN32_WCE) -/* "stdio.h" functions are not supported on WindowsCE */ -# include -# endif +# include # endif +#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED) +# define PNG_CONSOLE_IO_SUPPORTED +#endif + /* This macro protects us against machines that don't have function * prototypes (ie K&R style headers). If your compiler does not handle * function prototypes, define this macro and use the included ansi2knr. @@ -282,14 +312,10 @@ #ifdef _NO_PROTO # define PNGARG(arglist) () -# ifndef PNG_TYPECAST_NULL -# define PNG_TYPECAST_NULL -# endif #else # define PNGARG(arglist) arglist #endif /* _NO_PROTO */ - #endif /* OF */ #endif /* PNGARG */ @@ -305,12 +331,14 @@ # endif #endif -/* enough people need this for various reasons to include it here */ -#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE) +/* Enough people need this for various reasons to include it here */ +#if !defined(MACOS) && !defined(RISCOS) # include #endif -#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED) +/* PNG_SETJMP_NOT_SUPPORTED and PNG_NO_SETJMP_SUPPORTED are deprecated. */ +#if !defined(PNG_NO_SETJMP) && \ + !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED) # define PNG_SETJMP_SUPPORTED #endif @@ -341,14 +369,15 @@ # endif /* __linux__ */ # endif /* PNG_SKIP_SETJMP_CHECK */ - /* include setjmp.h for error handling */ + /* Include setjmp.h for error handling */ # include # ifdef __linux__ # ifdef PNG_SAVE_BSD_SOURCE -# ifndef _BSD_SOURCE -# define _BSD_SOURCE +# ifdef _BSD_SOURCE +# undef _BSD_SOURCE # endif +# define _BSD_SOURCE # undef PNG_SAVE_BSD_SOURCE # endif # endif /* __linux__ */ @@ -361,72 +390,33 @@ #endif /* Other defines for things like memory and the like can go here. */ -#ifdef PNG_INTERNAL -#include - -/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which - * aren't usually used outside the library (as far as I know), so it is - * debatable if they should be exported at all. In the future, when it is - * possible to have run-time registry of chunk-handling functions, some of - * these will be made available again. -#define PNG_EXTERN extern - */ -#define PNG_EXTERN - -/* Other defines specific to compilers can go here. Try to keep - * them inside an appropriate ifdef/endif pair for portability. - */ - -#if defined(PNG_FLOATING_POINT_SUPPORTED) -# if defined(MACOS) - /* We need to check that hasn't already been included earlier - * as it seems it doesn't agree with , yet we should really use - * if possible. - */ -# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) -# include -# endif -# else -# include -# endif -# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) - /* Amiga SAS/C: We must include builtin FPU functions when compiling using - * MATH=68881 - */ -# include -# endif -#endif - -/* Codewarrior on NT has linking problems without this. */ -#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) -# define PNG_ALWAYS_EXTERN -#endif - -/* This provides the non-ANSI (far) memory allocation routines. */ -#if defined(__TURBOC__) && defined(__MSDOS__) -# include -# include -#endif - -/* I have no idea why is this necessary... */ -#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \ - defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__)) -# include -#endif - -/* This controls how fine the dithering gets. As this allocates +/* This controls how fine the quantizing gets. As this allocates * a largish chunk of memory (32K), those who are not as concerned - * with dithering quality can decrease some or all of these. + * with quantizing quality can decrease some or all of these. */ -#ifndef PNG_DITHER_RED_BITS -# define PNG_DITHER_RED_BITS 5 + +/* Prior to libpng-1.4.2, these were PNG_DITHER_*_BITS + * These migration aids will be removed from libpng-1.5.0. + */ +#ifdef PNG_DITHER_RED_BITS +# define PNG_QUANTIZE_RED_BITS PNG_DITHER_RED_BITS #endif -#ifndef PNG_DITHER_GREEN_BITS -# define PNG_DITHER_GREEN_BITS 5 +#ifdef PNG_DITHER_GREEN_BITS +# define PNG_QUANTIZE_GREEN_BITS PNG_DITHER_GREEN_BITS #endif -#ifndef PNG_DITHER_BLUE_BITS -# define PNG_DITHER_BLUE_BITS 5 +#ifdef PNG_DITHER_BLUE_BITS +# define PNG_QUANTIZE_BLUE_BITS PNG_DITHER_BLUE_BITS +#endif + +#ifndef PNG_QUANTIZE_RED_BITS +# define PNG_QUANTIZE_RED_BITS 5 +#endif +#ifndef PNG_QUANTIZE_GREEN_BITS +# define PNG_QUANTIZE_GREEN_BITS 5 +#endif +#ifndef PNG_QUANTIZE_BLUE_BITS +# define PNG_QUANTIZE_BLUE_BITS 5 #endif /* This controls how fine the gamma correction becomes when you @@ -447,17 +437,17 @@ # define PNG_GAMMA_THRESHOLD 0.05 #endif -#endif /* PNG_INTERNAL */ - /* The following uses const char * instead of char * for error * and warning message functions, so some compilers won't complain. * If you do not want to use const, define PNG_NO_CONST here. */ -#ifndef PNG_NO_CONST -# define PNG_CONST const -#else -# define PNG_CONST +#ifndef PNG_CONST +# ifndef PNG_NO_CONST +# define PNG_CONST const +# else +# define PNG_CONST +# endif #endif /* The following defines give you the ability to remove code from the @@ -477,85 +467,25 @@ /* Any features you will not be using can be undef'ed here */ /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user - * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS - * on the compile line, then pick and choose which ones to define without - * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED + * to turn it off with PNG_NO_READ|WRITE_TRANSFORMS on the compile line, + * then pick and choose which ones to define without having to edit this + * file. It is safe to use the PNG_NO_READ|WRITE_TRANSFORMS * if you only want to have a png-compliant reader/writer but don't need * any of the extra transformations. This saves about 80 kbytes in a * typical installation of the library. (PNG_NO_* form added in version - * 1.0.1c, for consistency) + * 1.0.1c, for consistency; PNG_*_TRANSFORMS_NOT_SUPPORTED deprecated in + * 1.4.0) */ -/* The size of the png_text structure changed in libpng-1.0.6 when - * iTXt support was added. iTXt support was turned off by default through - * libpng-1.2.x, to support old apps that malloc the png_text structure - * instead of calling png_set_text() and letting libpng malloc it. It - * will be turned on by default in libpng-1.4.0. - */ - -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -# ifndef PNG_NO_iTXt_SUPPORTED -# define PNG_NO_iTXt_SUPPORTED -# endif -# ifndef PNG_NO_READ_iTXt -# define PNG_NO_READ_iTXt -# endif -# ifndef PNG_NO_WRITE_iTXt -# define PNG_NO_WRITE_iTXt -# endif -#endif - -#if !defined(PNG_NO_iTXt_SUPPORTED) -# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt) -# define PNG_READ_iTXt -# endif -# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt) -# define PNG_WRITE_iTXt -# endif -#endif - -/* The following support, added after version 1.0.0, can be turned off here en - * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility - * with old applications that require the length of png_struct and png_info - * to remain unchanged. - */ - -#ifdef PNG_LEGACY_SUPPORTED -# define PNG_NO_FREE_ME -# define PNG_NO_READ_UNKNOWN_CHUNKS -# define PNG_NO_WRITE_UNKNOWN_CHUNKS -# define PNG_NO_HANDLE_AS_UNKNOWN -# define PNG_NO_READ_USER_CHUNKS -# define PNG_NO_READ_iCCP -# define PNG_NO_WRITE_iCCP -# define PNG_NO_READ_iTXt -# define PNG_NO_WRITE_iTXt -# define PNG_NO_READ_sCAL -# define PNG_NO_WRITE_sCAL -# define PNG_NO_READ_sPLT -# define PNG_NO_WRITE_sPLT -# define PNG_NO_INFO_IMAGE -# define PNG_NO_READ_RGB_TO_GRAY -# define PNG_NO_READ_USER_TRANSFORM -# define PNG_NO_WRITE_USER_TRANSFORM -# define PNG_NO_USER_MEM -# define PNG_NO_READ_EMPTY_PLTE -# define PNG_NO_MNG_FEATURES -# define PNG_NO_FIXED_POINT_SUPPORTED -#endif - /* Ignore attempt to turn off both floating and fixed point support */ #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ !defined(PNG_NO_FIXED_POINT_SUPPORTED) # define PNG_FIXED_POINT_SUPPORTED #endif -#ifndef PNG_NO_FREE_ME -# define PNG_FREE_ME_SUPPORTED -#endif - #ifdef PNG_READ_SUPPORTED +/* PNG_READ_TRANSFORMS_NOT_SUPPORTED is deprecated. */ #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \ !defined(PNG_NO_READ_TRANSFORMS) # define PNG_READ_TRANSFORMS_SUPPORTED @@ -583,8 +513,11 @@ # ifndef PNG_NO_READ_INVERT # define PNG_READ_INVERT_SUPPORTED # endif -# ifndef PNG_NO_READ_DITHER -# define PNG_READ_DITHER_SUPPORTED +# ifndef PNG_NO_READ_QUANTIZE + /* Prior to libpng-1.4.0 this was PNG_READ_DITHER_SUPPORTED */ +# ifndef PNG_NO_READ_DITHER /* This migration aid will be removed */ +# define PNG_READ_QUANTIZE_SUPPORTED +# endif # endif # ifndef PNG_NO_READ_BACKGROUND # define PNG_READ_BACKGROUND_SUPPORTED @@ -618,33 +551,41 @@ # endif #endif /* PNG_READ_TRANSFORMS_SUPPORTED */ +/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */ #if !defined(PNG_NO_PROGRESSIVE_READ) && \ - !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive */ -# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ -#endif /* about interlacing capability! You'll */ - /* still have interlacing unless you change the following line: */ + !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */ +# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ +#endif /* about interlacing capability! You'll */ + /* still have interlacing unless you change the following define: */ -#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */ +#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ + +/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */ +#if !defined(PNG_NO_SEQUENTIAL_READ) && \ + !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \ + !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED) +# define PNG_SEQUENTIAL_READ_SUPPORTED +#endif #ifndef PNG_NO_READ_COMPOSITE_NODIV # ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */ -# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ +# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ # endif #endif -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -/* Deprecated, will be removed from version 2.0.0. - Use PNG_MNG_FEATURES_SUPPORTED instead. */ -#ifndef PNG_NO_READ_EMPTY_PLTE -# define PNG_READ_EMPTY_PLTE_SUPPORTED -#endif +#if !defined(PNG_NO_GET_INT_32) || defined(PNG_READ_oFFS_SUPPORTED) || \ + defined(PNG_READ_pCAL_SUPPORTED) +# ifndef PNG_GET_INT_32_SUPPORTED +# define PNG_GET_INT_32_SUPPORTED +# endif #endif #endif /* PNG_READ_SUPPORTED */ #ifdef PNG_WRITE_SUPPORTED -# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ +/* PNG_WRITE_TRANSFORMS_NOT_SUPPORTED is deprecated. */ +#if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ !defined(PNG_NO_WRITE_TRANSFORMS) # define PNG_WRITE_TRANSFORMS_SUPPORTED #endif @@ -684,9 +625,10 @@ #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \ !defined(PNG_WRITE_INTERLACING_SUPPORTED) -#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant - encoders, but can cause trouble - if left undefined */ + /* This is not required for PNG-compliant encoders, but can cause + * trouble if left undefined + */ +# define PNG_WRITE_INTERLACING_SUPPORTED #endif #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ @@ -699,20 +641,16 @@ # define PNG_WRITE_FLUSH_SUPPORTED #endif -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) -/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */ -#ifndef PNG_NO_WRITE_EMPTY_PLTE -# define PNG_WRITE_EMPTY_PLTE_SUPPORTED -#endif +#if !defined(PNG_NO_SAVE_INT_32) || defined(PNG_WRITE_oFFS_SUPPORTED) || \ + defined(PNG_WRITE_pCAL_SUPPORTED) +# ifndef PNG_SAVE_INT_32_SUPPORTED +# define PNG_SAVE_INT_32_SUPPORTED +# endif #endif #endif /* PNG_WRITE_SUPPORTED */ -#ifndef PNG_1_0_X -# ifndef PNG_NO_ERROR_NUMBERS -# define PNG_ERROR_NUMBERS_SUPPORTED -# endif -#endif /* PNG_1_0_X */ +#define PNG_NO_ERROR_NUMBERS #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) @@ -721,7 +659,7 @@ # endif #endif -#ifndef PNG_NO_STDIO +#if defined(PNG_STDIO_SUPPORTED) && !defined(PNG_TIME_RFC1123_SUPPORTED) # define PNG_TIME_RFC1123_SUPPORTED #endif @@ -745,65 +683,35 @@ # define PNG_EASY_ACCESS_SUPPORTED #endif -/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 - * and removed from version 1.2.20. The following will be removed - * from libpng-1.4.0 -*/ - -#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE) -# ifndef PNG_OPTIMIZED_CODE_SUPPORTED -# define PNG_OPTIMIZED_CODE_SUPPORTED -# endif -#endif - -#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE) -# ifndef PNG_ASSEMBLER_CODE_SUPPORTED -# define PNG_ASSEMBLER_CODE_SUPPORTED -# endif - -# if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4) - /* work around 64-bit gcc compiler bugs in gcc-3.x */ -# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) -# define PNG_NO_MMX_CODE -# endif -# endif - -# if defined(__APPLE__) -# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) -# define PNG_NO_MMX_CODE -# endif -# endif - -# if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh)) -# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) -# define PNG_NO_MMX_CODE -# endif -# endif - -# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) -# define PNG_MMX_CODE_SUPPORTED -# endif - -#endif -/* end of obsolete code to be removed from libpng-1.4.0 */ - -#if !defined(PNG_1_0_X) +/* Added at libpng-1.2.0 */ #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) # define PNG_USER_MEM_SUPPORTED #endif -#endif /* PNG_1_0_X */ /* Added at libpng-1.2.6 */ -#if !defined(PNG_1_0_X) -#ifndef PNG_SET_USER_LIMITS_SUPPORTED -#if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED) -# define PNG_SET_USER_LIMITS_SUPPORTED +#ifndef PNG_NO_SET_USER_LIMITS +# ifndef PNG_SET_USER_LIMITS_SUPPORTED +# define PNG_SET_USER_LIMITS_SUPPORTED +# endif + /* Feature added at libpng-1.4.0, this flag added at 1.4.1 */ +# ifndef PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +# define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +# endif + /* Feature added at libpng-1.4.1, this flag added at 1.4.1 */ +# ifndef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +# define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +# endif #endif -#endif -#endif /* PNG_1_0_X */ -/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter - * how large, set these limits to 0x7fffffffL +/* Added at libpng-1.2.43 */ +#ifndef PNG_USER_LIMITS_SUPPORTED +# ifndef PNG_NO_USER_LIMITS +# define PNG_USER_LIMITS_SUPPORTED +# endif +#endif + +/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter + * how large, set these two limits to 0x7fffffffL */ #ifndef PNG_USER_WIDTH_MAX # define PNG_USER_WIDTH_MAX 1000000L @@ -812,14 +720,39 @@ # define PNG_USER_HEIGHT_MAX 1000000L #endif -/* Added at libpng-1.2.34 and 1.4.0 */ +/* Added at libpng-1.2.43. To accept all valid PNGs no matter + * how large, set these two limits to 0. + */ +#ifndef PNG_USER_CHUNK_CACHE_MAX +# define PNG_USER_CHUNK_CACHE_MAX 0 +#endif + +/* Added at libpng-1.2.43 */ +#ifndef PNG_USER_CHUNK_MALLOC_MAX +# define PNG_USER_CHUNK_MALLOC_MAX 0 +#endif + +/* Added at libpng-1.4.0 */ +#if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED) +# define PNG_IO_STATE_SUPPORTED +#endif + +#ifndef PNG_LITERAL_SHARP +# define PNG_LITERAL_SHARP 0x23 +#endif +#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET +# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b +#endif +#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET +# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d +#endif #ifndef PNG_STRING_NEWLINE #define PNG_STRING_NEWLINE "\n" #endif /* These are currently experimental features, define them if you want */ -/* very little testing */ +/* Very little testing */ /* #ifdef PNG_READ_SUPPORTED # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED @@ -836,16 +769,17 @@ #endif */ -/* Buggy compilers (e.g., gcc 2.7.2.2) need this */ -/* -#define PNG_NO_POINTER_INDEXING -*/ +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# define PNG_USE_READ_MACROS +#endif + +/* Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING */ + +#if !defined(PNG_NO_POINTER_INDEXING) && \ + !defined(PNG_POINTER_INDEXING_SUPPORTED) +# define PNG_POINTER_INDEXING_SUPPORTED +#endif -/* These functions are turned off by default, as they will be phased out. */ -/* -#define PNG_USELESS_TESTS_SUPPORTED -#define PNG_CORRECT_PALETTE_SUPPORTED -*/ /* Any chunks you are not interested in, you can undef here. The * ones that allocate memory may be expecially important (hIST, @@ -853,12 +787,21 @@ * a bit smaller. */ +/* The size of the png_text structure changed in libpng-1.0.6 when + * iTXt support was added. iTXt support was turned off by default through + * libpng-1.2.x, to support old apps that malloc the png_text structure + * instead of calling png_set_text() and letting libpng malloc it. It + * was turned on by default in libpng-1.4.0. + */ + +/* PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */ #if defined(PNG_READ_SUPPORTED) && \ !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ !defined(PNG_NO_READ_ANCILLARY_CHUNKS) # define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED #endif +/* PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */ #if defined(PNG_WRITE_SUPPORTED) && \ !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS) @@ -872,6 +815,7 @@ # define PNG_NO_READ_tEXt # define PNG_NO_READ_zTXt #endif + #ifndef PNG_NO_READ_bKGD # define PNG_READ_bKGD_SUPPORTED # define PNG_bKGD_SUPPORTED @@ -956,23 +900,24 @@ #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ #ifndef PNG_NO_READ_UNKNOWN_CHUNKS -# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +# ifndef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +# endif # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED # define PNG_UNKNOWN_CHUNKS_SUPPORTED # endif -#endif -#if !defined(PNG_NO_READ_USER_CHUNKS) && \ - defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) -# define PNG_READ_USER_CHUNKS_SUPPORTED -# define PNG_USER_CHUNKS_SUPPORTED -# ifdef PNG_NO_READ_UNKNOWN_CHUNKS -# undef PNG_NO_READ_UNKNOWN_CHUNKS -# endif -# ifdef PNG_NO_HANDLE_AS_UNKNOWN -# undef PNG_NO_HANDLE_AS_UNKNOWN +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED +# define PNG_READ_USER_CHUNKS_SUPPORTED +# endif +#endif +#ifndef PNG_NO_READ_USER_CHUNKS +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED +# define PNG_READ_USER_CHUNKS_SUPPORTED +# endif +# ifndef PNG_USER_CHUNKS_SUPPORTED +# define PNG_USER_CHUNKS_SUPPORTED # endif #endif - #ifndef PNG_NO_HANDLE_AS_UNKNOWN # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED @@ -1099,15 +1044,31 @@ # endif #endif +#ifdef PNG_WRITE_tIME_SUPPORTED +# ifndef PNG_NO_CONVERT_tIME +# ifndef _WIN32_WCE +/* The "tm" structure is not supported on WindowsCE */ +# ifndef PNG_CONVERT_tIME_SUPPORTED +# define PNG_CONVERT_tIME_SUPPORTED +# endif +# endif +# endif +#endif + #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ +#ifndef PNG_NO_WRITE_FILTER +# ifndef PNG_WRITE_FILTER_SUPPORTED +# define PNG_WRITE_FILTER_SUPPORTED +# endif +#endif + #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED # define PNG_UNKNOWN_CHUNKS_SUPPORTED # endif #endif - #ifndef PNG_NO_HANDLE_AS_UNKNOWN # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED @@ -1123,12 +1084,10 @@ # define PNG_INFO_IMAGE_SUPPORTED #endif -/* need the time information for reading tIME chunks */ -#if defined(PNG_tIME_SUPPORTED) -# if !defined(_WIN32_WCE) +/* Need the time information for converting tIME chunks */ +#ifdef PNG_CONVERT_tIME_SUPPORTED /* "time.h" functions are not supported on WindowsCE */ # include -# endif #endif /* Some typedefs to get us started. These should be safe on most of the @@ -1136,28 +1095,29 @@ * numbers suggest (a png_uint_32 must be at least 32 bits long), but they * don't have to be exactly that size. Some compilers dislike passing * unsigned shorts as function parameters, so you may be better off using - * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may - * want to have unsigned int for png_uint_32 instead of unsigned long. + * unsigned int for png_uint_16. */ +#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL) typedef unsigned int png_uint_32; typedef int png_int_32; +#else +typedef unsigned long png_uint_32; +typedef long png_int_32; +#endif typedef unsigned short png_uint_16; typedef short png_int_16; typedef unsigned char png_byte; -/* This is usually size_t. It is typedef'ed just in case you need it to - change (I'm not sure if you will or not, so I thought I'd be safe) */ -#ifdef PNG_SIZE_T - typedef PNG_SIZE_T png_size_t; -# define png_sizeof(x) png_convert_size(sizeof(x)) +#ifdef PNG_NO_SIZE_T + typedef unsigned int png_size_t; #else typedef size_t png_size_t; -# define png_sizeof(x) sizeof(x) #endif +#define png_sizeof(x) sizeof(x) /* The following is needed for medium model support. It cannot be in the - * PNG_INTERNAL section. Needs modification for other compilers besides + * pngpriv.h header. Needs modification for other compilers besides * MSC. Model independent support declares all arrays and pointers to be * large using the far keyword. The zlib version used must also support * model independent data. As of version zlib 1.0.4, the necessary changes @@ -1166,7 +1126,8 @@ typedef unsigned char png_byte; */ /* Separate compiler dependencies (problem here is that zlib.h always - defines FAR. (SJT) */ + * defines FAR. (SJT) + */ #ifdef __BORLANDC__ # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) # define LDATA 1 @@ -1197,8 +1158,8 @@ typedef unsigned char png_byte; */ /* MSC Medium model */ -#if defined(FAR) -# if defined(M_I86MM) +#ifdef FAR +# ifdef M_I86MM # define USE_FAR_KEYWORD # define FARDATA FAR # include @@ -1231,12 +1192,8 @@ typedef char FAR * png_charp; typedef png_fixed_point FAR * png_fixed_point_p; #ifndef PNG_NO_STDIO -#if defined(_WIN32_WCE) -typedef HANDLE png_FILE_p; -#else typedef FILE * png_FILE_p; #endif -#endif #ifdef PNG_FLOATING_POINT_SUPPORTED typedef double FAR * png_doublep; @@ -1258,20 +1215,7 @@ typedef double FAR * FAR * png_doublepp; /* Pointers to pointers to pointers; i.e., pointer to array */ typedef char FAR * FAR * FAR * png_charppp; -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) -/* SPC - Is this stuff deprecated? */ -/* It'll be removed as of libpng-1.4.0 - GR-P */ -/* libpng typedefs for types in zlib. If zlib changes - * or another compression library is used, then change these. - * Eliminates need to change all the source files. - */ -typedef charf * png_zcharp; -typedef charf * FAR * png_zcharpp; -typedef z_stream FAR * png_zstreamp; -#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */ - -/* - * Define PNG_BUILD_DLL if the module being built is a Windows +/* Define PNG_BUILD_DLL if the module being built is a Windows * LIBPNG DLL. * * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL. @@ -1291,50 +1235,16 @@ typedef z_stream FAR * png_zstreamp; #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) # define PNG_DLL #endif -/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib. - * When building a static lib, default to no GLOBAL ARRAYS, but allow - * command-line override - */ -#if defined(__CYGWIN__) -# if !defined(PNG_STATIC) -# if defined(PNG_USE_GLOBAL_ARRAYS) -# undef PNG_USE_GLOBAL_ARRAYS -# endif -# if !defined(PNG_USE_LOCAL_ARRAYS) -# define PNG_USE_LOCAL_ARRAYS -# endif -# else -# if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS) -# if defined(PNG_USE_GLOBAL_ARRAYS) -# undef PNG_USE_GLOBAL_ARRAYS -# endif -# endif -# endif -# if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) -# define PNG_USE_LOCAL_ARRAYS -# endif -#endif -/* Do not use global arrays (helps with building DLL's) - * They are no longer used in libpng itself, since version 1.0.5c, - * but might be required for some pre-1.0.5c applications. - */ -#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) -# if defined(PNG_NO_GLOBAL_ARRAYS) || \ - (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER) -# define PNG_USE_LOCAL_ARRAYS -# else -# define PNG_USE_GLOBAL_ARRAYS -# endif -#endif - -#if defined(__CYGWIN__) +#ifdef __CYGWIN__ # undef PNGAPI # define PNGAPI __cdecl # undef PNG_IMPEXP # define PNG_IMPEXP #endif +#define PNG_USE_LOCAL_ARRAYS /* Not used in libpng, defined for legacy apps */ + /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", * you may get warnings regarding the linkage of png_zalloc and png_zfree. * Don't ignore those warnings; you must also reset the default calling @@ -1369,43 +1279,42 @@ typedef z_stream FAR * png_zstreamp; # define PNG_IMPEXP # endif -# if !defined(PNG_IMPEXP) +# ifndef PNG_IMPEXP -# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol -# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol +# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol +# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol - /* Borland/Microsoft */ -# if defined(_MSC_VER) || defined(__BORLANDC__) -# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) -# define PNG_EXPORT PNG_EXPORT_TYPE1 -# else -# define PNG_EXPORT PNG_EXPORT_TYPE2 -# if defined(PNG_BUILD_DLL) -# define PNG_IMPEXP __export -# else -# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in - VC++ */ -# endif /* Exists in Borland C++ for - C++ classes (== huge) */ -# endif -# endif + /* Borland/Microsoft */ +# if defined(_MSC_VER) || defined(__BORLANDC__) +# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) +# define PNG_EXPORT PNG_EXPORT_TYPE1 +# else +# define PNG_EXPORT PNG_EXPORT_TYPE2 +# ifdef PNG_BUILD_DLL +# define PNG_IMPEXP __export +# else +# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in VC++ */ +# endif /* Exists in Borland C++ for + C++ classes (== huge) */ +# endif +# endif -# if !defined(PNG_IMPEXP) -# if defined(PNG_BUILD_DLL) -# define PNG_IMPEXP __declspec(dllexport) -# else -# define PNG_IMPEXP __declspec(dllimport) -# endif -# endif +# ifndef PNG_IMPEXP +# ifdef PNG_BUILD_DLL +# define PNG_IMPEXP __declspec(dllexport) +# else +# define PNG_IMPEXP __declspec(dllimport) +# endif +# endif # endif /* PNG_IMPEXP */ #else /* !(DLL || non-cygwin WINDOWS) */ # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) -# ifndef PNGAPI -# define PNGAPI _System -# endif +# ifndef PNGAPI +# define PNGAPI _System +# endif # else -# if 0 /* ... other platforms, with other meanings */ -# endif +# if 0 /* ... other platforms, with other meanings */ +# endif # endif #endif @@ -1420,83 +1329,186 @@ typedef z_stream FAR * png_zstreamp; # ifndef PNG_EXPORT # define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END # endif -# ifdef PNG_USE_GLOBAL_ARRAYS -# ifndef PNG_EXPORT_VAR -# define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT -# endif -# endif #endif #ifndef PNG_EXPORT # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol #endif -#ifdef PNG_USE_GLOBAL_ARRAYS -# ifndef PNG_EXPORT_VAR -# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED # endif #endif -/* User may want to use these so they are not in PNG_INTERNAL. Any library - * functions that are passed far data must be model independent. +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. + */ +# ifdef __GNUC__ +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif + + /* This specifically protects structure members that should only be + * accessed from within the library, therefore should be empty during + * a library build. + */ +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif /* PNG_PRIVATE */ +# endif /* __GNUC__ */ +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif + +/* Users may want to use these so they are not private. Any library + * functions that are passed far data must be model-independent. */ +/* memory model/platform independent fns */ #ifndef PNG_ABORT - #if !defined(_WIN32_WCE ) - #define PNG_ABORT() abort() - #else - #define PNG_ABORT() - #endif +# ifdef _WINDOWS_ +# define PNG_ABORT() ExitProcess(0) +# else +# define PNG_ABORT() abort() +# endif #endif -#ifdef PNG_SETJMP_SUPPORTED -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#else -# define png_jmpbuf(png_ptr) \ - (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED) -#endif - -#if defined(USE_FAR_KEYWORD) /* memory model independent fns */ -/* use this to make far-to-near assignments */ +#ifdef USE_FAR_KEYWORD +/* Use this to make far-to-near assignments */ # define CHECK 1 # define NOCHECK 0 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) -# define png_snprintf _fsnprintf /* Added to v 1.2.19 */ +# define png_strcpy _fstrcpy +# define png_strncpy _fstrncpy /* Added to v 1.2.6 */ # define png_strlen _fstrlen # define png_memcmp _fmemcmp /* SJT: added */ # define png_memcpy _fmemcpy # define png_memset _fmemset -#else /* use the usual functions */ -# define CVT_PTR(ptr) (ptr) -# define CVT_PTR_NOCHECK(ptr) (ptr) -# ifndef PNG_NO_SNPRINTF -# ifdef _MSC_VER -# define png_snprintf _snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 _snprintf -# define png_snprintf6 _snprintf -# else -# define png_snprintf snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 snprintf -# define png_snprintf6 snprintf -# endif +# define png_sprintf sprintf +#else +# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ +# define CVT_PTR(ptr) (ptr) +# define CVT_PTR_NOCHECK(ptr) (ptr) +# define png_strcpy lstrcpyA +# define png_strncpy lstrcpynA +# define png_strlen lstrlenA +# define png_memcmp memcmp +# define png_memcpy CopyMemory +# define png_memset memset +# define png_sprintf wsprintfA # else - /* You don't have or don't want to use snprintf(). Caution: Using - * sprintf instead of snprintf exposes your application to accidental - * or malevolent buffer overflows. If you don't have snprintf() - * as a general rule you should provide one (you can get one from - * Portable OpenSSH). */ -# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) -# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2) -# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ - sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) +# define CVT_PTR(ptr) (ptr) +# define CVT_PTR_NOCHECK(ptr) (ptr) +# define png_strcpy strcpy +# define png_strncpy strncpy /* Added to v 1.2.6 */ +# define png_strlen strlen +# define png_memcmp memcmp /* SJT: added */ +# define png_memcpy memcpy +# define png_memset memset +# define png_sprintf sprintf +# ifndef PNG_NO_SNPRINTF +# ifdef _MSC_VER +# define png_snprintf _snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 _snprintf +# define png_snprintf6 _snprintf +# else +# define png_snprintf snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 snprintf +# define png_snprintf6 snprintf +# endif +# else + /* You don't have or don't want to use snprintf(). Caution: Using + * sprintf instead of snprintf exposes your application to accidental + * or malevolent buffer overflows. If you don't have snprintf() + * as a general rule you should provide one (you can get one from + * Portable OpenSSH). + */ +# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) +# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2) +# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ + sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) +# endif # endif -# define png_strlen strlen -# define png_memcmp memcmp /* SJT: added */ -# define png_memcpy memcpy -# define png_memset memset #endif -/* End of memory model independent support */ + +/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, + * and no smaller than png_uint_32. Casts from png_size_t or png_uint_32 + * to png_alloc_size_t are not necessary; in fact, it is recommended + * not to use them at all so that the compiler can complain when something + * turns out to be problematic. + * Casts in the other direction (from png_alloc_size_t to png_size_t or + * png_uint_32) should be explicitly applied; however, we do not expect + * to encounter practical situations that require such conversions. + */ +#if defined(__TURBOC__) && !defined(__FLAT__) +# define png_mem_alloc farmalloc +# define png_mem_free farfree + typedef unsigned long png_alloc_size_t; +#else +# if defined(_MSC_VER) && defined(MAXSEG_64K) +# define png_mem_alloc(s) halloc(s, 1) +# define png_mem_free hfree + typedef unsigned long png_alloc_size_t; +# else +# if defined(_WINDOWS_) && (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) +# define png_mem_alloc(s) HeapAlloc(GetProcessHeap(), 0, s) +# define png_mem_free(p) HeapFree(GetProcessHeap(), 0, p) + typedef DWORD png_alloc_size_t; +# else +# define png_mem_alloc malloc +# define png_mem_free free + typedef png_size_t png_alloc_size_t; +# endif +# endif +#endif +/* End of memory model/platform independent support */ /* Just a little check that someone hasn't tried to define something * contradictory. @@ -1506,6 +1518,7 @@ typedef z_stream FAR * png_zstreamp; # define PNG_ZBUF_SIZE 65536L #endif + /* Added at libpng-1.2.8 */ #endif /* PNG_VERSION_INFO_ONLY */ diff --git a/source/Irrlicht/libpng/pngerror.c b/source/Irrlicht/libpng/pngerror.c index 15d79102..bb02b276 100644 --- a/source/Irrlicht/libpng/pngerror.c +++ b/source/Irrlicht/libpng/pngerror.c @@ -1,8 +1,8 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 3, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,25 +16,26 @@ * at each function. */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +#include "pngpriv.h" static void /* PRIVATE */ png_default_error PNGARG((png_structp png_ptr, - png_const_charp error_message)); -#ifndef PNG_NO_WARNINGS + png_const_charp error_message)) PNG_NORETURN; +#ifdef PNG_WARNINGS_SUPPORTED static void /* PRIVATE */ png_default_warning PNGARG((png_structp png_ptr, png_const_charp warning_message)); -#endif /* PNG_NO_WARNINGS */ +#endif /* PNG_WARNINGS_SUPPORTED */ /* This function is called whenever there is a fatal error. This function * should not be changed. If there is a need to handle errors differently, * you should supply a replacement error function and use png_set_error_fn() * to replace the error function at run-time. */ -#ifndef PNG_NO_ERROR_TEXT +#ifdef PNG_ERROR_TEXT_SUPPORTED void PNGAPI png_error(png_structp png_ptr, png_const_charp error_message) { @@ -45,7 +46,7 @@ png_error(png_structp png_ptr, png_const_charp error_message) if (png_ptr->flags& (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) { - if (*error_message == '#') + if (*error_message == PNG_LITERAL_SHARP) { /* Strip "#nnnn " from beginning of error message. */ int offset; @@ -93,9 +94,9 @@ png_err(png_structp png_ptr) use the default handler, which will not return. */ png_default_error(png_ptr, '\0'); } -#endif /* PNG_NO_ERROR_TEXT */ +#endif /* PNG_ERROR_TEXT_SUPPORTED */ -#ifndef PNG_NO_WARNINGS +#ifdef PNG_WARNINGS_SUPPORTED /* This function is called whenever there is a non-fatal error. This function * should not be changed. If there is a need to handle warnings differently, * you should supply a replacement warning function and use @@ -112,7 +113,7 @@ png_warning(png_structp png_ptr, png_const_charp warning_message) (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) #endif { - if (*warning_message == '#') + if (*warning_message == PNG_LITERAL_SHARP) { for (offset = 1; offset < 15; offset++) if (warning_message[offset] == ' ') @@ -125,8 +126,18 @@ png_warning(png_structp png_ptr, png_const_charp warning_message) else png_default_warning(png_ptr, warning_message + offset); } -#endif /* PNG_NO_WARNINGS */ +#endif /* PNG_WARNINGS_SUPPORTED */ +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_benign_error(png_structp png_ptr, png_const_charp error_message) +{ + if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) + png_warning(png_ptr, error_message); + else + png_error(png_ptr, error_message); +} +#endif /* These utilities are used internally to build an error message that relates * to the current chunk. The chunk name comes from png_ptr->chunk_name, @@ -141,8 +152,7 @@ static PNG_CONST char png_digit[16] = { }; #define PNG_MAX_ERROR_TEXT 64 - -#if !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT) +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED) static void /* PRIVATE */ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp error_message) @@ -154,10 +164,10 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp int c = png_ptr->chunk_name[iin++]; if (isnonalpha(c)) { - buffer[iout++] = '['; + buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET; buffer[iout++] = png_digit[(c & 0xf0) >> 4]; buffer[iout++] = png_digit[c & 0x0f]; - buffer[iout++] = ']'; + buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET; } else { @@ -190,9 +200,9 @@ png_chunk_error(png_structp png_ptr, png_const_charp error_message) } } #endif /* PNG_READ_SUPPORTED */ -#endif /* !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT) */ +#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ -#ifndef PNG_NO_WARNINGS +#ifdef PNG_WARNINGS_SUPPORTED void PNGAPI png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) { @@ -205,8 +215,36 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) png_warning(png_ptr, msg); } } -#endif /* PNG_NO_WARNINGS */ +#endif /* PNG_WARNINGS_SUPPORTED */ +#ifdef PNG_READ_SUPPORTED +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message) +{ + if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) + png_chunk_warning(png_ptr, error_message); + else + png_chunk_error(png_ptr, error_message); +} +#endif +#endif /* PNG_READ_SUPPORTED */ + +#ifdef PNG_SETJMP_SUPPORTED +/* This API only exists if ANSI-C style error handling is used, + * otherwise it is necessary for png_default_error to be overridden. + */ +jmp_buf* PNGAPI +png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn, + size_t jmp_buf_size) +{ + if (png_ptr == NULL || jmp_buf_size != png_sizeof(jmp_buf)) + return NULL; + + png_ptr->longjmp_fn = longjmp_fn; + return &png_ptr->jmpbuf; +} +#endif /* This is the default error handling function. Note that replacements for * this function MUST NOT RETURN, or the program will likely crash. This @@ -216,9 +254,9 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) static void /* PRIVATE */ png_default_error(png_structp png_ptr, png_const_charp error_message) { -#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_CONSOLE_IO_SUPPORTED #ifdef PNG_ERROR_NUMBERS_SUPPORTED - if (*error_message == '#') + if (*error_message == PNG_LITERAL_SHARP) { /* Strip "#nnnn " from beginning of error message. */ int offset; @@ -252,27 +290,27 @@ png_default_error(png_structp png_ptr, png_const_charp error_message) #endif #ifdef PNG_SETJMP_SUPPORTED - if (png_ptr) + if (png_ptr && png_ptr->longjmp_fn) { # ifdef USE_FAR_KEYWORD { jmp_buf jmpbuf; png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf)); - longjmp(jmpbuf, 1); + png_ptr->longjmp_fn(jmpbuf, 1); } # else - longjmp(png_ptr->jmpbuf, 1); + png_ptr->longjmp_fn(png_ptr->jmpbuf, 1); # endif } -#else - PNG_ABORT(); #endif -#ifdef PNG_NO_CONSOLE_IO + /* Here if not setjmp support or if png_ptr is null. */ + PNG_ABORT(); +#ifndef PNG_CONSOLE_IO_SUPPORTED error_message = error_message; /* Make compiler happy */ #endif } -#ifndef PNG_NO_WARNINGS +#ifdef PNG_WARNINGS_SUPPORTED /* This function is called when there is a warning, but the library thinks * it can continue anyway. Replacement functions don't have to do anything * here if you don't want them to. In the default configuration, png_ptr is @@ -281,9 +319,9 @@ png_default_error(png_structp png_ptr, png_const_charp error_message) static void /* PRIVATE */ png_default_warning(png_structp png_ptr, png_const_charp warning_message) { -#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_CONSOLE_IO_SUPPORTED # ifdef PNG_ERROR_NUMBERS_SUPPORTED - if (*warning_message == '#') + if (*warning_message == PNG_LITERAL_SHARP) { int offset; char warning_number[16]; @@ -318,7 +356,7 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message) #endif png_ptr = png_ptr; /* Make compiler happy */ } -#endif /* PNG_NO_WARNINGS */ +#endif /* PNG_WARNINGS_SUPPORTED */ /* This function is called when the application wants to use another method * of handling errors and warnings. Note that the error function MUST NOT diff --git a/source/Irrlicht/libpng/pnggccrd.c b/source/Irrlicht/libpng/pnggccrd.c deleted file mode 100644 index 6d932abf..00000000 --- a/source/Irrlicht/libpng/pnggccrd.c +++ /dev/null @@ -1,103 +0,0 @@ -/* pnggccrd.c was removed from libpng-1.2.20. */ - -/* This code snippet is for use by configure's compilation test. */ - -#if (!defined _MSC_VER) && \ - defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \ - defined(PNG_MMX_CODE_SUPPORTED) - -int PNGAPI png_dummy_mmx_support(void); - -static int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested - -int PNGAPI -png_dummy_mmx_support(void) __attribute__((noinline)); - -int PNGAPI -png_dummy_mmx_support(void) -{ - int result; -#if defined(PNG_MMX_CODE_SUPPORTED) // superfluous, but what the heck - __asm__ __volatile__ ( -#if defined(__x86_64__) - "pushq %%rbx \n\t" // rbx gets clobbered by CPUID instruction - "pushq %%rcx \n\t" // so does rcx... - "pushq %%rdx \n\t" // ...and rdx (but rcx & rdx safe on Linux) - "pushfq \n\t" // save Eflag to stack - "popq %%rax \n\t" // get Eflag from stack into rax - "movq %%rax, %%rcx \n\t" // make another copy of Eflag in rcx - "xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21) - "pushq %%rax \n\t" // save modified Eflag back to stack - "popfq \n\t" // restore modified value to Eflag reg - "pushfq \n\t" // save Eflag to stack - "popq %%rax \n\t" // get Eflag from stack - "pushq %%rcx \n\t" // save original Eflag to stack - "popfq \n\t" // restore original Eflag -#else - "pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction - "pushl %%ecx \n\t" // so does ecx... - "pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux) - "pushfl \n\t" // save Eflag to stack - "popl %%eax \n\t" // get Eflag from stack into eax - "movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx - "xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21) - "pushl %%eax \n\t" // save modified Eflag back to stack - "popfl \n\t" // restore modified value to Eflag reg - "pushfl \n\t" // save Eflag to stack - "popl %%eax \n\t" // get Eflag from stack - "pushl %%ecx \n\t" // save original Eflag to stack - "popfl \n\t" // restore original Eflag -#endif - "xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag - "jz 0f \n\t" // if same, CPUID instr. is not supported - - "xorl %%eax, %%eax \n\t" // set eax to zero -// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode) - "cpuid \n\t" // get the CPU identification info - "cmpl $1, %%eax \n\t" // make sure eax return non-zero value - "jl 0f \n\t" // if eax is zero, MMX is not supported - - "xorl %%eax, %%eax \n\t" // set eax to zero and... - "incl %%eax \n\t" // ...increment eax to 1. This pair is - // faster than the instruction "mov eax, 1" - "cpuid \n\t" // get the CPU identification info again - "andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23) - "cmpl $0, %%edx \n\t" // 0 = MMX not supported - "jz 0f \n\t" // non-zero = yes, MMX IS supported - - "movl $1, %%eax \n\t" // set return value to 1 - "jmp 1f \n\t" // DONE: have MMX support - - "0: \n\t" // .NOT_SUPPORTED: target label for jump instructions - "movl $0, %%eax \n\t" // set return value to 0 - "1: \n\t" // .RETURN: target label for jump instructions -#if defined(__x86_64__) - "popq %%rdx \n\t" // restore rdx - "popq %%rcx \n\t" // restore rcx - "popq %%rbx \n\t" // restore rbx -#else - "popl %%edx \n\t" // restore edx - "popl %%ecx \n\t" // restore ecx - "popl %%ebx \n\t" // restore ebx -#endif - -// "ret \n\t" // DONE: no MMX support - // (fall through to standard C "ret") - - : "=a" (result) // output list - - : // any variables used on input (none) - - // no clobber list -// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually -// , "memory" // if write to a variable gcc thought was in a reg -// , "cc" // "condition codes" (flag bits) - ); - _mmx_supported = result; -#else - _mmx_supported = 0; -#endif /* PNG_MMX_CODE_SUPPORTED */ - - return _mmx_supported; -} -#endif diff --git a/source/Irrlicht/libpng/pngget.c b/source/Irrlicht/libpng/pngget.c index a2da6990..2a43a4d4 100644 --- a/source/Irrlicht/libpng/pngget.c +++ b/source/Irrlicht/libpng/pngget.c @@ -1,8 +1,8 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.2 [May 6, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -12,9 +12,10 @@ * */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +#include "pngpriv.h" png_uint_32 PNGAPI png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) @@ -26,7 +27,7 @@ png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) return(0); } -png_uint_32 PNGAPI +png_size_t PNGAPI png_get_rowbytes(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) @@ -36,7 +37,7 @@ png_get_rowbytes(png_structp png_ptr, png_infop info_ptr) return(0); } -#if defined(PNG_INFO_IMAGE_SUPPORTED) +#ifdef PNG_INFO_IMAGE_SUPPORTED png_bytepp PNGAPI png_get_rows(png_structp png_ptr, png_infop info_ptr) { @@ -117,7 +118,7 @@ png_uint_32 PNGAPI png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED if (info_ptr->valid & PNG_INFO_pHYs) { png_debug1(1, "in %s retrieval function", "png_get_x_pixels_per_meter"); @@ -138,7 +139,7 @@ png_uint_32 PNGAPI png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED if (info_ptr->valid & PNG_INFO_pHYs) { png_debug1(1, "in %s retrieval function", "png_get_y_pixels_per_meter"); @@ -159,7 +160,7 @@ png_uint_32 PNGAPI png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED if (info_ptr->valid & PNG_INFO_pHYs) { png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter"); @@ -182,13 +183,15 @@ float PNGAPI png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED if (info_ptr->valid & PNG_INFO_pHYs) { png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio"); + if (info_ptr->x_pixels_per_unit == 0) return ((float)0.0); + else return ((float)((float)info_ptr->y_pixels_per_unit /(float)info_ptr->x_pixels_per_unit)); @@ -204,7 +207,7 @@ png_int_32 PNGAPI png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED if (info_ptr->valid & PNG_INFO_oFFs) { @@ -227,7 +230,7 @@ png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED if (info_ptr->valid & PNG_INFO_oFFs) { png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns"); @@ -249,7 +252,7 @@ png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED if (info_ptr->valid & PNG_INFO_oFFs) { png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns"); @@ -271,7 +274,7 @@ png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED if (info_ptr->valid & PNG_INFO_oFFs) { png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns"); @@ -324,7 +327,7 @@ png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr) *.00003937); } -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED png_uint_32 PNGAPI png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) @@ -334,6 +337,7 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) { png_debug1(1, "in %s retrieval function", "pHYs"); + if (res_x != NULL) { *res_x = info_ptr->x_pixels_per_unit; @@ -382,7 +386,7 @@ png_get_signature(png_structp png_ptr, png_infop info_ptr) return (NULL); } -#if defined(PNG_bKGD_SUPPORTED) +#ifdef PNG_bKGD_SUPPORTED png_uint_32 PNGAPI png_get_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p *background) @@ -391,6 +395,7 @@ png_get_bKGD(png_structp png_ptr, png_infop info_ptr, && background != NULL) { png_debug1(1, "in %s retrieval function", "bKGD"); + *background = &(info_ptr->background); return (PNG_INFO_bKGD); } @@ -398,7 +403,7 @@ png_get_bKGD(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED png_uint_32 PNGAPI png_get_cHRM(png_structp png_ptr, png_infop info_ptr, @@ -408,6 +413,7 @@ png_get_cHRM(png_structp png_ptr, png_infop info_ptr, if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) { png_debug1(1, "in %s retrieval function", "cHRM"); + if (white_x != NULL) *white_x = (double)info_ptr->x_white; if (white_y != NULL) @@ -436,9 +442,10 @@ png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, png_fixed_point *blue_x, png_fixed_point *blue_y) { + png_debug1(1, "in %s retrieval function", "cHRM"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) { - png_debug1(1, "in %s retrieval function", "cHRM"); if (white_x != NULL) *white_x = info_ptr->int_x_white; if (white_y != NULL) @@ -462,15 +469,16 @@ png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, #endif #endif -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED png_uint_32 PNGAPI png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma) { + png_debug1(1, "in %s retrieval function", "gAMA"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) && file_gamma != NULL) { - png_debug1(1, "in %s retrieval function", "gAMA"); *file_gamma = (double)info_ptr->gamma; return (PNG_INFO_gAMA); } @@ -482,10 +490,11 @@ png_uint_32 PNGAPI png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_file_gamma) { + png_debug1(1, "in %s retrieval function", "gAMA"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) && int_file_gamma != NULL) { - png_debug1(1, "in %s retrieval function", "gAMA"); *int_file_gamma = info_ptr->int_gamma; return (PNG_INFO_gAMA); } @@ -494,14 +503,15 @@ png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, #endif #endif -#if defined(PNG_sRGB_SUPPORTED) +#ifdef PNG_sRGB_SUPPORTED png_uint_32 PNGAPI png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent) { + png_debug1(1, "in %s retrieval function", "sRGB"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB) && file_srgb_intent != NULL) { - png_debug1(1, "in %s retrieval function", "sRGB"); *file_srgb_intent = (int)info_ptr->srgb_intent; return (PNG_INFO_sRGB); } @@ -509,16 +519,17 @@ png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent) } #endif -#if defined(PNG_iCCP_SUPPORTED) +#ifdef PNG_iCCP_SUPPORTED png_uint_32 PNGAPI png_get_iCCP(png_structp png_ptr, png_infop info_ptr, png_charpp name, int *compression_type, png_charpp profile, png_uint_32 *proflen) { + png_debug1(1, "in %s retrieval function", "iCCP"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP) && name != NULL && profile != NULL && proflen != NULL) { - png_debug1(1, "in %s retrieval function", "iCCP"); *name = info_ptr->iccp_name; *profile = info_ptr->iccp_profile; /* Compression_type is a dummy so the API won't have to change @@ -532,7 +543,7 @@ png_get_iCCP(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_sPLT_SUPPORTED) +#ifdef PNG_sPLT_SUPPORTED png_uint_32 PNGAPI png_get_sPLT(png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp spalettes) @@ -546,14 +557,15 @@ png_get_sPLT(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_hIST_SUPPORTED) +#ifdef PNG_hIST_SUPPORTED png_uint_32 PNGAPI png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist) { + png_debug1(1, "in %s retrieval function", "hIST"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) && hist != NULL) { - png_debug1(1, "in %s retrieval function", "hIST"); *hist = info_ptr->hist; return (PNG_INFO_hIST); } @@ -568,62 +580,48 @@ png_get_IHDR(png_structp png_ptr, png_infop info_ptr, int *filter_type) { - if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL && - bit_depth != NULL && color_type != NULL) - { - png_debug1(1, "in %s retrieval function", "IHDR"); - *width = info_ptr->width; - *height = info_ptr->height; - *bit_depth = info_ptr->bit_depth; - if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16) - png_error(png_ptr, "Invalid bit depth"); + png_debug1(1, "in %s retrieval function", "IHDR"); - *color_type = info_ptr->color_type; + if (png_ptr == NULL || info_ptr == NULL || width == NULL || + height == NULL || bit_depth == NULL || color_type == NULL) + return (0); - if (info_ptr->color_type > 6) - png_error(png_ptr, "Invalid color type"); + *width = info_ptr->width; + *height = info_ptr->height; + *bit_depth = info_ptr->bit_depth; + *color_type = info_ptr->color_type; - if (compression_type != NULL) - *compression_type = info_ptr->compression_type; + if (compression_type != NULL) + *compression_type = info_ptr->compression_type; - if (filter_type != NULL) - *filter_type = info_ptr->filter_type; + if (filter_type != NULL) + *filter_type = info_ptr->filter_type; - if (interlace_type != NULL) - *interlace_type = info_ptr->interlace_type; + if (interlace_type != NULL) + *interlace_type = info_ptr->interlace_type; - /* Check for potential overflow of rowbytes */ - if (*width == 0 || *width > PNG_UINT_31_MAX) - png_error(png_ptr, "Invalid image width"); + /* This is redundant if we can be sure that the info_ptr values were all + * assigned in png_set_IHDR(). We do the check anyhow in case an + * application has ignored our advice not to mess with the members + * of info_ptr directly. + */ + png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type, + info_ptr->compression_type, info_ptr->filter_type); - if (*height == 0 || *height > PNG_UINT_31_MAX) - png_error(png_ptr, "Invalid image height"); - - if (info_ptr->width > (PNG_UINT_32_MAX - >> 3) /* 8-byte RGBA pixels */ - - 64 /* bigrowbuf hack */ - - 1 /* filter byte */ - - 7*8 /* rounding of width to multiple of 8 pixels */ - - 8) /* extra max_pixel_depth pad */ - { - png_warning(png_ptr, - "Width too large for libpng to process image data."); - } - - return (1); - } - return (0); + return (1); } -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED png_uint_32 PNGAPI png_get_oFFs(png_structp png_ptr, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type) { + png_debug1(1, "in %s retrieval function", "oFFs"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs) && offset_x != NULL && offset_y != NULL && unit_type != NULL) { - png_debug1(1, "in %s retrieval function", "oFFs"); *offset_x = info_ptr->x_offset; *offset_y = info_ptr->y_offset; *unit_type = (int)info_ptr->offset_unit_type; @@ -633,17 +631,18 @@ png_get_oFFs(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_pCAL_SUPPORTED) +#ifdef PNG_pCAL_SUPPORTED png_uint_32 PNGAPI png_get_pCAL(png_structp png_ptr, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params) { + png_debug1(1, "in %s retrieval function", "pCAL"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL) && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL && nparams != NULL && units != NULL && params != NULL) { - png_debug1(1, "in %s retrieval function", "pCAL"); *purpose = info_ptr->pcal_purpose; *X0 = info_ptr->pcal_X0; *X1 = info_ptr->pcal_X1; @@ -657,7 +656,7 @@ png_get_pCAL(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED png_uint_32 PNGAPI png_get_sCAL(png_structp png_ptr, png_infop info_ptr, @@ -693,18 +692,18 @@ png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr, #endif #endif -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED png_uint_32 PNGAPI png_get_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) { png_uint_32 retval = 0; + png_debug1(1, "in %s retrieval function", "pHYs"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) { - png_debug1(1, "in %s retrieval function", "pHYs"); - if (res_x != NULL) { *res_x = info_ptr->x_pixels_per_unit; @@ -731,10 +730,11 @@ png_uint_32 PNGAPI png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette) { + png_debug1(1, "in %s retrieval function", "PLTE"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE) && palette != NULL) { - png_debug1(1, "in %s retrieval function", "PLTE"); *palette = info_ptr->palette; *num_palette = info_ptr->num_palette; png_debug1(3, "num_palette = %d", *num_palette); @@ -743,14 +743,15 @@ png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, return (0); } -#if defined(PNG_sBIT_SUPPORTED) +#ifdef PNG_sBIT_SUPPORTED png_uint_32 PNGAPI png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit) { + png_debug1(1, "in %s retrieval function", "sBIT"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT) && sig_bit != NULL) { - png_debug1(1, "in %s retrieval function", "sBIT"); *sig_bit = &(info_ptr->sig_bit); return (PNG_INFO_sBIT); } @@ -758,7 +759,7 @@ png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit) } #endif -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED png_uint_32 PNGAPI png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text) @@ -783,14 +784,15 @@ png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, } #endif -#if defined(PNG_tIME_SUPPORTED) +#ifdef PNG_tIME_SUPPORTED png_uint_32 PNGAPI png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time) { + png_debug1(1, "in %s retrieval function", "tIME"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME) && mod_time != NULL) { - png_debug1(1, "in %s retrieval function", "tIME"); *mod_time = &(info_ptr->mod_time); return (PNG_INFO_tIME); } @@ -798,36 +800,37 @@ png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time) } #endif -#if defined(PNG_tRNS_SUPPORTED) +#ifdef PNG_tRNS_SUPPORTED png_uint_32 PNGAPI png_get_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep *trans, int *num_trans, png_color_16p *trans_values) + png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color) { png_uint_32 retval = 0; if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) { png_debug1(1, "in %s retrieval function", "tRNS"); + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { - if (trans != NULL) + if (trans_alpha != NULL) { - *trans = info_ptr->trans; + *trans_alpha = info_ptr->trans_alpha; retval |= PNG_INFO_tRNS; } - if (trans_values != NULL) - *trans_values = &(info_ptr->trans_values); + if (trans_color != NULL) + *trans_color = &(info_ptr->trans_color); } else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */ { - if (trans_values != NULL) + if (trans_color != NULL) { - *trans_values = &(info_ptr->trans_values); + *trans_color = &(info_ptr->trans_color); retval |= PNG_INFO_tRNS; } - if (trans != NULL) - *trans = NULL; + if (trans_alpha != NULL) + *trans_alpha = NULL; } if (num_trans != NULL) { @@ -839,7 +842,7 @@ png_get_tRNS(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED png_uint_32 PNGAPI png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp unknowns) @@ -853,7 +856,7 @@ png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED png_byte PNGAPI png_get_rgb_to_gray_status (png_structp png_ptr) { @@ -861,7 +864,7 @@ png_get_rgb_to_gray_status (png_structp png_ptr) } #endif -#if defined(PNG_USER_CHUNKS_SUPPORTED) +#ifdef PNG_USER_CHUNKS_SUPPORTED png_voidp PNGAPI png_get_user_chunk_ptr(png_structp png_ptr) { @@ -869,64 +872,16 @@ png_get_user_chunk_ptr(png_structp png_ptr) } #endif -#ifdef PNG_WRITE_SUPPORTED -png_uint_32 PNGAPI +png_size_t PNGAPI png_get_compression_buffer_size(png_structp png_ptr) { - return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L); -} -#endif - -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED -#ifndef PNG_1_0_X -/* This function was added to libpng 1.2.0 and should exist by default */ -png_uint_32 PNGAPI -png_get_asm_flags (png_structp png_ptr) -{ - /* Obsolete, to be removed from libpng-1.4.0 */ - return (png_ptr? 0L: 0L); + return (png_ptr ? png_ptr->zbuf_size : 0L); } -/* This function was added to libpng 1.2.0 and should exist by default */ -png_uint_32 PNGAPI -png_get_asm_flagmask (int flag_select) -{ - /* Obsolete, to be removed from libpng-1.4.0 */ - flag_select=flag_select; - return 0L; -} - - /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */ -/* This function was added to libpng 1.2.0 */ -png_uint_32 PNGAPI -png_get_mmx_flagmask (int flag_select, int *compilerID) -{ - /* Obsolete, to be removed from libpng-1.4.0 */ - flag_select=flag_select; - *compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */ - return 0L; -} - -/* This function was added to libpng 1.2.0 */ -png_byte PNGAPI -png_get_mmx_bitdepth_threshold (png_structp png_ptr) -{ - /* Obsolete, to be removed from libpng-1.4.0 */ - return (png_ptr? 0: 0); -} - -/* This function was added to libpng 1.2.0 */ -png_uint_32 PNGAPI -png_get_mmx_rowbytes_threshold (png_structp png_ptr) -{ - /* Obsolete, to be removed from libpng-1.4.0 */ - return (png_ptr? 0L: 0L); -} -#endif /* ?PNG_1_0_X */ -#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED -/* These functions were added to libpng 1.2.6 */ +/* These functions were added to libpng 1.2.6 and were enabled + * by default in libpng-1.4.0 */ png_uint_32 PNGAPI png_get_user_width_max (png_structp png_ptr) { @@ -937,7 +892,34 @@ png_get_user_height_max (png_structp png_ptr) { return (png_ptr? png_ptr->user_height_max : 0); } +/* This function was added to libpng 1.4.0 */ +png_uint_32 PNGAPI +png_get_chunk_cache_max (png_structp png_ptr) +{ + return (png_ptr? png_ptr->user_chunk_cache_max : 0); +} +/* This function was added to libpng 1.4.1 */ +png_alloc_size_t PNGAPI +png_get_chunk_malloc_max (png_structp png_ptr) +{ + return (png_ptr? + png_ptr->user_chunk_malloc_max : 0); +} #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ +/* These functions were added to libpng 1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +png_uint_32 PNGAPI +png_get_io_state (png_structp png_ptr) +{ + return png_ptr->io_state; +} + +png_bytep PNGAPI +png_get_io_chunk_name (png_structp png_ptr) +{ + return png_ptr->chunk_name; +} +#endif /* ?PNG_IO_STATE_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/source/Irrlicht/libpng/pngmem.c b/source/Irrlicht/libpng/pngmem.c index 401b0bc3..a7a79ab1 100644 --- a/source/Irrlicht/libpng/pngmem.c +++ b/source/Irrlicht/libpng/pngmem.c @@ -1,8 +1,8 @@ /* pngmem.c - stub functions for memory allocation * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.2 [May 6, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -17,9 +17,10 @@ * identify the replacement functions. */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +#include "pngpriv.h" /* Borland DOS special memory handler */ #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) @@ -31,7 +32,7 @@ png_voidp /* PRIVATE */ png_create_struct(int type) { #ifdef PNG_USER_MEM_SUPPORTED - return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL)); + return (png_create_struct_2(type, NULL, NULL)); } /* Alternate version of png_create_struct, for use with user-defined malloc. */ @@ -70,7 +71,7 @@ void /* PRIVATE */ png_destroy_struct(png_voidp struct_ptr) { #ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL); + png_destroy_struct_2(struct_ptr, NULL, NULL); } /* Free memory allocated by a png_create_struct() call */ @@ -114,9 +115,19 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, * result, we would be truncating potentially larger memory requests * (which should cause a fatal error) and introducing major problems. */ +png_voidp PNGAPI +png_calloc(png_structp png_ptr, png_alloc_size_t size) +{ + png_voidp ret; + + ret = (png_malloc(png_ptr, size)); + if (ret != NULL) + png_memset(ret,0,(png_size_t)size); + return (ret); +} png_voidp PNGAPI -png_malloc(png_structp png_ptr, png_uint_32 size) +png_malloc(png_structp png_ptr, png_alloc_size_t size) { png_voidp ret; @@ -129,12 +140,12 @@ png_malloc(png_structp png_ptr, png_uint_32 size) else ret = (png_malloc_default(png_ptr, size)); if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of memory!"); + png_error(png_ptr, "Out of memory"); return (ret); } png_voidp PNGAPI -png_malloc_default(png_structp png_ptr, png_uint_32 size) +png_malloc_default(png_structp png_ptr, png_alloc_size_t size) { png_voidp ret; #endif /* PNG_USER_MEM_SUPPORTED */ @@ -190,9 +201,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size) { #ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */ + png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */ else - png_warning(png_ptr, "Out Of Memory."); + png_warning(png_ptr, "Out Of Memory"); #endif return (NULL); } @@ -218,9 +229,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size) { #ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */ + png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */ else - png_warning(png_ptr, "Out Of memory."); + png_warning(png_ptr, "Out Of memory"); #endif return (NULL); } @@ -247,9 +258,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size) { #ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */ + png_error(png_ptr, "Out of Memory"); /* Note "o" and "M" */ else - png_warning(png_ptr, "Out of Memory."); + png_warning(png_ptr, "Out of Memory"); #endif return (NULL); } @@ -263,9 +274,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size) if (ret == NULL) { if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */ + png_error(png_ptr, "Out of memory"); /* Note "o" and "m" */ else - png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */ + png_warning(png_ptr, "Out of memory"); /* Note "o" and "m" */ } #endif @@ -337,7 +348,7 @@ png_voidp /* PRIVATE */ png_create_struct(int type) { #ifdef PNG_USER_MEM_SUPPORTED - return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL)); + return (png_create_struct_2(type, NULL, NULL)); } /* Allocate memory for a png_struct or a png_info. The malloc and @@ -391,7 +402,7 @@ void /* PRIVATE */ png_destroy_struct(png_voidp struct_ptr) { #ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL); + png_destroy_struct_2(struct_ptr, NULL, NULL); } /* Free memory allocated by a png_create_struct() call */ @@ -431,9 +442,19 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, * have the ability to do that. */ +png_voidp PNGAPI +png_calloc(png_structp png_ptr, png_alloc_size_t size) +{ + png_voidp ret; + + ret = (png_malloc(png_ptr, size)); + if (ret != NULL) + png_memset(ret,0,(png_size_t)size); + return (ret); +} png_voidp PNGAPI -png_malloc(png_structp png_ptr, png_uint_32 size) +png_malloc(png_structp png_ptr, png_alloc_size_t size) { png_voidp ret; @@ -446,12 +467,12 @@ png_malloc(png_structp png_ptr, png_uint_32 size) else ret = (png_malloc_default(png_ptr, size)); if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory!"); + png_error(png_ptr, "Out of Memory"); return (ret); } png_voidp PNGAPI -png_malloc_default(png_structp png_ptr, png_uint_32 size) +png_malloc_default(png_structp png_ptr, png_alloc_size_t size) { png_voidp ret; #endif /* PNG_USER_MEM_SUPPORTED */ @@ -538,16 +559,13 @@ png_free_default(png_structp png_ptr, png_voidp ptr) #endif /* Not Borland DOS special memory handler */ -#if defined(PNG_1_0_X) -# define png_malloc_warn png_malloc -#else /* This function was added at libpng version 1.2.3. The png_malloc_warn() * function will set up png_malloc() to issue a png_warning and return NULL * instead of issuing a png_error, if it fails to allocate the requested * memory. */ png_voidp PNGAPI -png_malloc_warn(png_structp png_ptr, png_uint_32 size) +png_malloc_warn(png_structp png_ptr, png_alloc_size_t size) { png_voidp ptr; png_uint_32 save_flags; @@ -560,34 +578,7 @@ png_malloc_warn(png_structp png_ptr, png_uint_32 size) png_ptr->flags=save_flags; return(ptr); } -#endif -png_voidp PNGAPI -png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2, - png_uint_32 length) -{ - png_size_t size; - - size = (png_size_t)length; - if ((png_uint_32)size != length) - png_error(png_ptr, "Overflow in png_memcpy_check."); - - return(png_memcpy (s1, s2, size)); -} - -png_voidp PNGAPI -png_memset_check (png_structp png_ptr, png_voidp s1, int value, - png_uint_32 length) -{ - png_size_t size; - - size = (png_size_t)length; - if ((png_uint_32)size != length) - png_error(png_ptr, "Overflow in png_memset_check."); - - return (png_memset (s1, value, size)); - -} #ifdef PNG_USER_MEM_SUPPORTED /* This function is called when the application wants to use another method diff --git a/source/Irrlicht/libpng/pngpread.c b/source/Irrlicht/libpng/pngpread.c index 3db60f67..ed5d82c6 100644 --- a/source/Irrlicht/libpng/pngpread.c +++ b/source/Irrlicht/libpng/pngpread.c @@ -1,8 +1,8 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.2.38 [July 16, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.3 [June 26, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,9 +11,10 @@ * and license in png.h */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_PROGRESSIVE_READ_SUPPORTED +#include "pngpriv.h" /* Push model modes */ #define PNG_READ_SIG_MODE 0 @@ -70,7 +71,7 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr) break; } -#if defined(PNG_READ_tEXt_SUPPORTED) +#ifdef PNG_READ_tEXt_SUPPORTED case PNG_READ_tEXt_MODE: { png_push_read_tEXt(png_ptr, info_ptr); @@ -78,7 +79,7 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_zTXt_SUPPORTED) +#ifdef PNG_READ_zTXt_SUPPORTED case PNG_READ_zTXt_MODE: { png_push_read_zTXt(png_ptr, info_ptr); @@ -86,7 +87,7 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_iTXt_SUPPORTED) +#ifdef PNG_READ_iTXt_SUPPORTED case PNG_READ_iTXt_MODE: { png_push_read_iTXt(png_ptr, info_ptr); @@ -149,63 +150,62 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr) void /* PRIVATE */ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_CONST PNG_IHDR; - PNG_CONST PNG_IDAT; - PNG_CONST PNG_IEND; - PNG_CONST PNG_PLTE; -#if defined(PNG_READ_bKGD_SUPPORTED) - PNG_CONST PNG_bKGD; + PNG_IHDR; + PNG_IDAT; + PNG_IEND; + PNG_PLTE; +#ifdef PNG_READ_bKGD_SUPPORTED + PNG_bKGD; #endif -#if defined(PNG_READ_cHRM_SUPPORTED) - PNG_CONST PNG_cHRM; +#ifdef PNG_READ_cHRM_SUPPORTED + PNG_cHRM; #endif -#if defined(PNG_READ_gAMA_SUPPORTED) - PNG_CONST PNG_gAMA; +#ifdef PNG_READ_gAMA_SUPPORTED + PNG_gAMA; #endif -#if defined(PNG_READ_hIST_SUPPORTED) - PNG_CONST PNG_hIST; +#ifdef PNG_READ_hIST_SUPPORTED + PNG_hIST; #endif -#if defined(PNG_READ_iCCP_SUPPORTED) - PNG_CONST PNG_iCCP; +#ifdef PNG_READ_iCCP_SUPPORTED + PNG_iCCP; #endif -#if defined(PNG_READ_iTXt_SUPPORTED) - PNG_CONST PNG_iTXt; +#ifdef PNG_READ_iTXt_SUPPORTED + PNG_iTXt; #endif -#if defined(PNG_READ_oFFs_SUPPORTED) - PNG_CONST PNG_oFFs; +#ifdef PNG_READ_oFFs_SUPPORTED + PNG_oFFs; #endif -#if defined(PNG_READ_pCAL_SUPPORTED) - PNG_CONST PNG_pCAL; +#ifdef PNG_READ_pCAL_SUPPORTED + PNG_pCAL; #endif -#if defined(PNG_READ_pHYs_SUPPORTED) - PNG_CONST PNG_pHYs; +#ifdef PNG_READ_pHYs_SUPPORTED + PNG_pHYs; #endif -#if defined(PNG_READ_sBIT_SUPPORTED) - PNG_CONST PNG_sBIT; +#ifdef PNG_READ_sBIT_SUPPORTED + PNG_sBIT; #endif -#if defined(PNG_READ_sCAL_SUPPORTED) - PNG_CONST PNG_sCAL; +#ifdef PNG_READ_sCAL_SUPPORTED + PNG_sCAL; #endif -#if defined(PNG_READ_sRGB_SUPPORTED) - PNG_CONST PNG_sRGB; +#ifdef PNG_READ_sRGB_SUPPORTED + PNG_sRGB; #endif -#if defined(PNG_READ_sPLT_SUPPORTED) - PNG_CONST PNG_sPLT; +#ifdef PNG_READ_sPLT_SUPPORTED + PNG_sPLT; #endif -#if defined(PNG_READ_tEXt_SUPPORTED) - PNG_CONST PNG_tEXt; +#ifdef PNG_READ_tEXt_SUPPORTED + PNG_tEXt; #endif -#if defined(PNG_READ_tIME_SUPPORTED) - PNG_CONST PNG_tIME; +#ifdef PNG_READ_tIME_SUPPORTED + PNG_tIME; #endif -#if defined(PNG_READ_tRNS_SUPPORTED) - PNG_CONST PNG_tRNS; +#ifdef PNG_READ_tRNS_SUPPORTED + PNG_tRNS; #endif -#if defined(PNG_READ_zTXt_SUPPORTED) - PNG_CONST PNG_zTXt; +#ifdef PNG_READ_zTXt_SUPPORTED + PNG_zTXt; #endif -#endif /* PNG_USE_LOCAL_ARRAYS */ + /* First we make sure we have enough data for the 4 byte chunk name * and the 4 byte chunk length before proceeding with decoding the * chunk data. To fully decode each of these chunks, we also make @@ -322,19 +322,21 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) return; if (png_ptr->mode & PNG_AFTER_IDAT) - png_error(png_ptr, "Too many IDAT's found"); + png_benign_error(png_ptr, "Too many IDATs found"); } png_ptr->idat_size = png_ptr->push_length; png_ptr->mode |= PNG_HAVE_IDAT; png_ptr->process_mode = PNG_READ_IDAT_MODE; png_push_have_info(png_ptr, info_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; png_ptr->zstream.next_out = png_ptr->row_buf; return; } -#if defined(PNG_READ_gAMA_SUPPORTED) +#ifdef PNG_READ_gAMA_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -347,7 +349,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_sBIT_SUPPORTED) +#ifdef PNG_READ_sBIT_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -360,7 +362,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_cHRM_SUPPORTED) +#ifdef PNG_READ_cHRM_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -373,7 +375,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -386,7 +388,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_iCCP_SUPPORTED) +#ifdef PNG_READ_iCCP_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -399,7 +401,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_sPLT_SUPPORTED) +#ifdef PNG_READ_sPLT_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -412,7 +414,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_tRNS_SUPPORTED) +#ifdef PNG_READ_tRNS_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -425,7 +427,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_bKGD_SUPPORTED) +#ifdef PNG_READ_bKGD_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -438,7 +440,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_hIST_SUPPORTED) +#ifdef PNG_READ_hIST_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -451,7 +453,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_pHYs_SUPPORTED) +#ifdef PNG_READ_pHYs_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -464,7 +466,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_oFFs_SUPPORTED) +#ifdef PNG_READ_oFFs_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -477,7 +479,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_pCAL_SUPPORTED) +#ifdef PNG_READ_pCAL_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -490,7 +492,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_sCAL_SUPPORTED) +#ifdef PNG_READ_sCAL_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -503,7 +505,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_tIME_SUPPORTED) +#ifdef PNG_READ_tIME_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -516,7 +518,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_tEXt_SUPPORTED) +#ifdef PNG_READ_tEXt_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -529,7 +531,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_zTXt_SUPPORTED) +#ifdef PNG_READ_zTXt_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -542,7 +544,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_iTXt_SUPPORTED) +#ifdef PNG_READ_iTXt_SUPPORTED else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4)) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) @@ -698,8 +700,13 @@ png_push_save_buffer(png_structp png_ptr) new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; old_buffer = png_ptr->save_buffer; - png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr, - (png_uint_32)new_max); + png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr, + (png_size_t)new_max); + if (png_ptr->save_buffer == NULL) + { + png_free(png_ptr, old_buffer); + png_error(png_ptr, "Insufficient memory for save_buffer"); + } png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); png_free(png_ptr, old_buffer); png_ptr->save_buffer_max = new_max; @@ -728,9 +735,7 @@ png_push_restore_buffer(png_structp png_ptr, png_bytep buffer, void /* PRIVATE */ png_push_read_IDAT(png_structp png_ptr) { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_CONST PNG_IDAT; -#endif + PNG_IDAT; if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) { png_byte chunk_length[4]; @@ -774,8 +779,7 @@ png_push_read_IDAT(png_structp png_ptr) png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); + png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); png_ptr->idat_size -= save_size; png_ptr->buffer_size -= save_size; @@ -798,8 +802,8 @@ png_push_read_IDAT(png_structp png_ptr) save_size = png_ptr->current_buffer_size; png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); png_ptr->idat_size -= save_size; png_ptr->buffer_size -= save_size; @@ -824,60 +828,101 @@ void /* PRIVATE */ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, png_size_t buffer_length) { - int ret; - - if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length) - png_error(png_ptr, "Extra compression data"); + /* The caller checks for a non-zero buffer length. */ + if (!(buffer_length > 0) || buffer == NULL) + png_error(png_ptr, "No IDAT data (internal error)"); + /* This routine must process all the data it has been given + * before returning, calling the row callback as required to + * handle the uncompressed results. + */ png_ptr->zstream.next_in = buffer; png_ptr->zstream.avail_in = (uInt)buffer_length; - for (;;) + + /* Keep going until the decompressed data is all processed + * or the stream marked as finished. + */ + while (png_ptr->zstream.avail_in > 0 && + !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) { - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret != Z_OK) + int ret; + + /* We have data for zlib, but we must check that zlib + * has somewhere to put the results. It doesn't matter + * if we don't expect any results -- it may be the input + * data is just the LZ end code. + */ + if (!(png_ptr->zstream.avail_out > 0)) { - if (ret == Z_STREAM_END) - { - if (png_ptr->zstream.avail_in) - png_error(png_ptr, "Extra compressed data"); - - if (!(png_ptr->zstream.avail_out)) - { - png_push_process_row(png_ptr); - } - - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - else if (ret == Z_BUF_ERROR) - break; - - else - png_error(png_ptr, "Decompression Error"); - } - if (!(png_ptr->zstream.avail_out)) - { - if (( -#if defined(PNG_READ_INTERLACING_SUPPORTED) - png_ptr->interlaced && png_ptr->pass > 6) || - (!png_ptr->interlaced && -#endif - png_ptr->row_number == png_ptr->num_rows)) - { - if (png_ptr->zstream.avail_in) - png_warning(png_ptr, "Too much data in IDAT chunks"); - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - png_push_process_row(png_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; png_ptr->zstream.next_out = png_ptr->row_buf; } - else - break; + /* Using Z_SYNC_FLUSH here means that an unterminated + * LZ stream can still be handled (a stream with a missing + * end code), otherwise (Z_NO_FLUSH) a future zlib + * implementation might defer output and, therefore, + * change the current behavior. (See comments in inflate.c + * for why this doesn't happen at present with zlib 1.2.5.) + */ + ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH); + + /* Check for any failure before proceeding. */ + if (ret != Z_OK && ret != Z_STREAM_END) + { + /* Terminate the decompression. */ + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + + /* This may be a truncated stream (missing or + * damaged end code). Treat that as a warning. + */ + if (png_ptr->row_number >= png_ptr->num_rows || + png_ptr->pass > 6) + png_warning(png_ptr, "Truncated compressed data in IDAT"); + else + png_error(png_ptr, "Decompression error in IDAT"); + + /* Skip the check on unprocessed input */ + return; + } + + /* Did inflate output any data? */ + if (png_ptr->zstream.next_out != png_ptr->row_buf) + { + /* Is this unexpected data after the last row? + * If it is, artificially terminate the LZ output + * here. + */ + if (png_ptr->row_number >= png_ptr->num_rows || + png_ptr->pass > 6) + { + /* Extra data. */ + png_warning(png_ptr, "Extra compressed data in IDAT"); + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + /* Do no more processing; skip the unprocessed + * input check below. + */ + return; + } + + /* Do we have a complete row? */ + if (png_ptr->zstream.avail_out == 0) + png_push_process_row(png_ptr); + } + + /* And check for the end of the stream. */ + if (ret == Z_STREAM_END) + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; } + + /* All the data should have been processed, if anything + * is left at this point we have bytes of IDAT data + * after the zlib end code. + */ + if (png_ptr->zstream.avail_in > 0) + png_warning(png_ptr, "Extra compression data"); } void /* PRIVATE */ @@ -893,23 +938,22 @@ png_push_process_row(png_structp png_ptr) png_ptr->row_info.width); png_read_filter_row(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->prev_row + 1, - (int)(png_ptr->row_buf[0])); + png_ptr->row_buf + 1, png_ptr->prev_row + 1, + (int)(png_ptr->row_buf[0])); - png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, - png_ptr->rowbytes + 1); + png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) png_do_read_transformations(png_ptr); -#if defined(PNG_READ_INTERLACING_SUPPORTED) +#ifdef PNG_READ_INTERLACING_SUPPORTED /* Blow up interlaced rows to full size */ if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) { if (png_ptr->pass < 6) /* old interface (pre-1.0.9): png_do_read_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); + png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); */ png_do_read_interlace(png_ptr); @@ -928,7 +972,7 @@ png_push_process_row(png_structp png_ptr) { for (i = 0; i < 4 && png_ptr->pass == 2; i++) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } @@ -937,14 +981,14 @@ png_push_process_row(png_structp png_ptr) { for (i = 0; i < 2 && png_ptr->pass == 4; i++) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } if (png_ptr->pass == 6 && png_ptr->height <= 4) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -964,7 +1008,7 @@ png_push_process_row(png_structp png_ptr) { for (i = 0; i < 4 && png_ptr->pass == 2; i++) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } @@ -984,7 +1028,7 @@ png_push_process_row(png_structp png_ptr) for (i = 0; i < 4 && png_ptr->pass == 2; i++) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -992,7 +1036,7 @@ png_push_process_row(png_structp png_ptr) { for (i = 0; i < 2 && png_ptr->pass == 4; i++) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } @@ -1014,7 +1058,7 @@ png_push_process_row(png_structp png_ptr) { for (i = 0; i < 2 && png_ptr->pass == 4; i++) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } @@ -1034,13 +1078,13 @@ png_push_process_row(png_structp png_ptr) for (i = 0; i < 2 && png_ptr->pass == 4; i++) { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } if (png_ptr->pass == 6) /* Pass 5 might be empty */ { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1059,7 +1103,7 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass == 6) /* Skip top generated row */ { - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1073,7 +1117,7 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass != 6) break; - png_push_have_row(png_ptr, png_bytep_NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } @@ -1089,7 +1133,6 @@ png_push_process_row(png_structp png_ptr) void /* PRIVATE */ png_read_push_finish_row(png_structp png_ptr) { -#ifdef PNG_USE_LOCAL_ARRAYS /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Start of interlace block */ @@ -1108,17 +1151,16 @@ png_read_push_finish_row(png_structp png_ptr) * it, uncomment it here and in png.h PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; */ -#endif png_ptr->row_number++; if (png_ptr->row_number < png_ptr->num_rows) return; -#if defined(PNG_READ_INTERLACING_SUPPORTED) +#ifdef PNG_READ_INTERLACING_SUPPORTED if (png_ptr->interlaced) { png_ptr->row_number = 0; - png_memset_check(png_ptr, png_ptr->prev_row, 0, + png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); do { @@ -1139,9 +1181,6 @@ png_read_push_finish_row(png_structp png_ptr) png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, - png_ptr->iwidth) + 1; - if (png_ptr->transformations & PNG_INTERLACE) break; @@ -1155,7 +1194,7 @@ png_read_push_finish_row(png_structp png_ptr) #endif /* PNG_READ_INTERLACING_SUPPORTED */ } -#if defined(PNG_READ_tEXt_SUPPORTED) +#ifdef PNG_READ_tEXt_SUPPORTED void /* PRIVATE */ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -1178,7 +1217,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 #endif png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length + 1)); + (png_size_t)(length + 1)); png_ptr->current_text[length] = '\0'; png_ptr->current_text_ptr = png_ptr->current_text; png_ptr->current_text_size = (png_size_t)length; @@ -1218,7 +1257,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) png_push_crc_finish(png_ptr); -#if defined(PNG_MAX_MALLOC_64K) +#ifdef PNG_MAX_MALLOC_64K if (png_ptr->skip_length) return; #endif @@ -1232,7 +1271,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) text++; text_ptr = (png_textp)png_malloc(png_ptr, - (png_uint_32)png_sizeof(png_text)); + png_sizeof(png_text)); text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; text_ptr->key = key; #ifdef PNG_iTXt_SUPPORTED @@ -1248,12 +1287,12 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) png_ptr->current_text = NULL; if (ret) - png_warning(png_ptr, "Insufficient memory to store text chunk."); + png_warning(png_ptr, "Insufficient memory to store text chunk"); } } #endif -#if defined(PNG_READ_zTXt_SUPPORTED) +#ifdef PNG_READ_zTXt_SUPPORTED void /* PRIVATE */ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -1278,7 +1317,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 #endif png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length + 1)); + (png_size_t)(length + 1)); png_ptr->current_text[length] = '\0'; png_ptr->current_text_ptr = png_ptr->current_text; png_ptr->current_text_size = (png_size_t)length; @@ -1371,7 +1410,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) if (text == NULL) { text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(png_ptr->zbuf_size + (png_ptr->zbuf_size - png_ptr->zstream.avail_out + key_size + 1)); png_memcpy(text + key_size, png_ptr->zbuf, @@ -1390,7 +1429,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) tmp = text; text = (png_charp)png_malloc(png_ptr, text_size + - (png_uint_32)(png_ptr->zbuf_size + (png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1)); png_memcpy(text, tmp, text_size); @@ -1434,7 +1473,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) text += key_size; text_ptr = (png_textp)png_malloc(png_ptr, - (png_uint_32)png_sizeof(png_text)); + png_sizeof(png_text)); text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt; text_ptr->key = key; #ifdef PNG_iTXt_SUPPORTED @@ -1449,12 +1488,12 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) png_free(png_ptr, text_ptr); if (ret) - png_warning(png_ptr, "Insufficient memory to store text chunk."); + png_warning(png_ptr, "Insufficient memory to store text chunk"); } } #endif -#if defined(PNG_READ_iTXt_SUPPORTED) +#ifdef PNG_READ_iTXt_SUPPORTED void /* PRIVATE */ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -1477,7 +1516,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 #endif png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length + 1)); + (png_size_t)(length + 1)); png_ptr->current_text[length] = '\0'; png_ptr->current_text_ptr = png_ptr->current_text; png_ptr->current_text_size = (png_size_t)length; @@ -1521,7 +1560,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) png_push_crc_finish(png_ptr); -#if defined(PNG_MAX_MALLOC_64K) +#ifdef PNG_MAX_MALLOC_64K if (png_ptr->skip_length) return; #endif @@ -1554,7 +1593,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) text++; text_ptr = (png_textp)png_malloc(png_ptr, - (png_uint_32)png_sizeof(png_text)); + png_sizeof(png_text)); text_ptr->compression = comp_flag + 2; text_ptr->key = key; @@ -1570,7 +1609,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) png_free(png_ptr, text_ptr); if (ret) - png_warning(png_ptr, "Insufficient memory to store iTXt chunk."); + png_warning(png_ptr, "Insufficient memory to store iTXt chunk"); } } #endif @@ -1587,10 +1626,10 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 if (!(png_ptr->chunk_name[0] & 0x20)) { -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != PNG_HANDLE_CHUNK_ALWAYS -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED && png_ptr->read_user_chunk_fn == NULL #endif ) @@ -1600,7 +1639,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 info_ptr = info_ptr; /* To quiet some compiler warnings */ } -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) { #ifdef PNG_MAX_MALLOC_64K @@ -1612,7 +1651,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 } #endif png_memcpy((png_charp)png_ptr->unknown_chunk.name, - (png_charp)png_ptr->chunk_name, + (png_charp)png_ptr->chunk_name, png_sizeof(png_ptr->unknown_chunk.name)); png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name) - 1] = '\0'; @@ -1625,11 +1664,11 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 else { png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, - (png_uint_32)length); + (png_size_t)length); png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length); } -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED if (png_ptr->read_user_chunk_fn != NULL) { /* Callback to user unknown chunk handler */ @@ -1690,10 +1729,9 @@ void PNGAPI png_progressive_combine_row (png_structp png_ptr, png_bytep old_row, png_bytep new_row) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_CONST int FARDATA png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; -#endif + if (png_ptr == NULL) return; diff --git a/source/Irrlicht/libpng/pngpriv.h b/source/Irrlicht/libpng/pngpriv.h new file mode 100644 index 00000000..b1b6a99b --- /dev/null +++ b/source/Irrlicht/libpng/pngpriv.h @@ -0,0 +1,956 @@ + +/* pngpriv.h - private declarations for use inside libpng + * + * libpng version 1.4.3 - June 26, 2010 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The symbols declared in this file (including the functions declared + * as PNG_EXTERN) are PRIVATE. They are not part of the libpng public + * interface, and are not recommended for use by regular applications. + * Some of them may become public in the future; others may stay private, + * change in an incompatible way, or even disappear. + * Although the libpng users are not forbidden to include this header, + * they should be well aware of the issues that may arise from doing so. + */ + +#ifndef PNGPRIV_H +#define PNGPRIV_H + +#ifndef PNG_VERSION_INFO_ONLY + +#include + +/* The functions exported by PNG_EXTERN are internal functions, which + * aren't usually used outside the library (as far as I know), so it is + * debatable if they should be exported at all. In the future, when it + * is possible to have run-time registry of chunk-handling functions, + * some of these will be made available again. +#define PNG_EXTERN extern + */ +#define PNG_EXTERN + +/* Other defines specific to compilers can go here. Try to keep + * them inside an appropriate ifdef/endif pair for portability. + */ + +#ifdef PNG_FLOATING_POINT_SUPPORTED +# ifdef MACOS + /* We need to check that hasn't already been included earlier + * as it seems it doesn't agree with , yet we should really use + * if possible. + */ +# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) +# include +# endif +# else +# include +# endif +# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 + */ +# include +# endif +#endif + +/* Codewarrior on NT has linking problems without this. */ +#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) +# define PNG_ALWAYS_EXTERN +#endif + +/* This provides the non-ANSI (far) memory allocation routines. */ +#if defined(__TURBOC__) && defined(__MSDOS__) +# include +# include +#endif + +#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ + defined(_WIN32) || defined(__WIN32__) +# include /* defines _WINDOWS_ macro */ +/* I have no idea why is this necessary... */ +# ifdef _MSC_VER +# include +# endif +#endif + +/* Various modes of operation. Note that after an init, mode is set to + * zero automatically when the structure is created. + */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_HAVE_IDAT 0x04 +#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */ +#define PNG_HAVE_IEND 0x10 +#define PNG_HAVE_gAMA 0x20 +#define PNG_HAVE_cHRM 0x40 +#define PNG_HAVE_sRGB 0x80 +#define PNG_HAVE_CHUNK_HEADER 0x100 +#define PNG_WROTE_tIME 0x200 +#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 +#define PNG_BACKGROUND_IS_GRAY 0x800 +#define PNG_HAVE_PNG_SIGNATURE 0x1000 +#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ + +/* Flags for the transformations the PNG library does on the image data */ +#define PNG_BGR 0x0001 +#define PNG_INTERLACE 0x0002 +#define PNG_PACK 0x0004 +#define PNG_SHIFT 0x0008 +#define PNG_SWAP_BYTES 0x0010 +#define PNG_INVERT_MONO 0x0020 +#define PNG_QUANTIZE 0x0040 /* formerly PNG_DITHER */ +#define PNG_BACKGROUND 0x0080 +#define PNG_BACKGROUND_EXPAND 0x0100 + /* 0x0200 unused */ +#define PNG_16_TO_8 0x0400 +#define PNG_RGBA 0x0800 +#define PNG_EXPAND 0x1000 +#define PNG_GAMMA 0x2000 +#define PNG_GRAY_TO_RGB 0x4000 +#define PNG_FILLER 0x8000L +#define PNG_PACKSWAP 0x10000L +#define PNG_SWAP_ALPHA 0x20000L +#define PNG_STRIP_ALPHA 0x40000L +#define PNG_INVERT_ALPHA 0x80000L +#define PNG_USER_TRANSFORM 0x100000L +#define PNG_RGB_TO_GRAY_ERR 0x200000L +#define PNG_RGB_TO_GRAY_WARN 0x400000L +#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ + /* 0x800000L Unused */ +#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */ +#define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */ + /* 0x4000000L unused */ + /* 0x8000000L unused */ + /* 0x10000000L unused */ + /* 0x20000000L unused */ + /* 0x40000000L unused */ + +/* Flags for png_create_struct */ +#define PNG_STRUCT_PNG 0x0001 +#define PNG_STRUCT_INFO 0x0002 + +/* Scaling factor for filter heuristic weighting calculations */ +#define PNG_WEIGHT_SHIFT 8 +#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) +#define PNG_COST_SHIFT 3 +#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) + +/* Flags for the png_ptr->flags rather than declaring a byte for each one */ +#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 +#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 +#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 +#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 +#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 +#define PNG_FLAG_ZLIB_FINISHED 0x0020 +#define PNG_FLAG_ROW_INIT 0x0040 +#define PNG_FLAG_FILLER_AFTER 0x0080 +#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 +#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 +#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 +#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 + /* 0x1000 unused */ + /* 0x2000 unused */ + /* 0x4000 unused */ +#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L +#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L +#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L +#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L +#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L +#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L +#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ +#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ +#define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */ + /* 0x1000000L unused */ + /* 0x2000000L unused */ + /* 0x4000000L unused */ + /* 0x8000000L unused */ + /* 0x10000000L unused */ + /* 0x20000000L unused */ + /* 0x40000000L unused */ + +#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ + PNG_FLAG_CRC_ANCILLARY_NOWARN) + +#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ + PNG_FLAG_CRC_CRITICAL_IGNORE) + +#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ + PNG_FLAG_CRC_CRITICAL_MASK) + +/* Save typing and make code easier to understand */ + +#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ + abs((int)((c1).green) - (int)((c2).green)) + \ + abs((int)((c1).blue) - (int)((c2).blue))) + +/* Added to libpng-1.2.6 JB */ +#define PNG_ROWBYTES(pixel_bits, width) \ + ((pixel_bits) >= 8 ? \ + ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \ + (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) ) + +/* PNG_OUT_OF_RANGE returns true if value is outside the range + * ideal-delta..ideal+delta. Each argument is evaluated twice. + * "ideal" and "delta" should be constants, normally simple + * integers, "value" a variable. Added to libpng-1.2.6 JB + */ +#define PNG_OUT_OF_RANGE(value, ideal, delta) \ + ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) + +/* Constant strings for known chunk types. If you need to add a chunk, + * define the name here, and add an invocation of the macro wherever it's + * needed. + */ +#define PNG_IHDR PNG_CONST png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'} +#define PNG_IDAT PNG_CONST png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'} +#define PNG_IEND PNG_CONST png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'} +#define PNG_PLTE PNG_CONST png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'} +#define PNG_bKGD PNG_CONST png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'} +#define PNG_cHRM PNG_CONST png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'} +#define PNG_gAMA PNG_CONST png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'} +#define PNG_hIST PNG_CONST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'} +#define PNG_iCCP PNG_CONST png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'} +#define PNG_iTXt PNG_CONST png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'} +#define PNG_oFFs PNG_CONST png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'} +#define PNG_pCAL PNG_CONST png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'} +#define PNG_sCAL PNG_CONST png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'} +#define PNG_pHYs PNG_CONST png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'} +#define PNG_sBIT PNG_CONST png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'} +#define PNG_sPLT PNG_CONST png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'} +#define PNG_sRGB PNG_CONST png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'} +#define PNG_sTER PNG_CONST png_byte png_sTER[5] = {115, 84, 69, 82, '\0'} +#define PNG_tEXt PNG_CONST png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'} +#define PNG_tIME PNG_CONST png_byte png_tIME[5] = {116, 73, 77, 69, '\0'} +#define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'} +#define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'} + + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* These functions are used internally in the code. They generally + * shouldn't be used unless you are writing code to add or replace some + * functionality in libpng. More information about most functions can + * be found in the files where the functions are located. + */ + +/* Allocate memory for an internal libpng struct */ +PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); + +/* Free memory from internal libpng struct */ +PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); + +PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr + malloc_fn, png_voidp mem_ptr)); +PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, + png_free_ptr free_fn, png_voidp mem_ptr)); + +/* Free any memory that info_ptr points to and reset struct. */ +PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* Function to allocate memory for zlib. PNGAPI is disallowed. */ +PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); + +/* Function to free memory for zlib. PNGAPI is disallowed. */ +PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); + +/* Next four functions are used internally as callbacks. PNGAPI is required + * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */ + +PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t length)); +#endif + +PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +#ifdef PNG_STDIO_SUPPORTED +PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); +#endif +#endif + +/* Reset the CRC variable */ +PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); + +/* Write the "data" buffer to whatever output you are using */ +PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +/* Read the chunk header (length + type name) */ +PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); + +/* Read data from whatever input you are using into the "data" buffer */ +PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +/* Read bytes into buf, and update png_ptr->crc */ +PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, + png_size_t length)); + +/* Decompress data in a chunk that uses compression */ +#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ + defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, + int comp_type, png_size_t chunklength, png_size_t prefix_length, + png_size_t *data_length)); +#endif + +/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ +PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); + +/* Read the CRC from the file and compare it to the libpng calculated CRC */ +PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); + +/* Calculate the CRC over a section of data. Note that we are only + * passing a maximum of 64K on systems that have this as a memory limit, + * since this is the maximum buffer size we can specify. + */ +PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, + png_size_t length)); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); +#endif + +/* Write various chunks */ + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. + */ +PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, + png_uint_32 height, + int bit_depth, int color_type, int compression_method, int filter_method, + int interlace_method)); + +PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, + png_uint_32 num_pal)); + +PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); + +#ifdef PNG_WRITE_gAMA_SUPPORTED +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, + png_fixed_point file_gamma)); +#endif +#endif + +#ifdef PNG_WRITE_sBIT_SUPPORTED +PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, + int color_type)); +#endif + +#ifdef PNG_WRITE_cHRM_SUPPORTED +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, + double white_x, double white_y, + double red_x, double red_y, double green_x, double green_y, + double blue_x, double blue_y)); +#endif +PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); +#endif + +#ifdef PNG_WRITE_sRGB_SUPPORTED +PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, + int intent)); +#endif + +#ifdef PNG_WRITE_iCCP_SUPPORTED +PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, + png_charp name, int compression_type, + png_charp profile, int proflen)); + /* Note to maintainer: profile should be png_bytep */ +#endif + +#ifdef PNG_WRITE_sPLT_SUPPORTED +PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, + png_sPLT_tp palette)); +#endif + +#ifdef PNG_WRITE_tRNS_SUPPORTED +PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, + png_color_16p values, int number, int color_type)); +#endif + +#ifdef PNG_WRITE_bKGD_SUPPORTED +PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, + png_color_16p values, int color_type)); +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED +PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, + int num_hist)); +#endif + +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ + defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) +PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, + png_charp key, png_charpp new_key)); +#endif + +#ifdef PNG_WRITE_tEXt_SUPPORTED +PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, + png_charp text, png_size_t text_len)); +#endif + +#ifdef PNG_WRITE_zTXt_SUPPORTED +PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, + png_charp text, png_size_t text_len, int compression)); +#endif + +#ifdef PNG_WRITE_iTXt_SUPPORTED +PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, + int compression, png_charp key, png_charp lang, png_charp lang_key, + png_charp text)); +#endif + +#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ +PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, + png_infop info_ptr, png_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED +PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, + png_int_32 x_offset, png_int_32 y_offset, int unit_type)); +#endif + +#ifdef PNG_WRITE_pCAL_SUPPORTED +PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, + png_int_32 X0, png_int_32 X1, int type, int nparams, + png_charp units, png_charpp params)); +#endif + +#ifdef PNG_WRITE_pHYs_SUPPORTED +PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, + png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, + int unit_type)); +#endif + +#ifdef PNG_WRITE_tIME_SUPPORTED +PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, + png_timep mod_time)); +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED +#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) +PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, + int unit, double width, double height)); +#else +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, + int unit, png_charp width, png_charp height)); +#endif +#endif +#endif + +/* Called when finished processing a row of data */ +PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); + +/* Internal use only. Called before first row of data */ +PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); + +#ifdef PNG_READ_GAMMA_SUPPORTED +PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr, + png_byte bit_depth)); +#endif + +/* Combine a row of data, dealing with alpha, etc. if requested */ +PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, + int mask)); + +#ifdef PNG_READ_INTERLACING_SUPPORTED +/* Expand an interlaced row */ +/* OLD pre-1.0.9 interface: +PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, + png_bytep row, int pass, png_uint_32 transformations)); + */ +PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); +#endif + +/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED +/* Grab pixels out of a row for an interlaced pass */ +PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, + png_bytep row, int pass)); +#endif + +/* Unfilter a row */ +PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, + png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); + +/* Choose the best filter to use and filter the row data */ +PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, + png_row_infop row_info)); + +/* Write out the filtered row. */ +PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, + png_bytep filtered_row)); +/* Finish a row while reading, dealing with interlacing passes, etc. */ +PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); + +/* Initialize the row buffers, etc. */ +PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); +/* Optional call to update the users info structure */ +PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* These are the functions that do the transformations */ +#ifdef PNG_READ_FILLER_SUPPORTED +PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 filler, png_uint_32 flags)); +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED +PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED +PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED +PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED +PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 flags)); +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop + row_info, png_bytep row)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_PACK_SUPPORTED +PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED +PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, + png_color_8p sig_bits)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#ifdef PNG_READ_16_TO_8_SUPPORTED +PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info, + png_bytep row, png_bytep palette_lookup, png_bytep quantize_lookup)); + +# ifdef PNG_CORRECT_PALETTE_SUPPORTED +PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, + png_colorp palette, int num_palette)); +# endif +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#ifdef PNG_WRITE_PACK_SUPPORTED +PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 bit_depth)); +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED +PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, + png_color_8p bit_depth)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +#ifdef PNG_READ_GAMMA_SUPPORTED +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, + png_color_16p trans_color, png_color_16p background, + png_color_16p background_1, + png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, + png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, + png_uint_16pp gamma_16_to_1, int gamma_shift)); +#else +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, + png_color_16p trans_color, png_color_16p background)); +#endif +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, + png_bytep gamma_table, png_uint_16pp gamma_16_table, + int gamma_shift)); +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED +PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, + png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); +PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, + png_bytep row, png_color_16p trans_value)); +#endif + +/* The following decodes the appropriate chunks, and does error correction, + * then calls the appropriate callback for the chunk if it is valid. + */ + +/* Decode the IHDR chunk */ +PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); + +#ifdef PNG_READ_bKGD_SUPPORTED +PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_cHRM_SUPPORTED +PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_gAMA_SUPPORTED +PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_hIST_SUPPORTED +PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_iCCP_SUPPORTED +extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif /* PNG_READ_iCCP_SUPPORTED */ + +#ifdef PNG_READ_iTXt_SUPPORTED +PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_oFFs_SUPPORTED +PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED +PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_pHYs_SUPPORTED +PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_sBIT_SUPPORTED +PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_sCAL_SUPPORTED +PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_sPLT_SUPPORTED +extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif /* PNG_READ_sPLT_SUPPORTED */ + +#ifdef PNG_READ_sRGB_SUPPORTED +PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_tEXt_SUPPORTED +PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_tIME_SUPPORTED +PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_tRNS_SUPPORTED +PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#ifdef PNG_READ_zTXt_SUPPORTED +PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); + +PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, + png_bytep chunk_name)); + +/* Handle the transformations for reading and writing */ +PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); + +PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, + png_uint_32 length)); +PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t buffer_length)); +PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t buffer_length)); +PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); +PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); +#ifdef PNG_READ_tEXt_SUPPORTED +PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +#endif +#ifdef PNG_READ_zTXt_SUPPORTED +PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +#endif +#ifdef PNG_READ_iTXt_SUPPORTED +PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +#endif + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, + png_bytep row)); +PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +/* Added at libpng version 1.4.0 */ +#ifdef PNG_cHRM_SUPPORTED +PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +#ifdef PNG_CHECK_cHRM_SUPPORTED +/* Added at libpng version 1.2.34 and 1.4.0 */ +PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, + unsigned long *hi_product, unsigned long *lo_product)); +#endif +#endif + +/* Added at libpng version 1.4.0 */ +PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type)); + +/* Free all memory used by the read (old method - NOT DLL EXPORTED) */ +extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, + png_infop end_info_ptr)); + +/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ +extern void png_write_destroy PNGARG((png_structp png_ptr)); + +#ifdef USE_FAR_KEYWORD /* memory model conversion function */ +extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, + int check)); +#endif /* USE_FAR_KEYWORD */ + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + */ +#ifdef PNG_DEBUG +#if (PNG_DEBUG > 0) +#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +#include +#if (PNG_DEBUG > 1) +#ifndef _DEBUG +# define _DEBUG +#endif +#ifndef png_debug +#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) +#endif +#ifndef png_debug1 +#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) +#endif +#ifndef png_debug2 +#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) +#endif +#endif +#else /* PNG_DEBUG_FILE || !_MSC_VER */ +#ifndef PNG_DEBUG_FILE +#define PNG_DEBUG_FILE stderr +#endif /* PNG_DEBUG_FILE */ + +#if (PNG_DEBUG > 1) +/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on + * non-ISO compilers + */ +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ + } +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ + } +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ + } +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } +# endif +# endif /* __STDC __ */ +#endif /* (PNG_DEBUG > 1) */ + +#endif /* _MSC_VER */ +#endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +#define png_debug(l, m) +#endif +#ifndef png_debug1 +#define png_debug1(l, m, p1) +#endif +#ifndef png_debug2 +#define png_debug2(l, m, p1, p2) +#endif + +/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +#endif /* PNGPRIV_H */ diff --git a/source/Irrlicht/libpng/pngread.c b/source/Irrlicht/libpng/pngread.c index ce3245c9..3ec2df4d 100644 --- a/source/Irrlicht/libpng/pngread.c +++ b/source/Irrlicht/libpng/pngread.c @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.1 [February 25, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -14,9 +14,11 @@ * read a PNG file or stream. */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" -#if defined(PNG_READ_SUPPORTED) +#ifdef PNG_READ_SUPPORTED +#include "pngpriv.h" + /* Create a PNG structure for reading, and allocate any memory needed. */ png_structp PNGAPI @@ -26,10 +28,12 @@ png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_USER_MEM_SUPPORTED return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn, - warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL)); + warn_fn, NULL, NULL, NULL)); } -/* Alternate create PNG structure for reading, and allocate any memory needed. */ +/* Alternate create PNG structure for reading, and allocate any memory + * needed. + */ png_structp PNGAPI png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, @@ -41,6 +45,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, volatile #endif png_structp png_ptr; + volatile int png_cleanup_needed = 0; #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD @@ -51,9 +56,10 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, int i; png_debug(1, "in png_create_read_struct"); + #ifdef PNG_USER_MEM_SUPPORTED png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, - (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); + malloc_fn, mem_ptr); #else png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); #endif @@ -61,18 +67,119 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, return (NULL); /* Added at libpng-1.2.6 */ -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_ptr->user_width_max=PNG_USER_WIDTH_MAX; - png_ptr->user_height_max=PNG_USER_HEIGHT_MAX; +#ifdef PNG_USER_LIMITS_SUPPORTED + png_ptr->user_width_max = PNG_USER_WIDTH_MAX; + png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; +# ifdef PNG_USER_CHUNK_CACHE_MAX + /* Added at libpng-1.2.43 and 1.4.0 */ + png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; +# endif +# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX + /* Added at libpng-1.2.43 and 1.4.1 */ + png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; +# endif #endif #ifdef PNG_SETJMP_SUPPORTED +/* Applications that neglect to set up their own setjmp() and then + encounter a png_error() will longjmp here. Since the jmpbuf is + then meaningless we abort instead of returning. */ #ifdef USE_FAR_KEYWORD if (setjmp(jmpbuf)) #else - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) /* Sets longjmp to match setjmp */ #endif + PNG_ABORT(); +#ifdef USE_FAR_KEYWORD + png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf)); +#endif +#endif /* PNG_SETJMP_SUPPORTED */ + +#ifdef PNG_USER_MEM_SUPPORTED + png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); +#endif + + png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); + + if (user_png_ver) { + i = 0; + do + { + if (user_png_ver[i] != png_libpng_ver[i]) + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + } while (png_libpng_ver[i++]); + } + else + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + + + if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) + { + /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so + * we must recompile any applications that use any older library version. + * For versions after libpng 1.0, we will be compatible, so we need + * only check the first digit. + */ + if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || + (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || + (user_png_ver[0] == '0' && user_png_ver[2] < '9')) + { +#ifdef PNG_STDIO_SUPPORTED + char msg[80]; + if (user_png_ver) + { + png_snprintf(msg, 80, + "Application was compiled with png.h from libpng-%.20s", + user_png_ver); + png_warning(png_ptr, msg); + } + png_snprintf(msg, 80, + "Application is running with png.c from libpng-%.20s", + png_libpng_ver); + png_warning(png_ptr, msg); +#endif +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags = 0; +#endif + png_warning(png_ptr, + "Incompatible libpng version in application and library"); + + png_cleanup_needed = 1; + } + } + + if (!png_cleanup_needed) + { + /* Initialize zbuf - compression buffer */ + png_ptr->zbuf_size = PNG_ZBUF_SIZE; + png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, + png_ptr->zbuf_size); + if (png_ptr->zbuf == NULL) + png_cleanup_needed = 1; + } + png_ptr->zstream.zalloc = png_zalloc; + png_ptr->zstream.zfree = png_zfree; + png_ptr->zstream.opaque = (voidpf)png_ptr; + + if (!png_cleanup_needed) + { + switch (inflateInit(&png_ptr->zstream)) + { + case Z_OK: /* Do nothing */ break; + case Z_MEM_ERROR: + case Z_STREAM_ERROR: png_warning(png_ptr, "zlib memory error"); + png_cleanup_needed = 1; break; + case Z_VERSION_ERROR: png_warning(png_ptr, "zlib version error"); + png_cleanup_needed = 1; break; + default: png_warning(png_ptr, "Unknown zlib error"); + png_cleanup_needed = 1; + } + } + + if (png_cleanup_needed) + { + /* Clean up PNG structure and deallocate any memory. */ png_free(png_ptr, png_ptr->zbuf); png_ptr->zbuf = NULL; #ifdef PNG_USER_MEM_SUPPORTED @@ -83,243 +190,18 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, #endif return (NULL); } -#ifdef USE_FAR_KEYWORD - png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf)); -#endif -#endif - -#ifdef PNG_USER_MEM_SUPPORTED - png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); -#endif - - png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - - if (user_png_ver) - { - i = 0; - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); - } - else - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - - - if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) - { - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || - (user_png_ver[0] == '0' && user_png_ver[2] < '9')) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char msg[80]; - if (user_png_ver) - { - png_snprintf(msg, 80, - "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - png_snprintf(msg, 80, - "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); -#endif -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags = 0; -#endif - png_error(png_ptr, - "Incompatible libpng version in application and library"); - } - } - - /* Initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - switch (inflateInit(&png_ptr->zstream)) - { - case Z_OK: /* Do nothing */ break; - case Z_MEM_ERROR: - case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory error"); break; - case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error"); break; - default: png_error(png_ptr, "Unknown zlib error"); - } png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL); + png_set_read_fn(png_ptr, NULL, NULL); + -#ifdef PNG_SETJMP_SUPPORTED -/* Applications that neglect to set up their own setjmp() and then encounter - a png_error() will longjmp here. Since the jmpbuf is then meaningless we - abort instead of returning. */ -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) - PNG_ABORT(); - png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf)); -#else - if (setjmp(png_ptr->jmpbuf)) - PNG_ABORT(); -#endif -#endif return (png_ptr); } -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) -/* Initialize PNG structure for reading, and allocate any memory needed. - This interface is deprecated in favour of the png_create_read_struct(), - and it will disappear as of libpng-1.3.0. */ -#undef png_read_init -void PNGAPI -png_read_init(png_structp png_ptr) -{ - /* We only come here via pre-1.0.7-compiled applications */ - png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0); -} -void PNGAPI -png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size, png_size_t png_info_size) -{ - /* We only come here via pre-1.0.12-compiled applications */ - if (png_ptr == NULL) - return; -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - if (png_sizeof(png_struct) > png_struct_size || - png_sizeof(png_info) > png_info_size) - { - char msg[80]; - png_ptr->warning_fn = NULL; - if (user_png_ver) - { - png_snprintf(msg, 80, - "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - png_snprintf(msg, 80, - "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); - } -#endif - if (png_sizeof(png_struct) > png_struct_size) - { - png_ptr->error_fn = NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags = 0; -#endif - png_error(png_ptr, - "The png struct allocated by the application for reading is too small."); - } - if (png_sizeof(png_info) > png_info_size) - { - png_ptr->error_fn = NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags = 0; -#endif - png_error(png_ptr, - "The info struct allocated by application for reading is too small."); - } - png_read_init_3(&png_ptr, user_png_ver, png_struct_size); -} -#endif /* PNG_1_0_X || PNG_1_2_X */ - -void PNGAPI -png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size) -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; /* to save current jump buffer */ -#endif - - int i = 0; - - png_structp png_ptr=*ptr_ptr; - - if (png_ptr == NULL) - return; - - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - { -#ifdef PNG_LEGACY_SUPPORTED - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; -#else - png_ptr->warning_fn = NULL; - png_warning(png_ptr, - "Application uses deprecated png_read_init() and should be recompiled."); - break; -#endif - } - } while (png_libpng_ver[i++]); - - png_debug(1, "in png_read_init_3"); - -#ifdef PNG_SETJMP_SUPPORTED - /* Save jump buffer and error functions */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf)); -#endif - - if (png_sizeof(png_struct) > png_struct_size) - { - png_destroy_struct(png_ptr); - *ptr_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); - png_ptr = *ptr_ptr; - } - - /* Reset all variables to 0 */ - png_memset(png_ptr, 0, png_sizeof(png_struct)); - -#ifdef PNG_SETJMP_SUPPORTED - /* Restore jump buffer */ - png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); -#endif - - /* Added at libpng-1.2.6 */ -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_ptr->user_width_max=PNG_USER_WIDTH_MAX; - png_ptr->user_height_max=PNG_USER_HEIGHT_MAX; -#endif - - /* Initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - switch (inflateInit(&png_ptr->zstream)) - { - case Z_OK: /* Do nothing */ break; - case Z_MEM_ERROR: - case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory"); break; - case Z_VERSION_ERROR: png_error(png_ptr, "zlib version"); break; - default: png_error(png_ptr, "Unknown zlib error"); - } - - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL); -} - -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the information before the actual image data. This has been * changed in v0.90 to allow reading a file that already has the magic * bytes read from the stream. You can tell libpng how many bytes have @@ -331,15 +213,21 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, void PNGAPI png_read_info(png_structp png_ptr, png_infop info_ptr) { + png_debug(1, "in png_read_info"); + if (png_ptr == NULL || info_ptr == NULL) return; - png_debug(1, "in png_read_info"); + /* If we haven't checked all of the PNG signature bytes, do so now. */ if (png_ptr->sig_bytes < 8) { png_size_t num_checked = png_ptr->sig_bytes, num_to_check = 8 - num_checked; +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE; +#endif + png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); png_ptr->sig_bytes = 8; @@ -357,63 +245,61 @@ png_read_info(png_structp png_ptr, png_infop info_ptr) for (;;) { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_CONST PNG_IHDR; - PNG_CONST PNG_IDAT; - PNG_CONST PNG_IEND; - PNG_CONST PNG_PLTE; -#if defined(PNG_READ_bKGD_SUPPORTED) - PNG_CONST PNG_bKGD; + PNG_IHDR; + PNG_IDAT; + PNG_IEND; + PNG_PLTE; +#ifdef PNG_READ_bKGD_SUPPORTED + PNG_bKGD; #endif -#if defined(PNG_READ_cHRM_SUPPORTED) - PNG_CONST PNG_cHRM; +#ifdef PNG_READ_cHRM_SUPPORTED + PNG_cHRM; #endif -#if defined(PNG_READ_gAMA_SUPPORTED) - PNG_CONST PNG_gAMA; +#ifdef PNG_READ_gAMA_SUPPORTED + PNG_gAMA; #endif -#if defined(PNG_READ_hIST_SUPPORTED) - PNG_CONST PNG_hIST; +#ifdef PNG_READ_hIST_SUPPORTED + PNG_hIST; #endif -#if defined(PNG_READ_iCCP_SUPPORTED) - PNG_CONST PNG_iCCP; +#ifdef PNG_READ_iCCP_SUPPORTED + PNG_iCCP; #endif -#if defined(PNG_READ_iTXt_SUPPORTED) - PNG_CONST PNG_iTXt; +#ifdef PNG_READ_iTXt_SUPPORTED + PNG_iTXt; #endif -#if defined(PNG_READ_oFFs_SUPPORTED) - PNG_CONST PNG_oFFs; +#ifdef PNG_READ_oFFs_SUPPORTED + PNG_oFFs; #endif -#if defined(PNG_READ_pCAL_SUPPORTED) - PNG_CONST PNG_pCAL; +#ifdef PNG_READ_pCAL_SUPPORTED + PNG_pCAL; #endif -#if defined(PNG_READ_pHYs_SUPPORTED) - PNG_CONST PNG_pHYs; +#ifdef PNG_READ_pHYs_SUPPORTED + PNG_pHYs; #endif -#if defined(PNG_READ_sBIT_SUPPORTED) - PNG_CONST PNG_sBIT; +#ifdef PNG_READ_sBIT_SUPPORTED + PNG_sBIT; #endif -#if defined(PNG_READ_sCAL_SUPPORTED) - PNG_CONST PNG_sCAL; +#ifdef PNG_READ_sCAL_SUPPORTED + PNG_sCAL; #endif -#if defined(PNG_READ_sPLT_SUPPORTED) - PNG_CONST PNG_sPLT; +#ifdef PNG_READ_sPLT_SUPPORTED + PNG_sPLT; #endif -#if defined(PNG_READ_sRGB_SUPPORTED) - PNG_CONST PNG_sRGB; +#ifdef PNG_READ_sRGB_SUPPORTED + PNG_sRGB; #endif -#if defined(PNG_READ_tEXt_SUPPORTED) - PNG_CONST PNG_tEXt; +#ifdef PNG_READ_tEXt_SUPPORTED + PNG_tEXt; #endif -#if defined(PNG_READ_tIME_SUPPORTED) - PNG_CONST PNG_tIME; +#ifdef PNG_READ_tIME_SUPPORTED + PNG_tIME; #endif -#if defined(PNG_READ_tRNS_SUPPORTED) - PNG_CONST PNG_tRNS; +#ifdef PNG_READ_tRNS_SUPPORTED + PNG_tRNS; #endif -#if defined(PNG_READ_zTXt_SUPPORTED) - PNG_CONST PNG_zTXt; +#ifdef PNG_READ_zTXt_SUPPORTED + PNG_zTXt; #endif -#endif /* PNG_USE_LOCAL_ARRAYS */ png_uint_32 length = png_read_chunk_header(png_ptr); PNG_CONST png_bytep chunk_name = png_ptr->chunk_name; @@ -461,71 +347,71 @@ png_read_info(png_structp png_ptr, png_infop info_ptr) png_ptr->mode |= PNG_HAVE_IDAT; break; } -#if defined(PNG_READ_bKGD_SUPPORTED) +#ifdef PNG_READ_bKGD_SUPPORTED else if (!png_memcmp(chunk_name, png_bKGD, 4)) png_handle_bKGD(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_cHRM_SUPPORTED) +#ifdef PNG_READ_cHRM_SUPPORTED else if (!png_memcmp(chunk_name, png_cHRM, 4)) png_handle_cHRM(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_gAMA_SUPPORTED) +#ifdef PNG_READ_gAMA_SUPPORTED else if (!png_memcmp(chunk_name, png_gAMA, 4)) png_handle_gAMA(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_hIST_SUPPORTED) +#ifdef PNG_READ_hIST_SUPPORTED else if (!png_memcmp(chunk_name, png_hIST, 4)) png_handle_hIST(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_oFFs_SUPPORTED) +#ifdef PNG_READ_oFFs_SUPPORTED else if (!png_memcmp(chunk_name, png_oFFs, 4)) png_handle_oFFs(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_pCAL_SUPPORTED) +#ifdef PNG_READ_pCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_pCAL, 4)) png_handle_pCAL(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sCAL_SUPPORTED) +#ifdef PNG_READ_sCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_sCAL, 4)) png_handle_sCAL(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_pHYs_SUPPORTED) +#ifdef PNG_READ_pHYs_SUPPORTED else if (!png_memcmp(chunk_name, png_pHYs, 4)) png_handle_pHYs(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sBIT_SUPPORTED) +#ifdef PNG_READ_sBIT_SUPPORTED else if (!png_memcmp(chunk_name, png_sBIT, 4)) png_handle_sBIT(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED else if (!png_memcmp(chunk_name, png_sRGB, 4)) png_handle_sRGB(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_iCCP_SUPPORTED) +#ifdef PNG_READ_iCCP_SUPPORTED else if (!png_memcmp(chunk_name, png_iCCP, 4)) png_handle_iCCP(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sPLT_SUPPORTED) +#ifdef PNG_READ_sPLT_SUPPORTED else if (!png_memcmp(chunk_name, png_sPLT, 4)) png_handle_sPLT(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_tEXt_SUPPORTED) +#ifdef PNG_READ_tEXt_SUPPORTED else if (!png_memcmp(chunk_name, png_tEXt, 4)) png_handle_tEXt(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_tIME_SUPPORTED) +#ifdef PNG_READ_tIME_SUPPORTED else if (!png_memcmp(chunk_name, png_tIME, 4)) png_handle_tIME(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_tRNS_SUPPORTED) +#ifdef PNG_READ_tRNS_SUPPORTED else if (!png_memcmp(chunk_name, png_tRNS, 4)) png_handle_tRNS(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_zTXt_SUPPORTED) +#ifdef PNG_READ_zTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_zTXt, 4)) png_handle_zTXt(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_iTXt_SUPPORTED) +#ifdef PNG_READ_iTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_iTXt, 4)) png_handle_iTXt(png_ptr, info_ptr, length); #endif @@ -533,13 +419,14 @@ png_read_info(png_structp png_ptr, png_infop info_ptr) png_handle_unknown(png_ptr, info_ptr, length); } } -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ /* Optional call to update the users info_ptr structure */ void PNGAPI png_read_update_info(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_read_update_info"); + if (png_ptr == NULL) return; if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) @@ -547,10 +434,11 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr) else png_warning(png_ptr, "Ignoring extra png_read_update_info() call; row buffer not reallocated"); + png_read_transform_info(png_ptr, info_ptr); } -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Initialize palette, background, etc, after transformations * are set, but before any reading takes place. This allows * the user to obtain a gamma-corrected palette, for example. @@ -560,28 +448,30 @@ void PNGAPI png_start_read_image(png_structp png_ptr) { png_debug(1, "in png_start_read_image"); + if (png_ptr == NULL) return; if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) png_read_start_row(png_ptr); } -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED void PNGAPI png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_CONST PNG_IDAT; + PNG_IDAT; PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; -#endif int ret; + if (png_ptr == NULL) return; + png_debug2(1, "in png_read_row (row %lu, pass %d)", - png_ptr->row_number, png_ptr->pass); + (unsigned long) png_ptr->row_number, png_ptr->pass); + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) png_read_start_row(png_ptr); if (png_ptr->row_number == 0 && png_ptr->pass == 0) @@ -589,35 +479,36 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) /* Check for transforms that have been set but were defined out */ #if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED) if (png_ptr->transformations & PNG_INVERT_MONO) - png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined"); #endif #if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) - png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined"); #endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED) +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + !defined(PNG_READ_PACKSWAP_SUPPORTED) if (png_ptr->transformations & PNG_PACKSWAP) - png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined"); #endif #if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) if (png_ptr->transformations & PNG_PACK) - png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined"); #endif #if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) if (png_ptr->transformations & PNG_SHIFT) - png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined"); #endif #if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED) if (png_ptr->transformations & PNG_BGR) - png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined"); #endif #if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED) if (png_ptr->transformations & PNG_SWAP_BYTES) - png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined"); #endif } -#if defined(PNG_READ_INTERLACING_SUPPORTED) +#ifdef PNG_READ_INTERLACING_SUPPORTED /* If interlaced and we do not need a new row, combine row and return */ if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) { @@ -698,7 +589,9 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) png_error(png_ptr, "Invalid attempt to read row data"); png_ptr->zstream.next_out = png_ptr->row_buf; - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1); do { if (!(png_ptr->zstream.avail_in)) @@ -724,7 +617,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) { if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in || png_ptr->idat_size) - png_error(png_ptr, "Extra compressed data"); + png_benign_error(png_ptr, "Extra compressed data"); png_ptr->mode |= PNG_AFTER_IDAT; png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; break; @@ -748,10 +641,9 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) png_ptr->row_buf + 1, png_ptr->prev_row + 1, (int)(png_ptr->row_buf[0])); - png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, - png_ptr->rowbytes + 1); + png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) { @@ -764,7 +656,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) png_do_read_transformations(png_ptr); -#if defined(PNG_READ_INTERLACING_SUPPORTED) +#ifdef PNG_READ_INTERLACING_SUPPORTED /* Blow up interlaced rows to full size */ if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) @@ -796,9 +688,9 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) if (png_ptr->read_row_fn != NULL) (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); } -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. If the image is interlaced, * and png_set_interlace_handling() has been called, the rows need to * contain the contents of the rows from the previous pass. If the @@ -832,6 +724,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row, png_bytepp dp; png_debug(1, "in png_read_rows"); + if (png_ptr == NULL) return; rp = row; @@ -848,20 +741,20 @@ png_read_rows(png_structp png_ptr, png_bytepp row, for (i = 0; i < num_rows; i++) { png_bytep rptr = *rp; - png_read_row(png_ptr, rptr, png_bytep_NULL); + png_read_row(png_ptr, rptr, NULL); rp++; } else if (dp != NULL) for (i = 0; i < num_rows; i++) { png_bytep dptr = *dp; - png_read_row(png_ptr, png_bytep_NULL, dptr); + png_read_row(png_ptr, NULL, dptr); dp++; } } -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the entire image. If the image has an alpha channel or a tRNS * chunk, and you have called png_handle_alpha()[*], you will need to * initialize the image to the current image that PNG will be overlaying. @@ -882,6 +775,7 @@ png_read_image(png_structp png_ptr, png_bytepp image) png_bytepp rp; png_debug(1, "in png_read_image"); + if (png_ptr == NULL) return; @@ -890,7 +784,7 @@ png_read_image(png_structp png_ptr, png_bytepp image) #else if (png_ptr->interlaced) png_error(png_ptr, - "Cannot read interlaced image -- interlace handler disabled."); + "Cannot read interlaced image -- interlace handler disabled"); pass = 1; #endif @@ -903,14 +797,14 @@ png_read_image(png_structp png_ptr, png_bytepp image) rp = image; for (i = 0; i < image_height; i++) { - png_read_row(png_ptr, *rp, png_bytep_NULL); + png_read_row(png_ptr, *rp, NULL); rp++; } } } -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the end of the PNG file. Will not read past the end of the * file, will verify the end is accurate, and will read any comments * or time information at the end of the file, if info is not NULL. @@ -919,69 +813,68 @@ void PNGAPI png_read_end(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_read_end"); + if (png_ptr == NULL) return; png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */ do { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_CONST PNG_IHDR; - PNG_CONST PNG_IDAT; - PNG_CONST PNG_IEND; - PNG_CONST PNG_PLTE; -#if defined(PNG_READ_bKGD_SUPPORTED) - PNG_CONST PNG_bKGD; + PNG_IHDR; + PNG_IDAT; + PNG_IEND; + PNG_PLTE; +#ifdef PNG_READ_bKGD_SUPPORTED + PNG_bKGD; #endif -#if defined(PNG_READ_cHRM_SUPPORTED) - PNG_CONST PNG_cHRM; +#ifdef PNG_READ_cHRM_SUPPORTED + PNG_cHRM; #endif -#if defined(PNG_READ_gAMA_SUPPORTED) - PNG_CONST PNG_gAMA; +#ifdef PNG_READ_gAMA_SUPPORTED + PNG_gAMA; #endif -#if defined(PNG_READ_hIST_SUPPORTED) - PNG_CONST PNG_hIST; +#ifdef PNG_READ_hIST_SUPPORTED + PNG_hIST; #endif -#if defined(PNG_READ_iCCP_SUPPORTED) - PNG_CONST PNG_iCCP; +#ifdef PNG_READ_iCCP_SUPPORTED + PNG_iCCP; #endif -#if defined(PNG_READ_iTXt_SUPPORTED) - PNG_CONST PNG_iTXt; +#ifdef PNG_READ_iTXt_SUPPORTED + PNG_iTXt; #endif -#if defined(PNG_READ_oFFs_SUPPORTED) - PNG_CONST PNG_oFFs; +#ifdef PNG_READ_oFFs_SUPPORTED + PNG_oFFs; #endif -#if defined(PNG_READ_pCAL_SUPPORTED) - PNG_CONST PNG_pCAL; +#ifdef PNG_READ_pCAL_SUPPORTED + PNG_pCAL; #endif -#if defined(PNG_READ_pHYs_SUPPORTED) - PNG_CONST PNG_pHYs; +#ifdef PNG_READ_pHYs_SUPPORTED + PNG_pHYs; #endif -#if defined(PNG_READ_sBIT_SUPPORTED) - PNG_CONST PNG_sBIT; +#ifdef PNG_READ_sBIT_SUPPORTED + PNG_sBIT; #endif -#if defined(PNG_READ_sCAL_SUPPORTED) - PNG_CONST PNG_sCAL; +#ifdef PNG_READ_sCAL_SUPPORTED + PNG_sCAL; #endif -#if defined(PNG_READ_sPLT_SUPPORTED) - PNG_CONST PNG_sPLT; +#ifdef PNG_READ_sPLT_SUPPORTED + PNG_sPLT; #endif -#if defined(PNG_READ_sRGB_SUPPORTED) - PNG_CONST PNG_sRGB; +#ifdef PNG_READ_sRGB_SUPPORTED + PNG_sRGB; #endif -#if defined(PNG_READ_tEXt_SUPPORTED) - PNG_CONST PNG_tEXt; +#ifdef PNG_READ_tEXt_SUPPORTED + PNG_tEXt; #endif -#if defined(PNG_READ_tIME_SUPPORTED) - PNG_CONST PNG_tIME; +#ifdef PNG_READ_tIME_SUPPORTED + PNG_tIME; #endif -#if defined(PNG_READ_tRNS_SUPPORTED) - PNG_CONST PNG_tRNS; +#ifdef PNG_READ_tRNS_SUPPORTED + PNG_tRNS; #endif -#if defined(PNG_READ_zTXt_SUPPORTED) - PNG_CONST PNG_zTXt; +#ifdef PNG_READ_zTXt_SUPPORTED + PNG_zTXt; #endif -#endif /* PNG_USE_LOCAL_ARRAYS */ png_uint_32 length = png_read_chunk_header(png_ptr); PNG_CONST png_bytep chunk_name = png_ptr->chunk_name; @@ -995,7 +888,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) if (!png_memcmp(chunk_name, png_IDAT, 4)) { if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) - png_error(png_ptr, "Too many IDAT's found"); + png_benign_error(png_ptr, "Too many IDATs found"); } png_handle_unknown(png_ptr, info_ptr, length); if (!png_memcmp(chunk_name, png_PLTE, 4)) @@ -1008,76 +901,76 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) * read, but not after other chunks have been read. */ if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) - png_error(png_ptr, "Too many IDAT's found"); + png_benign_error(png_ptr, "Too many IDATs found"); png_crc_finish(png_ptr, length); } else if (!png_memcmp(chunk_name, png_PLTE, 4)) png_handle_PLTE(png_ptr, info_ptr, length); -#if defined(PNG_READ_bKGD_SUPPORTED) +#ifdef PNG_READ_bKGD_SUPPORTED else if (!png_memcmp(chunk_name, png_bKGD, 4)) png_handle_bKGD(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_cHRM_SUPPORTED) +#ifdef PNG_READ_cHRM_SUPPORTED else if (!png_memcmp(chunk_name, png_cHRM, 4)) png_handle_cHRM(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_gAMA_SUPPORTED) +#ifdef PNG_READ_gAMA_SUPPORTED else if (!png_memcmp(chunk_name, png_gAMA, 4)) png_handle_gAMA(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_hIST_SUPPORTED) +#ifdef PNG_READ_hIST_SUPPORTED else if (!png_memcmp(chunk_name, png_hIST, 4)) png_handle_hIST(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_oFFs_SUPPORTED) +#ifdef PNG_READ_oFFs_SUPPORTED else if (!png_memcmp(chunk_name, png_oFFs, 4)) png_handle_oFFs(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_pCAL_SUPPORTED) +#ifdef PNG_READ_pCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_pCAL, 4)) png_handle_pCAL(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sCAL_SUPPORTED) +#ifdef PNG_READ_sCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_sCAL, 4)) png_handle_sCAL(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_pHYs_SUPPORTED) +#ifdef PNG_READ_pHYs_SUPPORTED else if (!png_memcmp(chunk_name, png_pHYs, 4)) png_handle_pHYs(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sBIT_SUPPORTED) +#ifdef PNG_READ_sBIT_SUPPORTED else if (!png_memcmp(chunk_name, png_sBIT, 4)) png_handle_sBIT(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED else if (!png_memcmp(chunk_name, png_sRGB, 4)) png_handle_sRGB(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_iCCP_SUPPORTED) +#ifdef PNG_READ_iCCP_SUPPORTED else if (!png_memcmp(chunk_name, png_iCCP, 4)) png_handle_iCCP(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_sPLT_SUPPORTED) +#ifdef PNG_READ_sPLT_SUPPORTED else if (!png_memcmp(chunk_name, png_sPLT, 4)) png_handle_sPLT(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_tEXt_SUPPORTED) +#ifdef PNG_READ_tEXt_SUPPORTED else if (!png_memcmp(chunk_name, png_tEXt, 4)) png_handle_tEXt(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_tIME_SUPPORTED) +#ifdef PNG_READ_tIME_SUPPORTED else if (!png_memcmp(chunk_name, png_tIME, 4)) png_handle_tIME(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_tRNS_SUPPORTED) +#ifdef PNG_READ_tRNS_SUPPORTED else if (!png_memcmp(chunk_name, png_tRNS, 4)) png_handle_tRNS(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_zTXt_SUPPORTED) +#ifdef PNG_READ_zTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_zTXt, 4)) png_handle_zTXt(png_ptr, info_ptr, length); #endif -#if defined(PNG_READ_iTXt_SUPPORTED) +#ifdef PNG_READ_iTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_iTXt, 4)) png_handle_iTXt(png_ptr, info_ptr, length); #endif @@ -1085,7 +978,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) png_handle_unknown(png_ptr, info_ptr, length); } while (!(png_ptr->mode & PNG_HAVE_IEND)); } -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ /* Free all memory used by the read */ void PNGAPI @@ -1100,6 +993,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, #endif png_debug(1, "in png_destroy_read_struct"); + if (png_ptr_ptr != NULL) png_ptr = *png_ptr_ptr; if (png_ptr == NULL) @@ -1120,7 +1014,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, if (info_ptr != NULL) { -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1); #endif @@ -1135,7 +1029,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, if (end_info_ptr != NULL) { -#if defined(PNG_READ_TEXT_SUPPORTED) +#ifdef PNG_READ_TEXT_SUPPORTED png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1); #endif #ifdef PNG_USER_MEM_SUPPORTED @@ -1161,7 +1055,8 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, /* Free all memory used by the read (old method) */ void /* PRIVATE */ -png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) +png_read_destroy(png_structp png_ptr, png_infop info_ptr, + png_infop end_info_ptr) { #ifdef PNG_SETJMP_SUPPORTED jmp_buf tmp_jmp; @@ -1174,6 +1069,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr #endif png_debug(1, "in png_read_destroy"); + if (info_ptr != NULL) png_info_destroy(png_ptr, info_ptr); @@ -1184,50 +1080,32 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr png_free(png_ptr, png_ptr->big_row_buf); png_free(png_ptr, png_ptr->prev_row); png_free(png_ptr, png_ptr->chunkdata); -#if defined(PNG_READ_DITHER_SUPPORTED) +#ifdef PNG_READ_QUANTIZE_SUPPORTED png_free(png_ptr, png_ptr->palette_lookup); - png_free(png_ptr, png_ptr->dither_index); + png_free(png_ptr, png_ptr->quantize_index); #endif -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED png_free(png_ptr, png_ptr->gamma_table); #endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED png_free(png_ptr, png_ptr->gamma_from_1); png_free(png_ptr, png_ptr->gamma_to_1); #endif -#ifdef PNG_FREE_ME_SUPPORTED if (png_ptr->free_me & PNG_FREE_PLTE) png_zfree(png_ptr, png_ptr->palette); png_ptr->free_me &= ~PNG_FREE_PLTE; -#else - if (png_ptr->flags & PNG_FLAG_FREE_PLTE) - png_zfree(png_ptr, png_ptr->palette); - png_ptr->flags &= ~PNG_FLAG_FREE_PLTE; -#endif #if defined(PNG_tRNS_SUPPORTED) || \ defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) -#ifdef PNG_FREE_ME_SUPPORTED if (png_ptr->free_me & PNG_FREE_TRNS) - png_free(png_ptr, png_ptr->trans); + png_free(png_ptr, png_ptr->trans_alpha); png_ptr->free_me &= ~PNG_FREE_TRNS; -#else - if (png_ptr->flags & PNG_FLAG_FREE_TRNS) - png_free(png_ptr, png_ptr->trans); - png_ptr->flags &= ~PNG_FLAG_FREE_TRNS; #endif -#endif -#if defined(PNG_READ_hIST_SUPPORTED) -#ifdef PNG_FREE_ME_SUPPORTED +#ifdef PNG_READ_hIST_SUPPORTED if (png_ptr->free_me & PNG_FREE_HIST) png_free(png_ptr, png_ptr->hist); png_ptr->free_me &= ~PNG_FREE_HIST; -#else - if (png_ptr->flags & PNG_FLAG_FREE_HIST) - png_free(png_ptr, png_ptr->hist); - png_ptr->flags &= ~PNG_FLAG_FREE_HIST; #endif -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (png_ptr->gamma_16_table != NULL) { int i; @@ -1238,7 +1116,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr } png_free(png_ptr, png_ptr->gamma_16_table); } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED if (png_ptr->gamma_16_from_1 != NULL) { int i; @@ -1261,7 +1139,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr } #endif #endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) +#ifdef PNG_TIME_RFC1123_SUPPORTED png_free(png_ptr, png_ptr->time_buffer); #endif @@ -1314,8 +1192,8 @@ png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn) } -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED -#if defined(PNG_INFO_IMAGE_SUPPORTED) +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_INFO_IMAGE_SUPPORTED void PNGAPI png_read_png(png_structp png_ptr, png_infop info_ptr, int transforms, @@ -1325,12 +1203,6 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, if (png_ptr == NULL) return; -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) - /* Invert the alpha channel from opacity to transparency - */ - if (transforms & PNG_TRANSFORM_INVERT_ALPHA) - png_set_invert_alpha(png_ptr); -#endif /* png_read_info() gives us all of the information from the * PNG file before the first IDAT (image data chunk). @@ -1341,14 +1213,14 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, /* -------------- image transformations start here ------------------- */ -#if defined(PNG_READ_16_TO_8_SUPPORTED) +#ifdef PNG_READ_16_TO_8_SUPPORTED /* Tell libpng to strip 16 bit/color files down to 8 bits per color. */ if (transforms & PNG_TRANSFORM_STRIP_16) png_set_strip_16(png_ptr); #endif -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED /* Strip alpha bytes from the input data without combining with * the background (not recommended). */ @@ -1364,7 +1236,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, png_set_packing(png_ptr); #endif -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED /* Change the order of packed pixels to least significant bit first * (not useful if you are using png_set_packing). */ @@ -1372,7 +1244,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, png_set_packswap(png_ptr); #endif -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED /* Expand paletted colors into true RGB triplets * Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel * Expand paletted or RGB images with transparency to full alpha @@ -1385,17 +1257,17 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, png_set_expand(png_ptr); #endif - /* We don't handle background color or gamma transformation or dithering. + /* We don't handle background color or gamma transformation or quantizing. */ -#if defined(PNG_READ_INVERT_SUPPORTED) +#ifdef PNG_READ_INVERT_SUPPORTED /* Invert monochrome files to have 0 as white and 1 as black */ if (transforms & PNG_TRANSFORM_INVERT_MONO) png_set_invert_mono(png_ptr); #endif -#if defined(PNG_READ_SHIFT_SUPPORTED) +#ifdef PNG_READ_SHIFT_SUPPORTED /* If you want to shift the pixel values from the range [0,255] or * [0,65535] to the original [0,7] or [0,31], or whatever range the * colors were originally in: @@ -1410,27 +1282,43 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_READ_BGR_SUPPORTED) +#ifdef PNG_READ_BGR_SUPPORTED /* Flip the RGB pixels to BGR (or RGBA to BGRA) */ if (transforms & PNG_TRANSFORM_BGR) png_set_bgr(png_ptr); #endif -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ if (transforms & PNG_TRANSFORM_SWAP_ALPHA) png_set_swap_alpha(png_ptr); #endif -#if defined(PNG_READ_SWAP_SUPPORTED) +#ifdef PNG_READ_SWAP_SUPPORTED /* Swap bytes of 16 bit files to least significant byte first */ if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) png_set_swap(png_ptr); #endif +/* Added at libpng-1.2.41 */ +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + /* Invert the alpha channel from opacity to transparency + */ + if (transforms & PNG_TRANSFORM_INVERT_ALPHA) + png_set_invert_alpha(png_ptr); +#endif + +/* Added at libpng-1.2.41 */ +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /* Expand grayscale image to RGB + */ + if (transforms & PNG_TRANSFORM_GRAY_TO_RGB) + png_set_gray_to_rgb(png_ptr); +#endif + /* We don't handle adding filler bytes */ /* Optional call to gamma correct and add the background to the palette @@ -1441,18 +1329,18 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, /* -------------- image transformations end here ------------------- */ -#ifdef PNG_FREE_ME_SUPPORTED png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); -#endif if (info_ptr->row_pointers == NULL) { + png_uint_32 iptr; + info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr, info_ptr->height * png_sizeof(png_bytep)); - png_memset(info_ptr->row_pointers, 0, info_ptr->height - * png_sizeof(png_bytep)); -#ifdef PNG_FREE_ME_SUPPORTED + for (iptr=0; iptrheight; iptr++) + info_ptr->row_pointers[iptr] = NULL; + info_ptr->free_me |= PNG_FREE_ROWS; -#endif + for (row = 0; row < (int)info_ptr->height; row++) info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); @@ -1469,5 +1357,5 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, } #endif /* PNG_INFO_IMAGE_SUPPORTED */ -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ #endif /* PNG_READ_SUPPORTED */ diff --git a/source/Irrlicht/libpng/pngrio.c b/source/Irrlicht/libpng/pngrio.c index 65fb5293..990fe3f5 100644 --- a/source/Irrlicht/libpng/pngrio.c +++ b/source/Irrlicht/libpng/pngrio.c @@ -1,8 +1,8 @@ /* pngrio.c - functions for data input * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.1 [February 25, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -18,9 +18,10 @@ * libpng use it at run time with png_set_read_fn(...). */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" -#if defined(PNG_READ_SUPPORTED) +#ifdef PNG_READ_SUPPORTED +#include "pngpriv.h" /* Read the data from whatever input you are using. The default routine * reads from a file pointer. Note that this routine sometimes gets called @@ -32,13 +33,14 @@ void /* PRIVATE */ png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_debug1(4, "reading %d bytes", (int)length); + if (png_ptr->read_data_fn != NULL) (*(png_ptr->read_data_fn))(png_ptr, data, length); else png_error(png_ptr, "Call to NULL read function"); } -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED /* This is the function that does the actual reading of data. If you are * not reading from a standard C stream, you should create a replacement * read_data function and use it at run time with png_set_read_fn(), rather @@ -55,13 +57,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) /* fread() returns 0 on error, so it is OK to store this in a png_size_t * instead of an int, which is what fread() actually returns. */ -#if defined(_WIN32_WCE) - if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) - check = 0; -#else - check = (png_size_t)fread(data, (png_size_t)1, length, - (png_FILE_p)png_ptr->io_ptr); -#endif + check = fread(data, 1, length, (png_FILE_p)png_ptr->io_ptr); if (check != length) png_error(png_ptr, "Read Error"); @@ -78,7 +74,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) static void PNGAPI png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { - int check; + png_size_t check; png_byte *n_data; png_FILE_p io_ptr; @@ -89,12 +85,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); if ((png_bytep)n_data == data) { -#if defined(_WIN32_WCE) - if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) - check = 0; -#else check = fread(n_data, 1, length, io_ptr); -#endif } else { @@ -105,12 +96,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) do { read = MIN(NEAR_BUF_SIZE, remaining); -#if defined(_WIN32_WCE) - if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) ) - err = 0; -#else - err = fread(buf, (png_size_t)1, read, io_ptr); -#endif + err = fread(buf, 1, read, io_ptr); png_memcpy(data, buf, read); /* copy far buffer to near buffer */ if (err != read) break; @@ -151,7 +137,7 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, return; png_ptr->io_ptr = io_ptr; -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED if (read_data_fn != NULL) png_ptr->read_data_fn = read_data_fn; else @@ -167,10 +153,10 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, png_warning(png_ptr, "It's an error to set both read_data_fn and write_data_fn in the "); png_warning(png_ptr, - "same structure. Resetting write_data_fn to NULL."); + "same structure. Resetting write_data_fn to NULL"); } -#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED png_ptr->output_flush_fn = NULL; #endif } diff --git a/source/Irrlicht/libpng/pngrtran.c b/source/Irrlicht/libpng/pngrtran.c index 4dae5ad0..63ac38b8 100644 --- a/source/Irrlicht/libpng/pngrtran.c +++ b/source/Irrlicht/libpng/pngrtran.c @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.2.38 [July 16, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.2 [May 6, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,18 +16,21 @@ * in pngtrans.c. */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" -#if defined(PNG_READ_SUPPORTED) +#ifdef PNG_READ_SUPPORTED +#include "pngpriv.h" /* Set the action on getting a CRC error for an ancillary or critical chunk. */ void PNGAPI png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) { png_debug(1, "in png_set_crc_action"); - /* Tell libpng how we react to CRC errors in critical chunks */ + if (png_ptr == NULL) return; + + /* Tell libpng how we react to CRC errors in critical chunks */ switch (crit_action) { case PNG_CRC_NO_CHANGE: /* Leave setting as is */ @@ -46,7 +49,7 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) case PNG_CRC_WARN_DISCARD: /* Not a valid action for critical data */ png_warning(png_ptr, - "Can't discard critical data on CRC error."); + "Can't discard critical data on CRC error"); case PNG_CRC_ERROR_QUIT: /* Error/quit */ case PNG_CRC_DEFAULT: @@ -55,6 +58,7 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) break; } + /* Tell libpng how we react to CRC errors in ancillary chunks */ switch (ancil_action) { case PNG_CRC_NO_CHANGE: /* Leave setting as is */ @@ -94,6 +98,7 @@ png_set_background(png_structp png_ptr, int need_expand, double background_gamma) { png_debug(1, "in png_set_background"); + if (png_ptr == NULL) return; if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN) @@ -111,36 +116,38 @@ png_set_background(png_structp png_ptr, } #endif -#if defined(PNG_READ_16_TO_8_SUPPORTED) +#ifdef PNG_READ_16_TO_8_SUPPORTED /* Strip 16 bit depth files to 8 bit depth */ void PNGAPI png_set_strip_16(png_structp png_ptr) { png_debug(1, "in png_set_strip_16"); + if (png_ptr == NULL) return; png_ptr->transformations |= PNG_16_TO_8; } #endif -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED void PNGAPI png_set_strip_alpha(png_structp png_ptr) { png_debug(1, "in png_set_strip_alpha"); + if (png_ptr == NULL) return; png_ptr->flags |= PNG_FLAG_STRIP_ALPHA; } #endif -#if defined(PNG_READ_DITHER_SUPPORTED) -/* Dither file to 8 bit. Supply a palette, the current number +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Quantize file to 8 bit. Supply a palette, the current number * of elements in the palette, the maximum number of elements * allowed, and a histogram if possible. If the current number * of colors is greater then the maximum number, the palette will be - * modified to fit in the maximum number. "full_dither" indicates - * whether we need a dithering cube set up for RGB images, or if we + * modified to fit in the maximum number. "full_quantize" indicates + * whether we need a quantizeing cube set up for RGB images, or if we * simply are reducing the number of colors in a paletted image. */ @@ -154,23 +161,24 @@ typedef png_dsort FAR * png_dsortp; typedef png_dsort FAR * FAR * png_dsortpp; void PNGAPI -png_set_dither(png_structp png_ptr, png_colorp palette, +png_set_quantize(png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, - int full_dither) + int full_quantize) { - png_debug(1, "in png_set_dither"); + png_debug(1, "in png_set_quantize"); + if (png_ptr == NULL) return; - png_ptr->transformations |= PNG_DITHER; + png_ptr->transformations |= PNG_QUANTIZE; - if (!full_dither) + if (!full_quantize) { int i; - png_ptr->dither_index = (png_bytep)png_malloc(png_ptr, + png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_palette * png_sizeof(png_byte))); for (i = 0; i < num_palette; i++) - png_ptr->dither_index[i] = (png_byte)i; + png_ptr->quantize_index[i] = (png_byte)i; } if (num_palette > maximum_colors) @@ -184,12 +192,12 @@ png_set_dither(png_structp png_ptr, png_colorp palette, int i; /* Initialize an array to sort colors */ - png_ptr->dither_sort = (png_bytep)png_malloc(png_ptr, + png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_palette * png_sizeof(png_byte))); - /* Initialize the dither_sort array */ + /* Initialize the quantize_sort array */ for (i = 0; i < num_palette; i++) - png_ptr->dither_sort[i] = (png_byte)i; + png_ptr->quantize_sort[i] = (png_byte)i; /* Find the least used palette entries by starting a * bubble sort, and running it until we have sorted @@ -206,14 +214,14 @@ png_set_dither(png_structp png_ptr, png_colorp palette, done = 1; for (j = 0; j < i; j++) { - if (histogram[png_ptr->dither_sort[j]] - < histogram[png_ptr->dither_sort[j + 1]]) + if (histogram[png_ptr->quantize_sort[j]] + < histogram[png_ptr->quantize_sort[j + 1]]) { png_byte t; - t = png_ptr->dither_sort[j]; - png_ptr->dither_sort[j] = png_ptr->dither_sort[j + 1]; - png_ptr->dither_sort[j + 1] = t; + t = png_ptr->quantize_sort[j]; + png_ptr->quantize_sort[j] = png_ptr->quantize_sort[j + 1]; + png_ptr->quantize_sort[j + 1] = t; done = 0; } } @@ -222,7 +230,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette, } /* Swap the palette around, and set up a table, if necessary */ - if (full_dither) + if (full_quantize) { int j = num_palette; @@ -231,11 +239,11 @@ png_set_dither(png_structp png_ptr, png_colorp palette, */ for (i = 0; i < maximum_colors; i++) { - if ((int)png_ptr->dither_sort[i] >= maximum_colors) + if ((int)png_ptr->quantize_sort[i] >= maximum_colors) { do j--; - while ((int)png_ptr->dither_sort[j] >= maximum_colors); + while ((int)png_ptr->quantize_sort[j] >= maximum_colors); palette[i] = palette[j]; } } @@ -250,32 +258,32 @@ png_set_dither(png_structp png_ptr, png_colorp palette, for (i = 0; i < maximum_colors; i++) { /* Only move the colors we need to */ - if ((int)png_ptr->dither_sort[i] >= maximum_colors) + if ((int)png_ptr->quantize_sort[i] >= maximum_colors) { png_color tmp_color; do j--; - while ((int)png_ptr->dither_sort[j] >= maximum_colors); + while ((int)png_ptr->quantize_sort[j] >= maximum_colors); tmp_color = palette[j]; palette[j] = palette[i]; palette[i] = tmp_color; /* Indicate where the color went */ - png_ptr->dither_index[j] = (png_byte)i; - png_ptr->dither_index[i] = (png_byte)j; + png_ptr->quantize_index[j] = (png_byte)i; + png_ptr->quantize_index[i] = (png_byte)j; } } /* Find closest color for those colors we are not using */ for (i = 0; i < num_palette; i++) { - if ((int)png_ptr->dither_index[i] >= maximum_colors) + if ((int)png_ptr->quantize_index[i] >= maximum_colors) { int min_d, k, min_k, d_index; /* Find the closest color to one we threw out */ - d_index = png_ptr->dither_index[i]; + d_index = png_ptr->quantize_index[i]; min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); for (k = 1, min_k = 0; k < maximum_colors; k++) { @@ -290,12 +298,12 @@ png_set_dither(png_structp png_ptr, png_colorp palette, } } /* Point to closest color */ - png_ptr->dither_index[i] = (png_byte)min_k; + png_ptr->quantize_index[i] = (png_byte)min_k; } } } - png_free(png_ptr, png_ptr->dither_sort); - png_ptr->dither_sort = NULL; + png_free(png_ptr, png_ptr->quantize_sort); + png_ptr->quantize_sort = NULL; } else { @@ -328,9 +336,8 @@ png_set_dither(png_structp png_ptr, png_colorp palette, png_ptr->palette_to_index[i] = (png_byte)i; } - hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 * + hash = (png_dsortpp)png_calloc(png_ptr, (png_uint_32)(769 * png_sizeof(png_dsortp))); - png_memset(hash, 0, 769 * png_sizeof(png_dsortp)); num_new_palette = num_palette; @@ -403,19 +410,19 @@ png_set_dither(png_structp png_ptr, png_colorp palette, num_new_palette--; palette[png_ptr->index_to_palette[j]] = palette[num_new_palette]; - if (!full_dither) + if (!full_quantize) { int k; for (k = 0; k < num_palette; k++) { - if (png_ptr->dither_index[k] == + if (png_ptr->quantize_index[k] == png_ptr->index_to_palette[j]) - png_ptr->dither_index[k] = + png_ptr->quantize_index[k] = png_ptr->index_to_palette[next_j]; - if ((int)png_ptr->dither_index[k] == + if ((int)png_ptr->quantize_index[k] == num_new_palette) - png_ptr->dither_index[k] = + png_ptr->quantize_index[k] = png_ptr->index_to_palette[j]; } } @@ -425,8 +432,10 @@ png_set_dither(png_structp png_ptr, png_colorp palette, png_ptr->palette_to_index[png_ptr->index_to_palette[j]] = png_ptr->palette_to_index[num_new_palette]; - png_ptr->index_to_palette[j] = (png_byte)num_new_palette; - png_ptr->palette_to_index[num_new_palette] = (png_byte)j; + png_ptr->index_to_palette[j] = + (png_byte)num_new_palette; + png_ptr->palette_to_index[num_new_palette] = + (png_byte)j; } if (num_new_palette <= maximum_colors) break; @@ -466,38 +475,37 @@ png_set_dither(png_structp png_ptr, png_colorp palette, } png_ptr->num_palette = (png_uint_16)num_palette; - if (full_dither) + if (full_quantize) { int i; png_bytep distance; - int total_bits = PNG_DITHER_RED_BITS + PNG_DITHER_GREEN_BITS + - PNG_DITHER_BLUE_BITS; - int num_red = (1 << PNG_DITHER_RED_BITS); - int num_green = (1 << PNG_DITHER_GREEN_BITS); - int num_blue = (1 << PNG_DITHER_BLUE_BITS); + int total_bits = PNG_QUANTIZE_RED_BITS + PNG_QUANTIZE_GREEN_BITS + + PNG_QUANTIZE_BLUE_BITS; + int num_red = (1 << PNG_QUANTIZE_RED_BITS); + int num_green = (1 << PNG_QUANTIZE_GREEN_BITS); + int num_blue = (1 << PNG_QUANTIZE_BLUE_BITS); png_size_t num_entries = ((png_size_t)1 << total_bits); - png_ptr->palette_lookup = (png_bytep )png_malloc(png_ptr, + + png_ptr->palette_lookup = (png_bytep )png_calloc(png_ptr, (png_uint_32)(num_entries * png_sizeof(png_byte))); - png_memset(png_ptr->palette_lookup, 0, num_entries * - png_sizeof(png_byte)); distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries * png_sizeof(png_byte))); - png_memset(distance, 0xff, num_entries * png_sizeof(png_byte)); for (i = 0; i < num_palette; i++) { int ir, ig, ib; - int r = (palette[i].red >> (8 - PNG_DITHER_RED_BITS)); - int g = (palette[i].green >> (8 - PNG_DITHER_GREEN_BITS)); - int b = (palette[i].blue >> (8 - PNG_DITHER_BLUE_BITS)); + int r = (palette[i].red >> (8 - PNG_QUANTIZE_RED_BITS)); + int g = (palette[i].green >> (8 - PNG_QUANTIZE_GREEN_BITS)); + int b = (palette[i].blue >> (8 - PNG_QUANTIZE_BLUE_BITS)); for (ir = 0; ir < num_red; ir++) { /* int dr = abs(ir - r); */ int dr = ((ir > r) ? ir - r : r - ir); - int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS)); + int index_r = (ir << (PNG_QUANTIZE_BLUE_BITS + + PNG_QUANTIZE_GREEN_BITS)); for (ig = 0; ig < num_green; ig++) { @@ -505,7 +513,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette, int dg = ((ig > g) ? ig - g : g - ig); int dt = dr + dg; int dm = ((dr > dg) ? dr : dg); - int index_g = index_r | (ig << PNG_DITHER_BLUE_BITS); + int index_g = index_r | (ig << PNG_QUANTIZE_BLUE_BITS); for (ib = 0; ib < num_blue; ib++) { @@ -528,7 +536,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette, png_free(png_ptr, distance); } } -#endif +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ #if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) /* Transform the image from the file_gamma to the screen_gamma. We @@ -544,8 +552,10 @@ void PNGAPI png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) { png_debug(1, "in png_set_gamma"); + if (png_ptr == NULL) return; + if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) || (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) || (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) @@ -555,7 +565,7 @@ png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) } #endif -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED /* Expand paletted images to RGB, expand grayscale images of * less than 8-bit depth to 8-bit depth, and expand tRNS chunks * to alpha channels. @@ -564,8 +574,10 @@ void PNGAPI png_set_expand(png_structp png_ptr) { png_debug(1, "in png_set_expand"); + if (png_ptr == NULL) return; + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); png_ptr->flags &= ~PNG_FLAG_ROW_INIT; } @@ -583,8 +595,9 @@ png_set_expand(png_structp png_ptr) * More to the point, these functions make it obvious what libpng will be * doing, whereas "expand" can (and does) mean any number of things. * - * GRP 20060307: In libpng-1.4.0, png_set_gray_1_2_4_to_8() was modified - * to expand only the sample depth but not to expand the tRNS to alpha. + * GRP 20060307: In libpng-1.2.9, png_set_gray_1_2_4_to_8() was modified + * to expand only the sample depth but not to expand the tRNS to alpha + * and its name was changed to png_set_expand_gray_1_2_4_to_8(). */ /* Expand paletted images to RGB. */ @@ -592,37 +605,27 @@ void PNGAPI png_set_palette_to_rgb(png_structp png_ptr) { png_debug(1, "in png_set_palette_to_rgb"); + if (png_ptr == NULL) return; + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); png_ptr->flags &= ~PNG_FLAG_ROW_INIT; } -#if !defined(PNG_1_0_X) /* Expand grayscale images of less than 8-bit depth to 8 bits. */ void PNGAPI png_set_expand_gray_1_2_4_to_8(png_structp png_ptr) { png_debug(1, "in png_set_expand_gray_1_2_4_to_8"); + if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_EXPAND; png_ptr->flags &= ~PNG_FLAG_ROW_INIT; } -#endif -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) -/* Expand grayscale images of less than 8-bit depth to 8 bits. */ -/* Deprecated as of libpng-1.2.9 */ -void PNGAPI -png_set_gray_1_2_4_to_8(png_structp png_ptr) -{ - png_debug(1, "in png_set_gray_1_2_4_to_8"); - if (png_ptr == NULL) - return; - png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); -} -#endif /* Expand tRNS chunks to alpha channels. */ @@ -630,23 +633,25 @@ void PNGAPI png_set_tRNS_to_alpha(png_structp png_ptr) { png_debug(1, "in png_set_tRNS_to_alpha"); + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); png_ptr->flags &= ~PNG_FLAG_ROW_INIT; } #endif /* defined(PNG_READ_EXPAND_SUPPORTED) */ -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED void PNGAPI png_set_gray_to_rgb(png_structp png_ptr) { png_debug(1, "in png_set_gray_to_rgb"); + png_ptr->transformations |= PNG_GRAY_TO_RGB; png_ptr->flags &= ~PNG_FLAG_ROW_INIT; } #endif -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -#if defined(PNG_FLOATING_POINT_SUPPORTED) +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +#ifdef PNG_FLOATING_POINT_SUPPORTED /* Convert a RGB image to a grayscale of the same width. This allows us, * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image. */ @@ -668,8 +673,10 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, png_fixed_point red, png_fixed_point green) { png_debug(1, "in png_set_rgb_to_gray"); + if (png_ptr == NULL) return; + switch(error_action) { case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY; @@ -681,12 +688,12 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR; } if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED png_ptr->transformations |= PNG_EXPAND; #else { png_warning(png_ptr, - "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED."); + "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED"); png_ptr->transformations &= ~PNG_RGB_TO_GRAY; } #endif @@ -717,24 +724,20 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) void PNGAPI png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr read_user_transform_fn) { png_debug(1, "in png_set_read_user_transform_fn"); + if (png_ptr == NULL) return; -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED png_ptr->transformations |= PNG_USER_TRANSFORM; png_ptr->read_user_transform_fn = read_user_transform_fn; #endif -#ifdef PNG_LEGACY_SUPPORTED - if (read_user_transform_fn) - png_warning(png_ptr, - "This version of libpng does not support user transforms"); -#endif } #endif @@ -745,18 +748,17 @@ void /* PRIVATE */ png_init_read_transformations(png_structp png_ptr) { png_debug(1, "in png_init_read_transformations"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (png_ptr != NULL) -#endif + { -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \ - || defined(PNG_READ_GAMMA_SUPPORTED) +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_SHIFT_SUPPORTED) || \ + defined(PNG_READ_GAMMA_SUPPORTED) int color_type = png_ptr->color_type; #endif #if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Detect gray background and attempt to enable optimization * for gray --> RGB case * @@ -796,9 +798,9 @@ png_init_read_transformations(png_structp png_ptr) = png_ptr->background.blue = png_ptr->background.gray; if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) { - png_ptr->trans_values.gray *= (png_uint_16)0xff; - png_ptr->trans_values.red = png_ptr->trans_values.green - = png_ptr->trans_values.blue = png_ptr->trans_values.gray; + png_ptr->trans_color.gray *= (png_uint_16)0xff; + png_ptr->trans_color.red = png_ptr->trans_color.green + = png_ptr->trans_color.blue = png_ptr->trans_color.gray; } break; @@ -808,9 +810,9 @@ png_init_read_transformations(png_structp png_ptr) = png_ptr->background.blue = png_ptr->background.gray; if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) { - png_ptr->trans_values.gray *= (png_uint_16)0x55; - png_ptr->trans_values.red = png_ptr->trans_values.green - = png_ptr->trans_values.blue = png_ptr->trans_values.gray; + png_ptr->trans_color.gray *= (png_uint_16)0x55; + png_ptr->trans_color.red = png_ptr->trans_color.green + = png_ptr->trans_color.blue = png_ptr->trans_color.gray; } break; @@ -820,9 +822,9 @@ png_init_read_transformations(png_structp png_ptr) = png_ptr->background.blue = png_ptr->background.gray; if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) { - png_ptr->trans_values.gray *= (png_uint_16)0x11; - png_ptr->trans_values.red = png_ptr->trans_values.green - = png_ptr->trans_values.blue = png_ptr->trans_values.gray; + png_ptr->trans_color.gray *= (png_uint_16)0x11; + png_ptr->trans_color.red = png_ptr->trans_color.green + = png_ptr->trans_color.blue = png_ptr->trans_color.gray; } break; @@ -843,10 +845,10 @@ png_init_read_transformations(png_structp png_ptr) png_ptr->background.blue = png_ptr->palette[png_ptr->background.index].blue; -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_INVERT_ALPHA) { -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) #endif { @@ -856,7 +858,7 @@ png_init_read_transformations(png_structp png_ptr) int i, istop; istop=(int)png_ptr->num_trans; for (i=0; itrans[i] = (png_byte)(255 - png_ptr->trans[i]); + png_ptr->trans_alpha[i] = (png_byte)(255 - png_ptr->trans_alpha[i]); } } #endif @@ -878,7 +880,7 @@ png_init_read_transformations(png_structp png_ptr) k=0; for (i=0; inum_trans; i++) { - if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff) + if (png_ptr->trans_alpha[i] != 0 && png_ptr->trans_alpha[i] != 0xff) k=1; /* Partial transparency is present */ } if (k == 0) @@ -888,8 +890,9 @@ png_init_read_transformations(png_structp png_ptr) if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) && png_ptr->gamma != 0.0) { - png_build_gamma_table(png_ptr); -#if defined(PNG_READ_BACKGROUND_SUPPORTED) + png_build_gamma_table(png_ptr, png_ptr->bit_depth); + +#ifdef PNG_READ_BACKGROUND_SUPPORTED if (png_ptr->transformations & PNG_BACKGROUND) { if (color_type == PNG_COLOR_TYPE_PALETTE) @@ -944,42 +947,43 @@ png_init_read_transformations(png_structp png_ptr) else { back.red = (png_byte)(pow( - (double)png_ptr->background.red/255, gs) * 255.0 + .5); + (double)png_ptr->background.red/255.0, gs) * 255.0 + .5); back.green = (png_byte)(pow( - (double)png_ptr->background.green/255, gs) * 255.0 + .5); + (double)png_ptr->background.green/255.0, gs) * 255.0 + + .5); back.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255, gs) * 255.0 + .5); + (double)png_ptr->background.blue/255.0, gs) * 255.0 + .5); } back_1.red = (png_byte)(pow( - (double)png_ptr->background.red/255, g) * 255.0 + .5); + (double)png_ptr->background.red/255.0, g) * 255.0 + .5); back_1.green = (png_byte)(pow( - (double)png_ptr->background.green/255, g) * 255.0 + .5); + (double)png_ptr->background.green/255.0, g) * 255.0 + .5); back_1.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255, g) * 255.0 + .5); + (double)png_ptr->background.blue/255.0, g) * 255.0 + .5); } for (i = 0; i < num_palette; i++) { - if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff) + if (i < (int)png_ptr->num_trans && png_ptr->trans_alpha[i] != 0xff) { - if (png_ptr->trans[i] == 0) + if (png_ptr->trans_alpha[i] == 0) { palette[i] = back; } - else /* if (png_ptr->trans[i] != 0xff) */ + else /* if (png_ptr->trans_alpha[i] != 0xff) */ { png_byte v, w; v = png_ptr->gamma_to_1[palette[i].red]; - png_composite(w, v, png_ptr->trans[i], back_1.red); + png_composite(w, v, png_ptr->trans_alpha[i], back_1.red); palette[i].red = png_ptr->gamma_from_1[w]; v = png_ptr->gamma_to_1[palette[i].green]; - png_composite(w, v, png_ptr->trans[i], back_1.green); + png_composite(w, v, png_ptr->trans_alpha[i], back_1.green); palette[i].green = png_ptr->gamma_from_1[w]; v = png_ptr->gamma_to_1[palette[i].blue]; - png_composite(w, v, png_ptr->trans[i], back_1.blue); + png_composite(w, v, png_ptr->trans_alpha[i], back_1.blue); palette[i].blue = png_ptr->gamma_from_1[w]; } } @@ -990,14 +994,14 @@ png_init_read_transformations(png_structp png_ptr) palette[i].blue = png_ptr->gamma_table[palette[i].blue]; } } - /* Prevent the transformations being done again, and make sure - * that the now spurious alpha channel is stripped - the code - * has just reduced background composition and gamma correction - * to a simple alpha channel strip. - */ - png_ptr->transformations &= ~PNG_BACKGROUND; - png_ptr->transformations &= ~PNG_GAMMA; - png_ptr->transformations |= PNG_STRIP_ALPHA; + /* Prevent the transformations being done again, and make sure + * that the now spurious alpha channel is stripped - the code + * has just reduced background composition and gamma correction + * to a simple alpha channel strip. + */ + png_ptr->transformations &= ~PNG_BACKGROUND; + png_ptr->transformations &= ~PNG_GAMMA; + png_ptr->transformations |= PNG_STRIP_ALPHA; } /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */ else @@ -1075,15 +1079,15 @@ png_init_read_transformations(png_structp png_ptr) palette[i].blue = png_ptr->gamma_table[palette[i].blue]; } - /* Done the gamma correction. */ - png_ptr->transformations &= ~PNG_GAMMA; + /* Done the gamma correction. */ + png_ptr->transformations &= ~PNG_GAMMA; } } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED else #endif #endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */ -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED /* No GAMMA transformation */ if ((png_ptr->transformations & PNG_BACKGROUND) && (color_type == PNG_COLOR_TYPE_PALETTE)) @@ -1099,19 +1103,19 @@ png_init_read_transformations(png_structp png_ptr) for (i = 0; i < istop; i++) { - if (png_ptr->trans[i] == 0) + if (png_ptr->trans_alpha[i] == 0) { palette[i] = back; } - else if (png_ptr->trans[i] != 0xff) + else if (png_ptr->trans_alpha[i] != 0xff) { /* The png_composite() macro is defined in png.h */ png_composite(palette[i].red, palette[i].red, - png_ptr->trans[i], back.red); + png_ptr->trans_alpha[i], back.red); png_composite(palette[i].green, palette[i].green, - png_ptr->trans[i], back.green); + png_ptr->trans_alpha[i], back.green); png_composite(palette[i].blue, palette[i].blue, - png_ptr->trans[i], back.blue); + png_ptr->trans_alpha[i], back.blue); } } @@ -1121,7 +1125,7 @@ png_init_read_transformations(png_structp png_ptr) } #endif /* PNG_READ_BACKGROUND_SUPPORTED */ -#if defined(PNG_READ_SHIFT_SUPPORTED) +#ifdef PNG_READ_SHIFT_SUPPORTED if ((png_ptr->transformations & PNG_SHIFT) && (color_type == PNG_COLOR_TYPE_PALETTE)) { @@ -1161,7 +1165,8 @@ void /* PRIVATE */ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_read_transform_info"); -#if defined(PNG_READ_EXPAND_SUPPORTED) + +#ifdef PNG_READ_EXPAND_SUPPORTED if (png_ptr->transformations & PNG_EXPAND) { if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) @@ -1188,7 +1193,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED if (png_ptr->transformations & PNG_BACKGROUND) { info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; @@ -1197,7 +1202,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (png_ptr->transformations & PNG_GAMMA) { #ifdef PNG_FLOATING_POINT_SUPPORTED @@ -1209,23 +1214,23 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_16_TO_8_SUPPORTED) +#ifdef PNG_READ_16_TO_8_SUPPORTED if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16)) info_ptr->bit_depth = 8; #endif -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED if (png_ptr->transformations & PNG_GRAY_TO_RGB) info_ptr->color_type |= PNG_COLOR_MASK_COLOR; #endif -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED if (png_ptr->transformations & PNG_RGB_TO_GRAY) info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR; #endif -#if defined(PNG_READ_DITHER_SUPPORTED) - if (png_ptr->transformations & PNG_DITHER) +#ifdef PNG_READ_QUANTIZE_SUPPORTED + if (png_ptr->transformations & PNG_QUANTIZE) { if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && @@ -1236,7 +1241,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) } #endif -#if defined(PNG_READ_PACK_SUPPORTED) +#ifdef PNG_READ_PACK_SUPPORTED if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) info_ptr->bit_depth = 8; #endif @@ -1248,7 +1253,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) else info_ptr->channels = 1; -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA) info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; #endif @@ -1256,7 +1261,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) info_ptr->channels++; -#if defined(PNG_READ_FILLER_SUPPORTED) +#ifdef PNG_READ_FILLER_SUPPORTED /* STRIP_ALPHA and FILLER allowed: MASK_ALPHA bit stripped above */ if ((png_ptr->transformations & PNG_FILLER) && ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || @@ -1264,10 +1269,8 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) { info_ptr->channels++; /* If adding a true alpha channel not just filler */ -#if !defined(PNG_1_0_X) if (png_ptr->transformations & PNG_ADD_ALPHA) info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; -#endif } #endif @@ -1287,7 +1290,7 @@ defined(PNG_READ_USER_TRANSFORM_SUPPORTED) info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width); -#if !defined(PNG_READ_EXPAND_SUPPORTED) +#ifndef PNG_READ_EXPAND_SUPPORTED if (png_ptr) return; #endif @@ -1301,9 +1304,10 @@ void /* PRIVATE */ png_do_read_transformations(png_structp png_ptr) { png_debug(1, "in png_do_read_transformations"); + if (png_ptr->row_buf == NULL) { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) +#ifdef PNG_STDIO_SUPPORTED char msg[50]; png_snprintf2(msg, 50, @@ -1327,20 +1331,20 @@ png_do_read_transformations(png_structp png_ptr) #endif #endif -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED if (png_ptr->transformations & PNG_EXPAND) { if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE) { png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette, png_ptr->trans, png_ptr->num_trans); + png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans); } else { if (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND_tRNS)) png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_values)); + &(png_ptr->trans_color)); else png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, NULL); @@ -1348,17 +1352,18 @@ png_do_read_transformations(png_structp png_ptr) } #endif -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA) png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)); #endif -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED if (png_ptr->transformations & PNG_RGB_TO_GRAY) { int rgb_error = - png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1); + png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), + png_ptr->row_buf + 1); if (rgb_error) { png_ptr->rgb_to_gray_status=1; @@ -1403,7 +1408,7 @@ png_do_read_transformations(png_structp png_ptr) * transform appropriately, then it would save a lot of work/time. */ -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* If gray -> RGB, do so now only if background is non-gray; else do later * for performance reasons */ @@ -1412,13 +1417,13 @@ png_do_read_transformations(png_structp png_ptr) png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED if ((png_ptr->transformations & PNG_BACKGROUND) && ((png_ptr->num_trans != 0 ) || (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_values), &(png_ptr->background) -#if defined(PNG_READ_GAMMA_SUPPORTED) + &(png_ptr->trans_color), &(png_ptr->background) +#ifdef PNG_READ_GAMMA_SUPPORTED , &(png_ptr->background_1), png_ptr->gamma_table, png_ptr->gamma_from_1, png_ptr->gamma_to_1, png_ptr->gamma_16_table, @@ -1428,9 +1433,9 @@ png_do_read_transformations(png_structp png_ptr) ); #endif -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if ((png_ptr->transformations & PNG_GAMMA) && -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED !((png_ptr->transformations & PNG_BACKGROUND) && ((png_ptr->num_trans != 0) || (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) && @@ -1441,76 +1446,76 @@ png_do_read_transformations(png_structp png_ptr) png_ptr->gamma_shift); #endif -#if defined(PNG_READ_16_TO_8_SUPPORTED) +#ifdef PNG_READ_16_TO_8_SUPPORTED if (png_ptr->transformations & PNG_16_TO_8) png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_DITHER_SUPPORTED) - if (png_ptr->transformations & PNG_DITHER) +#ifdef PNG_READ_QUANTIZE_SUPPORTED + if (png_ptr->transformations & PNG_QUANTIZE) { - png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette_lookup, png_ptr->dither_index); + png_do_quantize((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1, + png_ptr->palette_lookup, png_ptr->quantize_index); if (png_ptr->row_info.rowbytes == (png_uint_32)0) - png_error(png_ptr, "png_do_dither returned rowbytes=0"); + png_error(png_ptr, "png_do_quantize returned rowbytes=0"); } #endif -#if defined(PNG_READ_INVERT_SUPPORTED) +#ifdef PNG_READ_INVERT_SUPPORTED if (png_ptr->transformations & PNG_INVERT_MONO) png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_SHIFT_SUPPORTED) +#ifdef PNG_READ_SHIFT_SUPPORTED if (png_ptr->transformations & PNG_SHIFT) png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1, &(png_ptr->shift)); #endif -#if defined(PNG_READ_PACK_SUPPORTED) +#ifdef PNG_READ_PACK_SUPPORTED if (png_ptr->transformations & PNG_PACK) png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_BGR_SUPPORTED) +#ifdef PNG_READ_BGR_SUPPORTED if (png_ptr->transformations & PNG_BGR) png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED if (png_ptr->transformations & PNG_PACKSWAP) png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* If gray -> RGB, do so now only if we did not do so above */ if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_FILLER_SUPPORTED) +#ifdef PNG_READ_FILLER_SUPPORTED if (png_ptr->transformations & PNG_FILLER) png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, (png_uint_32)png_ptr->filler, png_ptr->flags); #endif -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_INVERT_ALPHA) png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_SWAP_ALPHA) png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_SWAP_SUPPORTED) +#ifdef PNG_READ_SWAP_SUPPORTED if (png_ptr->transformations & PNG_SWAP_BYTES) png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED if (png_ptr->transformations & PNG_USER_TRANSFORM) { if (png_ptr->read_user_transform_fn != NULL) @@ -1524,7 +1529,7 @@ png_do_read_transformations(png_structp png_ptr) /* png_byte channels; number of channels (1-4) */ /* png_byte pixel_depth; bits per pixel (depth*channels) */ png_ptr->row_buf + 1); /* start of pixel data for row */ -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED if (png_ptr->user_transform_depth) png_ptr->row_info.bit_depth = png_ptr->user_transform_depth; if (png_ptr->user_transform_channels) @@ -1539,7 +1544,7 @@ png_do_read_transformations(png_structp png_ptr) } -#if defined(PNG_READ_PACK_SUPPORTED) +#ifdef PNG_READ_PACK_SUPPORTED /* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel, * without changing the actual values. Thus, if you had a row with * a bit depth of 1, you would end up with bytes that only contained @@ -1550,11 +1555,8 @@ void /* PRIVATE */ png_do_unpack(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_unpack"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && row_info->bit_depth < 8) -#else + if (row_info->bit_depth < 8) -#endif { png_uint_32 i; png_uint_32 row_width=row_info->width; @@ -1632,7 +1634,7 @@ png_do_unpack(png_row_infop row_info, png_bytep row) } #endif -#if defined(PNG_READ_SHIFT_SUPPORTED) +#ifdef PNG_READ_SHIFT_SUPPORTED /* Reverse the effects of png_do_shift. This routine merely shifts the * pixels back to their significant bits values. Thus, if you have * a row of bit depth 8, but only 5 are significant, this will shift @@ -1642,10 +1644,8 @@ void /* PRIVATE */ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) { png_debug(1, "in png_do_unshift"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && sig_bits != NULL && -#endif row_info->color_type != PNG_COLOR_TYPE_PALETTE) { int shift[4]; @@ -1745,17 +1745,14 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) } #endif -#if defined(PNG_READ_16_TO_8_SUPPORTED) +#ifdef PNG_READ_16_TO_8_SUPPORTED /* Chop rows of bit depth 16 down to 8 */ void /* PRIVATE */ png_do_chop(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_chop"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && row_info->bit_depth == 16) -#else + if (row_info->bit_depth == 16) -#endif { png_bytep sp = row; png_bytep dp = row; @@ -1764,7 +1761,7 @@ png_do_chop(png_row_infop row_info, png_bytep row) for (i = 0; iwidth; if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) @@ -1895,14 +1890,12 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) } #endif -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED void /* PRIVATE */ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_read_invert_alpha"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif + { png_uint_32 row_width = row_info->width; if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) @@ -1993,7 +1986,7 @@ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) } #endif -#if defined(PNG_READ_FILLER_SUPPORTED) +#ifdef PNG_READ_FILLER_SUPPORTED /* Add filler channel if we have RGB color */ void /* PRIVATE */ png_do_read_filler(png_row_infop row_info, png_bytep row, @@ -2006,10 +1999,8 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, png_byte lo_filler = (png_byte)(filler & 0xff); png_debug(1, "in png_do_read_filler"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif row_info->color_type == PNG_COLOR_TYPE_GRAY) { if (row_info->bit_depth == 8) @@ -2169,7 +2160,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, } #endif -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Expand grayscale files to RGB, with or without alpha */ void /* PRIVATE */ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) @@ -2178,10 +2169,8 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) png_uint_32 row_width = row_info->width; png_debug(1, "in png_do_gray_to_rgb"); + if (row_info->bit_depth >= 8 && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif !(row_info->color_type & PNG_COLOR_MASK_COLOR)) { if (row_info->color_type == PNG_COLOR_TYPE_GRAY) @@ -2252,7 +2241,7 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) } #endif -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* Reduce RGB files to grayscale, with or without alpha * using the equation given in Poynton's ColorFAQ at * (THIS LINK IS DEAD June 2008) @@ -2284,10 +2273,8 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) int rgb_error = 0; png_debug(1, "in png_do_rgb_to_gray"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif (row_info->color_type & PNG_COLOR_MASK_COLOR)) { png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; @@ -2362,7 +2349,8 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) { png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green&0xff) >> png_ptr->gamma_shift][green>>8]; png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> png_ptr->gamma_shift][blue>>8]; @@ -2458,13 +2446,14 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) else { png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> - png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> - png_ptr->gamma_shift][green>>8]; + png_ptr->gamma_shift][red>>8]; + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green&0xff) >> + png_ptr->gamma_shift][green>>8]; png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> - png_ptr->gamma_shift][blue>>8]; + png_ptr->gamma_shift][blue>>8]; png_uint_16 gray16 = (png_uint_16)((rc * red_1 - + gc * green_1 + bc * blue_1)>>15); + + gc * green_1 + bc * blue_1)>>15); w = png_ptr->gamma_16_from_1[(gray16&0xff) >> png_ptr->gamma_shift][gray16 >> 8]; rgb_error |= 1; @@ -2522,6 +2511,7 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette) int v; png_debug(1, "in png_do_build_grayscale_palette"); + if (palette == NULL) return; @@ -2561,197 +2551,16 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette) } } -/* This function is currently unused. Do we really need it? */ -#if defined(PNG_READ_DITHER_SUPPORTED) && defined(PNG_CORRECT_PALETTE_SUPPORTED) -void /* PRIVATE */ -png_correct_palette(png_structp png_ptr, png_colorp palette, - int num_palette) -{ - png_debug(1, "in png_correct_palette"); -#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ - defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) - if (png_ptr->transformations & (PNG_GAMMA | PNG_BACKGROUND)) - { - png_color back, back_1; - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) - { - back.red = png_ptr->gamma_table[png_ptr->background.red]; - back.green = png_ptr->gamma_table[png_ptr->background.green]; - back.blue = png_ptr->gamma_table[png_ptr->background.blue]; - - back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; - back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; - back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; - } - else - { - double g; - - g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma); - - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN || - fabs(g - 1.0) < PNG_GAMMA_THRESHOLD) - { - back.red = png_ptr->background.red; - back.green = png_ptr->background.green; - back.blue = png_ptr->background.blue; - } - else - { - back.red = - (png_byte)(pow((double)png_ptr->background.red/255, g) * - 255.0 + 0.5); - back.green = - (png_byte)(pow((double)png_ptr->background.green/255, g) * - 255.0 + 0.5); - back.blue = - (png_byte)(pow((double)png_ptr->background.blue/255, g) * - 255.0 + 0.5); - } - - g = 1.0 / png_ptr->background_gamma; - - back_1.red = - (png_byte)(pow((double)png_ptr->background.red/255, g) * - 255.0 + 0.5); - back_1.green = - (png_byte)(pow((double)png_ptr->background.green/255, g) * - 255.0 + 0.5); - back_1.blue = - (png_byte)(pow((double)png_ptr->background.blue/255, g) * - 255.0 + 0.5); - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_uint_32 i; - - for (i = 0; i < (png_uint_32)num_palette; i++) - { - if (i < png_ptr->num_trans && png_ptr->trans[i] == 0) - { - palette[i] = back; - } - else if (i < png_ptr->num_trans && png_ptr->trans[i] != 0xff) - { - png_byte v, w; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].red]; - png_composite(w, v, png_ptr->trans[i], back_1.red); - palette[i].red = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].green]; - png_composite(w, v, png_ptr->trans[i], back_1.green); - palette[i].green = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].blue]; - png_composite(w, v, png_ptr->trans[i], back_1.blue); - palette[i].blue = png_ptr->gamma_from_1[w]; - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - else - { - int i; - - for (i = 0; i < num_palette; i++) - { - if (palette[i].red == (png_byte)png_ptr->trans_values.gray) - { - palette[i] = back; - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - } - else -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (png_ptr->transformations & PNG_GAMMA) - { - int i; - - for (i = 0; i < num_palette; i++) - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - else -#endif -#endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_color back; - - back.red = (png_byte)png_ptr->background.red; - back.green = (png_byte)png_ptr->background.green; - back.blue = (png_byte)png_ptr->background.blue; - - for (i = 0; i < (int)png_ptr->num_trans; i++) - { - if (png_ptr->trans[i] == 0) - { - palette[i].red = back.red; - palette[i].green = back.green; - palette[i].blue = back.blue; - } - else if (png_ptr->trans[i] != 0xff) - { - png_composite(palette[i].red, png_ptr->palette[i].red, - png_ptr->trans[i], back.red); - png_composite(palette[i].green, png_ptr->palette[i].green, - png_ptr->trans[i], back.green); - png_composite(palette[i].blue, png_ptr->palette[i].blue, - png_ptr->trans[i], back.blue); - } - } - } - else /* Assume grayscale palette (what else could it be?) */ - { - int i; - - for (i = 0; i < num_palette; i++) - { - if (i == (png_byte)png_ptr->trans_values.gray) - { - palette[i].red = (png_byte)png_ptr->background.red; - palette[i].green = (png_byte)png_ptr->background.green; - palette[i].blue = (png_byte)png_ptr->background.blue; - } - } - } - } -#endif -} -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED /* Replace any alpha or transparency with the supplied background color. * "background" is already in the screen gamma, while "background_1" is * at a gamma of 1.0. Paletted files have already been taken care of. */ void /* PRIVATE */ png_do_background(png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background -#if defined(PNG_READ_GAMMA_SUPPORTED) + png_color_16p trans_color, png_color_16p background +#ifdef PNG_READ_GAMMA_SUPPORTED , png_color_16p background_1, png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, @@ -2765,12 +2574,10 @@ png_do_background(png_row_infop row_info, png_bytep row, int shift; png_debug(1, "in png_do_background"); + if (background != NULL && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) || - (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values))) + (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_color))) { switch (row_info->color_type) { @@ -2785,7 +2592,7 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x01) - == trans_values->gray) + == trans_color->gray) { *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); @@ -2803,7 +2610,7 @@ png_do_background(png_row_infop row_info, png_bytep row, case 2: { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_table != NULL) { sp = row; @@ -2811,7 +2618,7 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x03) - == trans_values->gray) + == trans_color->gray) { *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); @@ -2841,7 +2648,7 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x03) - == trans_values->gray) + == trans_color->gray) { *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); @@ -2860,7 +2667,7 @@ png_do_background(png_row_infop row_info, png_bytep row, case 4: { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_table != NULL) { sp = row; @@ -2868,7 +2675,7 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x0f) - == trans_values->gray) + == trans_color->gray) { *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); @@ -2898,7 +2705,7 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x0f) - == trans_values->gray) + == trans_color->gray) { *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); @@ -2917,13 +2724,13 @@ png_do_background(png_row_infop row_info, png_bytep row, case 8: { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_table != NULL) { sp = row; for (i = 0; i < row_width; i++, sp++) { - if (*sp == trans_values->gray) + if (*sp == trans_color->gray) { *sp = (png_byte)background->gray; } @@ -2939,7 +2746,7 @@ png_do_background(png_row_infop row_info, png_bytep row, sp = row; for (i = 0; i < row_width; i++, sp++) { - if (*sp == trans_values->gray) + if (*sp == trans_color->gray) { *sp = (png_byte)background->gray; } @@ -2950,7 +2757,7 @@ png_do_background(png_row_infop row_info, png_bytep row, case 16: { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_16 != NULL) { sp = row; @@ -2959,7 +2766,7 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 v; v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - if (v == trans_values->gray) + if (v == trans_color->gray) { /* Background is already in screen gamma */ *sp = (png_byte)((background->gray >> 8) & 0xff); @@ -2982,7 +2789,7 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 v; v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - if (v == trans_values->gray) + if (v == trans_color->gray) { *sp = (png_byte)((background->gray >> 8) & 0xff); *(sp + 1) = (png_byte)(background->gray & 0xff); @@ -2999,15 +2806,15 @@ png_do_background(png_row_infop row_info, png_bytep row, { if (row_info->bit_depth == 8) { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_table != NULL) { sp = row; for (i = 0; i < row_width; i++, sp += 3) { - if (*sp == trans_values->red && - *(sp + 1) == trans_values->green && - *(sp + 2) == trans_values->blue) + if (*sp == trans_color->red && + *(sp + 1) == trans_color->green && + *(sp + 2) == trans_color->blue) { *sp = (png_byte)background->red; *(sp + 1) = (png_byte)background->green; @@ -3027,9 +2834,9 @@ png_do_background(png_row_infop row_info, png_bytep row, sp = row; for (i = 0; i < row_width; i++, sp += 3) { - if (*sp == trans_values->red && - *(sp + 1) == trans_values->green && - *(sp + 2) == trans_values->blue) + if (*sp == trans_color->red && + *(sp + 1) == trans_color->green && + *(sp + 2) == trans_color->blue) { *sp = (png_byte)background->red; *(sp + 1) = (png_byte)background->green; @@ -3040,7 +2847,7 @@ png_do_background(png_row_infop row_info, png_bytep row, } else /* if (row_info->bit_depth == 16) */ { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_16 != NULL) { sp = row; @@ -3049,8 +2856,8 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); - if (r == trans_values->red && g == trans_values->green && - b == trans_values->blue) + if (r == trans_color->red && g == trans_color->green && + b == trans_color->blue) { /* Background is already in screen gamma */ *sp = (png_byte)((background->red >> 8) & 0xff); @@ -3084,8 +2891,8 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); - if (r == trans_values->red && g == trans_values->green && - b == trans_values->blue) + if (r == trans_color->red && g == trans_color->green && + b == trans_color->blue) { *sp = (png_byte)((background->red >> 8) & 0xff); *(sp + 1) = (png_byte)(background->red & 0xff); @@ -3104,7 +2911,7 @@ png_do_background(png_row_infop row_info, png_bytep row, { if (row_info->bit_depth == 8) { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_to_1 != NULL && gamma_from_1 != NULL && gamma_table != NULL) { @@ -3146,7 +2953,7 @@ png_do_background(png_row_infop row_info, png_bytep row, { *dp = *sp; } -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) { *dp = (png_byte)background->gray; @@ -3163,7 +2970,7 @@ png_do_background(png_row_infop row_info, png_bytep row, } else /* if (png_ptr->bit_depth == 16) */ { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_16 != NULL && gamma_16_from_1 != NULL && gamma_16_to_1 != NULL) { @@ -3181,7 +2988,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *dp = (png_byte)((v >> 8) & 0xff); *(dp + 1) = (png_byte)(v & 0xff); } -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) #else else @@ -3191,7 +2998,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *dp = (png_byte)((background->gray >> 8) & 0xff); *(dp + 1) = (png_byte)(background->gray & 0xff); } -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED else { png_uint_16 g, v, w; @@ -3217,7 +3024,7 @@ png_do_background(png_row_infop row_info, png_bytep row, { png_memcpy(dp, sp, 2); } -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) #else else @@ -3226,7 +3033,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *dp = (png_byte)((background->gray >> 8) & 0xff); *(dp + 1) = (png_byte)(background->gray & 0xff); } -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED else { png_uint_16 g, v; @@ -3247,7 +3054,7 @@ png_do_background(png_row_infop row_info, png_bytep row, { if (row_info->bit_depth == 8) { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_to_1 != NULL && gamma_from_1 != NULL && gamma_table != NULL) { @@ -3320,7 +3127,7 @@ png_do_background(png_row_infop row_info, png_bytep row, } else /* if (row_info->bit_depth == 16) */ { -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if (gamma_16 != NULL && gamma_16_from_1 != NULL && gamma_16_to_1 != NULL) { @@ -3437,7 +3244,7 @@ png_do_background(png_row_infop row_info, png_bytep row, } #endif -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED /* Gamma correct the image, avoiding the alpha channel. Make sure * you do this after you deal with the transparency issue on grayscale * or RGB images. If your bit depth is 8, use gamma_table, if it @@ -3454,10 +3261,8 @@ png_do_gamma(png_row_infop row_info, png_bytep row, png_uint_32 row_width=row_info->width; png_debug(1, "in png_do_gamma"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif ((row_info->bit_depth <= 8 && gamma_table != NULL) || (row_info->bit_depth == 16 && gamma_16_table != NULL))) { @@ -3578,10 +3383,10 @@ png_do_gamma(png_row_infop row_info, png_bytep row, int d = *sp & 0x03; *sp = (png_byte)( - ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)| - ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)| - ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)| - ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) )); + ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)| + ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)| + ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)| + ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) )); sp++; } } @@ -3595,7 +3400,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, int lsb = *sp & 0x0f; *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0) - | (((int)gamma_table[(lsb << 4) | lsb]) >> 4)); + | (((int)gamma_table[(lsb << 4) | lsb]) >> 4)); sp++; } } @@ -3628,13 +3433,13 @@ png_do_gamma(png_row_infop row_info, png_bytep row, } #endif -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED /* Expands a palette row to an RGB or RGBA row depending * upon whether you supply trans and num_trans. */ void /* PRIVATE */ png_do_expand_palette(png_row_infop row_info, png_bytep row, - png_colorp palette, png_bytep trans, int num_trans) + png_colorp palette, png_bytep trans_alpha, int num_trans) { int shift, value; png_bytep sp, dp; @@ -3642,10 +3447,8 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, png_uint_32 row_width=row_info->width; png_debug(1, "in png_do_expand_palette"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif row_info->color_type == PNG_COLOR_TYPE_PALETTE) { if (row_info->bit_depth < 8) @@ -3728,7 +3531,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, { case 8: { - if (trans != NULL) + if (trans_alpha != NULL) { sp = row + (png_size_t)row_width - 1; dp = row + (png_size_t)(row_width << 2) - 1; @@ -3738,7 +3541,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, if ((int)(*sp) >= num_trans) *dp-- = 0xff; else - *dp-- = trans[*sp]; + *dp-- = trans_alpha[*sp]; *dp-- = palette[*sp].blue; *dp-- = palette[*sp].green; *dp-- = palette[*sp].red; @@ -3788,9 +3591,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, png_uint_32 row_width=row_info->width; png_debug(1, "in png_do_expand"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif + { if (row_info->color_type == PNG_COLOR_TYPE_GRAY) { @@ -3989,19 +3790,17 @@ png_do_expand(png_row_infop row_info, png_bytep row, } #endif -#if defined(PNG_READ_DITHER_SUPPORTED) +#ifdef PNG_READ_QUANTIZE_SUPPORTED void /* PRIVATE */ -png_do_dither(png_row_infop row_info, png_bytep row, - png_bytep palette_lookup, png_bytep dither_lookup) +png_do_quantize(png_row_infop row_info, png_bytep row, + png_bytep palette_lookup, png_bytep quantize_lookup) { png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width=row_info->width; - png_debug(1, "in png_do_dither"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif + png_debug(1, "in png_do_quantize"); + { if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup && row_info->bit_depth == 8) @@ -4022,14 +3821,14 @@ png_do_dither(png_row_infop row_info, png_bytep row, * (((g >> 3) & 0x1f) << 5) | * ((b >> 3) & 0x1f); */ - p = (((r >> (8 - PNG_DITHER_RED_BITS)) & - ((1 << PNG_DITHER_RED_BITS) - 1)) << - (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | - (((g >> (8 - PNG_DITHER_GREEN_BITS)) & - ((1 << PNG_DITHER_GREEN_BITS) - 1)) << - (PNG_DITHER_BLUE_BITS)) | - ((b >> (8 - PNG_DITHER_BLUE_BITS)) & - ((1 << PNG_DITHER_BLUE_BITS) - 1)); + p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); *dp++ = palette_lookup[p]; } @@ -4051,14 +3850,14 @@ png_do_dither(png_row_infop row_info, png_bytep row, b = *sp++; sp++; - p = (((r >> (8 - PNG_DITHER_RED_BITS)) & - ((1 << PNG_DITHER_RED_BITS) - 1)) << - (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | - (((g >> (8 - PNG_DITHER_GREEN_BITS)) & - ((1 << PNG_DITHER_GREEN_BITS) - 1)) << - (PNG_DITHER_BLUE_BITS)) | - ((b >> (8 - PNG_DITHER_BLUE_BITS)) & - ((1 << PNG_DITHER_BLUE_BITS) - 1)); + p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); *dp++ = palette_lookup[p]; } @@ -4068,12 +3867,12 @@ png_do_dither(png_row_infop row_info, png_bytep row, row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); } else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && - dither_lookup && row_info->bit_depth == 8) + quantize_lookup && row_info->bit_depth == 8) { sp = row; for (i = 0; i < row_width; i++, sp++) { - *sp = dither_lookup[*sp]; + *sp = quantize_lookup[*sp]; } } } @@ -4081,7 +3880,7 @@ png_do_dither(png_row_infop row_info, png_bytep row, #endif #ifdef PNG_FLOATING_POINT_SUPPORTED -#if defined(PNG_READ_GAMMA_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED static PNG_CONST int png_gamma_shift[] = {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00}; @@ -4089,13 +3888,42 @@ static PNG_CONST int png_gamma_shift[] = * tables, we don't make a full table if we are reducing to 8-bit in * the future. Note also how the gamma_16 tables are segmented so that * we don't need to allocate > 64K chunks for a full 16-bit table. + * + * See the PNG extensions document for an integer algorithm for creating + * the gamma tables. Maybe we will implement that here someday. + * + * We should only reach this point if + * + * the file_gamma is known (i.e., the gAMA or sRGB chunk is present, + * or the application has provided a file_gamma) + * + * AND + * { + * the screen_gamma is known + * + * OR + * + * RGB_to_gray transformation is being performed + * } + * + * AND + * { + * the screen_gamma is different from the reciprocal of the + * file_gamma by more than the specified threshold + * + * OR + * + * a background color has been specified and the file_gamma + * and screen_gamma are not 1.0, within the specified threshold. + * } */ + void /* PRIVATE */ -png_build_gamma_table(png_structp png_ptr) +png_build_gamma_table(png_structp png_ptr, png_byte bit_depth) { png_debug(1, "in png_build_gamma_table"); - if (png_ptr->bit_depth <= 8) + if (bit_depth <= 8) { int i; double g; @@ -4199,9 +4027,8 @@ png_build_gamma_table(png_structp png_ptr) else g = 1.0; - png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr, + png_ptr->gamma_16_table = (png_uint_16pp)png_calloc(png_ptr, (png_uint_32)(num * png_sizeof(png_uint_16p))); - png_memset(png_ptr->gamma_16_table, 0, num * png_sizeof(png_uint_16p)); if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) { @@ -4261,9 +4088,8 @@ png_build_gamma_table(png_structp png_ptr) g = 1.0 / (png_ptr->gamma); - png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr, + png_ptr->gamma_16_to_1 = (png_uint_16pp)png_calloc(png_ptr, (png_uint_32)(num * png_sizeof(png_uint_16p ))); - png_memset(png_ptr->gamma_16_to_1, 0, num * png_sizeof(png_uint_16p)); for (i = 0; i < num; i++) { @@ -4286,10 +4112,8 @@ png_build_gamma_table(png_structp png_ptr) else g = png_ptr->gamma; /* Probably doing rgb_to_gray */ - png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr, + png_ptr->gamma_16_from_1 = (png_uint_16pp)png_calloc(png_ptr, (png_uint_32)(num * png_sizeof(png_uint_16p))); - png_memset(png_ptr->gamma_16_from_1, 0, - num * png_sizeof(png_uint_16p)); for (i = 0; i < num; i++) { @@ -4314,16 +4138,14 @@ png_build_gamma_table(png_structp png_ptr) /* To do: install integer version of png_build_gamma_table here */ #endif -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED /* Undoes intrapixel differencing */ void /* PRIVATE */ png_do_read_intrapixel(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_read_intrapixel"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif (row_info->color_type & PNG_COLOR_MASK_COLOR)) { int bytes_per_pixel; diff --git a/source/Irrlicht/libpng/pngrutil.c b/source/Irrlicht/libpng/pngrutil.c index 981218df..db5ec0c3 100644 --- a/source/Irrlicht/libpng/pngrutil.c +++ b/source/Irrlicht/libpng/pngrutil.c @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.2.38 [July 16, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.3 [June 26, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -14,57 +14,21 @@ * libpng itself during the course of reading an image. */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" -#if defined(PNG_READ_SUPPORTED) +#ifdef PNG_READ_SUPPORTED +#include "pngpriv.h" -#if defined(_WIN32_WCE) && (_WIN32_WCE<0x500) -# define WIN32_WCE_OLD -#endif - -#ifdef PNG_FLOATING_POINT_SUPPORTED -# if defined(WIN32_WCE_OLD) -/* The strtod() function is not supported on WindowsCE */ -__inline double png_strtod(png_structp png_ptr, PNG_CONST char *nptr, char **endptr) -{ - double result = 0; - int len; - wchar_t *str, *end; - - len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0); - str = (wchar_t *)png_malloc(png_ptr, len * png_sizeof(wchar_t)); - if ( NULL != str ) - { - MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len); - result = wcstod(str, &end); - len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL); - *endptr = (char *)nptr + (png_strlen(nptr) - len + 1); - png_free(png_ptr, str); - } - return result; -} -# else # define png_strtod(p,a,b) strtod(a,b) -# endif -#endif - png_uint_32 PNGAPI png_get_uint_31(png_structp png_ptr, png_bytep buf) { -#ifdef PNG_READ_BIG_ENDIAN_SUPPORTED png_uint_32 i = png_get_uint_32(buf); -#else - /* Avoid an extra function call by inlining the result. */ - png_uint_32 i = ((png_uint_32)(*buf) << 24) + - ((png_uint_32)(*(buf + 1)) << 16) + - ((png_uint_32)(*(buf + 2)) << 8) + - (png_uint_32)(*(buf + 3)); -#endif if (i > PNG_UINT_31_MAX) - png_error(png_ptr, "PNG unsigned integer out of range."); + png_error(png_ptr, "PNG unsigned integer out of range"); return (i); } -#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED +#ifndef PNG_USE_READ_MACROS /* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ png_uint_32 PNGAPI png_get_uint_32(png_bytep buf) @@ -101,7 +65,7 @@ png_get_uint_16(png_bytep buf) return (i); } -#endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */ +#endif /* PNG_USE_READ_MACROS */ /* Read the chunk header (length + type name). * Put the type name into png_ptr->chunk_name, and return the length. @@ -112,6 +76,13 @@ png_read_chunk_header(png_structp png_ptr) png_byte buf[8]; png_uint_32 length; +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk header is being read. + * PNG_IO_CHUNK_HDR requires a single I/O call. + */ + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_HDR; +#endif + /* Read the length and the chunk name */ png_read_data(png_ptr, buf, 8); length = png_get_uint_31(png_ptr, buf); @@ -129,6 +100,13 @@ png_read_chunk_header(png_structp png_ptr) /* Check to see if chunk name is valid */ png_check_chunk_name(png_ptr, png_ptr->chunk_name); +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that chunk data will (possibly) be read. + * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls. + */ + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_DATA; +#endif + return length; } @@ -173,7 +151,8 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip) } else { - png_chunk_error(png_ptr, "CRC error"); + png_chunk_benign_error(png_ptr, "CRC error"); + return (0); } return (1); } @@ -203,6 +182,12 @@ png_crc_error(png_structp png_ptr) need_crc = 0; } +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk CRC is being read */ + /* PNG_IO_CHUNK_CRC requires the I/O to be done at once */ + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_CRC; +#endif + png_read_data(png_ptr, crc_bytes, 4); if (need_crc) @@ -216,6 +201,97 @@ png_crc_error(png_structp png_ptr) #if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \ defined(PNG_READ_iCCP_SUPPORTED) +static png_size_t +png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size, + png_bytep output, png_size_t output_size) +{ + png_size_t count = 0; + + png_ptr->zstream.next_in = (png_bytep)data; /* const_cast: VALID */ + png_ptr->zstream.avail_in = size; + + while (1) + { + int ret, avail; + + /* Reset the output buffer each time round - we empty it + * after every inflate call. + */ + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = png_ptr->zbuf_size; + + ret = inflate(&png_ptr->zstream, Z_NO_FLUSH); + avail = png_ptr->zbuf_size - png_ptr->zstream.avail_out; + + /* First copy/count any new output - but only if we didn't + * get an error code. + */ + if ((ret == Z_OK || ret == Z_STREAM_END) && avail > 0) + { + if (output != 0 && output_size > count) + { + int copy = output_size - count; + if (avail < copy) copy = avail; + png_memcpy(output + count, png_ptr->zbuf, copy); + } + count += avail; + } + + if (ret == Z_OK) + continue; + + /* Termination conditions - always reset the zstream, it + * must be left in inflateInit state. + */ + png_ptr->zstream.avail_in = 0; + inflateReset(&png_ptr->zstream); + + if (ret == Z_STREAM_END) + return count; /* NOTE: may be zero. */ + + /* Now handle the error codes - the API always returns 0 + * and the error message is dumped into the uncompressed + * buffer if available. + */ + { + PNG_CONST char *msg; + if (png_ptr->zstream.msg != 0) + msg = png_ptr->zstream.msg; + else + { +#ifdef PNG_STDIO_SUPPORTED + char umsg[52]; + + switch (ret) + { + case Z_BUF_ERROR: + msg = "Buffer error in compressed datastream in %s chunk"; + break; + case Z_DATA_ERROR: + msg = "Data error in compressed datastream in %s chunk"; + break; + default: + msg = "Incomplete compressed datastream in %s chunk"; + break; + } + + png_snprintf(umsg, sizeof umsg, msg, png_ptr->chunk_name); + msg = umsg; +#else + msg = "Damaged compressed datastream in chunk other than IDAT"; +#endif + } + + png_warning(png_ptr, msg); + } + + /* 0 means an error - notice that this code simple ignores + * zero length compressed chunks as a result. + */ + return 0; + } +} + /* * Decompress trailing data in a chunk. The assumption is that chunkdata * points at an allocated area holding the contents of a chunk with a @@ -225,171 +301,114 @@ png_crc_error(png_structp png_ptr) */ void /* PRIVATE */ png_decompress_chunk(png_structp png_ptr, int comp_type, - png_size_t chunklength, - png_size_t prefix_size, png_size_t *newlength) + png_size_t chunklength, + png_size_t prefix_size, png_size_t *newlength) { - static PNG_CONST char msg[] = "Error decoding compressed text"; - png_charp text; - png_size_t text_size; - - if (comp_type == PNG_COMPRESSION_TYPE_BASE) + /* The caller should guarantee this */ + if (prefix_size > chunklength) { - int ret = Z_OK; - png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size); - png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - text_size = 0; - text = NULL; - - while (png_ptr->zstream.avail_in) - { - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret != Z_OK && ret != Z_STREAM_END) - { - if (png_ptr->zstream.msg != NULL) - png_warning(png_ptr, png_ptr->zstream.msg); - else - png_warning(png_ptr, msg); - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - if (text == NULL) - { - text_size = prefix_size + png_sizeof(msg) + 1; - text = (png_charp)png_malloc_warn(png_ptr, text_size); - if (text == NULL) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, "Not enough memory to decompress chunk"); - } - png_memcpy(text, png_ptr->chunkdata, prefix_size); - } - - text[text_size - 1] = 0x00; - - /* Copy what we can of the error message into the text chunk */ - text_size = (png_size_t)(chunklength - - (text - png_ptr->chunkdata) - 1); - if (text_size > png_sizeof(msg)) - text_size = png_sizeof(msg); - png_memcpy(text + prefix_size, msg, text_size); - break; - } - if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) - { - if (text == NULL) - { - text_size = prefix_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out; - text = (png_charp)png_malloc_warn(png_ptr, text_size + 1); - if (text == NULL) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, - "Not enough memory to decompress chunk."); - } - png_memcpy(text + prefix_size, png_ptr->zbuf, - text_size - prefix_size); - png_memcpy(text, png_ptr->chunkdata, prefix_size); - *(text + text_size) = 0x00; - } - else - { - png_charp tmp; - - tmp = text; - text = (png_charp)png_malloc_warn(png_ptr, - (png_uint_32)(text_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1)); - if (text == NULL) - { - png_free(png_ptr, tmp); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, - "Not enough memory to decompress chunk.."); - } - png_memcpy(text, tmp, text_size); - png_free(png_ptr, tmp); - png_memcpy(text + text_size, png_ptr->zbuf, - (png_ptr->zbuf_size - png_ptr->zstream.avail_out)); - text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; - *(text + text_size) = 0x00; - } - if (ret == Z_STREAM_END) - break; - else - { - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - } - } - if (ret != Z_STREAM_END) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char umsg[52]; - - if (ret == Z_BUF_ERROR) - png_snprintf(umsg, 52, - "Buffer error in compressed datastream in %s chunk", - png_ptr->chunk_name); - - else if (ret == Z_DATA_ERROR) - png_snprintf(umsg, 52, - "Data error in compressed datastream in %s chunk", - png_ptr->chunk_name); - - else - png_snprintf(umsg, 52, - "Incomplete compressed datastream in %s chunk", - png_ptr->chunk_name); - - png_warning(png_ptr, umsg); -#else - png_warning(png_ptr, - "Incomplete compressed datastream in chunk other than IDAT"); -#endif - text_size = prefix_size; - if (text == NULL) - { - text = (png_charp)png_malloc_warn(png_ptr, text_size+1); - if (text == NULL) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, "Not enough memory for text."); - } - png_memcpy(text, png_ptr->chunkdata, prefix_size); - } - *(text + text_size) = 0x00; - } - - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = text; - *newlength=text_size; + /* The recovery is to delete the chunk. */ + png_warning(png_ptr, "invalid chunklength"); + prefix_size = 0; /* To delete everything */ } + + else if (comp_type == PNG_COMPRESSION_TYPE_BASE) + { + png_size_t expanded_size = png_inflate(png_ptr, + (png_bytep)(png_ptr->chunkdata + prefix_size), + chunklength - prefix_size, + 0/*output*/, 0/*output size*/); + + /* Now check the limits on this chunk - if the limit fails the + * compressed data will be removed, the prefix will remain. + */ +#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED + if (png_ptr->user_chunk_malloc_max && + (prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1)) +#else +# ifdef PNG_USER_CHUNK_MALLOC_MAX + if ((PNG_USER_CHUNK_MALLOC_MAX > 0) && + prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1) +# endif +#endif + png_warning(png_ptr, "Exceeded size limit while expanding chunk"); + + /* If the size is zero either there was an error and a message + * has already been output (warning) or the size really is zero + * and we have nothing to do - the code will exit through the + * error case below. + */ +#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \ + defined(PNG_USER_CHUNK_MALLOC_MAX) + else +#endif + if (expanded_size > 0) + { + /* Success (maybe) - really uncompress the chunk. */ + png_size_t new_size = 0; + png_charp text = png_malloc_warn(png_ptr, + prefix_size + expanded_size + 1); + + if (text != NULL) + { + png_memcpy(text, png_ptr->chunkdata, prefix_size); + new_size = png_inflate(png_ptr, + (png_bytep)(png_ptr->chunkdata + prefix_size), + chunklength - prefix_size, + (png_bytep)(text + prefix_size), expanded_size); + text[prefix_size + expanded_size] = 0; /* just in case */ + + if (new_size == expanded_size) + { + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = text; + *newlength = prefix_size + expanded_size; + return; /* The success return! */ + } + + png_warning(png_ptr, "png_inflate logic error"); + png_free(png_ptr, text); + } + else + png_warning(png_ptr, "Not enough memory to decompress chunk"); + } + } + else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */ { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) +#ifdef PNG_STDIO_SUPPORTED char umsg[50]; - png_snprintf(umsg, 50, "Unknown zTXt compression type %d", comp_type); + png_snprintf(umsg, sizeof umsg, "Unknown zTXt compression type %d", + comp_type); png_warning(png_ptr, umsg); #else png_warning(png_ptr, "Unknown zTXt compression type"); #endif - *(png_ptr->chunkdata + prefix_size) = 0x00; - *newlength = prefix_size; + /* The recovery is to simply drop the data. */ } + + /* Generic error return - leave the prefix, delete the compressed + * data, reallocate the chunkdata to remove the potentially large + * amount of compressed data. + */ + { + png_charp text = png_malloc_warn(png_ptr, prefix_size + 1); + if (text != NULL) + { + if (prefix_size > 0) + png_memcpy(text, png_ptr->chunkdata, prefix_size); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = text; + + /* This is an extra zero in the 'uncompressed' part. */ + *(png_ptr->chunkdata + prefix_size) = 0x00; + } + /* Ignore a malloc error here - it is safe. */ + } + + *newlength = prefix_size; } #endif @@ -430,7 +449,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->bit_depth = (png_byte)bit_depth; png_ptr->interlaced = (png_byte)interlace_type; png_ptr->color_type = (png_byte)color_type; -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED png_ptr->filter_type = (png_byte)filter_type; #endif png_ptr->compression_type = (png_byte)compression_type; @@ -473,7 +492,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_color palette[PNG_MAX_PALETTE_LENGTH]; int num, i; -#ifndef PNG_NO_POINTER_INDEXING +#ifdef PNG_POINTER_INDEXING_SUPPORTED png_colorp pal_ptr; #endif @@ -501,7 +520,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) +#ifndef PNG_READ_OPT_PLTE_SUPPORTED if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) { png_crc_finish(png_ptr, length); @@ -526,7 +545,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) num = (int)length / 3; -#ifndef PNG_NO_POINTER_INDEXING +#ifdef PNG_POINTER_INDEXING_SUPPORTED for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++) { png_byte buf[3]; @@ -554,13 +573,13 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) * have an RGB image, the PLTE can be considered ancillary, so * we will act as though it is. */ -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) +#ifndef PNG_READ_OPT_PLTE_SUPPORTED if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) #endif { png_crc_finish(png_ptr, 0); } -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) +#ifndef PNG_READ_OPT_PLTE_SUPPORTED else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */ { /* If we don't want to use the data from an ancillary chunk, @@ -571,7 +590,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) { - png_chunk_error(png_ptr, "CRC error"); + png_chunk_benign_error(png_ptr, "CRC error"); } else { @@ -589,7 +608,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_set_PLTE(png_ptr, info_ptr, palette, num); -#if defined(PNG_READ_tRNS_SUPPORTED) +#ifdef PNG_READ_tRNS_SUPPORTED if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) @@ -631,7 +650,7 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */ } -#if defined(PNG_READ_gAMA_SUPPORTED) +#ifdef PNG_READ_gAMA_SUPPORTED void /* PRIVATE */ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -656,7 +675,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_warning(png_ptr, "Out of place gAMA chunk"); if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED && !(info_ptr->valid & PNG_INFO_sRGB) #endif ) @@ -686,13 +705,13 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)) if (PNG_OUT_OF_RANGE(igamma, 45500L, 500)) { png_warning(png_ptr, "Ignoring incorrect gAMA value when sRGB is also present"); -#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_CONSOLE_IO_SUPPORTED fprintf(stderr, "gamma = (%d/100000)", (int)igamma); #endif return; @@ -712,7 +731,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_sBIT_SUPPORTED) +#ifdef PNG_READ_sBIT_SUPPORTED void /* PRIVATE */ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -778,7 +797,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_cHRM_SUPPORTED) +#ifdef PNG_READ_cHRM_SUPPORTED void /* PRIVATE */ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -806,7 +825,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_warning(png_ptr, "Missing PLTE before cHRM"); if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM) -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED && !(info_ptr->valid & PNG_INFO_sRGB) #endif ) @@ -858,7 +877,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) blue_y = (float)int_y_blue / (float)100000.0; #endif -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB)) { if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) || @@ -872,7 +891,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_warning(png_ptr, "Ignoring incorrect cHRM value when sRGB is also present"); -#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_CONSOLE_IO_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED fprintf(stderr, "wx=%f, wy=%f, rx=%f, ry=%f\n", white_x, white_y, red_x, red_y); @@ -880,11 +899,13 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) green_x, green_y, blue_x, blue_y); #else fprintf(stderr, "wx=%ld, wy=%ld, rx=%ld, ry=%ld\n", - int_x_white, int_y_white, int_x_red, int_y_red); + (long)int_x_white, (long)int_y_white, + (long)int_x_red, (long)int_y_red); fprintf(stderr, "gx=%ld, gy=%ld, bx=%ld, by=%ld\n", - int_x_green, int_y_green, int_x_blue, int_y_blue); + (long)int_x_green, (long)int_y_green, + (long)int_x_blue, (long)int_y_blue); #endif -#endif /* PNG_NO_CONSOLE_IO */ +#endif /* PNG_CONSOLE_IO_SUPPORTED */ } return; } @@ -902,7 +923,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_sRGB_SUPPORTED) +#ifdef PNG_READ_sRGB_SUPPORTED void /* PRIVATE */ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -964,7 +985,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_warning(png_ptr, "Ignoring incorrect gAMA value when sRGB is also present"); -#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_CONSOLE_IO_SUPPORTED # ifdef PNG_FIXED_POINT_SUPPORTED fprintf(stderr, "incorrect gamma=(%d/100000)\n", (int)png_ptr->int_gamma); @@ -1000,7 +1021,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif /* PNG_READ_sRGB_SUPPORTED */ -#if defined(PNG_READ_iCCP_SUPPORTED) +#ifdef PNG_READ_iCCP_SUPPORTED void /* PRIVATE */ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Note: this does not properly handle chunks that are > 64K under DOS */ @@ -1109,7 +1130,19 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; - png_warning(png_ptr, "Ignoring truncated iCCP profile."); + png_warning(png_ptr, "Ignoring truncated iCCP profile"); +#ifdef PNG_STDIO_SUPPORTED + { + char umsg[50]; + + png_snprintf(umsg, 50, "declared profile size = %lu", + (unsigned long)profile_size); + png_warning(png_ptr, umsg); + png_snprintf(umsg, 50, "actual profile length = %lu", + (unsigned long)profile_length); + png_warning(png_ptr, umsg); + } +#endif return; } @@ -1120,14 +1153,14 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif /* PNG_READ_iCCP_SUPPORTED */ -#if defined(PNG_READ_sPLT_SUPPORTED) +#ifdef PNG_READ_sPLT_SUPPORTED void /* PRIVATE */ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Note: this does not properly handle chunks that are > 64K under DOS */ { png_bytep entry_start; png_sPLT_t new_palette; -#ifdef PNG_NO_POINTER_INDEXING +#ifdef PNG_POINTER_INDEXING_SUPPORTED png_sPLT_entryp pp; #endif int data_length, entry_size, i; @@ -1136,6 +1169,23 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_debug(1, "in png_handle_sPLT"); +#ifdef PNG_USER_LIMITS_SUPPORTED + + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + if (--png_ptr->user_chunk_cache_max == 1) + { + png_warning(png_ptr, "No space in chunk cache for sPLT"); + png_crc_finish(png_ptr, length); + return; + } + } +#endif if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before sPLT"); @@ -1169,7 +1219,8 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata[slength] = 0x00; - for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; entry_start++) + for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; + entry_start++) /* Empty loop to find end of name */ ; ++entry_start; @@ -1210,10 +1261,10 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } -#ifndef PNG_NO_POINTER_INDEXING +#ifdef PNG_POINTER_INDEXING_SUPPORTED for (i = 0; i < new_palette.nentries; i++) { - png_sPLT_entryp pp = new_palette.entries + i; + pp = new_palette.entries + i; if (new_palette.depth == 8) { @@ -1265,7 +1316,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif /* PNG_READ_sPLT_SUPPORTED */ -#if defined(PNG_READ_tRNS_SUPPORTED) +#ifdef PNG_READ_tRNS_SUPPORTED void /* PRIVATE */ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -1301,7 +1352,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_read(png_ptr, buf, 2); png_ptr->num_trans = 1; - png_ptr->trans_values.gray = png_get_uint_16(buf); + png_ptr->trans_color.gray = png_get_uint_16(buf); } else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) { @@ -1315,9 +1366,9 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, (png_size_t)length); png_ptr->num_trans = 1; - png_ptr->trans_values.red = png_get_uint_16(buf); - png_ptr->trans_values.green = png_get_uint_16(buf + 2); - png_ptr->trans_values.blue = png_get_uint_16(buf + 4); + png_ptr->trans_color.red = png_get_uint_16(buf); + png_ptr->trans_color.green = png_get_uint_16(buf + 2); + png_ptr->trans_color.blue = png_get_uint_16(buf + 4); } else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { @@ -1356,11 +1407,11 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans, - &(png_ptr->trans_values)); + &(png_ptr->trans_color)); } #endif -#if defined(PNG_READ_bKGD_SUPPORTED) +#ifdef PNG_READ_bKGD_SUPPORTED void /* PRIVATE */ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -1449,7 +1500,7 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_hIST_SUPPORTED) +#ifdef PNG_READ_hIST_SUPPORTED void /* PRIVATE */ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -1503,7 +1554,7 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_pHYs_SUPPORTED) +#ifdef PNG_READ_pHYs_SUPPORTED void /* PRIVATE */ png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -1546,7 +1597,7 @@ png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_oFFs_SUPPORTED) +#ifdef PNG_READ_oFFs_SUPPORTED void /* PRIVATE */ png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -1589,7 +1640,7 @@ png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_pCAL_SUPPORTED) +#ifdef PNG_READ_pCAL_SUPPORTED /* Read the pCAL chunk (described in the PNG Extensions document) */ void /* PRIVATE */ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -1624,7 +1675,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); if (png_ptr->chunkdata == NULL) { - png_warning(png_ptr, "No memory for pCAL purpose."); + png_warning(png_ptr, "No memory for pCAL purpose"); return; } slength = (png_size_t)length; @@ -1685,12 +1736,12 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_debug(3, "Allocating pCAL parameters array"); params = (png_charpp)png_malloc_warn(png_ptr, - (png_uint_32)(nparams * png_sizeof(png_charp))) ; + (png_size_t)(nparams * png_sizeof(png_charp))); if (params == NULL) { png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; - png_warning(png_ptr, "No memory for pCAL params."); + png_warning(png_ptr, "No memory for pCAL params"); return; } @@ -1723,7 +1774,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_sCAL_SUPPORTED) +#ifdef PNG_READ_sCAL_SUPPORTED /* Read the sCAL chunk */ void /* PRIVATE */ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -1762,6 +1813,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (png_ptr->chunkdata == NULL) { png_warning(png_ptr, "Out of memory while processing sCAL chunk"); + png_crc_finish(png_ptr, length); return; } slength = (png_size_t)length; @@ -1783,6 +1835,8 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (*vp) { png_warning(png_ptr, "malformed width string in sCAL chunk"); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; return; } #else @@ -1791,9 +1845,11 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (swidth == NULL) { png_warning(png_ptr, "Out of memory while processing sCAL chunk width"); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; return; } - png_memcpy(swidth, ep, (png_size_t)png_strlen(ep)); + png_memcpy(swidth, ep, png_strlen(ep)); #endif #endif @@ -1804,8 +1860,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (png_ptr->chunkdata + slength < ep) { png_warning(png_ptr, "Truncated sCAL chunk"); -#if defined(PNG_FIXED_POINT_SUPPORTED) && \ - !defined(PNG_FLOATING_POINT_SUPPORTED) +#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) png_free(png_ptr, swidth); #endif png_free(png_ptr, png_ptr->chunkdata); @@ -1818,6 +1873,11 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (*vp) { png_warning(png_ptr, "malformed height string in sCAL chunk"); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; +#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) + png_free(png_ptr, swidth); +#endif return; } #else @@ -1826,9 +1886,14 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (sheight == NULL) { png_warning(png_ptr, "Out of memory while processing sCAL chunk height"); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; +#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) + png_free(png_ptr, swidth); +#endif return; } - png_memcpy(sheight, ep, (png_size_t)png_strlen(ep)); + png_memcpy(sheight, ep, png_strlen(ep)); #endif #endif @@ -1866,7 +1931,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_tIME_SUPPORTED) +#ifdef PNG_READ_tIME_SUPPORTED void /* PRIVATE */ png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -1909,7 +1974,7 @@ png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif -#if defined(PNG_READ_tEXt_SUPPORTED) +#ifdef PNG_READ_tEXt_SUPPORTED /* Note: this does not properly handle chunks that are > 64K under DOS */ void /* PRIVATE */ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -1923,6 +1988,22 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_debug(1, "in png_handle_tEXt"); +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + if (--png_ptr->user_chunk_cache_max == 1) + { + png_warning(png_ptr, "No space in chunk cache for tEXt"); + png_crc_finish(png_ptr, length); + return; + } + } +#endif if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before tEXt"); @@ -1944,7 +2025,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); if (png_ptr->chunkdata == NULL) { - png_warning(png_ptr, "No memory to process text chunk."); + png_warning(png_ptr, "No memory to process text chunk"); return; } slength = (png_size_t)length; @@ -1968,10 +2049,10 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) text++; text_ptr = (png_textp)png_malloc_warn(png_ptr, - (png_uint_32)png_sizeof(png_text)); + png_sizeof(png_text)); if (text_ptr == NULL) { - png_warning(png_ptr, "Not enough memory to process text chunk."); + png_warning(png_ptr, "Not enough memory to process text chunk"); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; return; @@ -1992,11 +2073,11 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = NULL; png_free(png_ptr, text_ptr); if (ret) - png_warning(png_ptr, "Insufficient memory to process text chunk."); + png_warning(png_ptr, "Insufficient memory to process text chunk"); } #endif -#if defined(PNG_READ_zTXt_SUPPORTED) +#ifdef PNG_READ_zTXt_SUPPORTED /* Note: this does not correctly handle chunks that are > 64K under DOS */ void /* PRIVATE */ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -2009,6 +2090,22 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_debug(1, "in png_handle_zTXt"); +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + if (--png_ptr->user_chunk_cache_max == 1) + { + png_warning(png_ptr, "No space in chunk cache for zTXt"); + png_crc_finish(png_ptr, length); + return; + } + } +#endif if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before zTXt"); @@ -2031,7 +2128,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); if (png_ptr->chunkdata == NULL) { - png_warning(png_ptr, "Out of memory processing zTXt chunk."); + png_warning(png_ptr, "Out of memory processing zTXt chunk"); return; } slength = (png_size_t)length; @@ -2072,10 +2169,10 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) (png_size_t)length, prefix_len, &data_len); text_ptr = (png_textp)png_malloc_warn(png_ptr, - (png_uint_32)png_sizeof(png_text)); + png_sizeof(png_text)); if (text_ptr == NULL) { - png_warning(png_ptr, "Not enough memory to process zTXt chunk."); + png_warning(png_ptr, "Not enough memory to process zTXt chunk"); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; return; @@ -2096,11 +2193,11 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; if (ret) - png_error(png_ptr, "Insufficient memory to store zTXt chunk."); + png_error(png_ptr, "Insufficient memory to store zTXt chunk"); } #endif -#if defined(PNG_READ_iTXt_SUPPORTED) +#ifdef PNG_READ_iTXt_SUPPORTED /* Note: this does not correctly handle chunks that are > 64K under DOS */ void /* PRIVATE */ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) @@ -2114,6 +2211,22 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_debug(1, "in png_handle_iTXt"); +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + if (--png_ptr->user_chunk_cache_max == 1) + { + png_warning(png_ptr, "No space in chunk cache for iTXt"); + png_crc_finish(png_ptr, length); + return; + } + } +#endif if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before iTXt"); @@ -2136,7 +2249,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); if (png_ptr->chunkdata == NULL) { - png_warning(png_ptr, "No memory to process iTXt chunk."); + png_warning(png_ptr, "No memory to process iTXt chunk"); return; } slength = (png_size_t)length; @@ -2204,10 +2317,10 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) else data_len = png_strlen(png_ptr->chunkdata + prefix_len); text_ptr = (png_textp)png_malloc_warn(png_ptr, - (png_uint_32)png_sizeof(png_text)); + png_sizeof(png_text)); if (text_ptr == NULL) { - png_warning(png_ptr, "Not enough memory to process iTXt chunk."); + png_warning(png_ptr, "Not enough memory to process iTXt chunk"); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; return; @@ -2226,7 +2339,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; if (ret) - png_error(png_ptr, "Insufficient memory to store iTXt chunk."); + png_error(png_ptr, "Insufficient memory to store iTXt chunk"); } #endif @@ -2242,22 +2355,36 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_debug(1, "in png_handle_unknown"); +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + if (--png_ptr->user_chunk_cache_max == 1) + { + png_warning(png_ptr, "No space in chunk cache for unknown chunk"); + png_crc_finish(png_ptr, length); + return; + } + } +#endif if (png_ptr->mode & PNG_HAVE_IDAT) { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_CONST PNG_IDAT; -#endif + PNG_IDAT; if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) /* Not an IDAT */ png_ptr->mode |= PNG_AFTER_IDAT; } if (!(png_ptr->chunk_name[0] & 0x20)) { -#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != PNG_HANDLE_CHUNK_ALWAYS -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED && png_ptr->read_user_chunk_fn == NULL #endif ) @@ -2265,9 +2392,9 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_chunk_error(png_ptr, "unknown critical chunk"); } -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED if ((png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED || (png_ptr->read_user_chunk_fn != NULL) #endif ) @@ -2283,7 +2410,8 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_memcpy((png_charp)png_ptr->unknown_chunk.name, (png_charp)png_ptr->chunk_name, png_sizeof(png_ptr->unknown_chunk.name)); - png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0'; + png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] + = '\0'; png_ptr->unknown_chunk.size = (png_size_t)length; if (length == 0) png_ptr->unknown_chunk.data = NULL; @@ -2292,7 +2420,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length); png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length); } -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED if (png_ptr->read_user_chunk_fn != NULL) { /* Callback to user unknown chunk handler */ @@ -2304,7 +2432,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (ret == 0) { if (!(png_ptr->chunk_name[0] & 0x20)) -#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != PNG_HANDLE_CHUNK_ALWAYS) #endif @@ -2325,7 +2453,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, skip); -#if !defined(PNG_READ_USER_CHUNKS_SUPPORTED) +#ifndef PNG_READ_USER_CHUNKS_SUPPORTED info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */ #endif } @@ -2383,7 +2511,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) png_uint_32 i; png_uint_32 row_width = png_ptr->width; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED if (png_ptr->transformations & PNG_PACKSWAP) { s_start = 0; @@ -2438,7 +2566,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) png_uint_32 row_width = png_ptr->width; int value; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED if (png_ptr->transformations & PNG_PACKSWAP) { s_start = 0; @@ -2490,7 +2618,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) png_uint_32 row_width = png_ptr->width; int value; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED if (png_ptr->transformations & PNG_PACKSWAP) { s_start = 0; @@ -2573,11 +2701,9 @@ png_do_read_interlace(png_structp png_ptr) png_bytep row = png_ptr->row_buf + 1; int pass = png_ptr->pass; png_uint_32 transformations = png_ptr->transformations; -#ifdef PNG_USE_LOCAL_ARRAYS /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Offset to next interlace block */ PNG_CONST int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; -#endif png_debug(1, "in png_do_read_interlace"); if (row != NULL && row_info != NULL) @@ -2599,7 +2725,7 @@ png_do_read_interlace(png_structp png_ptr) png_uint_32 i; int j; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED if (transformations & PNG_PACKSWAP) { sshift = (int)((row_info->width + 7) & 0x07); @@ -2652,7 +2778,7 @@ png_do_read_interlace(png_structp png_ptr) int jstop = png_pass_inc[pass]; png_uint_32 i; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED if (transformations & PNG_PACKSWAP) { sshift = (int)(((row_info->width + 3) & 0x03) << 1); @@ -2708,7 +2834,7 @@ png_do_read_interlace(png_structp png_ptr) png_uint_32 i; int jstop = png_pass_inc[pass]; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifdef PNG_READ_PACKSWAP_SUPPORTED if (transformations & PNG_PACKSWAP) { sshift = (int)(((row_info->width + 1) & 0x01) << 2); @@ -2757,7 +2883,8 @@ png_do_read_interlace(png_structp png_ptr) default: { png_size_t pixel_bytes = (row_info->pixel_depth >> 3); - png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes; + png_bytep sp = row + (png_size_t)(row_info->width - 1) + * pixel_bytes; png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; int jstop = png_pass_inc[pass]; @@ -2782,7 +2909,7 @@ png_do_read_interlace(png_structp png_ptr) row_info->width = final_width; row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width); } -#if !defined(PNG_READ_PACKSWAP_SUPPORTED) +#ifndef PNG_READ_PACKSWAP_SUPPORTED transformations = transformations; /* Silence compiler warning */ #endif } @@ -2911,11 +3038,10 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, } } -#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED void /* PRIVATE */ png_read_finish_row(png_structp png_ptr) { -#ifdef PNG_USE_LOCAL_ARRAYS #ifdef PNG_READ_INTERLACING_SUPPORTED /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ @@ -2931,7 +3057,6 @@ png_read_finish_row(png_structp png_ptr) /* Offset to next interlace block in the y direction */ PNG_CONST int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; #endif /* PNG_READ_INTERLACING_SUPPORTED */ -#endif png_debug(1, "in png_read_finish_row"); png_ptr->row_number++; @@ -2942,7 +3067,7 @@ png_read_finish_row(png_structp png_ptr) if (png_ptr->interlaced) { png_ptr->row_number = 0; - png_memset_check(png_ptr, png_ptr->prev_row, 0, + png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); do { @@ -2954,9 +3079,6 @@ png_read_finish_row(png_structp png_ptr) png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, - png_ptr->iwidth) + 1; - if (!(png_ptr->transformations & PNG_INTERLACE)) { png_ptr->num_rows = (png_ptr->height + @@ -2977,9 +3099,7 @@ png_read_finish_row(png_structp png_ptr) if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_CONST PNG_IDAT; -#endif + PNG_IDAT; char extra; int ret; @@ -3026,7 +3146,7 @@ png_read_finish_row(png_structp png_ptr) if (!(png_ptr->zstream.avail_out)) { - png_warning(png_ptr, "Extra compressed data."); + png_warning(png_ptr, "Extra compressed data"); png_ptr->mode |= PNG_AFTER_IDAT; png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; break; @@ -3043,12 +3163,11 @@ png_read_finish_row(png_structp png_ptr) png_ptr->mode |= PNG_AFTER_IDAT; } -#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ void /* PRIVATE */ png_read_start_row(png_structp png_ptr) { -#ifdef PNG_USE_LOCAL_ARRAYS #ifdef PNG_READ_INTERLACING_SUPPORTED /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ @@ -3063,7 +3182,6 @@ png_read_start_row(png_structp png_ptr) /* Offset to next interlace block in the y direction */ PNG_CONST int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif #endif int max_pixel_depth; @@ -3085,25 +3203,21 @@ png_read_start_row(png_structp png_ptr) png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - - png_ptr->irowbytes = - PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1; } else #endif /* PNG_READ_INTERLACING_SUPPORTED */ { png_ptr->num_rows = png_ptr->height; png_ptr->iwidth = png_ptr->width; - png_ptr->irowbytes = png_ptr->rowbytes + 1; } max_pixel_depth = png_ptr->pixel_depth; -#if defined(PNG_READ_PACK_SUPPORTED) +#ifdef PNG_READ_PACK_SUPPORTED if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8) max_pixel_depth = 8; #endif -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED if (png_ptr->transformations & PNG_EXPAND) { if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) @@ -3131,7 +3245,7 @@ png_read_start_row(png_structp png_ptr) } #endif -#if defined(PNG_READ_FILLER_SUPPORTED) +#ifdef PNG_READ_FILLER_SUPPORTED if (png_ptr->transformations & (PNG_FILLER)) { if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) @@ -3153,14 +3267,14 @@ png_read_start_row(png_structp png_ptr) } #endif -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED if (png_ptr->transformations & PNG_GRAY_TO_RGB) { if ( -#if defined(PNG_READ_EXPAND_SUPPORTED) +#ifdef PNG_READ_EXPAND_SUPPORTED (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || #endif -#if defined(PNG_READ_FILLER_SUPPORTED) +#ifdef PNG_READ_FILLER_SUPPORTED (png_ptr->transformations & (PNG_FILLER)) || #endif png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) @@ -3212,40 +3326,55 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) png_error(png_ptr, "This image requires a row greater than 64KB"); #endif - if (row_bytes + 64 > png_ptr->old_big_row_buf_size) + if (row_bytes + 48 > png_ptr->old_big_row_buf_size) { png_free(png_ptr, png_ptr->big_row_buf); - png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes + 64); if (png_ptr->interlaced) - png_memset(png_ptr->big_row_buf, 0, row_bytes + 64); + png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr, + row_bytes + 48); + else + png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, + row_bytes + 48); + png_ptr->old_big_row_buf_size = row_bytes + 48; + +#ifdef PNG_ALIGNED_MEMORY_SUPPORTED + /* Use 16-byte aligned memory for row_buf with at least 16 bytes + * of padding before and after row_buf. + */ + png_ptr->row_buf = png_ptr->big_row_buf + 32 + - (((png_alloc_size_t)&(png_ptr->big_row_buf[0]) + 15) % 16); + png_ptr->old_big_row_buf_size = row_bytes + 48; +#else + /* Use 32 bytes of padding before and 16 bytes after row_buf. */ png_ptr->row_buf = png_ptr->big_row_buf + 32; - png_ptr->old_big_row_buf_size = row_bytes + 64; +#endif + png_ptr->old_big_row_buf_size = row_bytes + 48; } #ifdef PNG_MAX_MALLOC_64K - if ((png_uint_32)row_bytes + 1 > (png_uint_32)65536L) + if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L) png_error(png_ptr, "This image requires a row greater than 64KB"); #endif - if ((png_uint_32)row_bytes > (png_uint_32)(PNG_SIZE_MAX - 1)) - png_error(png_ptr, "Row has too many bytes to allocate in memory."); + if ((png_uint_32)png_ptr->rowbytes > (png_uint_32)(PNG_SIZE_MAX - 1)) + png_error(png_ptr, "Row has too many bytes to allocate in memory"); - if (row_bytes + 1 > png_ptr->old_prev_row_size) + if (png_ptr->rowbytes + 1 > png_ptr->old_prev_row_size) { png_free(png_ptr, png_ptr->prev_row); png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)( - row_bytes + 1)); - png_memset_check(png_ptr, png_ptr->prev_row, 0, row_bytes + 1); - png_ptr->old_prev_row_size = row_bytes + 1; + png_ptr->rowbytes + 1)); + png_ptr->old_prev_row_size = png_ptr->rowbytes + 1; } - png_ptr->rowbytes = row_bytes; + png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); png_debug1(3, "width = %lu,", png_ptr->width); png_debug1(3, "height = %lu,", png_ptr->height); png_debug1(3, "iwidth = %lu,", png_ptr->iwidth); png_debug1(3, "num_rows = %lu,", png_ptr->num_rows); png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes); - png_debug1(3, "irowbytes = %lu", png_ptr->irowbytes); + png_debug1(3, "irowbytes = %lu", + PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); png_ptr->flags |= PNG_FLAG_ROW_INIT; } diff --git a/source/Irrlicht/libpng/pngset.c b/source/Irrlicht/libpng/pngset.c index 6727e48a..90ef1b4c 100644 --- a/source/Irrlicht/libpng/pngset.c +++ b/source/Irrlicht/libpng/pngset.c @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.2.39 [August 13, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.1 [February 25, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,15 +16,17 @@ * info struct and allows us to change the structure in the future. */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +#include "pngpriv.h" -#if defined(PNG_bKGD_SUPPORTED) +#ifdef PNG_bKGD_SUPPORTED void PNGAPI png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) { png_debug1(1, "in %s storage function", "bKGD"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -33,7 +35,7 @@ png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) } #endif -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED void PNGAPI png_set_cHRM(png_structp png_ptr, png_infop info_ptr, @@ -41,6 +43,7 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr, double green_x, double green_y, double blue_x, double blue_y) { png_debug1(1, "in %s storage function", "cHRM"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -74,10 +77,11 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point blue_x, png_fixed_point blue_y) { png_debug1(1, "in %s storage function", "cHRM fixed"); + if (png_ptr == NULL || info_ptr == NULL) return; -#if !defined(PNG_NO_CHECK_cHRM) +#ifdef PNG_CHECK_cHRM_SUPPORTED if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y)) #endif @@ -106,13 +110,15 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, #endif /* PNG_FIXED_POINT_SUPPORTED */ #endif /* PNG_cHRM_SUPPORTED */ -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED void PNGAPI png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) { double png_gamma; + png_debug1(1, "in %s storage function", "gAMA"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -140,6 +146,7 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point png_fixed_point png_gamma; png_debug1(1, "in %s storage function", "gAMA"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -170,34 +177,34 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point } #endif -#if defined(PNG_hIST_SUPPORTED) +#ifdef PNG_hIST_SUPPORTED void PNGAPI png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) { int i; png_debug1(1, "in %s storage function", "hIST"); + if (png_ptr == NULL || info_ptr == NULL) return; + if (info_ptr->num_palette == 0 || info_ptr->num_palette > PNG_MAX_PALETTE_LENGTH) { png_warning(png_ptr, - "Invalid palette size, hIST allocation skipped."); + "Invalid palette size, hIST allocation skipped"); return; } -#ifdef PNG_FREE_ME_SUPPORTED png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); -#endif /* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in * version 1.2.1 */ png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr, - (png_uint_32)(PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16))); + PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16)); if (png_ptr->hist == NULL) { - png_warning(png_ptr, "Insufficient memory for hIST chunk data."); + png_warning(png_ptr, "Insufficient memory for hIST chunk data"); return; } @@ -206,11 +213,7 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) info_ptr->hist = png_ptr->hist; info_ptr->valid |= PNG_INFO_hIST; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_HIST; -#else - png_ptr->flags |= PNG_FLAG_FREE_HIST; -#endif } #endif @@ -221,85 +224,22 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr, int filter_type) { png_debug1(1, "in %s storage function", "IHDR"); + if (png_ptr == NULL || info_ptr == NULL) return; - /* Check for width and height valid values */ - if (width == 0 || height == 0) - png_error(png_ptr, "Image width or height is zero in IHDR"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (width > png_ptr->user_width_max || height > png_ptr->user_height_max) - png_error(png_ptr, "image size exceeds user limits in IHDR"); -#else - if (width > PNG_USER_WIDTH_MAX || height > PNG_USER_HEIGHT_MAX) - png_error(png_ptr, "image size exceeds user limits in IHDR"); -#endif - if (width > PNG_UINT_31_MAX || height > PNG_UINT_31_MAX) - png_error(png_ptr, "Invalid image size in IHDR"); - if ( width > (PNG_UINT_32_MAX - >> 3) /* 8-byte RGBA pixels */ - - 64 /* bigrowbuf hack */ - - 1 /* filter byte */ - - 7*8 /* rounding of width to multiple of 8 pixels */ - - 8) /* extra max_pixel_depth pad */ - png_warning(png_ptr, "Width is too large for libpng to process pixels"); - - /* Check other values */ - if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && - bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth in IHDR"); - - if (color_type < 0 || color_type == 1 || - color_type == 5 || color_type > 6) - png_error(png_ptr, "Invalid color type in IHDR"); - - if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) || - ((color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8)) - png_error(png_ptr, "Invalid color type/bit depth combination in IHDR"); - - if (interlace_type >= PNG_INTERLACE_LAST) - png_error(png_ptr, "Unknown interlace method in IHDR"); - - if (compression_type != PNG_COMPRESSION_TYPE_BASE) - png_error(png_ptr, "Unknown compression method in IHDR"); - -#if defined(PNG_MNG_FEATURES_SUPPORTED) - /* Accept filter_method 64 (intrapixel differencing) only if - * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and - * 2. Libpng did not read a PNG signature (this filter_method is only - * used in PNG datastreams that are embedded in MNG datastreams) and - * 3. The application called png_permit_mng_features with a mask that - * included PNG_FLAG_MNG_FILTER_64 and - * 4. The filter_method is 64 and - * 5. The color_type is RGB or RGBA - */ - if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&png_ptr->mng_features_permitted) - png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); - if (filter_type != PNG_FILTER_TYPE_BASE) - { - if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && - ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && - (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA))) - png_error(png_ptr, "Unknown filter method in IHDR"); - if (png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) - png_warning(png_ptr, "Invalid filter method in IHDR"); - } -#else - if (filter_type != PNG_FILTER_TYPE_BASE) - png_error(png_ptr, "Unknown filter method in IHDR"); -#endif - info_ptr->width = width; info_ptr->height = height; info_ptr->bit_depth = (png_byte)bit_depth; - info_ptr->color_type =(png_byte) color_type; + info_ptr->color_type = (png_byte)color_type; info_ptr->compression_type = (png_byte)compression_type; info_ptr->filter_type = (png_byte)filter_type; info_ptr->interlace_type = (png_byte)interlace_type; + + png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type, + info_ptr->compression_type, info_ptr->filter_type); + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) info_ptr->channels = 1; else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) @@ -317,17 +257,18 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr, - 1 /* filter byte */ - 7*8 /* rounding of width to multiple of 8 pixels */ - 8) /* extra max_pixel_depth pad */ - info_ptr->rowbytes = (png_size_t)0; + info_ptr->rowbytes = 0; else info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); } -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED void PNGAPI png_set_oFFs(png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type) { png_debug1(1, "in %s storage function", "oFFs"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -338,16 +279,17 @@ png_set_oFFs(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_pCAL_SUPPORTED) +#ifdef PNG_pCAL_SUPPORTED void PNGAPI png_set_pCAL(png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params) { - png_uint_32 length; + png_size_t length; int i; png_debug1(1, "in %s storage function", "pCAL"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -357,10 +299,10 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length); if (info_ptr->pcal_purpose == NULL) { - png_warning(png_ptr, "Insufficient memory for pCAL purpose."); + png_warning(png_ptr, "Insufficient memory for pCAL purpose"); return; } - png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length); + png_memcpy(info_ptr->pcal_purpose, purpose, length); png_debug(3, "storing X0, X1, type, and nparams in info"); info_ptr->pcal_X0 = X0; @@ -374,16 +316,16 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length); if (info_ptr->pcal_units == NULL) { - png_warning(png_ptr, "Insufficient memory for pCAL units."); + png_warning(png_ptr, "Insufficient memory for pCAL units"); return; } - png_memcpy(info_ptr->pcal_units, units, (png_size_t)length); + png_memcpy(info_ptr->pcal_units, units, length); info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr, - (png_uint_32)((nparams + 1) * png_sizeof(png_charp))); + (png_size_t)((nparams + 1) * png_sizeof(png_charp))); if (info_ptr->pcal_params == NULL) { - png_warning(png_ptr, "Insufficient memory for pCAL params."); + png_warning(png_ptr, "Insufficient memory for pCAL params"); return; } @@ -397,16 +339,14 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); if (info_ptr->pcal_params[i] == NULL) { - png_warning(png_ptr, "Insufficient memory for pCAL parameter."); + png_warning(png_ptr, "Insufficient memory for pCAL parameter"); return; } - png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length); + png_memcpy(info_ptr->pcal_params[i], params[i], length); } info_ptr->valid |= PNG_INFO_pCAL; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_PCAL; -#endif } #endif @@ -417,6 +357,7 @@ png_set_sCAL(png_structp png_ptr, png_infop info_ptr, int unit, double width, double height) { png_debug1(1, "in %s storage function", "sCAL"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -432,9 +373,10 @@ void PNGAPI png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, int unit, png_charp swidth, png_charp sheight) { - png_uint_32 length; + png_size_t length; png_debug1(1, "in %s storage function", "sCAL"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -447,10 +389,10 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, if (info_ptr->scal_s_width == NULL) { png_warning(png_ptr, - "Memory allocation failed while processing sCAL."); + "Memory allocation failed while processing sCAL"); return; } - png_memcpy(info_ptr->scal_s_width, swidth, (png_size_t)length); + png_memcpy(info_ptr->scal_s_width, swidth, length); length = png_strlen(sheight) + 1; png_debug1(3, "allocating unit for info (%u bytes)", @@ -461,25 +403,24 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, png_free (png_ptr, info_ptr->scal_s_width); info_ptr->scal_s_width = NULL; png_warning(png_ptr, - "Memory allocation failed while processing sCAL."); + "Memory allocation failed while processing sCAL"); return; } - png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length); + png_memcpy(info_ptr->scal_s_height, sheight, length); info_ptr->valid |= PNG_INFO_sCAL; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_SCAL; -#endif } #endif #endif #endif -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED void PNGAPI png_set_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type) { png_debug1(1, "in %s storage function", "pHYs"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -496,6 +437,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr, { png_debug1(1, "in %s storage function", "PLTE"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -510,42 +452,34 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr, } } - /* - * It may not actually be necessary to set png_ptr->palette here; + /* It may not actually be necessary to set png_ptr->palette here; * we do it for backward compatibility with the way the png_handle_tRNS * function used to do the allocation. */ -#ifdef PNG_FREE_ME_SUPPORTED png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); -#endif /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead * of num_palette entries, in case of an invalid PNG file that has * too-large sample values. */ - png_ptr->palette = (png_colorp)png_malloc(png_ptr, + png_ptr->palette = (png_colorp)png_calloc(png_ptr, PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color)); - png_memset(png_ptr->palette, 0, PNG_MAX_PALETTE_LENGTH * - png_sizeof(png_color)); png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color)); info_ptr->palette = png_ptr->palette; info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_PLTE; -#else - png_ptr->flags |= PNG_FLAG_FREE_PLTE; -#endif info_ptr->valid |= PNG_INFO_PLTE; } -#if defined(PNG_sBIT_SUPPORTED) +#ifdef PNG_sBIT_SUPPORTED void PNGAPI png_set_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit) { png_debug1(1, "in %s storage function", "sBIT"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -554,11 +488,12 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_sRGB_SUPPORTED) +#ifdef PNG_sRGB_SUPPORTED void PNGAPI png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent) { png_debug1(1, "in %s storage function", "sRGB"); + if (png_ptr == NULL || info_ptr == NULL) return; @@ -570,7 +505,7 @@ void PNGAPI png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, int intent) { -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED float file_gamma; #endif @@ -578,7 +513,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma; #endif #endif -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; #endif @@ -586,12 +521,13 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, int_green_y, int_blue_x, int_blue_y; #endif png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM"); + if (png_ptr == NULL || info_ptr == NULL) return; png_set_sRGB(png_ptr, info_ptr, intent); -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED file_gamma = (float).45455; png_set_gAMA(png_ptr, info_ptr, file_gamma); @@ -602,7 +538,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, #endif #endif -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_cHRM_SUPPORTED int_white_x = 31270L; int_white_y = 32900L; int_red_x = 64000L; @@ -623,28 +559,21 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, blue_y = (float).06; #endif -#if !defined(PNG_NO_CHECK_cHRM) - if (png_check_cHRM_fixed(png_ptr, - int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, - int_green_y, int_blue_x, int_blue_y)) -#endif - { #ifdef PNG_FIXED_POINT_SUPPORTED - png_set_cHRM_fixed(png_ptr, info_ptr, - int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, - int_green_y, int_blue_x, int_blue_y); + png_set_cHRM_fixed(png_ptr, info_ptr, + int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, + int_green_y, int_blue_x, int_blue_y); #endif #ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_cHRM(png_ptr, info_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); + png_set_cHRM(png_ptr, info_ptr, + white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); #endif - } #endif /* cHRM */ } #endif /* sRGB */ -#if defined(PNG_iCCP_SUPPORTED) +#ifdef PNG_iCCP_SUPPORTED void PNGAPI png_set_iCCP(png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, @@ -655,6 +584,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length; png_debug1(1, "in %s storage function", "iCCP"); + if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) return; @@ -662,7 +592,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length); if (new_iccp_name == NULL) { - png_warning(png_ptr, "Insufficient memory to process iCCP chunk."); + png_warning(png_ptr, "Insufficient memory to process iCCP chunk"); return; } png_memcpy(new_iccp_name, name, length); @@ -671,7 +601,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, { png_free (png_ptr, new_iccp_name); png_warning(png_ptr, - "Insufficient memory to process iCCP profile."); + "Insufficient memory to process iCCP profile"); return; } png_memcpy(new_iccp_profile, profile, (png_size_t)proflen); @@ -682,16 +612,15 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, info_ptr->iccp_name = new_iccp_name; info_ptr->iccp_profile = new_iccp_profile; /* Compression is always zero but is here so the API and info structure - * does not have to change if we introduce multiple compression types */ + * does not have to change if we introduce multiple compression types + */ info_ptr->iccp_compression = (png_byte)compression_type; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_ICCP; -#endif info_ptr->valid |= PNG_INFO_iCCP; } #endif -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED void PNGAPI png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text) @@ -729,7 +658,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, info_ptr->max_text = info_ptr->num_text + num_text + 8; old_text = info_ptr->text; info_ptr->text = (png_textp)png_malloc_warn(png_ptr, - (png_uint_32)(info_ptr->max_text * png_sizeof(png_text))); + (png_size_t)(info_ptr->max_text * png_sizeof(png_text))); if (info_ptr->text == NULL) { png_free(png_ptr, old_text); @@ -744,12 +673,10 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, info_ptr->max_text = num_text + 8; info_ptr->num_text = 0; info_ptr->text = (png_textp)png_malloc_warn(png_ptr, - (png_uint_32)(info_ptr->max_text * png_sizeof(png_text))); + (png_size_t)(info_ptr->max_text * png_sizeof(png_text))); if (info_ptr->text == NULL) return(1); -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_TEXT; -#endif } png_debug1(3, "allocated %d entries for info_ptr->text", info_ptr->max_text); @@ -770,10 +697,12 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, lang_len = 0; lang_key_len = 0; } + else #ifdef PNG_iTXt_SUPPORTED { /* Set iTXt data */ + if (text_ptr[i].lang != NULL) lang_len = png_strlen(text_ptr[i].lang); else @@ -783,9 +712,9 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, else lang_key_len = 0; } -#else +#else /* PNG_iTXt_SUPPORTED */ { - png_warning(png_ptr, "iTXt chunk not supported."); + png_warning(png_ptr, "iTXt chunk not supported"); continue; } #endif @@ -800,6 +729,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, #endif textp->compression = PNG_TEXT_COMPRESSION_NONE; } + else { text_length = png_strlen(text_ptr[i].text); @@ -807,12 +737,12 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, } textp->key = (png_charp)png_malloc_warn(png_ptr, - (png_uint_32) + (png_size_t) (key_len + text_length + lang_len + lang_key_len + 4)); if (textp->key == NULL) return(1); png_debug2(2, "Allocated %lu bytes at %x in png_set_text", - (png_uint_32) + (unsigned long)(png_uint_32) (key_len + lang_len + lang_key_len + text_length + 4), (int)textp->key); @@ -851,6 +781,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, } else #endif + { textp->text_length = text_length; #ifdef PNG_iTXt_SUPPORTED @@ -864,11 +795,12 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, } #endif -#if defined(PNG_tIME_SUPPORTED) +#ifdef PNG_tIME_SUPPORTED void PNGAPI png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) { png_debug1(1, "in %s storage function", "tIME"); + if (png_ptr == NULL || info_ptr == NULL || (png_ptr->mode & PNG_WROTE_tIME)) return; @@ -878,46 +810,44 @@ png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) } #endif -#if defined(PNG_tRNS_SUPPORTED) +#ifdef PNG_tRNS_SUPPORTED void PNGAPI png_set_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep trans, int num_trans, png_color_16p trans_values) + png_bytep trans_alpha, int num_trans, png_color_16p trans_color) { png_debug1(1, "in %s storage function", "tRNS"); + if (png_ptr == NULL || info_ptr == NULL) return; - if (trans != NULL) + if (trans_alpha != NULL) { - /* - * It may not actually be necessary to set png_ptr->trans here; + /* It may not actually be necessary to set png_ptr->trans_alpha here; * we do it for backward compatibility with the way the png_handle_tRNS * function used to do the allocation. */ -#ifdef PNG_FREE_ME_SUPPORTED png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); -#endif /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */ - png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr, - (png_uint_32)PNG_MAX_PALETTE_LENGTH); + png_ptr->trans_alpha = info_ptr->trans_alpha = (png_bytep)png_malloc(png_ptr, + (png_size_t)PNG_MAX_PALETTE_LENGTH); if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH) - png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans); + png_memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans); } - if (trans_values != NULL) + if (trans_color != NULL) { int sample_max = (1 << info_ptr->bit_depth); if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY && - (int)trans_values->gray > sample_max) || + (int)trans_color->gray > sample_max) || (info_ptr->color_type == PNG_COLOR_TYPE_RGB && - ((int)trans_values->red > sample_max || - (int)trans_values->green > sample_max || - (int)trans_values->blue > sample_max))) + ((int)trans_color->red > sample_max || + (int)trans_color->green > sample_max || + (int)trans_color->blue > sample_max))) png_warning(png_ptr, "tRNS chunk has out-of-range samples for bit_depth"); - png_memcpy(&(info_ptr->trans_values), trans_values, + png_memcpy(&(info_ptr->trans_color), trans_color, png_sizeof(png_color_16)); if (num_trans == 0) num_trans = 1; @@ -927,16 +857,12 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr, if (num_trans != 0) { info_ptr->valid |= PNG_INFO_tRNS; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_TRNS; -#else - png_ptr->flags |= PNG_FLAG_FREE_TRNS; -#endif } } #endif -#if defined(PNG_sPLT_SUPPORTED) +#ifdef PNG_sPLT_SUPPORTED void PNGAPI png_set_sPLT(png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries) @@ -956,15 +882,15 @@ png_set_sPLT(png_structp png_ptr, np = (png_sPLT_tp)png_malloc_warn(png_ptr, (info_ptr->splt_palettes_num + nentries) * - (png_uint_32)png_sizeof(png_sPLT_t)); + (png_size_t)png_sizeof(png_sPLT_t)); if (np == NULL) { - png_warning(png_ptr, "No memory for sPLT palettes."); - return; + png_warning(png_ptr, "No memory for sPLT palettes"); + return; } png_memcpy(np, info_ptr->splt_palettes, - info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t)); + info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t)); png_free(png_ptr, info_ptr->splt_palettes); info_ptr->splt_palettes=NULL; @@ -975,7 +901,7 @@ png_set_sPLT(png_structp png_ptr, png_uint_32 length; length = png_strlen(from->name) + 1; - to->name = (png_charp)png_malloc_warn(png_ptr, length); + to->name = (png_charp)png_malloc_warn(png_ptr, (png_size_t)length); if (to->name == NULL) { png_warning(png_ptr, @@ -984,7 +910,7 @@ png_set_sPLT(png_structp png_ptr, } png_memcpy(to->name, from->name, length); to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr, - (png_uint_32)(from->nentries * png_sizeof(png_sPLT_entry))); + (png_size_t)(from->nentries * png_sizeof(png_sPLT_entry))); if (to->entries == NULL) { png_warning(png_ptr, @@ -1002,13 +928,11 @@ png_set_sPLT(png_structp png_ptr, info_ptr->splt_palettes = np; info_ptr->splt_palettes_num += nentries; info_ptr->valid |= PNG_INFO_sPLT; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_SPLT; -#endif } #endif /* PNG_sPLT_SUPPORTED */ -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED void PNGAPI png_set_unknown_chunks(png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns) @@ -1020,28 +944,27 @@ png_set_unknown_chunks(png_structp png_ptr, return; np = (png_unknown_chunkp)png_malloc_warn(png_ptr, - (png_uint_32)((info_ptr->unknown_chunks_num + num_unknowns) * + (png_size_t)((info_ptr->unknown_chunks_num + num_unknowns) * png_sizeof(png_unknown_chunk))); if (np == NULL) { png_warning(png_ptr, - "Out of memory while processing unknown chunk."); + "Out of memory while processing unknown chunk"); return; } png_memcpy(np, info_ptr->unknown_chunks, - info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk)); + info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk)); png_free(png_ptr, info_ptr->unknown_chunks); - info_ptr->unknown_chunks=NULL; + info_ptr->unknown_chunks = NULL; for (i = 0; i < num_unknowns; i++) { png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i; png_unknown_chunkp from = unknowns + i; - png_memcpy((png_charp)to->name, - (png_charp)from->name, - png_sizeof(from->name)); + png_memcpy((png_charp)to->name, (png_charp)from->name, + png_sizeof(from->name)); to->name[png_sizeof(to->name)-1] = '\0'; to->size = from->size; /* Note our location in the read or write sequence */ @@ -1052,11 +975,11 @@ png_set_unknown_chunks(png_structp png_ptr, else { to->data = (png_bytep)png_malloc_warn(png_ptr, - (png_uint_32)from->size); + (png_size_t)from->size); if (to->data == NULL) { png_warning(png_ptr, - "Out of memory while processing unknown chunk."); + "Out of memory while processing unknown chunk"); to->size = 0; } else @@ -1066,43 +989,25 @@ png_set_unknown_chunks(png_structp png_ptr, info_ptr->unknown_chunks = np; info_ptr->unknown_chunks_num += num_unknowns; -#ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_UNKN; -#endif } void PNGAPI png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, int chunk, int location) { if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk < - (int)info_ptr->unknown_chunks_num) + (int)info_ptr->unknown_chunks_num) info_ptr->unknown_chunks[chunk].location = (png_byte)location; } #endif -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) -#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ - defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -void PNGAPI -png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted) -{ - /* This function is deprecated in favor of png_permit_mng_features() - and will be removed from libpng-1.3.0 */ - png_debug(1, "in png_permit_empty_plte, DEPRECATED."); - if (png_ptr == NULL) - return; - png_ptr->mng_features_permitted = (png_byte) - ((png_ptr->mng_features_permitted & (~PNG_FLAG_MNG_EMPTY_PLTE)) | - ((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE))); -} -#endif -#endif -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED png_uint_32 PNGAPI png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) { png_debug(1, "in png_permit_mng_features"); + if (png_ptr == NULL) return (png_uint_32)0; png_ptr->mng_features_permitted = @@ -1111,7 +1016,7 @@ png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) } #endif -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED void PNGAPI png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks) @@ -1137,41 +1042,41 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep return; old_num_chunks = png_ptr->num_chunk_list; new_list=(png_bytep)png_malloc(png_ptr, - (png_uint_32) - (5*(num_chunks + old_num_chunks))); + (png_size_t) + (5*(num_chunks + old_num_chunks))); if (png_ptr->chunk_list != NULL) { png_memcpy(new_list, png_ptr->chunk_list, - (png_size_t)(5*old_num_chunks)); + (png_size_t)(5*old_num_chunks)); png_free(png_ptr, png_ptr->chunk_list); png_ptr->chunk_list=NULL; } png_memcpy(new_list + 5*old_num_chunks, chunk_list, - (png_size_t)(5*num_chunks)); + (png_size_t)(5*num_chunks)); for (p = new_list + 5*old_num_chunks + 4, i = 0; inum_chunk_list = old_num_chunks + num_chunks; png_ptr->chunk_list = new_list; -#ifdef PNG_FREE_ME_SUPPORTED png_ptr->free_me |= PNG_FREE_LIST; -#endif } #endif -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED void PNGAPI png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn) { png_debug(1, "in png_set_read_user_chunk_fn"); + if (png_ptr == NULL) return; + png_ptr->read_user_chunk_fn = read_user_chunk_fn; png_ptr->user_chunk_ptr = user_chunk_ptr; } #endif -#if defined(PNG_INFO_IMAGE_SUPPORTED) +#ifdef PNG_INFO_IMAGE_SUPPORTED void PNGAPI png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers) { @@ -1188,20 +1093,18 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers) } #endif -#ifdef PNG_WRITE_SUPPORTED void PNGAPI png_set_compression_buffer_size(png_structp png_ptr, - png_uint_32 size) + png_size_t size) { if (png_ptr == NULL) return; png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf_size = (png_size_t)size; + png_ptr->zbuf_size = size; png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } -#endif void PNGAPI png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) @@ -1211,32 +1114,6 @@ png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) } -#ifndef PNG_1_0_X -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED -/* Function was added to libpng 1.2.0 and should always exist by default */ -void PNGAPI -png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags) -{ -/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */ - if (png_ptr != NULL) - png_ptr->asm_flags = 0; - asm_flags = asm_flags; /* Quiet the compiler */ -} - -/* This function was added to libpng 1.2.0 */ -void PNGAPI -png_set_mmx_thresholds (png_structp png_ptr, - png_byte mmx_bitdepth_threshold, - png_uint_32 mmx_rowbytes_threshold) -{ -/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */ - if (png_ptr == NULL) - return; - /* Quiet the compiler */ - mmx_bitdepth_threshold = mmx_bitdepth_threshold; - mmx_rowbytes_threshold = mmx_rowbytes_threshold; -} -#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED /* This function was added to libpng 1.2.6 */ @@ -1253,7 +1130,38 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max, png_ptr->user_width_max = user_width_max; png_ptr->user_height_max = user_height_max; } + +/* This function was added to libpng 1.4.0 */ +void PNGAPI +png_set_chunk_cache_max (png_structp png_ptr, + png_uint_32 user_chunk_cache_max) +{ + if (png_ptr) + png_ptr->user_chunk_cache_max = user_chunk_cache_max; +} + +/* This function was added to libpng 1.4.1 */ +void PNGAPI +png_set_chunk_malloc_max (png_structp png_ptr, + png_alloc_size_t user_chunk_malloc_max) +{ + if (png_ptr) + png_ptr->user_chunk_malloc_max = + (png_size_t)user_chunk_malloc_max; +} #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ -#endif /* ?PNG_1_0_X */ + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_set_benign_errors(png_structp png_ptr, int allowed) +{ + png_debug(1, "in png_set_benign_errors"); + + if (allowed) + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; + else + png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN; +} +#endif /* PNG_BENIGN_ERRORS_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/source/Irrlicht/libpng/pngtest.c b/source/Irrlicht/libpng/pngtest.c index 37c876d1..35a4c7db 100644 --- a/source/Irrlicht/libpng/pngtest.c +++ b/source/Irrlicht/libpng/pngtest.c @@ -1,8 +1,8 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.1 [February 25, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -32,34 +32,14 @@ */ #include "png.h" +#include "pngpriv.h" -#if defined(_WIN32_WCE) -# if _WIN32_WCE < 211 - __error__ (f|w)printf functions are not supported on old WindowsCE.; -# endif -# include -# include -# define READFILE(file, data, length, check) \ - if (ReadFile(file, data, length, &check, NULL)) check = 0 -# define WRITEFILE(file, data, length, check)) \ - if (WriteFile(file, data, length, &check, NULL)) check = 0 -# define FCLOSE(file) CloseHandle(file) -#else # include # include -# define READFILE(file, data, length, check) \ - check=(png_size_t)fread(data, (png_size_t)1, length, file) -# define WRITEFILE(file, data, length, check) \ - check=(png_size_t)fwrite(data, (png_size_t)1, length, file) # define FCLOSE(file) fclose(file) -#endif -#if defined(PNG_NO_STDIO) -# if defined(_WIN32_WCE) - typedef HANDLE png_FILE_p; -# else +#ifndef PNG_STDIO_SUPPORTED typedef FILE * png_FILE_p; -# endif #endif /* Makes pngtest verbose so we can find problems (needs to be before png.h) */ @@ -75,7 +55,7 @@ #define PNGTEST_TIMING */ -#ifdef PNG_NO_FLOATING_POINT_SUPPORTED +#ifndef PNG_FLOATING_POINT_SUPPORTED #undef PNGTEST_TIMING #endif @@ -84,7 +64,7 @@ static float t_start, t_stop, t_decode, t_encode, t_misc; #include #endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) +#ifdef PNG_TIME_RFC1123_SUPPORTED #define PNG_tIME_STRING_LENGTH 29 static int tIME_chunk_present = 0; static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present"; @@ -118,14 +98,8 @@ static int status_dots_requested = 0; static int status_dots = 1; void -#ifdef PNG_1_0_X -PNGAPI -#endif read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); void -#ifdef PNG_1_0_X -PNGAPI -#endif read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) { if (png_ptr == NULL || row_number > PNG_UINT_31_MAX) @@ -146,14 +120,8 @@ read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) } void -#ifdef PNG_1_0_X -PNGAPI -#endif write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); void -#ifdef PNG_1_0_X -PNGAPI -#endif write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) { if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) @@ -162,21 +130,15 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) } -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED /* Example of using user transform callback (we don't transform anything, * but merely examine the row filters. We set this to 256 rather than * 5 in case illegal filter values are present.) */ static png_uint_32 filters_used[256]; void -#ifdef PNG_1_0_X -PNGAPI -#endif count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data); void -#ifdef PNG_1_0_X -PNGAPI -#endif count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) { if (png_ptr != NULL && row_info != NULL) @@ -184,7 +146,7 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) } #endif -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED /* Example of using user transform callback (we don't transform anything, * but merely count the zero samples) */ @@ -192,14 +154,8 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) static png_uint_32 zero_samples; void -#ifdef PNG_1_0_X -PNGAPI -#endif count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data); void -#ifdef PNG_1_0_X -PNGAPI -#endif count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) { png_bytep dp = data; @@ -297,7 +253,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) static int wrote_question = 0; -#if defined(PNG_NO_STDIO) +#ifndef PNG_STDIO_SUPPORTED /* START of code to validate stdio-free compilation */ /* These copies of the default read/write functions come from pngrio.c and * pngwio.c. They allow "don't include stdio" testing of the library. @@ -311,12 +267,17 @@ static int wrote_question = 0; static void pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { - png_size_t check; + png_size_t check = 0; + png_voidp io_ptr; /* fread() returns 0 on error, so it is OK to store this in a png_size_t * instead of an int, which is what fread() actually returns. */ - READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check); + io_ptr = png_get_io_ptr(png_ptr); + if (io_ptr != NULL) + { + check = fread(data, 1, length, (png_FILE_p)io_ptr); + } if (check != length) { @@ -335,7 +296,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) static void pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { - int check; + png_size_t check; png_byte *n_data; png_FILE_p io_ptr; @@ -344,7 +305,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); if ((png_bytep)n_data == data) { - READFILE(io_ptr, n_data, length, check); + check = fread(n_data, 1, length, io_ptr); } else { @@ -355,7 +316,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) do { read = MIN(NEAR_BUF_SIZE, remaining); - READFILE(io_ptr, buf, 1, err); + err = fread(buf, 1, 1, io_ptr); png_memcpy(data, buf, read); /* Copy far buffer to near buffer */ if (err != read) break; @@ -371,7 +332,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) } #endif /* USE_FAR_KEYWORD */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED static void pngtest_flush(png_structp png_ptr) { @@ -389,9 +350,9 @@ pngtest_flush(png_structp png_ptr) static void pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { - png_uint_32 check; + png_size_t check; - WRITEFILE((png_FILE_p)png_ptr->io_ptr, data, length, check); + check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr); if (check != length) { png_error(png_ptr, "Write Error"); @@ -409,7 +370,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) static void pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { - png_uint_32 check; + png_size_t check; png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ png_FILE_p io_ptr; @@ -418,7 +379,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); if ((png_bytep)near_data == data) { - WRITEFILE(io_ptr, near_data, length, check); + check = fwrite(near_data, 1, length, io_ptr); } else { @@ -430,7 +391,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { written = MIN(NEAR_BUF_SIZE, remaining); png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ - WRITEFILE(io_ptr, buf, written, err); + err = fwrite(buf, 1, written, io_ptr); if (err != written) break; else @@ -456,9 +417,12 @@ static void pngtest_warning(png_structp png_ptr, png_const_charp message) { PNG_CONST char *name = "UNKNOWN (ERROR!)"; - if (png_ptr != NULL && png_ptr->error_ptr != NULL) - name = png_ptr->error_ptr; - fprintf(STDERR, "%s: libpng warning: %s\n", name, message); + char *test; + test = png_get_error_ptr(png_ptr); + if (test == NULL) + fprintf(STDERR, "%s: libpng warning: %s\n", name, message); + else + fprintf(STDERR, "%s: libpng warning: %s\n", test, message); } /* This is the default error handling function. Note that replacements for @@ -474,7 +438,7 @@ pngtest_error(png_structp png_ptr, png_const_charp message) * actually OK in this case. */ } -#endif /* PNG_NO_STDIO */ +#endif /* !PNG_STDIO_SUPPORTED */ /* END of code to validate stdio-free compilation */ /* START of code to validate memory allocation and deallocation */ @@ -491,7 +455,7 @@ pngtest_error(png_structp png_ptr, png_const_charp message) */ typedef struct memory_information { - png_uint_32 size; + png_alloc_size_t size; png_voidp pointer; struct memory_information FAR *next; } memory_information; @@ -503,11 +467,12 @@ static int maximum_allocation = 0; static int total_allocation = 0; static int num_allocations = 0; -png_voidp png_debug_malloc PNGARG((png_structp png_ptr, png_uint_32 size)); +png_voidp png_debug_malloc + PNGARG((png_structp png_ptr, png_alloc_size_t size)); void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr)); png_voidp -png_debug_malloc(png_structp png_ptr, png_uint_32 size) +png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) { /* png_malloc has already tested for NULL; png_create_struct calls @@ -524,24 +489,23 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size) memory_infop pinfo; png_set_mem_fn(png_ptr, NULL, NULL, NULL); pinfo = (memory_infop)png_malloc(png_ptr, - (png_uint_32)png_sizeof(*pinfo)); + png_sizeof(*pinfo)); pinfo->size = size; current_allocation += size; total_allocation += size; num_allocations ++; if (current_allocation > maximum_allocation) maximum_allocation = current_allocation; - pinfo->pointer = (png_voidp)png_malloc(png_ptr, size); + pinfo->pointer = png_malloc(png_ptr, size); /* Restore malloc_fn and free_fn */ png_set_mem_fn(png_ptr, - png_voidp_NULL, (png_malloc_ptr)png_debug_malloc, - (png_free_ptr)png_debug_free); + NULL, png_debug_malloc, png_debug_free); if (size != 0 && pinfo->pointer == NULL) { current_allocation -= size; total_allocation -= size; png_error(png_ptr, - "out of memory in pngtest->png_debug_malloc."); + "out of memory in pngtest->png_debug_malloc"); } pinfo->next = pinformation; pinformation = pinfo; @@ -607,7 +571,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr) /* Demonstration of user chunk support of the sTER and vpAg chunks */ -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED /* (sTER is a public chunk not yet known by libpng. vpAg is a private chunk used in ImageMagick to store "virtual page" size). */ @@ -701,30 +665,17 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif #endif -#if defined(_WIN32_WCE) - TCHAR path[MAX_PATH]; -#endif char inbuf[256], outbuf[256]; row_buf = NULL; -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH); - if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) -#else if ((fpin = fopen(inname, "rb")) == NULL) -#endif { fprintf(STDERR, "Could not find input file %s\n", inname); return (1); } -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH); - if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL)) == INVALID_HANDLE_VALUE) -#else if ((fpout = fopen(outname, "wb")) == NULL) -#endif { fprintf(STDERR, "Could not open output file %s\n", outname); FCLOSE(fpin); @@ -734,20 +685,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_debug(0, "Allocating read and write structures"); #if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG read_ptr = - png_create_read_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL, + png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL, + NULL, NULL, NULL, (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free); #else read_ptr = - png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL); + png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); #endif -#if defined(PNG_NO_STDIO) +#ifndef PNG_STDIO_SUPPORTED png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error, pngtest_warning); #endif -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED user_chunk_data[0] = 0; user_chunk_data[1] = 0; user_chunk_data[2] = 0; @@ -759,15 +709,13 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #ifdef PNG_WRITE_SUPPORTED #if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG write_ptr = - png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL, - (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free); + png_create_write_struct_2(PNG_LIBPNG_VER_STRING, NULL, + NULL, NULL, NULL, png_debug_malloc, png_debug_free); #else write_ptr = - png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL); + png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); #endif -#if defined(PNG_NO_STDIO) +#ifndef PNG_STDIO_SUPPORTED png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error, pngtest_warning); #endif @@ -829,7 +777,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif png_debug(0, "Initializing input and output streams"); -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED png_init_io(read_ptr, fpin); # ifdef PNG_WRITE_SUPPORTED png_init_io(write_ptr, fpout); @@ -838,7 +786,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data); # ifdef PNG_WRITE_SUPPORTED png_set_write_fn(write_ptr, (png_voidp)fpout, pngtest_write_data, -# if defined(PNG_WRITE_FLUSH_SUPPORTED) +# ifdef PNG_WRITE_FLUSH_SUPPORTED pngtest_flush); # else NULL); @@ -855,12 +803,12 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) else { #ifdef PNG_WRITE_SUPPORTED - png_set_write_status_fn(write_ptr, png_write_status_ptr_NULL); + png_set_write_status_fn(write_ptr, NULL); #endif - png_set_read_status_fn(read_ptr, png_read_status_ptr_NULL); + png_set_read_status_fn(read_ptr, NULL); } -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED { int i; for (i = 0; i<256; i++) @@ -868,24 +816,24 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_set_read_user_transform_fn(read_ptr, count_filters); } #endif -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED zero_samples = 0; png_set_write_user_transform_fn(write_ptr, count_zero_samples); #endif -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED # ifndef PNG_HANDLE_CHUNK_ALWAYS # define PNG_HANDLE_CHUNK_ALWAYS 3 # endif png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS, - png_bytep_NULL, 0); + NULL, 0); #endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED # ifndef PNG_HANDLE_CHUNK_IF_SAFE # define PNG_HANDLE_CHUNK_IF_SAFE 2 # endif png_set_keep_unknown_chunks(write_ptr, PNG_HANDLE_CHUNK_IF_SAFE, - png_bytep_NULL, 0); + NULL, 0); #endif png_debug(0, "Reading info struct"); @@ -899,27 +847,27 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) &color_type, &interlace_type, &compression_type, &filter_type)) { png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) +#ifdef PNG_WRITE_INTERLACING_SUPPORTED color_type, interlace_type, compression_type, filter_type); #else color_type, PNG_INTERLACE_NONE, compression_type, filter_type); #endif } } -#if defined(PNG_FIXED_POINT_SUPPORTED) -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FIXED_POINT_SUPPORTED +#ifdef PNG_cHRM_SUPPORTED { png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; - if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y)) + if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, + &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y)) { png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); } } #endif -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED { png_fixed_point gamma; @@ -928,8 +876,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } #endif #else /* Use floating point versions */ -#if defined(PNG_FLOATING_POINT_SUPPORTED) -#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +#ifdef PNG_cHRM_SUPPORTED { double white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; @@ -941,7 +889,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_gAMA_SUPPORTED { double gamma; @@ -951,7 +899,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif #endif /* Floating point */ #endif /* Fixed point */ -#if defined(PNG_iCCP_SUPPORTED) +#ifdef PNG_iCCP_SUPPORTED { png_charp name; png_charp profile; @@ -966,7 +914,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_sRGB_SUPPORTED) +#ifdef PNG_sRGB_SUPPORTED { int intent; @@ -981,7 +929,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette)) png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette); } -#if defined(PNG_bKGD_SUPPORTED) +#ifdef PNG_bKGD_SUPPORTED { png_color_16p background; @@ -991,7 +939,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_hIST_SUPPORTED) +#ifdef PNG_hIST_SUPPORTED { png_uint_16p hist; @@ -999,7 +947,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_set_hIST(write_ptr, write_info_ptr, hist); } #endif -#if defined(PNG_oFFs_SUPPORTED) +#ifdef PNG_oFFs_SUPPORTED { png_int_32 offset_x, offset_y; int unit_type; @@ -1011,7 +959,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_pCAL_SUPPORTED) +#ifdef PNG_pCAL_SUPPORTED { png_charp purpose, units; png_charpp params; @@ -1026,7 +974,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_pHYs_SUPPORTED) +#ifdef PNG_pHYs_SUPPORTED { png_uint_32 res_x, res_y; int unit_type; @@ -1035,7 +983,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type); } #endif -#if defined(PNG_sBIT_SUPPORTED) +#ifdef PNG_sBIT_SUPPORTED { png_color_8p sig_bit; @@ -1043,7 +991,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_set_sBIT(write_ptr, write_info_ptr, sig_bit); } #endif -#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED { int unit; @@ -1064,13 +1012,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width, &scal_height)) { - png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height); + png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, + scal_height); } } #endif #endif #endif -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED { png_textp text_ptr; int num_text; @@ -1082,14 +1031,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_tIME_SUPPORTED) +#ifdef PNG_tIME_SUPPORTED { png_timep mod_time; if (png_get_tIME(read_ptr, read_info_ptr, &mod_time)) { png_set_tIME(write_ptr, write_info_ptr, mod_time); -#if defined(PNG_TIME_RFC1123_SUPPORTED) +#ifdef PNG_TIME_RFC1123_SUPPORTED /* We have to use png_memcpy instead of "=" because the string * pointed to by png_convert_to_rfc1123() gets free'ed before * we use it. @@ -1103,29 +1052,29 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_tRNS_SUPPORTED) +#ifdef PNG_tRNS_SUPPORTED { - png_bytep trans; + png_bytep trans_alpha; int num_trans; - png_color_16p trans_values; + png_color_16p trans_color; - if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans, - &trans_values)) + if (png_get_tRNS(read_ptr, read_info_ptr, &trans_alpha, &num_trans, + &trans_color)) { - int sample_max = (1 << read_info_ptr->bit_depth); + int sample_max = (1 << bit_depth); /* libpng doesn't reject a tRNS chunk with out-of-range samples */ - if (!((read_info_ptr->color_type == PNG_COLOR_TYPE_GRAY && - (int)trans_values->gray > sample_max) || - (read_info_ptr->color_type == PNG_COLOR_TYPE_RGB && - ((int)trans_values->red > sample_max || - (int)trans_values->green > sample_max || - (int)trans_values->blue > sample_max)))) - png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans, - trans_values); + if (!((color_type == PNG_COLOR_TYPE_GRAY && + (int)trans_color->gray > sample_max) || + (color_type == PNG_COLOR_TYPE_RGB && + ((int)trans_color->red > sample_max || + (int)trans_color->green > sample_max || + (int)trans_color->blue > sample_max)))) + png_set_tRNS(write_ptr, write_info_ptr, trans_alpha, num_trans, + trans_color); } } #endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED { png_unknown_chunkp unknowns; int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr, @@ -1154,7 +1103,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) */ png_write_info(write_ptr, write_info_ptr); -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED if (user_chunk_data[0] != 0) { png_byte png_sTER[5] = {115, 84, 69, 82, '\0'}; @@ -1224,7 +1173,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_debug2(0, "0x%08lx (%ld bytes)", (unsigned long)row_buf, png_get_rowbytes(read_ptr, read_info_ptr)); #endif /* !SINGLE_ROWBUF_ALLOC */ - png_read_rows(read_ptr, (png_bytepp)&row_buf, png_bytepp_NULL, 1); + png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1); #ifdef PNG_WRITE_SUPPORTED #ifdef PNGTEST_TIMING @@ -1248,17 +1197,17 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1); #endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1); #endif png_debug(0, "Reading and writing end_info data"); png_read_end(read_ptr, end_info_ptr); -#if defined(PNG_TEXT_SUPPORTED) +#ifdef PNG_TEXT_SUPPORTED { png_textp text_ptr; int num_text; @@ -1270,14 +1219,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_tIME_SUPPORTED) +#ifdef PNG_tIME_SUPPORTED { png_timep mod_time; if (png_get_tIME(read_ptr, end_info_ptr, &mod_time)) { png_set_tIME(write_ptr, write_end_info_ptr, mod_time); -#if defined(PNG_TIME_RFC1123_SUPPORTED) +#ifdef PNG_TIME_RFC1123_SUPPORTED /* We have to use png_memcpy instead of "=" because the string pointed to by png_convert_to_rfc1123() gets free'ed before we use it */ @@ -1290,7 +1239,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } } #endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED { png_unknown_chunkp unknowns; int num_unknowns; @@ -1346,23 +1295,13 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) FCLOSE(fpout); png_debug(0, "Opening files for comparison"); -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH); - if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) -#else if ((fpin = fopen(inname, "rb")) == NULL) -#endif { fprintf(STDERR, "Could not find file %s\n", inname); return (1); } -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH); - if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) -#else if ((fpout = fopen(outname, "rb")) == NULL) -#endif { fprintf(STDERR, "Could not find file %s\n", outname); FCLOSE(fpin); @@ -1373,8 +1312,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) { png_size_t num_in, num_out; - READFILE(fpin, inbuf, 1, num_in); - READFILE(fpout, outbuf, 1, num_out); + num_in = fread(inbuf, 1, 1, fpin); + num_out = fread(outbuf, 1, 1, fpout); if (num_in != num_out) { @@ -1527,27 +1466,27 @@ main(int argc, char *argv[]) #endif for (i=2; itransformations |= PNG_BGR; @@ -33,6 +35,7 @@ void PNGAPI png_set_swap(png_structp png_ptr) { png_debug(1, "in png_set_swap"); + if (png_ptr == NULL) return; if (png_ptr->bit_depth == 16) @@ -46,6 +49,7 @@ void PNGAPI png_set_packing(png_structp png_ptr) { png_debug(1, "in png_set_packing"); + if (png_ptr == NULL) return; if (png_ptr->bit_depth < 8) @@ -62,6 +66,7 @@ void PNGAPI png_set_packswap(png_structp png_ptr) { png_debug(1, "in png_set_packswap"); + if (png_ptr == NULL) return; if (png_ptr->bit_depth < 8) @@ -74,6 +79,7 @@ void PNGAPI png_set_shift(png_structp png_ptr, png_color_8p true_bits) { png_debug(1, "in png_set_shift"); + if (png_ptr == NULL) return; png_ptr->transformations |= PNG_SHIFT; @@ -87,6 +93,7 @@ int PNGAPI png_set_interlace_handling(png_structp png_ptr) { png_debug(1, "in png_set_interlace handling"); + if (png_ptr && png_ptr->interlaced) { png_ptr->transformations |= PNG_INTERLACE; @@ -107,10 +114,11 @@ void PNGAPI png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) { png_debug(1, "in png_set_filler"); + if (png_ptr == NULL) return; png_ptr->transformations |= PNG_FILLER; - png_ptr->filler = (png_byte)filler; + png_ptr->filler = (png_uint_16)filler; if (filler_loc == PNG_FILLER_AFTER) png_ptr->flags |= PNG_FLAG_FILLER_AFTER; else @@ -135,18 +143,17 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) } } -#if !defined(PNG_1_0_X) /* Added to libpng-1.2.7 */ void PNGAPI png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc) { png_debug(1, "in png_set_add_alpha"); + if (png_ptr == NULL) return; png_set_filler(png_ptr, filler, filler_loc); png_ptr->transformations |= PNG_ADD_ALPHA; } -#endif #endif @@ -156,6 +163,7 @@ void PNGAPI png_set_swap_alpha(png_structp png_ptr) { png_debug(1, "in png_set_swap_alpha"); + if (png_ptr == NULL) return; png_ptr->transformations |= PNG_SWAP_ALPHA; @@ -168,6 +176,7 @@ void PNGAPI png_set_invert_alpha(png_structp png_ptr) { png_debug(1, "in png_set_invert_alpha"); + if (png_ptr == NULL) return; png_ptr->transformations |= PNG_INVERT_ALPHA; @@ -179,6 +188,7 @@ void PNGAPI png_set_invert_mono(png_structp png_ptr) { png_debug(1, "in png_set_invert_mono"); + if (png_ptr == NULL) return; png_ptr->transformations |= PNG_INVERT_MONO; @@ -189,13 +199,10 @@ void /* PRIVATE */ png_do_invert(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_invert"); + /* This test removed from libpng version 1.0.13 and 1.2.0: * if (row_info->bit_depth == 1 && */ -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row == NULL || row_info == NULL) - return; -#endif if (row_info->color_type == PNG_COLOR_TYPE_GRAY) { png_bytep rp = row; @@ -244,10 +251,8 @@ void /* PRIVATE */ png_do_swap(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_swap"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif row_info->bit_depth == 16) { png_bytep rp = row; @@ -375,10 +380,8 @@ void /* PRIVATE */ png_do_packswap(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_packswap"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif row_info->bit_depth < 8) { png_bytep rp, end, table; @@ -407,9 +410,7 @@ void /* PRIVATE */ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) { png_debug(1, "in png_do_strip_filler"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif + { png_bytep sp=row; png_bytep dp=row; @@ -565,10 +566,8 @@ void /* PRIVATE */ png_do_bgr(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_bgr"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif (row_info->color_type & PNG_COLOR_MASK_COLOR)) { png_uint_32 row_width = row_info->width; @@ -637,16 +636,16 @@ png_do_bgr(png_row_infop row_info, png_bytep row) #endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) void PNGAPI png_set_user_transform_info(png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels) { png_debug(1, "in png_set_user_transform_info"); + if (png_ptr == NULL) return; -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED png_ptr->user_transform_ptr = user_transform_ptr; png_ptr->user_transform_depth = (png_byte)user_transform_depth; png_ptr->user_transform_channels = (png_byte)user_transform_channels; @@ -656,7 +655,6 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp "This version of libpng does not support user transform info"); #endif } -#endif /* This function returns a pointer to the user_transform_ptr associated with * the user transform functions. The application should free any memory @@ -668,10 +666,12 @@ png_get_user_transform_ptr(png_structp png_ptr) { if (png_ptr == NULL) return (NULL); -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED return ((png_voidp)png_ptr->user_transform_ptr); #else return (NULL); #endif } +#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED || + PNG_WRITE_USER_TRANSFORM_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/source/Irrlicht/libpng/pngvcrd.c b/source/Irrlicht/libpng/pngvcrd.c deleted file mode 100644 index 54fef609..00000000 --- a/source/Irrlicht/libpng/pngvcrd.c +++ /dev/null @@ -1 +0,0 @@ -/* pnggvrd.c was removed from libpng-1.2.20. */ diff --git a/source/Irrlicht/libpng/pngwio.c b/source/Irrlicht/libpng/pngwio.c index 7e868d87..d7b42fd9 100644 --- a/source/Irrlicht/libpng/pngwio.c +++ b/source/Irrlicht/libpng/pngwio.c @@ -1,8 +1,8 @@ /* pngwio.c - functions for data output * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 3, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -18,9 +18,10 @@ * them at run time with png_set_write_fn(...). */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_WRITE_SUPPORTED +#include "pngpriv.h" /* Write the data to whatever output you are using. The default routine * writes to a file pointer. Note that this routine sometimes gets called @@ -38,7 +39,7 @@ png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) png_error(png_ptr, "Call to NULL write function"); } -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED /* This is the function that does the actual writing of data. If you are * not writing to a standard C stream, you should create a replacement * write_data function and use it at run time with png_set_write_fn(), rather @@ -52,12 +53,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) if (png_ptr == NULL) return; -#if defined(_WIN32_WCE) - if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) - check = 0; -#else check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); -#endif if (check != length) png_error(png_ptr, "Write Error"); } @@ -84,12 +80,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); if ((png_bytep)near_data == data) { -#if defined(_WIN32_WCE) - if ( !WriteFile(io_ptr, near_data, length, &check, NULL) ) - check = 0; -#else check = fwrite(near_data, 1, length, io_ptr); -#endif } else { @@ -101,12 +92,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { written = MIN(NEAR_BUF_SIZE, remaining); png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ -#if defined(_WIN32_WCE) - if ( !WriteFile(io_ptr, buf, written, &err, NULL) ) - err = 0; -#else err = fwrite(buf, 1, written, io_ptr); -#endif if (err != written) break; @@ -129,7 +115,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) * to disk). After png_flush is called, there should be no data pending * writing in any buffers. */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED void /* PRIVATE */ png_flush(png_structp png_ptr) { @@ -137,19 +123,15 @@ png_flush(png_structp png_ptr) (*(png_ptr->output_flush_fn))(png_ptr); } -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED void PNGAPI png_default_flush(png_structp png_ptr) { -#if !defined(_WIN32_WCE) png_FILE_p io_ptr; -#endif if (png_ptr == NULL) return; -#if !defined(_WIN32_WCE) io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); fflush(io_ptr); -#endif } #endif #endif @@ -173,7 +155,7 @@ png_default_flush(png_structp png_ptr) * arguments a pointer to a png_struct. After a call to * the flush function, there should be no data in any buffers * or pending transmission. If the output method doesn't do - * any buffering of ouput, a function prototype must still be + * any buffering of output, a function prototype must still be * supplied although it doesn't have to do anything. If * PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile * time, output_flush_fn will be ignored, although it must be @@ -192,7 +174,7 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_ptr->io_ptr = io_ptr; -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED if (write_data_fn != NULL) png_ptr->write_data_fn = write_data_fn; @@ -202,8 +184,8 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_ptr->write_data_fn = write_data_fn; #endif -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -#if !defined(PNG_NO_STDIO) +#ifdef PNG_WRITE_FLUSH_SUPPORTED +#ifdef PNG_STDIO_SUPPORTED if (output_flush_fn != NULL) png_ptr->output_flush_fn = output_flush_fn; @@ -221,12 +203,12 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_warning(png_ptr, "Attempted to set both read_data_fn and write_data_fn in"); png_warning(png_ptr, - "the same structure. Resetting read_data_fn to NULL."); + "the same structure. Resetting read_data_fn to NULL"); } } -#if defined(USE_FAR_KEYWORD) -#if defined(_MSC_VER) +#ifdef USE_FAR_KEYWORD +#ifdef _MSC_VER void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) { void *near_ptr; diff --git a/source/Irrlicht/libpng/pngwrite.c b/source/Irrlicht/libpng/pngwrite.c index 50cb197f..75bfe18d 100644 --- a/source/Irrlicht/libpng/pngwrite.c +++ b/source/Irrlicht/libpng/pngwrite.c @@ -1,8 +1,8 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 3, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -12,9 +12,10 @@ */ /* Get internal access to png.h */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_WRITE_SUPPORTED +#include "pngpriv.h" /* Writes all the PNG information. This is the suggested way to use the * library. If you have a new chunk to add, make a function to write it, @@ -29,23 +30,26 @@ void PNGAPI png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_write_info_before_PLTE"); + if (png_ptr == NULL || info_ptr == NULL) return; if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) { - png_write_sig(png_ptr); /* Write PNG signature */ -#if defined(PNG_MNG_FEATURES_SUPPORTED) - if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted)) + /* Write PNG signature */ + png_write_sig(png_ptr); +#ifdef PNG_MNG_FEATURES_SUPPORTED + if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \ + (png_ptr->mng_features_permitted)) { png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); - png_ptr->mng_features_permitted=0; + png_ptr->mng_features_permitted = 0; } #endif /* Write IHDR information. */ png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, info_ptr->filter_type, -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) +#ifdef PNG_WRITE_INTERLACING_SUPPORTED info_ptr->interlace_type); #else 0); @@ -53,7 +57,7 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) /* The rest of these check to see if the valid field has the appropriate * flag set, and if it does, writes the chunk. */ -#if defined(PNG_WRITE_gAMA_SUPPORTED) +#ifdef PNG_WRITE_gAMA_SUPPORTED if (info_ptr->valid & PNG_INFO_gAMA) { # ifdef PNG_FLOATING_POINT_SUPPORTED @@ -65,20 +69,20 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) #endif } #endif -#if defined(PNG_WRITE_sRGB_SUPPORTED) +#ifdef PNG_WRITE_sRGB_SUPPORTED if (info_ptr->valid & PNG_INFO_sRGB) png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent); #endif -#if defined(PNG_WRITE_iCCP_SUPPORTED) +#ifdef PNG_WRITE_iCCP_SUPPORTED if (info_ptr->valid & PNG_INFO_iCCP) png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE, info_ptr->iccp_profile, (int)info_ptr->iccp_proflen); #endif -#if defined(PNG_WRITE_sBIT_SUPPORTED) +#ifdef PNG_WRITE_sBIT_SUPPORTED if (info_ptr->valid & PNG_INFO_sBIT) png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); #endif -#if defined(PNG_WRITE_cHRM_SUPPORTED) +#ifdef PNG_WRITE_cHRM_SUPPORTED if (info_ptr->valid & PNG_INFO_cHRM) { #ifdef PNG_FLOATING_POINT_SUPPORTED @@ -98,7 +102,7 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) #endif } #endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED if (info_ptr->unknown_chunks_num) { png_unknown_chunk *up; @@ -109,7 +113,7 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; up++) { - int keep=png_handle_as_unknown(png_ptr, up->name); + int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && up->location && !(up->location & PNG_HAVE_PLTE) && !(up->location & PNG_HAVE_IDAT) && @@ -147,47 +151,47 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) png_error(png_ptr, "Valid palette required for paletted images"); -#if defined(PNG_WRITE_tRNS_SUPPORTED) +#ifdef PNG_WRITE_tRNS_SUPPORTED if (info_ptr->valid & PNG_INFO_tRNS) { -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED /* Invert the alpha channel (in tRNS) */ if ((png_ptr->transformations & PNG_INVERT_ALPHA) && info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { int j; - for (j=0; j<(int)info_ptr->num_trans; j++) - info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]); + for (j = 0; j<(int)info_ptr->num_trans; j++) + info_ptr->trans_alpha[j] = (png_byte)(255 - info_ptr->trans_alpha[j]); } #endif - png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values), + png_write_tRNS(png_ptr, info_ptr->trans_alpha, &(info_ptr->trans_color), info_ptr->num_trans, info_ptr->color_type); } #endif -#if defined(PNG_WRITE_bKGD_SUPPORTED) +#ifdef PNG_WRITE_bKGD_SUPPORTED if (info_ptr->valid & PNG_INFO_bKGD) png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); #endif -#if defined(PNG_WRITE_hIST_SUPPORTED) +#ifdef PNG_WRITE_hIST_SUPPORTED if (info_ptr->valid & PNG_INFO_hIST) png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); #endif -#if defined(PNG_WRITE_oFFs_SUPPORTED) +#ifdef PNG_WRITE_oFFs_SUPPORTED if (info_ptr->valid & PNG_INFO_oFFs) png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, info_ptr->offset_unit_type); #endif -#if defined(PNG_WRITE_pCAL_SUPPORTED) +#ifdef PNG_WRITE_pCAL_SUPPORTED if (info_ptr->valid & PNG_INFO_pCAL) png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, info_ptr->pcal_units, info_ptr->pcal_params); #endif -#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_sCAL_SUPPORTED if (info_ptr->valid & PNG_INFO_sCAL) -#if defined(PNG_WRITE_sCAL_SUPPORTED) -#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) +#ifdef PNG_WRITE_sCAL_SUPPORTED +#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) png_write_sCAL(png_ptr, (int)info_ptr->scal_unit, info_ptr->scal_pixel_width, info_ptr->scal_pixel_height); #else /* !FLOATING_POINT */ @@ -198,17 +202,17 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) #endif /* FLOATING_POINT */ #else /* !WRITE_sCAL */ png_warning(png_ptr, - "png_write_sCAL not supported; sCAL chunk not written."); + "png_write_sCAL not supported; sCAL chunk not written"); #endif /* WRITE_sCAL */ #endif /* sCAL */ -#if defined(PNG_WRITE_pHYs_SUPPORTED) +#ifdef PNG_WRITE_pHYs_SUPPORTED if (info_ptr->valid & PNG_INFO_pHYs) png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); #endif /* pHYs */ -#if defined(PNG_WRITE_tIME_SUPPORTED) +#ifdef PNG_WRITE_tIME_SUPPORTED if (info_ptr->valid & PNG_INFO_tIME) { png_write_tIME(png_ptr, &(info_ptr->mod_time)); @@ -216,13 +220,13 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) } #endif /* tIME */ -#if defined(PNG_WRITE_sPLT_SUPPORTED) +#ifdef PNG_WRITE_sPLT_SUPPORTED if (info_ptr->valid & PNG_INFO_sPLT) for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); #endif /* sPLT */ -#if defined(PNG_WRITE_TEXT_SUPPORTED) +#ifdef PNG_WRITE_TEXT_SUPPORTED /* Check to see if we need to write text chunks */ for (i = 0; i < info_ptr->num_text; i++) { @@ -231,7 +235,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) /* An internationalized chunk? */ if (info_ptr->text[i].compression > 0) { -#if defined(PNG_WRITE_iTXt_SUPPORTED) +#ifdef PNG_WRITE_iTXt_SUPPORTED /* Write international chunk */ png_write_iTXt(png_ptr, info_ptr->text[i].compression, @@ -248,7 +252,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) /* If we want a compressed text chunk */ else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt) { -#if defined(PNG_WRITE_zTXt_SUPPORTED) +#ifdef PNG_WRITE_zTXt_SUPPORTED /* Write compressed chunk */ png_write_zTXt(png_ptr, info_ptr->text[i].key, info_ptr->text[i].text, 0, @@ -261,7 +265,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) } else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) { -#if defined(PNG_WRITE_tEXt_SUPPORTED) +#ifdef PNG_WRITE_tEXt_SUPPORTED /* Write uncompressed chunk */ png_write_tEXt(png_ptr, info_ptr->text[i].key, info_ptr->text[i].text, @@ -276,18 +280,18 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) } #endif /* tEXt */ -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED if (info_ptr->unknown_chunks_num) { - png_unknown_chunk *up; + png_unknown_chunk *up; - png_debug(5, "writing extra chunks"); + png_debug(5, "writing extra chunks"); - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep=png_handle_as_unknown(png_ptr, up->name); + for (up = info_ptr->unknown_chunks; + up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; + up++) + { + int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && up->location && (up->location & PNG_HAVE_PLTE) && !(up->location & PNG_HAVE_IDAT) && @@ -296,7 +300,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) { png_write_chunk(png_ptr, up->name, up->data, up->size); } - } + } } #endif } @@ -310,6 +314,7 @@ void PNGAPI png_write_end(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_write_end"); + if (png_ptr == NULL) return; if (!(png_ptr->mode & PNG_HAVE_IDAT)) @@ -318,16 +323,16 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) /* See if user wants us to write information chunks */ if (info_ptr != NULL) { -#if defined(PNG_WRITE_TEXT_SUPPORTED) - int i; /* Local index variable */ +#ifdef PNG_WRITE_TEXT_SUPPORTED + int i; /* local index variable */ #endif -#if defined(PNG_WRITE_tIME_SUPPORTED) +#ifdef PNG_WRITE_tIME_SUPPORTED /* Check to see if user has supplied a time chunk */ if ((info_ptr->valid & PNG_INFO_tIME) && !(png_ptr->mode & PNG_WROTE_tIME)) png_write_tIME(png_ptr, &(info_ptr->mod_time)); #endif -#if defined(PNG_WRITE_TEXT_SUPPORTED) +#ifdef PNG_WRITE_TEXT_SUPPORTED /* Loop through comment chunks */ for (i = 0; i < info_ptr->num_text; i++) { @@ -336,23 +341,23 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) /* An internationalized chunk? */ if (info_ptr->text[i].compression > 0) { -#if defined(PNG_WRITE_iTXt_SUPPORTED) - /* Write international chunk */ - png_write_iTXt(png_ptr, - info_ptr->text[i].compression, - info_ptr->text[i].key, - info_ptr->text[i].lang, - info_ptr->text[i].lang_key, - info_ptr->text[i].text); +#ifdef PNG_WRITE_iTXt_SUPPORTED + /* Write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); #else - png_warning(png_ptr, "Unable to write international text"); + png_warning(png_ptr, "Unable to write international text"); #endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; } else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) { -#if defined(PNG_WRITE_zTXt_SUPPORTED) +#ifdef PNG_WRITE_zTXt_SUPPORTED /* Write compressed chunk */ png_write_zTXt(png_ptr, info_ptr->text[i].key, info_ptr->text[i].text, 0, @@ -365,7 +370,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) } else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) { -#if defined(PNG_WRITE_tEXt_SUPPORTED) +#ifdef PNG_WRITE_tEXt_SUPPORTED /* Write uncompressed chunk */ png_write_tEXt(png_ptr, info_ptr->text[i].key, info_ptr->text[i].text, 0); @@ -378,18 +383,18 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) } } #endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED if (info_ptr->unknown_chunks_num) { - png_unknown_chunk *up; + png_unknown_chunk *up; - png_debug(5, "writing extra chunks"); + png_debug(5, "writing extra chunks"); - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep=png_handle_as_unknown(png_ptr, up->name); + for (up = info_ptr->unknown_chunks; + up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; + up++) + { + int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && up->location && (up->location & PNG_AFTER_IDAT) && ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || @@ -397,7 +402,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) { png_write_chunk(png_ptr, up->name, up->data, up->size); } - } + } } #endif } @@ -411,22 +416,22 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) * do not set png_ptr->output_flush_fn to crash. If your application * experiences a problem, please try building libpng with * PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED defined, and report the event to - * png-mng-implement at lists.sf.net . This kludge will be removed - * from libpng-1.4.0. + * png-mng-implement at lists.sf.net . */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) && \ - defined(PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED png_flush(png_ptr); +# endif #endif } -#if defined(PNG_WRITE_tIME_SUPPORTED) -#if !defined(_WIN32_WCE) -/* "time.h" functions are not supported on WindowsCE */ +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* "tm" structure is not supported on WindowsCE */ void PNGAPI png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime) { png_debug(1, "in png_convert_from_struct_tm"); + ptime->year = (png_uint_16)(1900 + ttime->tm_year); ptime->month = (png_byte)(ttime->tm_mon + 1); ptime->day = (png_byte)ttime->tm_mday; @@ -441,11 +446,11 @@ png_convert_from_time_t(png_timep ptime, time_t ttime) struct tm *tbuf; png_debug(1, "in png_convert_from_time_t"); + tbuf = gmtime(&ttime); png_convert_from_struct_tm(ptime, tbuf); } #endif -#endif /* Initialize png_ptr structure, and allocate any memory needed */ png_structp PNGAPI @@ -454,7 +459,7 @@ png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr, { #ifdef PNG_USER_MEM_SUPPORTED return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn, - warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL)); + warn_fn, NULL, NULL, NULL)); } /* Alternate initialize png_ptr structure, and allocate any memory needed */ @@ -464,17 +469,20 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn) { #endif /* PNG_USER_MEM_SUPPORTED */ + volatile int png_cleanup_needed = 0; #ifdef PNG_SETJMP_SUPPORTED - volatile + volatile #endif - png_structp png_ptr; + png_structp png_ptr; #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD jmp_buf jmpbuf; #endif #endif int i; + png_debug(1, "in png_create_write_struct"); + #ifdef PNG_USER_MEM_SUPPORTED png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); @@ -486,25 +494,23 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, /* Added at libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_ptr->user_width_max=PNG_USER_WIDTH_MAX; - png_ptr->user_height_max=PNG_USER_HEIGHT_MAX; + png_ptr->user_width_max = PNG_USER_WIDTH_MAX; + png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; #endif #ifdef PNG_SETJMP_SUPPORTED +/* Applications that neglect to set up their own setjmp() and then + encounter a png_error() will longjmp here. Since the jmpbuf is + then meaningless we abort instead of returning. */ #ifdef USE_FAR_KEYWORD if (setjmp(jmpbuf)) #else - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */ #endif - { - png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf=NULL; - png_destroy_struct(png_ptr); - return (NULL); - } #ifdef USE_FAR_KEYWORD - png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf)); #endif + PNG_ABORT(); #endif #ifdef PNG_USER_MEM_SUPPORTED @@ -514,12 +520,12 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, if (user_png_ver) { - i=0; - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); + i = 0; + do + { + if (user_png_ver[i] != png_libpng_ver[i]) + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + } while (png_libpng_ver[i++]); } if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) @@ -533,14 +539,14 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || (user_png_ver[0] == '0' && user_png_ver[2] < '9')) { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) +#ifdef PNG_STDIO_SUPPORTED char msg[80]; if (user_png_ver) { - png_snprintf(msg, 80, - "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); + png_snprintf(msg, 80, + "Application was compiled with png.h from libpng-%.20s", + user_png_ver); + png_warning(png_ptr, msg); } png_snprintf(msg, 80, "Application is running with png.c from libpng-%.20s", @@ -548,171 +554,47 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_warning(png_ptr, msg); #endif #ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; + png_ptr->flags = 0; #endif - png_error(png_ptr, + png_warning(png_ptr, "Incompatible libpng version in application and library"); + png_cleanup_needed = 1; } } /* Initialize zbuf - compression buffer */ png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - - png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL, - png_flush_ptr_NULL); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, - 1, png_doublep_NULL, png_doublep_NULL); -#endif - -#ifdef PNG_SETJMP_SUPPORTED -/* Applications that neglect to set up their own setjmp() and then encounter - a png_error() will longjmp here. Since the jmpbuf is then meaningless we - abort instead of returning. */ -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) - PNG_ABORT(); - png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf)); + if (!png_cleanup_needed) + { + png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, + png_ptr->zbuf_size); + if (png_ptr->zbuf == NULL) + png_cleanup_needed = 1; + } + if (png_cleanup_needed) + { + /* Clean up PNG structure and deallocate any memory. */ + png_free(png_ptr, png_ptr->zbuf); + png_ptr->zbuf = NULL; +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)png_ptr, + (png_free_ptr)free_fn, (png_voidp)mem_ptr); #else - if (setjmp(png_ptr->jmpbuf)) - PNG_ABORT(); + png_destroy_struct((png_voidp)png_ptr); #endif + return (NULL); + } + + png_set_write_fn(png_ptr, NULL, NULL, NULL); + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, + 1, NULL, NULL); #endif + return (png_ptr); } -/* Initialize png_ptr structure, and allocate any memory needed */ -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) -/* Deprecated. */ -#undef png_write_init -void PNGAPI -png_write_init(png_structp png_ptr) -{ - /* We only come here via pre-1.0.7-compiled applications */ - png_write_init_2(png_ptr, "1.0.6 or earlier", 0, 0); -} - -void PNGAPI -png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size, png_size_t png_info_size) -{ - /* We only come here via pre-1.0.12-compiled applications */ - if (png_ptr == NULL) return; -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - if (png_sizeof(png_struct) > png_struct_size || - png_sizeof(png_info) > png_info_size) - { - char msg[80]; - png_ptr->warning_fn=NULL; - if (user_png_ver) - { - png_snprintf(msg, 80, - "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - png_snprintf(msg, 80, - "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); - } -#endif - if (png_sizeof(png_struct) > png_struct_size) - { - png_ptr->error_fn=NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "The png struct allocated by the application for writing is too small."); - } - if (png_sizeof(png_info) > png_info_size) - { - png_ptr->error_fn=NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "The info struct allocated by the application for writing is too small."); - } - png_write_init_3(&png_ptr, user_png_ver, png_struct_size); -} -#endif /* PNG_1_0_X || PNG_1_2_X */ - - -void PNGAPI -png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size) -{ - png_structp png_ptr=*ptr_ptr; -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; /* To save current jump buffer */ -#endif - - int i = 0; - - if (png_ptr == NULL) - return; - - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - { -#ifdef PNG_LEGACY_SUPPORTED - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; -#else - png_ptr->warning_fn=NULL; - png_warning(png_ptr, - "Application uses deprecated png_write_init() and should be recompiled."); - break; -#endif - } - } while (png_libpng_ver[i++]); - - png_debug(1, "in png_write_init_3"); - -#ifdef PNG_SETJMP_SUPPORTED - /* Save jump buffer and error functions */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf)); -#endif - - if (png_sizeof(png_struct) > png_struct_size) - { - png_destroy_struct(png_ptr); - png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); - *ptr_ptr = png_ptr; - } - - /* Reset all variables to 0 */ - png_memset(png_ptr, 0, png_sizeof(png_struct)); - - /* Added at libpng-1.2.6 */ -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_ptr->user_width_max=PNG_USER_WIDTH_MAX; - png_ptr->user_height_max=PNG_USER_HEIGHT_MAX; -#endif - -#ifdef PNG_SETJMP_SUPPORTED - /* Restore jump buffer */ - png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); -#endif - - png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL, - png_flush_ptr_NULL); - - /* Initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, - 1, png_doublep_NULL, png_doublep_NULL); -#endif -} /* Write a few rows of image data. If the image is interlaced, * either you will have to write the 7 sub images, or, if you @@ -723,8 +605,8 @@ void PNGAPI png_write_rows(png_structp png_ptr, png_bytepp row, png_uint_32 num_rows) { - png_uint_32 i; /* Row counter */ - png_bytepp rp; /* Row pointer */ + png_uint_32 i; /* row counter */ + png_bytepp rp; /* row pointer */ png_debug(1, "in png_write_rows"); @@ -744,15 +626,16 @@ png_write_rows(png_structp png_ptr, png_bytepp row, void PNGAPI png_write_image(png_structp png_ptr, png_bytepp image) { - png_uint_32 i; /* Row index */ - int pass, num_pass; /* Pass variables */ - png_bytepp rp; /* Points to current row */ + png_uint_32 i; /* row index */ + int pass, num_pass; /* pass variables */ + png_bytepp rp; /* points to current row */ if (png_ptr == NULL) return; png_debug(1, "in png_write_image"); -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Initialize interlace handling. If image is not interlaced, * this will set pass to 1 */ @@ -777,6 +660,7 @@ png_write_row(png_structp png_ptr, png_bytep row) { if (png_ptr == NULL) return; + png_debug2(1, "in png_write_row (row %ld, pass %d)", png_ptr->row_number, png_ptr->pass); @@ -786,42 +670,44 @@ png_write_row(png_structp png_ptr, png_bytep row) /* Make sure we wrote the header info */ if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) png_error(png_ptr, - "png_write_info was never called before png_write_row."); + "png_write_info was never called before png_write_row"); /* Check for transforms that have been set but were defined out */ #if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED) if (png_ptr->transformations & PNG_INVERT_MONO) - png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined"); #endif #if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) - png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined"); #endif -#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED) +#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + defined(PNG_READ_PACKSWAP_SUPPORTED) if (png_ptr->transformations & PNG_PACKSWAP) - png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined."); + png_warning(png_ptr, + "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); #endif #if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) if (png_ptr->transformations & PNG_PACK) - png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined"); #endif #if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED) if (png_ptr->transformations & PNG_SHIFT) - png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined"); #endif #if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED) if (png_ptr->transformations & PNG_BGR) - png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined"); #endif #if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED) if (png_ptr->transformations & PNG_SWAP_BYTES) - png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined."); + png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined"); #endif png_write_start_row(png_ptr); } -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) +#ifdef PNG_WRITE_INTERLACING_SUPPORTED /* If interlaced and not interested in row, return */ if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) { @@ -899,10 +785,9 @@ png_write_row(png_structp png_ptr, png_bytep row) png_debug1(3, "row_info->rowbytes = %lu", png_ptr->row_info.rowbytes); /* Copy user's row into buffer, leaving room for filter byte. */ - png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row, - png_ptr->row_info.rowbytes); + png_memcpy(png_ptr->row_buf + 1, row, png_ptr->row_info.rowbytes); -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) +#ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Handle interlacing */ if (png_ptr->interlaced && png_ptr->pass < 6 && (png_ptr->transformations & PNG_INTERLACE)) @@ -922,7 +807,7 @@ png_write_row(png_structp png_ptr, png_bytep row) if (png_ptr->transformations) png_do_write_transformations(png_ptr); -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED /* Write filter_method 64 (intrapixel differencing) only if * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and * 2. Libpng did not write a PNG signature (this filter_method is only @@ -947,12 +832,13 @@ png_write_row(png_structp png_ptr, png_bytep row) (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); } -#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED /* Set the automatic flush interval or 0 to turn flushing off */ void PNGAPI png_set_flush(png_structp png_ptr, int nrows) { png_debug(1, "in png_set_flush"); + if (png_ptr == NULL) return; png_ptr->flush_dist = (nrows < 0 ? 0 : nrows); @@ -965,6 +851,7 @@ png_write_flush(png_structp png_ptr) int wrote_IDAT; png_debug(1, "in png_write_flush"); + if (png_ptr == NULL) return; /* We have already written out all of the data */ @@ -1025,6 +912,7 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) #endif png_debug(1, "in png_destroy_write_struct"); + if (png_ptr_ptr != NULL) { png_ptr = *png_ptr_ptr; @@ -1051,11 +939,10 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) { png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED if (png_ptr->num_chunk_list) { png_free(png_ptr, png_ptr->chunk_list); - png_ptr->chunk_list=NULL; png_ptr->num_chunk_list = 0; } #endif @@ -1099,13 +986,14 @@ png_write_destroy(png_structp png_ptr) #endif png_debug(1, "in png_write_destroy"); + /* Free any memory zlib uses */ deflateEnd(&png_ptr->zstream); /* Free our memory. png_free checks NULL for us. */ png_free(png_ptr, png_ptr->zbuf); png_free(png_ptr, png_ptr->row_buf); -#ifndef PNG_NO_WRITE_FILTER +#ifdef PNG_WRITE_FILTER_SUPPORTED png_free(png_ptr, png_ptr->prev_row); png_free(png_ptr, png_ptr->sub_row); png_free(png_ptr, png_ptr->up_row); @@ -1113,11 +1001,11 @@ png_write_destroy(png_structp png_ptr) png_free(png_ptr, png_ptr->paeth_row); #endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) +#ifdef PNG_TIME_RFC1123_SUPPORTED png_free(png_ptr, png_ptr->time_buffer); #endif -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED png_free(png_ptr, png_ptr->prev_filters); png_free(png_ptr, png_ptr->filter_weights); png_free(png_ptr, png_ptr->inv_filter_weights); @@ -1156,9 +1044,10 @@ void PNGAPI png_set_filter(png_structp png_ptr, int method, int filters) { png_debug(1, "in png_set_filter"); + if (png_ptr == NULL) return; -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && (method == PNG_INTRAPIXEL_DIFFERENCING)) method = PNG_FILTER_TYPE_BASE; @@ -1167,26 +1056,26 @@ png_set_filter(png_structp png_ptr, int method, int filters) { switch (filters & (PNG_ALL_FILTERS | 0x07)) { -#ifndef PNG_NO_WRITE_FILTER +#ifdef PNG_WRITE_FILTER_SUPPORTED case 5: case 6: case 7: png_warning(png_ptr, "Unknown row filter for method 0"); -#endif /* PNG_NO_WRITE_FILTER */ +#endif /* PNG_WRITE_FILTER_SUPPORTED */ case PNG_FILTER_VALUE_NONE: - png_ptr->do_filter=PNG_FILTER_NONE; break; -#ifndef PNG_NO_WRITE_FILTER + png_ptr->do_filter = PNG_FILTER_NONE; break; +#ifdef PNG_WRITE_FILTER_SUPPORTED case PNG_FILTER_VALUE_SUB: - png_ptr->do_filter=PNG_FILTER_SUB; break; + png_ptr->do_filter = PNG_FILTER_SUB; break; case PNG_FILTER_VALUE_UP: - png_ptr->do_filter=PNG_FILTER_UP; break; + png_ptr->do_filter = PNG_FILTER_UP; break; case PNG_FILTER_VALUE_AVG: - png_ptr->do_filter=PNG_FILTER_AVG; break; + png_ptr->do_filter = PNG_FILTER_AVG; break; case PNG_FILTER_VALUE_PAETH: - png_ptr->do_filter=PNG_FILTER_PAETH; break; + png_ptr->do_filter = PNG_FILTER_PAETH; break; default: png_ptr->do_filter = (png_byte)filters; break; #else default: png_warning(png_ptr, "Unknown row filter for method 0"); -#endif /* PNG_NO_WRITE_FILTER */ +#endif /* PNG_WRITE_FILTER_SUPPORTED */ } /* If we have allocated the row_buf, this means we have already started @@ -1200,7 +1089,7 @@ png_set_filter(png_structp png_ptr, int method, int filters) */ if (png_ptr->row_buf != NULL) { -#ifndef PNG_NO_WRITE_FILTER +#ifdef PNG_WRITE_FILTER_SUPPORTED if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL) { png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, @@ -1255,7 +1144,7 @@ png_set_filter(png_structp png_ptr, int method, int filters) } if (png_ptr->do_filter == PNG_NO_FILTERS) -#endif /* PNG_NO_WRITE_FILTER */ +#endif /* PNG_WRITE_FILTER_SUPPORTED */ png_ptr->do_filter = PNG_FILTER_NONE; } } @@ -1270,7 +1159,7 @@ png_set_filter(png_structp png_ptr, int method, int filters) * filtered data going to zlib more consistent, hopefully resulting in * better compression. */ -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* GRR 970116 */ +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */ void PNGAPI png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, int num_weights, png_doublep filter_weights, @@ -1279,6 +1168,7 @@ png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, int i; png_debug(1, "in png_set_filter_heuristics"); + if (png_ptr == NULL) return; if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST) @@ -1393,6 +1283,7 @@ void PNGAPI png_set_compression_level(png_structp png_ptr, int level) { png_debug(1, "in png_set_compression_level"); + if (png_ptr == NULL) return; png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL; @@ -1403,6 +1294,7 @@ void PNGAPI png_set_compression_mem_level(png_structp png_ptr, int mem_level) { png_debug(1, "in png_set_compression_mem_level"); + if (png_ptr == NULL) return; png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL; @@ -1413,6 +1305,7 @@ void PNGAPI png_set_compression_strategy(png_structp png_ptr, int strategy) { png_debug(1, "in png_set_compression_strategy"); + if (png_ptr == NULL) return; png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY; @@ -1433,7 +1326,7 @@ png_set_compression_window_bits(png_structp png_ptr, int window_bits) if (window_bits == 8) { png_warning(png_ptr, "Compression window is being reset to 512"); - window_bits=9; + window_bits = 9; } #endif png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS; @@ -1444,6 +1337,7 @@ void PNGAPI png_set_compression_method(png_structp png_ptr, int method) { png_debug(1, "in png_set_compression_method"); + if (png_ptr == NULL) return; if (method != 8) @@ -1460,12 +1354,13 @@ png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn) png_ptr->write_row_fn = write_row_fn; } -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED void PNGAPI png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr write_user_transform_fn) { png_debug(1, "in png_set_write_user_transform_fn"); + if (png_ptr == NULL) return; png_ptr->transformations |= PNG_USER_TRANSFORM; @@ -1474,31 +1369,26 @@ png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr #endif -#if defined(PNG_INFO_IMAGE_SUPPORTED) +#ifdef PNG_INFO_IMAGE_SUPPORTED void PNGAPI png_write_png(png_structp png_ptr, png_infop info_ptr, int transforms, voidp params) { if (png_ptr == NULL || info_ptr == NULL) return; -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) - /* Invert the alpha channel from opacity to transparency */ - if (transforms & PNG_TRANSFORM_INVERT_ALPHA) - png_set_invert_alpha(png_ptr); -#endif /* Write the file header information. */ png_write_info(png_ptr, info_ptr); /* ------ these transformations don't touch the info structure ------- */ -#if defined(PNG_WRITE_INVERT_SUPPORTED) +#ifdef PNG_WRITE_INVERT_SUPPORTED /* Invert monochrome pixels */ if (transforms & PNG_TRANSFORM_INVERT_MONO) png_set_invert_mono(png_ptr); #endif -#if defined(PNG_WRITE_SHIFT_SUPPORTED) +#ifdef PNG_WRITE_SHIFT_SUPPORTED /* Shift the pixels up to a legal bit depth and fill in * as appropriate to correctly scale the image. */ @@ -1507,19 +1397,19 @@ png_write_png(png_structp png_ptr, png_infop info_ptr, png_set_shift(png_ptr, &info_ptr->sig_bit); #endif -#if defined(PNG_WRITE_PACK_SUPPORTED) +#ifdef PNG_WRITE_PACK_SUPPORTED /* Pack pixels into bytes */ if (transforms & PNG_TRANSFORM_PACKING) png_set_packing(png_ptr); #endif -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED /* Swap location of alpha bytes from ARGB to RGBA */ if (transforms & PNG_TRANSFORM_SWAP_ALPHA) png_set_swap_alpha(png_ptr); #endif -#if defined(PNG_WRITE_FILLER_SUPPORTED) +#ifdef PNG_WRITE_FILLER_SUPPORTED /* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */ if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER) png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); @@ -1527,24 +1417,30 @@ png_write_png(png_structp png_ptr, png_infop info_ptr, png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); #endif -#if defined(PNG_WRITE_BGR_SUPPORTED) +#ifdef PNG_WRITE_BGR_SUPPORTED /* Flip BGR pixels to RGB */ if (transforms & PNG_TRANSFORM_BGR) png_set_bgr(png_ptr); #endif -#if defined(PNG_WRITE_SWAP_SUPPORTED) +#ifdef PNG_WRITE_SWAP_SUPPORTED /* Swap bytes of 16-bit files to most significant byte first */ if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) png_set_swap(png_ptr); #endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) +#ifdef PNG_WRITE_PACKSWAP_SUPPORTED /* Swap bits of 1, 2, 4 bit packed pixel formats */ if (transforms & PNG_TRANSFORM_PACKSWAP) png_set_packswap(png_ptr); #endif +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED + /* Invert the alpha channel from opacity to transparency */ + if (transforms & PNG_TRANSFORM_INVERT_ALPHA) + png_set_invert_alpha(png_ptr); +#endif + /* ----------------------- end of transformations ------------------- */ /* Write the bits */ diff --git a/source/Irrlicht/libpng/pngwtran.c b/source/Irrlicht/libpng/pngwtran.c index a8043f3d..9cf095b8 100644 --- a/source/Irrlicht/libpng/pngwtran.c +++ b/source/Irrlicht/libpng/pngwtran.c @@ -1,8 +1,8 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * Last changed in libpng 1.2.37 [June 4, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.1 [February 25, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,9 +11,10 @@ * and license in png.h */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_WRITE_SUPPORTED +#include "pngpriv.h" /* Transform the data according to the user's wishes. The order of * transformations is significant. @@ -26,10 +27,11 @@ png_do_write_transformations(png_structp png_ptr) if (png_ptr == NULL) return; -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED if (png_ptr->transformations & PNG_USER_TRANSFORM) if (png_ptr->write_user_transform_fn != NULL) - (*(png_ptr->write_user_transform_fn)) /* User write transform function */ + (*(png_ptr->write_user_transform_fn)) /* User write transform + function */ (png_ptr, /* png_ptr */ &(png_ptr->row_info), /* row_info: */ /* png_uint_32 width; width of row */ @@ -40,48 +42,48 @@ png_do_write_transformations(png_structp png_ptr) /* png_byte pixel_depth; bits per pixel (depth*channels) */ png_ptr->row_buf + 1); /* start of pixel data for row */ #endif -#if defined(PNG_WRITE_FILLER_SUPPORTED) +#ifdef PNG_WRITE_FILLER_SUPPORTED if (png_ptr->transformations & PNG_FILLER) png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, png_ptr->flags); #endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) +#ifdef PNG_WRITE_PACKSWAP_SUPPORTED if (png_ptr->transformations & PNG_PACKSWAP) png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_WRITE_PACK_SUPPORTED) +#ifdef PNG_WRITE_PACK_SUPPORTED if (png_ptr->transformations & PNG_PACK) png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1, (png_uint_32)png_ptr->bit_depth); #endif -#if defined(PNG_WRITE_SWAP_SUPPORTED) +#ifdef PNG_WRITE_SWAP_SUPPORTED if (png_ptr->transformations & PNG_SWAP_BYTES) png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_WRITE_SHIFT_SUPPORTED) +#ifdef PNG_WRITE_SHIFT_SUPPORTED if (png_ptr->transformations & PNG_SHIFT) png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1, &(png_ptr->shift)); #endif -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_SWAP_ALPHA) png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_INVERT_ALPHA) png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_WRITE_BGR_SUPPORTED) +#ifdef PNG_WRITE_BGR_SUPPORTED if (png_ptr->transformations & PNG_BGR) png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#if defined(PNG_WRITE_INVERT_SUPPORTED) +#ifdef PNG_WRITE_INVERT_SUPPORTED if (png_ptr->transformations & PNG_INVERT_MONO) png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif } -#if defined(PNG_WRITE_PACK_SUPPORTED) +#ifdef PNG_WRITE_PACK_SUPPORTED /* Pack pixels into bytes. Pass the true bit depth in bit_depth. The * row_info bit depth should be 8 (one pixel per byte). The channels * should be 1 (this only happens on grayscale and paletted images). @@ -90,10 +92,8 @@ void /* PRIVATE */ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) { png_debug(1, "in png_do_pack"); + if (row_info->bit_depth == 8 && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif row_info->channels == 1) { switch ((int)bit_depth) @@ -204,7 +204,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) } #endif -#if defined(PNG_WRITE_SHIFT_SUPPORTED) +#ifdef PNG_WRITE_SHIFT_SUPPORTED /* Shift pixel values to take advantage of whole range. Pass the * true number of bits in bit_depth. The row should be packed * according to row_info->bit_depth. Thus, if you had a row of @@ -216,11 +216,8 @@ void /* PRIVATE */ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) { png_debug(1, "in png_do_shift"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && -#else + if ( -#endif row_info->color_type != PNG_COLOR_TYPE_PALETTE) { int shift_start[4], shift_dec[4]; @@ -335,14 +332,12 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) } #endif -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED void /* PRIVATE */ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_write_swap_alpha"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif + { if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { @@ -423,14 +418,12 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) } #endif -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED void /* PRIVATE */ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_write_invert_alpha"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif + { if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { @@ -512,16 +505,14 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) } #endif -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED /* Undoes intrapixel differencing */ void /* PRIVATE */ png_do_write_intrapixel(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_write_intrapixel"); + if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif (row_info->color_type & PNG_COLOR_MASK_COLOR)) { int bytes_per_pixel; diff --git a/source/Irrlicht/libpng/pngwutil.c b/source/Irrlicht/libpng/pngwutil.c index f66e82a0..dc4aa142 100644 --- a/source/Irrlicht/libpng/pngwutil.c +++ b/source/Irrlicht/libpng/pngwutil.c @@ -1,8 +1,8 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.2.39 [August 13, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.1 [February 25, 2010] + * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,9 +11,10 @@ * and license in png.h */ -#define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_WRITE_SUPPORTED +#include "pngpriv.h" /* Place a 32-bit number into a buffer in PNG byte order. We work * with unsigned numbers for convenience, although one supported @@ -28,6 +29,7 @@ png_save_uint_32(png_bytep buf, png_uint_32 i) buf[3] = (png_byte)(i & 0xff); } +#ifdef PNG_SAVE_INT_32_SUPPORTED /* The png_save_int_32 function assumes integers are stored in two's * complement format. If this isn't the case, then this routine needs to * be modified to write data in two's complement format. @@ -40,6 +42,7 @@ png_save_int_32(png_bytep buf, png_int_32 i) buf[2] = (png_byte)((i >> 8) & 0xff); buf[3] = (png_byte)(i & 0xff); } +#endif /* Place a 16-bit number into a buffer in PNG byte order. * The parameter is declared unsigned int, not png_uint_16, @@ -58,11 +61,16 @@ png_save_uint_16(png_bytep buf, unsigned int i) * we should call png_set_sig_bytes() to tell libpng how many of the * bytes have already been written. */ -void /* PRIVATE */ +void PNGAPI png_write_sig(png_structp png_ptr) { png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the signature is being written */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_SIGNATURE; +#endif + /* Write the rest of the 8 byte signature */ png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], (png_size_t)(8 - png_ptr->sig_bytes)); @@ -102,9 +110,17 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, png_debug2(0, "Writing %s chunk, length = %lu", chunk_name, (unsigned long)length); + if (png_ptr == NULL) return; +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk header is being written. + * PNG_IO_CHUNK_HDR requires a single I/O call. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR; +#endif + /* Write the length and the chunk name */ png_save_uint_32(buf, length); png_memcpy(buf + 4, chunk_name, 4); @@ -113,7 +129,14 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, png_memcpy(png_ptr->chunk_name, chunk_name, 4); /* Reset the crc and run it over the chunk name */ png_reset_crc(png_ptr); - png_calculate_crc(png_ptr, chunk_name, (png_size_t)4); + png_calculate_crc(png_ptr, chunk_name, 4); + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that chunk data will (possibly) be written. + * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_DATA; +#endif } /* Write the data of a PNG chunk started with png_write_chunk_start(). @@ -145,6 +168,13 @@ png_write_chunk_end(png_structp png_ptr) if (png_ptr == NULL) return; +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk CRC is being written. + * PNG_IO_CHUNK_CRC requires a single I/O function call. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_CRC; +#endif + /* Write the crc in a single operation */ png_save_uint_32(buf, png_ptr->crc); @@ -191,7 +221,7 @@ png_text_compress(png_structp png_ptr, if (compression >= PNG_TEXT_COMPRESSION_LAST) { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) +#ifdef PNG_STDIO_SUPPORTED char msg[50]; png_snprintf(msg, 50, "Unknown compression type %d", compression); png_warning(png_ptr, msg); @@ -250,7 +280,7 @@ png_text_compress(png_structp png_ptr, old_ptr = comp->output_ptr; comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32) + (png_alloc_size_t) (comp->max_output_ptr * png_sizeof(png_charpp))); png_memcpy(comp->output_ptr, old_ptr, old_max * png_sizeof(png_charp)); @@ -258,14 +288,14 @@ png_text_compress(png_structp png_ptr, } else comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32) + (png_alloc_size_t) (comp->max_output_ptr * png_sizeof(png_charp))); } /* Save the data */ comp->output_ptr[comp->num_output_ptr] = (png_charp)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); + (png_alloc_size_t)png_ptr->zbuf_size); png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, png_ptr->zbuf_size); comp->num_output_ptr++; @@ -302,7 +332,7 @@ png_text_compress(png_structp png_ptr, old_ptr = comp->output_ptr; /* This could be optimized to realloc() */ comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(comp->max_output_ptr * + (png_alloc_size_t)(comp->max_output_ptr * png_sizeof(png_charp))); png_memcpy(comp->output_ptr, old_ptr, old_max * png_sizeof(png_charp)); @@ -310,14 +340,14 @@ png_text_compress(png_structp png_ptr, } else comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(comp->max_output_ptr * + (png_alloc_size_t)(comp->max_output_ptr * png_sizeof(png_charp))); } /* Save the data */ comp->output_ptr[comp->num_output_ptr] = (png_charp)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); + (png_alloc_size_t)png_ptr->zbuf_size); png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, png_ptr->zbuf_size); comp->num_output_ptr++; @@ -365,11 +395,9 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp) png_write_chunk_data(png_ptr, (png_bytep)comp->output_ptr[i], (png_size_t)png_ptr->zbuf_size); png_free(png_ptr, comp->output_ptr[i]); - comp->output_ptr[i]=NULL; } if (comp->max_output_ptr != 0) png_free(png_ptr, comp->output_ptr); - comp->output_ptr=NULL; /* Write anything left in zbuf */ if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size) png_write_chunk_data(png_ptr, png_ptr->zbuf, @@ -390,14 +418,13 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int compression_type, int filter_type, int interlace_type) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_IHDR; -#endif int ret; png_byte buf[13]; /* Buffer to store the IHDR info */ png_debug(1, "in png_write_IHDR"); + /* Check that we have valid input data from the application info */ switch (color_type) { @@ -409,7 +436,8 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, case 4: case 8: case 16: png_ptr->channels = 1; break; - default: png_error(png_ptr, "Invalid bit depth for grayscale image"); + default: png_error(png_ptr, + "Invalid bit depth for grayscale image"); } break; case PNG_COLOR_TYPE_RGB: @@ -457,7 +485,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, * 5. The color_type is RGB or RGBA */ if ( -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && (color_type == PNG_COLOR_TYPE_RGB || @@ -485,7 +513,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, png_ptr->bit_depth = (png_byte)bit_depth; png_ptr->color_type = (png_byte)color_type; png_ptr->interlaced = (png_byte)interlace_type; -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED png_ptr->filter_type = (png_byte)filter_type; #endif png_ptr->compression_type = (png_byte)compression_type; @@ -567,16 +595,15 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, void /* PRIVATE */ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_PLTE; -#endif png_uint_32 i; png_colorp pal_ptr; png_byte buf[3]; png_debug(1, "in png_write_PLTE"); + if (( -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && #endif num_pal == 0) || num_pal > 256) @@ -604,7 +631,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) png_write_chunk_start(png_ptr, (png_bytep)png_PLTE, (png_uint_32)(num_pal * 3)); -#ifndef PNG_NO_POINTER_INDEXING +#ifdef PNG_POINTER_INDEXING_SUPPORTED for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++) { buf[0] = pal_ptr->red; @@ -613,7 +640,9 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) png_write_chunk_data(png_ptr, buf, (png_size_t)3); } #else - /* This is a little slower but some buggy compilers need to do this instead */ + /* This is a little slower but some buggy compilers need to do this + * instead + */ pal_ptr=palette; for (i = 0; i < num_pal; i++) { @@ -631,9 +660,8 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) void /* PRIVATE */ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_IDAT; -#endif + png_debug(1, "in png_write_IDAT"); /* Optimize the CMF field in the zlib stream. */ @@ -685,28 +713,27 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) void /* PRIVATE */ png_write_IEND(png_structp png_ptr) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_IEND; -#endif + png_debug(1, "in png_write_IEND"); - png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL, + + png_write_chunk(png_ptr, (png_bytep)png_IEND, NULL, (png_size_t)0); png_ptr->mode |= PNG_HAVE_IEND; } -#if defined(PNG_WRITE_gAMA_SUPPORTED) +#ifdef PNG_WRITE_gAMA_SUPPORTED /* Write a gAMA chunk */ #ifdef PNG_FLOATING_POINT_SUPPORTED void /* PRIVATE */ png_write_gAMA(png_structp png_ptr, double file_gamma) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_gAMA; -#endif png_uint_32 igamma; png_byte buf[4]; png_debug(1, "in png_write_gAMA"); + /* file_gamma is saved in 1/100,000ths */ igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5); png_save_uint_32(buf, igamma); @@ -717,12 +744,11 @@ png_write_gAMA(png_structp png_ptr, double file_gamma) void /* PRIVATE */ png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_gAMA; -#endif png_byte buf[4]; png_debug(1, "in png_write_gAMA"); + /* file_gamma is saved in 1/100,000ths */ png_save_uint_32(buf, (png_uint_32)file_gamma); png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); @@ -730,17 +756,16 @@ png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma) #endif #endif -#if defined(PNG_WRITE_sRGB_SUPPORTED) +#ifdef PNG_WRITE_sRGB_SUPPORTED /* Write a sRGB chunk */ void /* PRIVATE */ png_write_sRGB(png_structp png_ptr, int srgb_intent) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_sRGB; -#endif png_byte buf[1]; png_debug(1, "in png_write_sRGB"); + if (srgb_intent >= PNG_sRGB_INTENT_LAST) png_warning(png_ptr, "Invalid sRGB rendering intent specified"); @@ -749,15 +774,13 @@ png_write_sRGB(png_structp png_ptr, int srgb_intent) } #endif -#if defined(PNG_WRITE_iCCP_SUPPORTED) +#ifdef PNG_WRITE_iCCP_SUPPORTED /* Write an iCCP chunk */ void /* PRIVATE */ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, png_charp profile, int profile_len) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_iCCP; -#endif png_size_t name_len; png_charp new_name; compression_state comp; @@ -830,25 +853,24 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, } #endif -#if defined(PNG_WRITE_sPLT_SUPPORTED) +#ifdef PNG_WRITE_sPLT_SUPPORTED /* Write a sPLT chunk */ void /* PRIVATE */ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_sPLT; -#endif png_size_t name_len; png_charp new_name; png_byte entrybuf[10]; - int entry_size = (spalette->depth == 8 ? 6 : 10); - int palette_size = entry_size * spalette->nentries; + png_size_t entry_size = (spalette->depth == 8 ? 6 : 10); + png_size_t palette_size = entry_size * spalette->nentries; png_sPLT_entryp ep; -#ifdef PNG_NO_POINTER_INDEXING +#ifndef PNG_POINTER_INDEXING_SUPPORTED int i; #endif png_debug(1, "in png_write_sPLT"); + if ((name_len = png_check_keyword(png_ptr,spalette->name, &new_name))==0) return; @@ -860,7 +882,7 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, (png_size_t)1); /* Loop through each palette entry, writing appropriately */ -#ifndef PNG_NO_POINTER_INDEXING +#ifdef PNG_POINTER_INDEXING_SUPPORTED for (ep = spalette->entries; epentries + spalette->nentries; ep++) { if (spalette->depth == 8) @@ -910,18 +932,17 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) } #endif -#if defined(PNG_WRITE_sBIT_SUPPORTED) +#ifdef PNG_WRITE_sBIT_SUPPORTED /* Write the sBIT chunk */ void /* PRIVATE */ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_sBIT; -#endif png_byte buf[4]; png_size_t size; png_debug(1, "in png_write_sBIT"); + /* Make sure we don't depend upon the order of PNG_COLOR_8 */ if (color_type & PNG_COLOR_MASK_COLOR) { @@ -966,7 +987,7 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) } #endif -#if defined(PNG_WRITE_cHRM_SUPPORTED) +#ifdef PNG_WRITE_cHRM_SUPPORTED /* Write the cHRM chunk */ #ifdef PNG_FLOATING_POINT_SUPPORTED void /* PRIVATE */ @@ -974,9 +995,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_cHRM; -#endif png_byte buf[32]; png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, @@ -993,7 +1012,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y, int_blue_x = (png_uint_32)(blue_x * 100000.0 + 0.5); int_blue_y = (png_uint_32)(blue_y * 100000.0 + 0.5); -#if !defined(PNG_NO_CHECK_cHRM) +#ifdef PNG_CHECK_cHRM_SUPPORTED if (png_check_cHRM_fixed(png_ptr, int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, int_green_y, int_blue_x, int_blue_y)) #endif @@ -1023,14 +1042,13 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, png_fixed_point blue_y) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_cHRM; -#endif png_byte buf[32]; png_debug(1, "in png_write_cHRM"); + /* Each value is saved in 1/100,000ths */ -#if !defined(PNG_NO_CHECK_cHRM) +#ifdef PNG_CHECK_cHRM_SUPPORTED if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y)) #endif @@ -1053,18 +1071,17 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, #endif #endif -#if defined(PNG_WRITE_tRNS_SUPPORTED) +#ifdef PNG_WRITE_tRNS_SUPPORTED /* Write the tRNS chunk */ void /* PRIVATE */ -png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran, +png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran, int num_trans, int color_type) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_tRNS; -#endif png_byte buf[6]; png_debug(1, "in png_write_tRNS"); + if (color_type == PNG_COLOR_TYPE_PALETTE) { if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette) @@ -1073,7 +1090,7 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran, return; } /* Write the chunk out as it is */ - png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans, + png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans_alpha, (png_size_t)num_trans); } else if (color_type == PNG_COLOR_TYPE_GRAY) @@ -1109,21 +1126,20 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran, } #endif -#if defined(PNG_WRITE_bKGD_SUPPORTED) +#ifdef PNG_WRITE_bKGD_SUPPORTED /* Write the background chunk */ void /* PRIVATE */ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_bKGD; -#endif png_byte buf[6]; png_debug(1, "in png_write_bKGD"); + if (color_type == PNG_COLOR_TYPE_PALETTE) { if ( -#if defined(PNG_MNG_FEATURES_SUPPORTED) +#ifdef PNG_MNG_FEATURES_SUPPORTED (png_ptr->num_palette || (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) && #endif @@ -1162,18 +1178,17 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) } #endif -#if defined(PNG_WRITE_hIST_SUPPORTED) +#ifdef PNG_WRITE_hIST_SUPPORTED /* Write the histogram */ void /* PRIVATE */ png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_hIST; -#endif int i; png_byte buf[3]; png_debug(1, "in png_write_hIST"); + if (num_hist > (int)png_ptr->num_palette) { png_debug2(3, "num_hist = %d, num_palette = %d", num_hist, @@ -1214,6 +1229,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) int kwarn=0; png_debug(1, "in png_check_keyword"); + *new_key = NULL; if (key == NULL || (key_len = png_strlen(key)) == 0) @@ -1237,7 +1253,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) if ((png_byte)*kp < 0x20 || ((png_byte)*kp > 0x7E && (png_byte)*kp < 0xA1)) { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) +#ifdef PNG_STDIO_SUPPORTED char msg[40]; png_snprintf(msg, 40, @@ -1309,7 +1325,6 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) if (key_len == 0) { png_free(png_ptr, *new_key); - *new_key=NULL; png_warning(png_ptr, "Zero length keyword"); } @@ -1324,19 +1339,18 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) } #endif -#if defined(PNG_WRITE_tEXt_SUPPORTED) +#ifdef PNG_WRITE_tEXt_SUPPORTED /* Write a tEXt chunk */ void /* PRIVATE */ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_tEXt; -#endif png_size_t key_len; png_charp new_key; png_debug(1, "in png_write_tEXt"); + if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0) return; @@ -1364,15 +1378,13 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, } #endif -#if defined(PNG_WRITE_zTXt_SUPPORTED) +#ifdef PNG_WRITE_zTXt_SUPPORTED /* Write a compressed text chunk */ void /* PRIVATE */ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len, int compression) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_zTXt; -#endif png_size_t key_len; char buf[1]; png_charp new_key; @@ -1424,15 +1436,13 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, } #endif -#if defined(PNG_WRITE_iTXt_SUPPORTED) +#ifdef PNG_WRITE_iTXt_SUPPORTED /* Write an iTXt chunk */ void /* PRIVATE */ png_write_iTXt(png_structp png_ptr, int compression, png_charp key, png_charp lang, png_charp lang_key, png_charp text) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_iTXt; -#endif png_size_t lang_len, key_len, lang_key_len, text_len; png_charp new_lang; png_charp new_key = NULL; @@ -1513,18 +1523,17 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key, } #endif -#if defined(PNG_WRITE_oFFs_SUPPORTED) +#ifdef PNG_WRITE_oFFs_SUPPORTED /* Write the oFFs chunk */ void /* PRIVATE */ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, int unit_type) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_oFFs; -#endif png_byte buf[9]; png_debug(1, "in png_write_oFFs"); + if (unit_type >= PNG_OFFSET_LAST) png_warning(png_ptr, "Unrecognized unit type for oFFs chunk"); @@ -1535,15 +1544,13 @@ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9); } #endif -#if defined(PNG_WRITE_pCAL_SUPPORTED) +#ifdef PNG_WRITE_pCAL_SUPPORTED /* Write the pCAL chunk (described in the PNG extensions document) */ void /* PRIVATE */ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_pCAL; -#endif png_size_t purpose_len, units_len, total_len; png_uint_32p params_len; png_byte buf[10]; @@ -1551,6 +1558,7 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, int i; png_debug1(1, "in png_write_pCAL (%d parameters)", nparams); + if (type >= PNG_EQUATION_LAST) png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); @@ -1561,7 +1569,7 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, total_len = purpose_len + units_len + 10; params_len = (png_uint_32p)png_malloc(png_ptr, - (png_uint_32)(nparams * png_sizeof(png_uint_32))); + (png_alloc_size_t)(nparams * png_sizeof(png_uint_32))); /* Find the length of each parameter, making sure we don't count the null terminator for the last parameter. */ @@ -1597,42 +1605,23 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, } #endif -#if defined(PNG_WRITE_sCAL_SUPPORTED) +#ifdef PNG_WRITE_sCAL_SUPPORTED /* Write the sCAL chunk */ -#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) +#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) void /* PRIVATE */ png_write_sCAL(png_structp png_ptr, int unit, double width, double height) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_sCAL; -#endif char buf[64]; png_size_t total_len; png_debug(1, "in png_write_sCAL"); buf[0] = (char)unit; -#if defined(_WIN32_WCE) -/* sprintf() function is not supported on WindowsCE */ - { - wchar_t wc_buf[32]; - size_t wc_len; - swprintf(wc_buf, TEXT("%12.12e"), width); - wc_len = wcslen(wc_buf); - WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL, NULL); - total_len = wc_len + 2; - swprintf(wc_buf, TEXT("%12.12e"), height); - wc_len = wcslen(wc_buf); - WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + total_len, wc_len, - NULL, NULL); - total_len += wc_len; - } -#else png_snprintf(buf + 1, 63, "%12.12e", width); total_len = 1 + png_strlen(buf + 1) + 1; png_snprintf(buf + total_len, 64-total_len, "%12.12e", height); total_len += png_strlen(buf + total_len); -#endif png_debug1(3, "sCAL total length = %u", (unsigned int)total_len); png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len); @@ -1643,9 +1632,7 @@ void /* PRIVATE */ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, png_charp height) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_sCAL; -#endif png_byte buf[64]; png_size_t wlen, hlen, total_len; @@ -1671,19 +1658,18 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, #endif #endif -#if defined(PNG_WRITE_pHYs_SUPPORTED) +#ifdef PNG_WRITE_pHYs_SUPPORTED /* Write the pHYs chunk */ void /* PRIVATE */ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int unit_type) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_pHYs; -#endif png_byte buf[9]; png_debug(1, "in png_write_pHYs"); + if (unit_type >= PNG_RESOLUTION_LAST) png_warning(png_ptr, "Unrecognized unit type for pHYs chunk"); @@ -1695,19 +1681,18 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, } #endif -#if defined(PNG_WRITE_tIME_SUPPORTED) +#ifdef PNG_WRITE_tIME_SUPPORTED /* Write the tIME chunk. Use either png_convert_from_struct_tm() * or png_convert_from_time_t(), or fill in the structure yourself. */ void /* PRIVATE */ png_write_tIME(png_structp png_ptr, png_timep mod_time) { -#ifdef PNG_USE_LOCAL_ARRAYS PNG_tIME; -#endif png_byte buf[7]; png_debug(1, "in png_write_tIME"); + if (mod_time->month > 12 || mod_time->month < 1 || mod_time->day > 31 || mod_time->day < 1 || mod_time->hour > 23 || mod_time->second > 60) @@ -1732,7 +1717,6 @@ void /* PRIVATE */ png_write_start_row(png_structp png_ptr) { #ifdef PNG_WRITE_INTERLACING_SUPPORTED -#ifdef PNG_USE_LOCAL_ARRAYS /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Start of interlace block */ @@ -1746,59 +1730,58 @@ png_write_start_row(png_structp png_ptr) /* Offset to next interlace block in the y direction */ int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif #endif png_size_t buf_size; png_debug(1, "in png_write_start_row"); + buf_size = (png_size_t)(PNG_ROWBYTES( png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1); /* Set up row buffer */ png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)buf_size); + (png_alloc_size_t)buf_size); png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; -#ifndef PNG_NO_WRITE_FILTER +#ifdef PNG_WRITE_FILTER_SUPPORTED /* Set up filtering buffer, if using this filter */ if (png_ptr->do_filter & PNG_FILTER_SUB) { png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(png_ptr->rowbytes + 1)); + (png_alloc_size_t)(png_ptr->rowbytes + 1)); png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; } /* We only need to keep the previous row if we are using one of these. */ if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) { - /* Set up previous row buffer */ - png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, - (png_uint_32)buf_size); - png_memset(png_ptr->prev_row, 0, buf_size); + /* Set up previous row buffer */ + png_ptr->prev_row = (png_bytep)png_calloc(png_ptr, + (png_alloc_size_t)buf_size); if (png_ptr->do_filter & PNG_FILTER_UP) { png_ptr->up_row = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(png_ptr->rowbytes + 1)); + (png_size_t)(png_ptr->rowbytes + 1)); png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; } if (png_ptr->do_filter & PNG_FILTER_AVG) { png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(png_ptr->rowbytes + 1)); + (png_alloc_size_t)(png_ptr->rowbytes + 1)); png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; } if (png_ptr->do_filter & PNG_FILTER_PAETH) { png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(png_ptr->rowbytes + 1)); + (png_size_t)(png_ptr->rowbytes + 1)); png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; } } -#endif /* PNG_NO_WRITE_FILTER */ +#endif /* PNG_WRITE_FILTER_SUPPORTED */ #ifdef PNG_WRITE_INTERLACING_SUPPORTED /* If interlaced, we need to set up width and height of pass */ @@ -1832,7 +1815,6 @@ void /* PRIVATE */ png_write_finish_row(png_structp png_ptr) { #ifdef PNG_WRITE_INTERLACING_SUPPORTED -#ifdef PNG_USE_LOCAL_ARRAYS /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Start of interlace block */ @@ -1846,12 +1828,12 @@ png_write_finish_row(png_structp png_ptr) /* Offset to next interlace block in the y direction */ int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif #endif int ret; png_debug(1, "in png_write_finish_row"); + /* Next row */ png_ptr->row_number++; @@ -1939,7 +1921,7 @@ png_write_finish_row(png_structp png_ptr) png_ptr->zstream.data_type = Z_BINARY; } -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) +#ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Pick out the correct pixels for the interlace pass. * The basic idea here is to go through the row with a source * pointer and a destination pointer (sp and dp), and copy the @@ -1950,7 +1932,6 @@ png_write_finish_row(png_structp png_ptr) void /* PRIVATE */ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) { -#ifdef PNG_USE_LOCAL_ARRAYS /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Start of interlace block */ @@ -1958,15 +1939,11 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) /* Offset to next interlace block */ int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; -#endif png_debug(1, "in png_do_write_interlace"); + /* We don't have to do anything on the last pass (6) */ -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && pass < 6) -#else if (pass < 6) -#endif { /* Each pixel depth is handled separately */ switch (row_info->pixel_depth) @@ -2122,26 +2099,32 @@ void /* PRIVATE */ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) { png_bytep best_row; -#ifndef PNG_NO_WRITE_FILTER +#ifdef PNG_WRITE_FILTER_SUPPORTED png_bytep prev_row, row_buf; png_uint_32 mins, bpp; png_byte filter_to_do = png_ptr->do_filter; png_uint_32 row_bytes = row_info->rowbytes; #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED int num_p_filters = (int)png_ptr->num_prev_filters; -#endif +#endif png_debug(1, "in png_write_find_filter"); +#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS) + { + /* These will never be selected so we need not test them. */ + filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH); + } +#endif - png_debug(1, "in png_write_find_filter"); /* Find out how many bytes offset each pixel is */ bpp = (row_info->pixel_depth + 7) >> 3; prev_row = png_ptr->prev_row; #endif best_row = png_ptr->row_buf; -#ifndef PNG_NO_WRITE_FILTER +#ifdef PNG_WRITE_FILTER_SUPPORTED row_buf = best_row; mins = PNG_MAXSUM; @@ -2184,7 +2167,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) sum += (v < 128) ? v : 256 - v; } -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { png_uint_32 sumhi, sumlo; @@ -2248,7 +2231,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) png_uint_32 i; int v; -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* We temporarily increase the "minimum sum" by the factor we * would reduce the sum of this filter, so that we can do the * early exit comparison without scaling the sum each time. @@ -2301,7 +2284,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) break; } -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { int j; @@ -2362,7 +2345,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) int v; -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { int j; @@ -2404,7 +2387,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) break; } -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { int j; @@ -2467,7 +2450,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) png_uint_32 i; int v; -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { int j; @@ -2516,7 +2499,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) break; } -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { int j; @@ -2600,7 +2583,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) png_uint_32 i; int v; -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { int j; @@ -2681,7 +2664,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) break; } -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { int j; @@ -2717,13 +2700,13 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) best_row = png_ptr->paeth_row; } } -#endif /* PNG_NO_WRITE_FILTER */ +#endif /* PNG_WRITE_FILTER_SUPPORTED */ /* Do the actual writing of the filtered row data from the chosen filter. */ png_write_filtered_row(png_ptr, best_row); -#ifndef PNG_NO_WRITE_FILTER -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) +#ifdef PNG_WRITE_FILTER_SUPPORTED +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* Save the type of filter we picked this time for future calculations */ if (png_ptr->num_prev_filters > 0) { @@ -2735,7 +2718,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) png_ptr->prev_filters[j] = best_row[0]; } #endif -#endif /* PNG_NO_WRITE_FILTER */ +#endif /* PNG_WRITE_FILTER_SUPPORTED */ } @@ -2744,6 +2727,7 @@ void /* PRIVATE */ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) { png_debug(1, "in png_write_filtered_row"); + png_debug1(2, "filter = %d", filtered_row[0]); /* Set up the zlib input buffer */ @@ -2789,7 +2773,7 @@ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) /* Finish row - updates counters and flushes zlib if last row */ png_write_finish_row(png_ptr); -#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED png_ptr->flush_rows++; if (png_ptr->flush_dist > 0 && diff --git a/source/Irrlicht/libpng/projects/beos/x86-shared.proj b/source/Irrlicht/libpng/projects/beos/x86-shared.proj deleted file mode 100644 index 6d2e3c31998f36b1fc44eb440f0c730f011d53f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17031 zcmeHPUu+yl8K3QKle25bm&E^KJI#f(32kIwt3pMSqQuELPN?mid~VaCHrMsu`n-5= z_cXiylU9g*h@gtf15lyx#zP+p52!qW5JGu~0HLZceKBf?O5-|Vct zcFxIh=cv~CMxNdI^L;bl{C4Ks@4lJ!_=WTcV`sjT&hQz=j{hRVM{LHJ`Z+>|zr-nx z7|U>T0rxoKZUvY0u&(2lK-`5$;bBB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BR$$n6c=RI<)I*8>ya>c>5P`sdwu=ydPzf&(k;llQvsd{k`r|Ms))J6{=i%qJR3 z6TgM~N%-H+nHHQs$^c`n;pQ*BB$$tQ;>M45kDEp6fDVT37d!7ugRbaxP73bjO~-(K5;X)eYQ_BY*fF z+;9r6F$cn}b-gOwYV(h7Xnqg!tq@-dAu&44Sd1Pkg&Hsl&)tOx&^z}LbYgJs@J0jb z#77w2jjaU=ehQpKY@`{5DbX4%-Xg%F zFcpnrL%{_7bnu4(O0~eWnSLs9e9h5NKqVRLzg7XLN2;4o!P^4-a@mD%i-yCAX2d@$ z;M7(fPMfVeZaNJ$ov`j+odirt#Hf0z5~j`89rw6qHyTj+%K(W+90jVqy7{yzQ2702 zH55=7Y1exIi9!uPZMN{-2D1yW@E(Tpg|A^fOnd5^PqgmbhMG@FLP&<_d`eUY)MhWd zg$A_8m0ayOZMNpCAoVxM=fNC7e zAmaZM?>hoZIUjsyPw86ye-{eEJ@*Rj3Q(Z7DEMfe?$s^nd$`zS2bY89YwaM=8IVZ+ z<_eu>;n%6Mm)Gj+Ca1RA^Rt5!egB76pqA)8$9 zM-IO9jDB4y9kLa5EY4lhXVq^EX-sxWACIgHzRbzTehk?omAc&UajER}2yxT2kxz-X PZ8~JH9RDDKPHFxR(DFj< diff --git a/source/Irrlicht/libpng/projects/beos/x86-shared.txt b/source/Irrlicht/libpng/projects/beos/x86-shared.txt deleted file mode 100644 index ea62d617..00000000 --- a/source/Irrlicht/libpng/projects/beos/x86-shared.txt +++ /dev/null @@ -1,22 +0,0 @@ -This project builds a shared library version of libpng on x86 BeOS. - -It defines PNG_USE_PNGGCCRD, which activates the assembly code in -pnggccrd.c; this hasn't been extensively tested on BeOS. - -To install: - -1) build - - Note: As of version 1.0.10, you'll get a fair number of warnings when - you compile pnggccrd.c. As far as I know, these are harmless, - but it would be better if someone fixed them. - -2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which - you'll have to make) is a good choice - -3) copy libpng.so to /boot/home/config/lib - -4) build your libpng.so applications (remember to include libz.a as - well when you link) - -- Chris Herborth, March 27, 2001 diff --git a/source/Irrlicht/libpng/projects/beos/x86-static.proj b/source/Irrlicht/libpng/projects/beos/x86-static.proj deleted file mode 100644 index 37c0753664a682120b138d997f0886ba4354e9b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16706 zcmeHOO>7&-6`nOWHl`CW7}Rb&lkCAmy&Z_%X7y~&T#77 zA*mVWnp6Av)jQP))!j8&Ya7bJg7CARMH5JLI4xe@V&_)k|t3C9~ zSjj4AZqdmP!P2jy{t)tpe(I{(uCs+Mh;s3Qx@Ts=^K8qdr%52(zMR8L=9OHLyDqm1 z+{sl-_c-XT{bkxI6d3E+i^?A4*viR4zo6?m)3D}IZ!D1rTa>g?3BYTfVOz=NL~$um za_k>*9k-#*6j`ThR27f)i>?LVAHJV746DI`swva`_u`OhgzRdQJB@pHtmjx>&Z#TDQ!=>8v z+QmS8d21Zbt&oMD6I+qCL>8}TZVOo=jA>F3tlj3GZOtkKS?uj1i^>!S&Q7x`Z3#bc zaV0R{^gS9A@9u;D8ROP4bW2WL%Fugzf2vd(%^RNWWXOvX{t|hOtE;PDb)sKU@Q0s( zO+BjXI$SGNg*qd4v1FLsxmY4c#)W^#SYozh=<&qGCsA&vHUez~b`}ECOdQUeYi8mC zUb=2K5<3f$wzh2q+6Yu5AYG6?itwOaeXf+(Jf1-egkIpKtHItbF6k8EeVsZG91;G> z^7oz+eg@k8UA00N_Yy8ZoDfl}q0o!QnD?BdD)GQAVte5hUC^w;f>z+6oMKE#mymQl zf%{antxK9?8CF3MZ;UWWrbnxos>#=d4HzZ)3j!m($F#k&&A2T{<&4mU}Kcn!^<|Q|a$Nu`Wit)JC9x-mxf|JK^4i zrX_q&d^B_bZ!;-vSFn{AM_acx0{4o5G$=h&ZkoP+sZ-odYo74P6xsJA{6LE49fBXI zE;jgwd!OcWLatN5W`sz`y4%UNU6 zS#xX8x`BFc+Hf^|(k$YOn~cR_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version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=2057 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion= -Comments= - -[HistoryLists\hlIncludePath] -Count=18 -Item0=..\..;..\..\..\zlib;$(BCB)\include -Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include -Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include -Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include -Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include -Item8=$(BCB)\include -Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl -Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl -Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl -Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl -Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl -Item17=$(BCB)\include;$(BCB)\include\vcl - -[HistoryLists\hlLibraryPath] -Count=10 -Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib -Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib -Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib -Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib -Item4=$(BCB)\lib\obj;$(BCB)\lib -Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib -Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=20 -Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF -Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF -Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF -Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS -Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr -Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED -Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED -Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF -Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5 -Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG -Item10=PNG_BUILD_DLL;ZLIB_DLL -Item11=PNG_BUILD_DLL -Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL -Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL -Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS -Item15=PNG_DLL;PNG_BUILD_DLL -Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF -Item17=_HTML_FORM -Item18=_DEBUG;_HTML_FORM -Item19=_DEBUG - -[HistoryLists\hlIntOutputDir] -Count=2 -Item0=..\Obj -Item1=P:\Development\Obj - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication=P:\Development\Executables\LibPNGTestApp.exe -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - - \ No newline at end of file diff --git a/source/Irrlicht/libpng/projects/cbuilder5/libpng.cpp b/source/Irrlicht/libpng/projects/cbuilder5/libpng.cpp deleted file mode 100644 index 97865f59..00000000 --- a/source/Irrlicht/libpng/projects/cbuilder5/libpng.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -//--------------------------------------------------------------------------- -// Important note about DLL memory management when your DLL uses the -// static version of the RunTime Library: -// -// If your DLL exports any functions that pass String objects (or structs/ -// classes containing nested Strings) as parameter or function results, -// you will need to add the library MEMMGR.LIB to both the DLL project and -// any other projects that use the DLL. You will also need to use MEMMGR.LIB -// if any other projects which use the DLL will be performing new or delete -// operations on any non-TObject-derived classes which are exported from the -// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling -// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, -// the file BORLNDMM.DLL should be deployed along with your DLL. -// -// To avoid using BORLNDMM.DLL, pass string information using "char *" or -// ShortString parameters. -// -// If your DLL uses the dynamic version of the RTL, you do not need to -// explicitly add MEMMGR.LIB as this will be done implicitly for you -//--------------------------------------------------------------------------- - -int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - \ No newline at end of file diff --git a/source/Irrlicht/libpng/projects/cbuilder5/libpng.readme.txt b/source/Irrlicht/libpng/projects/cbuilder5/libpng.readme.txt deleted file mode 100644 index 704c121e..00000000 --- a/source/Irrlicht/libpng/projects/cbuilder5/libpng.readme.txt +++ /dev/null @@ -1,25 +0,0 @@ -Project files to build libpng using Borland C++ Builder v5.0 - -In order to build and use libpng, please follow these steps: - - 1). Install zlib in a directory at the same level with libpng. - - 2). In a console window, go to the zlib directory and type: - make -f win32\Makefile.bor - After performing this step, you should have a file named - zlib.lib in the zlib directory. - - 3). Add the following conditional define to your project: - PNG_USE_DLL - - 4). Add libpng.lib or libpngstat.lib to the project. - Build the project. - - 5). If the build fails, add the paths to png.h and zlib.h to - your include path, and restart the build. - -By default, the libpng project uses zlib as a static library. If -you wish to use zlib as a DLL, please read the important notes from -the zlib DLL FAQ, found inside the zlib distribution. - -See the libpng documentation for instructions on how to use the code. diff --git a/source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpf b/source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpf deleted file mode 100644 index f736b62f..00000000 --- a/source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpf +++ /dev/null @@ -1,22 +0,0 @@ -USEUNIT("..\..\png.c"); -USEUNIT("..\..\pngerror.c"); -USEUNIT("..\..\pngget.c"); -USEUNIT("..\..\pngmem.c"); -USEUNIT("..\..\pngpread.c"); -USEUNIT("..\..\pngread.c"); -USEUNIT("..\..\pngrio.c"); -USEUNIT("..\..\pngrtran.c"); -USEUNIT("..\..\pngrutil.c"); -USEUNIT("..\..\pngset.c"); -USEUNIT("..\..\pngtrans.c"); -USEUNIT("..\..\pngwio.c"); -USEUNIT("..\..\pngwrite.c"); -USEUNIT("..\..\pngwtran.c"); -USEUNIT("..\..\pngwutil.c"); -USELIB("..\..\..\zlib\zlib.lib"); -//--------------------------------------------------------------------------- -#define Library - -// To add a file to the library use the Project menu 'Add to Project'. - - \ No newline at end of file diff --git a/source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpr b/source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpr deleted file mode 100644 index 68abb8dd..00000000 --- a/source/Irrlicht/libpng/projects/cbuilder5/libpngstat.bpr +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2057 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=2 -Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include -Item1=..\..;$(BCB)\include;$(BCB)\include\vcl - -[HistoryLists\hlLibraryPath] -Count=1 -Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=1 -Item0=_DEBUG - -[HistoryLists\hlTlibPageSize] -Count=1 -Item0=0x0010 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/source/Irrlicht/libpng/projects/cbuilder5/zlib.readme.txt b/source/Irrlicht/libpng/projects/cbuilder5/zlib.readme.txt deleted file mode 100644 index 9fb45575..00000000 --- a/source/Irrlicht/libpng/projects/cbuilder5/zlib.readme.txt +++ /dev/null @@ -1,14 +0,0 @@ -The project that builds libpng under Borland C++ Builder does not -explicitly build zlib. By taking this decision, there is no need -to update the libpng project each time when there is a change in -the list of zlib source files. After all, this list is private to -zlib, and applications (such as libpng) should not assume anything -about it. - -If you wish to contribute a project that builds zlib under Borland -C++ Builder, please submit it to the zlib developers, not to the -libpng developers. - -By default, the libpng project uses zlib as a static library. If -you wish to use zlib as a DLL, please read the important notes from -the zlib DLL FAQ, found inside the zlib distribution. diff --git a/source/Irrlicht/libpng/projects/netware.txt b/source/Irrlicht/libpng/projects/netware.txt deleted file mode 100644 index 4ba5ba3b..00000000 --- a/source/Irrlicht/libpng/projects/netware.txt +++ /dev/null @@ -1,6 +0,0 @@ -A set of project files is available for Netware. Get -libpng-1.2.5-project-netware.zip from a libpng distribution -site such as http://libpng.sourceforge.net - -Put the zip file in this directory (projects) and then run -"unzip -a libpng-1.2.5-project-netware.zip" diff --git a/source/Irrlicht/libpng/projects/visualc6/README.txt b/source/Irrlicht/libpng/projects/visualc6/README.txt index 863d39b9..db2ca020 100644 --- a/source/Irrlicht/libpng/projects/visualc6/README.txt +++ b/source/Irrlicht/libpng/projects/visualc6/README.txt @@ -2,8 +2,12 @@ Microsoft Developer Studio Project File, Format Version 6.00 for libpng. Copyright (C) 2000-2004 Simon-Pierre Cadieux. Copyright (C) 2004 Cosmin Truta. + +This code is released under the libpng license. For conditions of distribution and use, see copyright notice in png.h +NOTE: This project will be removed from libpng-1.5.0. It has +been replaced with the "vstudio" project. Assumptions: * The libpng source files are in ..\.. @@ -31,15 +35,11 @@ To use: This project builds the libpng binaries as follows: -* Win32_DLL_Release\libpng13.dll DLL build -* Win32_DLL_Debug\libpng13d.dll DLL build (debug version) -* Win32_DLL_ASM_Release\libpng13.dll DLL build using ASM code -* Win32_DLL_ASM_Debug\libpng13d.dll DLL build using ASM (debug version) -* Win32_DLL_VB\libpng13vb.dll DLL build for Visual Basic, using stdcall +* Win32_DLL_Release\libpng14.dll DLL build +* Win32_DLL_Debug\libpng14d.dll DLL build (debug version) +* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall * Win32_LIB_Release\libpng.lib static build * Win32_LIB_Debug\libpngd.lib static build (debug version) -* Win32_LIB_ASM_Release\libpng.lib static build using ASM code -* Win32_LIB_ASM_Debug\libpngd.lib static build using ASM (debug version) Notes: diff --git a/source/Irrlicht/libpng/projects/visualc71/PRJ0041.mak b/source/Irrlicht/libpng/projects/visualc71/PRJ0041.mak index 3a597b02..e15e12b5 100644 --- a/source/Irrlicht/libpng/projects/visualc71/PRJ0041.mak +++ b/source/Irrlicht/libpng/projects/visualc71/PRJ0041.mak @@ -1,5 +1,5 @@ # Prevent "Cannot find missing dependency..." warnings while compiling -# pngw32.rc (PRJ0041). +# pngwin.rc (PRJ0041). all: $(IntDir)\alloc.h \ $(IntDir)\fp.h \ diff --git a/source/Irrlicht/libpng/projects/visualc71/README.txt b/source/Irrlicht/libpng/projects/visualc71/README.txt index e49af14e..0425d7bf 100644 --- a/source/Irrlicht/libpng/projects/visualc71/README.txt +++ b/source/Irrlicht/libpng/projects/visualc71/README.txt @@ -1,8 +1,13 @@ Microsoft Developer Studio Project File, Format Version 7.10 for libpng. Copyright (C) 2004 Simon-Pierre Cadieux. + +This code is released under the libpng license. For conditions of distribution and use, see copyright notice in png.h +NOTE: This project will be removed from libpng-1.5.0. It has +been replaced with the "vstudio" project. + Assumptions: * The libpng source files are in ..\.. * The zlib source files are in ..\..\..\zlib @@ -32,15 +37,11 @@ To use: This project builds the libpng binaries as follows: -* Win32_DLL_Release\libpng13.dll DLL build -* Win32_DLL_Debug\libpng13d.dll DLL build (debug version) -* Win32_DLL_ASM_Release\libpng13.dll DLL build using ASM code -* Win32_DLL_ASM_Debug\libpng13d.dll DLL build using ASM (debug version) -* Win32_DLL_VB\libpng13vb.dll DLL build for Visual Basic, using stdcall +* Win32_DLL_Release\libpng14.dll DLL build +* Win32_DLL_Debug\libpng14d.dll DLL build (debug version) +* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall * Win32_LIB_Release\libpng.lib static build * Win32_LIB_Debug\libpngd.lib static build (debug version) -* Win32_LIB_ASM_Release\libpng.lib static build using ASM code -* Win32_LIB_ASM_Debug\libpngd.lib static build using ASM (debug version) Notes: diff --git a/source/Irrlicht/libpng/projects/visualc71/README_zlib.txt b/source/Irrlicht/libpng/projects/visualc71/README_zlib.txt index 589f5f42..56a735b5 100644 --- a/source/Irrlicht/libpng/projects/visualc71/README_zlib.txt +++ b/source/Irrlicht/libpng/projects/visualc71/README_zlib.txt @@ -6,8 +6,12 @@ Microsoft Developer Studio Project File, Format Version 7.10 for zlib. Copyright (C) 2004 Simon-Pierre Cadieux. Copyright (C) 2004 Cosmin Truta. + +This code is released under the libpng license. For conditions of distribution and use, see copyright notice in zlib.h. +NOTE: This project will be removed from libpng-1.5.0. It has +been replaced with the "vstudio" project. To use: @@ -35,10 +39,6 @@ This project builds the zlib binaries as follows: * Win32_DLL_Release\zlib1.dll DLL build * Win32_DLL_Debug\zlib1d.dll DLL build (debug version) -* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code -* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version) * Win32_LIB_Release\zlib.lib static build * Win32_LIB_Debug\zlibd.lib static build (debug version) -* Win32_LIB_ASM_Release\zlib.lib static build using ASM code -* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version) diff --git a/source/Irrlicht/libpng/projects/visualc71/libpng.sln b/source/Irrlicht/libpng/projects/visualc71/libpng.sln index 7f75b0c6..adce68aa 100644 --- a/source/Irrlicht/libpng/projects/visualc71/libpng.sln +++ b/source/Irrlicht/libpng/projects/visualc71/libpng.sln @@ -15,67 +15,39 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4 EndProject Global GlobalSection(SolutionConfiguration) = preSolution - DLL ASM Debug = DLL ASM Debug - DLL ASM Release = DLL ASM Release DLL Debug = DLL Debug DLL Release = DLL Release DLL VB = DLL VB - LIB ASM Debug = LIB ASM Debug - LIB ASM Release = LIB ASM Release LIB Debug = LIB Debug LIB Release = LIB Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32 - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32 - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32 - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.Build.0 = DLL ASM Release|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32 - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32 - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32 - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32 - {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.Build.0 = LIB ASM Release|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32 {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.Build.0 = DLL ASM Release|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32 - {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.Build.0 = LIB ASM Release|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32 {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.Build.0 = DLL ASM Release|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32 - {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.Build.0 = LIB ASM Release|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32 {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32 diff --git a/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj b/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj index 794e289d..ce03e683 100644 --- a/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj +++ b/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj @@ -18,7 +18,7 @@ Name="VCCLCompilerTool" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..;..\..\..\zlib" - PreprocessorDefinitions="WIN32;PNG_NO_MMX_CODE;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -30,9 +30,9 @@ Name="VCCustomBuildTool"/> + ModuleDefinitionFile="..\..\scripts\pngwin.def"/> @@ -91,105 +91,7 @@ Name="VCPreLinkEventTool"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -236,8 +138,8 @@ Name="VCPreLinkEventTool"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -493,18 +289,6 @@ Name="VCCLCompilerTool" UsePrecompiledHeader="1"/> - - - - - - - - - - - - @@ -564,7 +336,7 @@ RelativePath="..\..\pngtrans.c"> + RelativePath="..\..\scripts\pngwin.def"> @@ -583,18 +355,6 @@ - - - - - - @@ -618,12 +378,15 @@ + + + RelativePath="..\..\scripts\pngwin.rc"> @@ -636,18 +399,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -466,18 +286,6 @@ - - - - - - - - - - - - @@ -527,24 +317,6 @@ - - - - - - @@ -560,18 +332,6 @@ - - - - - - @@ -584,18 +344,6 @@ - - - - - - @@ -611,24 +359,6 @@ - - - - - - @@ -641,24 +371,6 @@ - - - - - - + + + + + + ..\..\..\..\zlib124-dll\zlib-1.2.4 + + + ..\..\..\..\zlib-1.2.4 + + diff --git a/source/Irrlicht/libpng/projects/wince.txt b/source/Irrlicht/libpng/projects/wince.txt deleted file mode 100644 index 4ccff387..00000000 --- a/source/Irrlicht/libpng/projects/wince.txt +++ /dev/null @@ -1,6 +0,0 @@ -A set of project files is available for WinCE. Get -libpng-1.2.5-project-wince.zip from a libpng distribution -site such as http://libpng.sourceforge.net - -Put the zip file in this directory (projects) and then run -"unzip -a libpng-1.2.5-project-wince.zip" diff --git a/source/Irrlicht/libpng/projects/xcode/Info.plist b/source/Irrlicht/libpng/projects/xcode/Info.plist new file mode 100644 index 00000000..0b525dff --- /dev/null +++ b/source/Irrlicht/libpng/projects/xcode/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + libpng + CFBundleIconFile + + CFBundleIdentifier + com.apple.carbonframeworktemplate + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 1.0 + CFBundleShortVersionString + 1.0 + CSResourcesFileMapped + + + diff --git a/source/Irrlicht/libpng/projects/xcode/README.txt b/source/Irrlicht/libpng/projects/xcode/README.txt new file mode 100644 index 00000000..b8dceb38 --- /dev/null +++ b/source/Irrlicht/libpng/projects/xcode/README.txt @@ -0,0 +1,9 @@ +The xcode project has not been entirely updated to libpng-1.4.0. + +It needs to *not* depend on pnggccrd.c or pngvcrd.c + +It needs to PNG_NO_PEDANTIC_WARNINGS in the CFLAGS while building +the library, but not while building an application. + +If an updated version is not received, this project will +be removed when libpng-1.4.0 is released. diff --git a/source/Irrlicht/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj b/source/Irrlicht/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e60ae4db --- /dev/null +++ b/source/Irrlicht/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj @@ -0,0 +1,353 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 44; + objects = { + +/* Begin PBXBuildFile section */ + 14461C7109C3C37F005840C0 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C5D09C3C37F005840C0 /* png.c */; }; + 14461C7209C3C37F005840C0 /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = 14461C5E09C3C37F005840C0 /* png.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14461C7309C3C37F005840C0 /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 14461C5F09C3C37F005840C0 /* pngconf.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14461C7409C3C37F005840C0 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6009C3C37F005840C0 /* pngerror.c */; }; + 14461C7509C3C37F005840C0 /* pnggccrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6109C3C37F005840C0 /* pnggccrd.c */; }; + 14461C7609C3C37F005840C0 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6209C3C37F005840C0 /* pngget.c */; }; + 14461C7709C3C37F005840C0 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6309C3C37F005840C0 /* pngmem.c */; }; + 14461C7809C3C37F005840C0 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6409C3C37F005840C0 /* pngpread.c */; }; + 14461C7909C3C37F005840C0 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6509C3C37F005840C0 /* pngread.c */; }; + 14461C7A09C3C37F005840C0 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6609C3C37F005840C0 /* pngrio.c */; }; + 14461C7B09C3C37F005840C0 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6709C3C37F005840C0 /* pngrtran.c */; }; + 14461C7C09C3C37F005840C0 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6809C3C37F005840C0 /* pngrutil.c */; }; + 14461C7D09C3C37F005840C0 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6909C3C37F005840C0 /* pngset.c */; }; + 14461C7F09C3C37F005840C0 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6B09C3C37F005840C0 /* pngtrans.c */; }; + 14461C8009C3C37F005840C0 /* pngvcrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6C09C3C37F005840C0 /* pngvcrd.c */; }; + 14461C8109C3C37F005840C0 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6D09C3C37F005840C0 /* pngwio.c */; }; + 14461C8209C3C37F005840C0 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6E09C3C37F005840C0 /* pngwrite.c */; }; + 14461C8309C3C37F005840C0 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6F09C3C37F005840C0 /* pngwtran.c */; }; + 14461C8409C3C37F005840C0 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C7009C3C37F005840C0 /* pngwutil.c */; }; + 67FA470510693F6B0078FB9E /* pngpriv.h in Headers */ = {isa = PBXBuildFile; fileRef = 67FA470410693F6B0078FB9E /* pngpriv.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 14461C5D09C3C37F005840C0 /* png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = png.c; path = ../../png.c; sourceTree = SOURCE_ROOT; }; + 14461C5E09C3C37F005840C0 /* png.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = png.h; path = ../../png.h; sourceTree = SOURCE_ROOT; }; + 14461C5F09C3C37F005840C0 /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = ../../pngconf.h; sourceTree = SOURCE_ROOT; }; + 14461C6009C3C37F005840C0 /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = ../../pngerror.c; sourceTree = SOURCE_ROOT; }; + 14461C6109C3C37F005840C0 /* pnggccrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pnggccrd.c; path = ../../pnggccrd.c; sourceTree = SOURCE_ROOT; }; + 14461C6209C3C37F005840C0 /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = ../../pngget.c; sourceTree = SOURCE_ROOT; }; + 14461C6309C3C37F005840C0 /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngmem.c; path = ../../pngmem.c; sourceTree = SOURCE_ROOT; }; + 14461C6409C3C37F005840C0 /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = ../../pngpread.c; sourceTree = SOURCE_ROOT; }; + 14461C6509C3C37F005840C0 /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngread.c; path = ../../pngread.c; sourceTree = SOURCE_ROOT; }; + 14461C6609C3C37F005840C0 /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = ../../pngrio.c; sourceTree = SOURCE_ROOT; }; + 14461C6709C3C37F005840C0 /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrtran.c; path = ../../pngrtran.c; sourceTree = SOURCE_ROOT; }; + 14461C6809C3C37F005840C0 /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = ../../pngrutil.c; sourceTree = SOURCE_ROOT; }; + 14461C6909C3C37F005840C0 /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngset.c; path = ../../pngset.c; sourceTree = SOURCE_ROOT; }; + 14461C6B09C3C37F005840C0 /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = ../../pngtrans.c; sourceTree = SOURCE_ROOT; }; + 14461C6C09C3C37F005840C0 /* pngvcrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngvcrd.c; path = ../../pngvcrd.c; sourceTree = SOURCE_ROOT; }; + 14461C6D09C3C37F005840C0 /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwio.c; path = ../../pngwio.c; sourceTree = SOURCE_ROOT; }; + 14461C6E09C3C37F005840C0 /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = ../../pngwrite.c; sourceTree = SOURCE_ROOT; }; + 14461C6F09C3C37F005840C0 /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwtran.c; path = ../../pngwtran.c; sourceTree = SOURCE_ROOT; }; + 14461C7009C3C37F005840C0 /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = ../../pngwutil.c; sourceTree = SOURCE_ROOT; }; + 67FA470410693F6B0078FB9E /* pngpriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngpriv.h; path = ../../pngpriv.h; sourceTree = SOURCE_ROOT; }; + 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D07F2C80486CC7A007CD1D0 /* libpng.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = libpng.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D07F2C30486CC7A007CD1D0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DDFF38A45A11DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + 8D07F2C80486CC7A007CD1D0 /* libpng.framework */, + ); + name = Products; + sourceTree = ""; + }; + 0867D691FE84028FC02AAC07 /* libpng */ = { + isa = PBXGroup; + children = ( + 08FB77ACFE841707C02AAC07 /* Source */, + 089C1665FE841158C02AAC07 /* Resources */, + 034768DDFF38A45A11DB9C8B /* Products */, + ); + name = libpng; + sourceTree = ""; + }; + 089C1665FE841158C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D07F2C70486CC7A007CD1D0 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77ACFE841707C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 67FA470410693F6B0078FB9E /* pngpriv.h */, + 14461C5D09C3C37F005840C0 /* png.c */, + 14461C5E09C3C37F005840C0 /* png.h */, + 14461C5F09C3C37F005840C0 /* pngconf.h */, + 14461C6009C3C37F005840C0 /* pngerror.c */, + 14461C6109C3C37F005840C0 /* pnggccrd.c */, + 14461C6209C3C37F005840C0 /* pngget.c */, + 14461C6309C3C37F005840C0 /* pngmem.c */, + 14461C6409C3C37F005840C0 /* pngpread.c */, + 14461C6509C3C37F005840C0 /* pngread.c */, + 14461C6609C3C37F005840C0 /* pngrio.c */, + 14461C6709C3C37F005840C0 /* pngrtran.c */, + 14461C6809C3C37F005840C0 /* pngrutil.c */, + 14461C6909C3C37F005840C0 /* pngset.c */, + 14461C6B09C3C37F005840C0 /* pngtrans.c */, + 14461C6C09C3C37F005840C0 /* pngvcrd.c */, + 14461C6D09C3C37F005840C0 /* pngwio.c */, + 14461C6E09C3C37F005840C0 /* pngwrite.c */, + 14461C6F09C3C37F005840C0 /* pngwtran.c */, + 14461C7009C3C37F005840C0 /* pngwutil.c */, + ); + name = Source; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D07F2BD0486CC7A007CD1D0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 14461C7209C3C37F005840C0 /* png.h in Headers */, + 14461C7309C3C37F005840C0 /* pngconf.h in Headers */, + 67FA470510693F6B0078FB9E /* pngpriv.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D07F2BC0486CC7A007CD1D0 /* libpng */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "libpng" */; + buildPhases = ( + 8D07F2BD0486CC7A007CD1D0 /* Headers */, + 8D07F2BF0486CC7A007CD1D0 /* Resources */, + 8D07F2C10486CC7A007CD1D0 /* Sources */, + 8D07F2C30486CC7A007CD1D0 /* Frameworks */, + 8D07F2C50486CC7A007CD1D0 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = libpng; + productInstallPath = "$(HOME)/Library/Frameworks"; + productName = libpng; + productReference = 8D07F2C80486CC7A007CD1D0 /* libpng.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "libpng" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 0867D691FE84028FC02AAC07 /* libpng */; + productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ../..; + targets = ( + 8D07F2BC0486CC7A007CD1D0 /* libpng */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D07F2BF0486CC7A007CD1D0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D07F2C50486CC7A007CD1D0 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D07F2C10486CC7A007CD1D0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 14461C7109C3C37F005840C0 /* png.c in Sources */, + 14461C7409C3C37F005840C0 /* pngerror.c in Sources */, + 14461C7509C3C37F005840C0 /* pnggccrd.c in Sources */, + 14461C7609C3C37F005840C0 /* pngget.c in Sources */, + 14461C7709C3C37F005840C0 /* pngmem.c in Sources */, + 14461C7809C3C37F005840C0 /* pngpread.c in Sources */, + 14461C7909C3C37F005840C0 /* pngread.c in Sources */, + 14461C7A09C3C37F005840C0 /* pngrio.c in Sources */, + 14461C7B09C3C37F005840C0 /* pngrtran.c in Sources */, + 14461C7C09C3C37F005840C0 /* pngrutil.c in Sources */, + 14461C7D09C3C37F005840C0 /* pngset.c in Sources */, + 14461C7F09C3C37F005840C0 /* pngtrans.c in Sources */, + 14461C8009C3C37F005840C0 /* pngvcrd.c in Sources */, + 14461C8109C3C37F005840C0 /* pngwio.c in Sources */, + 14461C8209C3C37F005840C0 /* pngwrite.c in Sources */, + 14461C8309C3C37F005840C0 /* pngwtran.c in Sources */, + 14461C8409C3C37F005840C0 /* pngwutil.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 4FADC24308B4156D00ABE55E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 14; + DYLIB_CURRENT_VERSION = 14; + FRAMEWORK_VERSION = 1.4.3; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "@executable_path/../Frameworks"; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_LDFLAGS = "-lz"; + PRODUCT_NAME = libpng; + WRAPPER_EXTENSION = framework; + }; + name = Debug; + }; + 4FADC24408B4156D00ABE55E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 14; + DYLIB_CURRENT_VERSION = 14; + FRAMEWORK_VERSION = 1.4.3; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "@executable_path/../Frameworks"; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_LDFLAGS = "-lz"; + PRODUCT_NAME = libpng; + WRAPPER_EXTENSION = framework; + }; + name = Release; + }; + 4FADC24708B4156D00ABE55E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + i386, + ppc, + ppc64, + x86_64, + ); + DEPLOYMENT_POSTPROCESSING = YES; + GCC_ENABLE_CPP_EXCEPTIONS = NO; + GCC_ENABLE_CPP_RTTI = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_VERSION_i386 = 4.0; + GCC_VERSION_ppc = 3.3; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4; + "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2; + MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.2; + PREBINDING = NO; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + "SDKROOT[arch=i386]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + "SDKROOT[arch=ppc]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; + SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; + ZERO_LINK = NO; + }; + name = Debug; + }; + 4FADC24808B4156D00ABE55E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + i386, + ppc, + ppc64, + x86_64, + ); + GCC_ENABLE_CPP_EXCEPTIONS = NO; + GCC_ENABLE_CPP_RTTI = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 2; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_VERSION_i386 = 4.0; + GCC_VERSION_ppc = 3.3; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4; + "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2; + MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.2; + PREBINDING = NO; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + "SDKROOT[arch=i386]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + "SDKROOT[arch=ppc]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; + SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "libpng" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4FADC24308B4156D00ABE55E /* Debug */, + 4FADC24408B4156D00ABE55E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "libpng" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4FADC24708B4156D00ABE55E /* Debug */, + 4FADC24808B4156D00ABE55E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/source/Irrlicht/libpng/scripts/CMakeLists.txt b/source/Irrlicht/libpng/scripts/CMakeLists.txt deleted file mode 100644 index 196e62fa..00000000 --- a/source/Irrlicht/libpng/scripts/CMakeLists.txt +++ /dev/null @@ -1,212 +0,0 @@ - -project(PNG) - -# Copyright (C) 2007 Glenn Randers-Pehrson - -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -set(PNGLIB_MAJOR 1) -set(PNGLIB_MINOR 2) -set(PNGLIB_RELEASE 39) -set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) -set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) - -# needed packages -find_package(ZLIB REQUIRED) -if(NOT WIN32) - find_library(M_LIBRARY - NAMES m - PATHS /usr/lib /usr/local/lib - ) - if(NOT M_LIBRARY) - message(STATUS - "math library 'libm' not found - floating point support disabled") - endif(NOT M_LIBRARY) -else(NOT WIN32) - # not needed on windows - set(M_LIBRARY "") -endif(NOT WIN32) - - -# COMMAND LINE OPTIONS -option(PNG_SHARED "Build shared lib" YES) -option(PNG_STATIC "Build static lib" YES) -if(MINGW) - option(PNG_TESTS "Build pngtest" NO) -else(MINGW) - option(PNG_TESTS "Build pngtest" YES) -endif(MINGW) -option(PNG_NO_CONSOLE_IO "FIXME" YES) -option(PNG_NO_STDIO "FIXME" YES) -option(PNG_DEBUG "Build with debug output" YES) -option(PNGARG "FIXME" YES) -#TODO: -# PNG_CONSOLE_IO_SUPPORTED - -# maybe needs improving, but currently I don't know when we can enable what :) -set(png_asm_tmp "OFF") -if(NOT WIN32) - find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin) - if(uname_executable) - EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output) - if("uname_output" MATCHES "^.*i[1-9]86.*$") - set(png_asm_tmp "ON") - else("uname_output" MATCHES "^.*i[1-9]86.*$") - set(png_asm_tmp "OFF") - endif("uname_output" MATCHES "^.*i[1-9]86.*$") - endif(uname_executable) -else(NOT WIN32) - # this env var is normally only set on win64 - SET(TEXT "ProgramFiles(x86)") - if("$ENV{${TEXT}}" STREQUAL "") - set(png_asm_tmp "ON") - endif("$ENV{${TEXT}}" STREQUAL "") -endif(NOT WIN32) - -# SET LIBNAME -# msvc does not append 'lib' - do it here to have consistent name -if(MSVC) - set(PNG_LIB_NAME lib) -endif(MSVC) -set(PNG_LIB_NAME ${PNG_LIB_NAME}png${PNGLIB_MAJOR}${PNGLIB_MINOR}) - -# to distinguish between debug and release lib -set(CMAKE_DEBUG_POSTFIX "d") - - -# OUR SOURCES -set(libpng_sources - png.h - pngconf.h - png.c - pngerror.c - pngget.c - pngmem.c - pngpread.c - pngread.c - pngrio.c - pngrtran.c - pngrutil.c - pngset.c - pngtrans.c - pngwio.c - pngwrite.c - pngwtran.c - pngwutil.c -) -set(pngtest_sources - pngtest.c -) -# SOME NEEDED DEFINITIONS -if(MSVC) - add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE) -endif(MSVC) - -add_definitions(-DZLIB_DLL) - -add_definitions(-DLIBPNG_NO_MMX) -add_definitions(-DPNG_NO_MMX_CODE) - -if(PNG_CONSOLE_IO_SUPPORTED) - add_definitions(-DPNG_CONSOLE_IO_SUPPORTED) -endif(PNG_CONSOLE_IO_SUPPORTED) - -if(PNG_NO_CONSOLE_IO) - add_definitions(-DPNG_NO_CONSOLE_IO) -endif(PNG_NO_CONSOLE_IO) - -if(PNG_NO_STDIO) - add_definitions(-DPNG_NO_STDIO) -endif(PNG_NO_STDIO) - -if(PNG_DEBUG) - add_definitions(-DPNG_DEBUG) -endif(PNG_DEBUG) - -if(NOT M_LIBRARY AND NOT WIN32) - add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED) -endif(NOT M_LIBRARY AND NOT WIN32) - -# NOW BUILD OUR TARGET -include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR}) - -if(PNG_SHARED) - add_library(${PNG_LIB_NAME} SHARED ${libpng_sources}) - target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY}) -endif(PNG_SHARED) -if(PNG_STATIC) -# does not work without changing name - set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static) - add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources}) -endif(PNG_STATIC) - -if(PNG_SHARED AND WIN32) - set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) -endif(PNG_SHARED AND WIN32) - -if(PNG_TESTS) -# does not work with msvc due to png_lib_ver issue - add_executable(pngtest ${pngtest_sources}) - target_link_libraries(pngtest ${PNG_LIB_NAME}) -# add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png) -endif(PNG_TESTS) - - -# CREATE PKGCONFIG FILES -# we use the same files like ./configure, so we have to set its vars -set(prefix ${CMAKE_INSTALL_PREFIX}) -set(exec_prefix ${CMAKE_INSTALL_PREFIX}) -set(libdir ${CMAKE_INSTALL_PREFIX}/lib) -set(includedir ${CMAKE_INSTALL_PREFIX}/include) - -configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in - ${PNG_BINARY_DIR}/libpng.pc) -configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in - ${PNG_BINARY_DIR}/libpng-config) -configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in - ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc) -configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in - ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config) - -# SET UP LINKS -set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 0.${PNGLIB_RELEASE}.1.2.39 - VERSION 0.${PNGLIB_RELEASE}.0 - SOVERSION 0 - CLEAN_DIRECT_OUTPUT 1) -if(NOT WIN32) - # that's uncool on win32 - it overwrites our static import lib... - set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES - OUTPUT_NAME ${PNG_LIB_NAME} - CLEAN_DIRECT_OUTPUT 1) -endif(NOT WIN32) -# INSTALL -install_targets(/lib ${PNG_LIB_NAME}) -if(PNG_STATIC) - install_targets(/lib ${PNG_LIB_NAME_STATIC}) -endif(PNG_STATIC) -install(FILES png.h pngconf.h DESTINATION include) -install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME}) -install(FILES libpng.3 libpngpf.3 DESTINATION man/man3) -install(FILES png.5 DESTINATION man/man5) -install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig) -install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin) -install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig) -install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin) - -# what's with libpng.txt and all the extra files? - - -# UNINSTALL -# do we need this? - - -# DIST -# do we need this? - -# to create msvc import lib for mingw compiled shared lib -# pexports libpng.dll > libpng.def -# lib /def:libpng.def /machine:x86 - diff --git a/source/Irrlicht/libpng/scripts/README.txt b/source/Irrlicht/libpng/scripts/README.txt new file mode 100644 index 00000000..d0238a5d --- /dev/null +++ b/source/Irrlicht/libpng/scripts/README.txt @@ -0,0 +1,67 @@ + +Makefiles for libpng version 1.4.3 - June 26, 2010 + + makefile.linux => Linux/ELF makefile + (gcc, creates libpng14.so.14.1.4.3) + makefile.gcc => Generic makefile (gcc, creates static libpng.a) + makefile.knr => Archaic UNIX Makefile that converts files with + ansi2knr (Requires ansi2knr.c from + ftp://ftp.cs.wisc.edu/ghost) + makefile.acorn => Acorn makefile + makefile.aix => AIX/gcc makefile + makefile.amiga => Amiga makefile + makefile.atari => Atari makefile + makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) + makefile.beos => beos makefile + makefile.bor => Borland makefile (uses bcc) + makefile.cegcc => minge32ce for Windows CE makefile + makefile.cygwin => Cygwin/gcc makefile + makefile.darwin => Darwin makefile, can use on MacosX + makefile.dec => DEC Alpha UNIX makefile + makefile.dj2 => DJGPP 2 makefile + makefile.elf => Linux/ELF makefile symbol versioning, + gcc, creates libpng14.so.14.1.4.3) + makefile.freebsd => FreeBSD makefile + makefile.gcc => Generic gcc makefile + makefile.hpgcc => HPUX makefile using gcc + makefile.hpux => HPUX (10.20 and 11.00) makefile + makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit + makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) + makefile.intel => Intel C/C++ version 4.0 and later + makefile.mingw => Mingw makefile + makefile.mips => MIPS makefile + makefile.msc => Microsoft C makefile + makefile.netbsd => NetBSD/cc makefile, makes libpng.so. + makefile.openbsd => OpenBSD makefile + makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) + makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc + makefile.sggcc => Silicon Graphics (gcc, + creates libpng14.so.14.1.4.3) + makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) + makefile.solaris => Solaris 2.X makefile (gcc, + creates libpng14.so.14.1.4.3) + makefile.so9 => Solaris 9 makefile (gcc, + creates libpng14.so.14.1.4.3) + makefile.std => Generic UNIX makefile (cc, creates static libpng.a) + makefile.sunos => Sun makefile + makefile.32sunu => Sun Ultra 32-bit makefile + makefile.64sunu => Sun Ultra 64-bit makefile + makefile.tc3 => Turbo C 3.0 makefile + makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later + makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model + makevms.com => VMS build script + smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler + (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc) + +Other supporting scripts: + descrip.mms => VMS makefile for MMS or MMK + libpng-config-body.in => used by several makefiles to create libpng-config + libpng-config-head.in => used by several makefiles to create libpng-config + libpng.pc.in => Used by several makefiles to create libpng.pc + pngos2.def => OS/2 module definition file used by makefile.os2 + pngwin.def => Module definitions for makefile.cygwin and mingw + png32ce.def => Module definition file used by makefile.cegcc + pngwin.rc => Used by the visualc6 and visualc71 projects. + SCOPTIONS.ppc => Used with smakefile.ppc + +Further information can be found in comments in the individual makefiles. diff --git a/source/Irrlicht/libpng/scripts/descrip.mms b/source/Irrlicht/libpng/scripts/descrip.mms index 78d13f92..6c7fef9c 100644 --- a/source/Irrlicht/libpng/scripts/descrip.mms +++ b/source/Irrlicht/libpng/scripts/descrip.mms @@ -33,20 +33,20 @@ clean : # Other dependencies. -png.obj : png.h, pngconf.h -pngpread.obj : png.h, pngconf.h -pngset.obj : png.h, pngconf.h -pngget.obj : png.h, pngconf.h -pngread.obj : png.h, pngconf.h -pngrtran.obj : png.h, pngconf.h -pngrutil.obj : png.h, pngconf.h -pngerror.obj : png.h, pngconf.h -pngmem.obj : png.h, pngconf.h -pngrio.obj : png.h, pngconf.h -pngwio.obj : png.h, pngconf.h -pngtrans.obj : png.h, pngconf.h -pngwrite.obj : png.h, pngconf.h -pngwtran.obj : png.h, pngconf.h -pngwutil.obj : png.h, pngconf.h +png.obj : png.h, pngconf.h, pngpriv.h +pngpread.obj : png.h, pngconf.h, pngpriv.h +pngset.obj : png.h, pngconf.h, pngpriv.h +pngget.obj : png.h, pngconf.h, pngpriv.h +pngread.obj : png.h, pngconf.h, pngpriv.h +pngrtran.obj : png.h, pngconf.h, pngpriv.h +pngrutil.obj : png.h, pngconf.h, pngpriv.h +pngerror.obj : png.h, pngconf.h, pngpriv.h +pngmem.obj : png.h, pngconf.h, pngpriv.h +pngrio.obj : png.h, pngconf.h, pngpriv.h +pngwio.obj : png.h, pngconf.h, pngpriv.h +pngtrans.obj : png.h, pngconf.h, pngpriv.h +pngwrite.obj : png.h, pngconf.h, pngpriv.h +pngwtran.obj : png.h, pngconf.h, pngpriv.h +pngwutil.obj : png.h, pngconf.h, pngpriv.h pngtest.obj : png.h, pngconf.h diff --git a/source/Irrlicht/libpng/scripts/libpng-config-head.in b/source/Irrlicht/libpng/scripts/libpng-config-head.in index 5b3a30f1..d3d1f4bf 100755 --- a/source/Irrlicht/libpng/scripts/libpng-config-head.in +++ b/source/Irrlicht/libpng/scripts/libpng-config-head.in @@ -11,7 +11,7 @@ # Modeled after libxml-config. -version=1.2.39 +version=1.4.3 prefix="" libdir="" libs="" diff --git a/source/Irrlicht/libpng/scripts/libpng.icc b/source/Irrlicht/libpng/scripts/libpng.icc deleted file mode 100644 index 6ce490bc..00000000 --- a/source/Irrlicht/libpng/scripts/libpng.icc +++ /dev/null @@ -1,47 +0,0 @@ -// Project file for libpng (static) -// IBM VisualAge/C++ version 4.0 or later -// Copyright (C) 2000 Cosmin Truta -// -// This code is released under the libpng license. -// For conditions of distribution and use, see the disclaimer -// and license in png.h -// -// Notes: -// All modules are compiled in C mode -// Tested with IBM VAC++ 4.0 under Win32 -// Expected to work with IBM VAC++ 4.0 or later under OS/2 and Win32 -// Can be easily adapted for IBM VAC++ 4.0 or later under AIX - -option incl(searchpath, "../zlib"), opt(level, "2"), - link(libsearchpath, "../zlib") -{ - target type(lib) "libpng.lib" - { - source type(c) "png.c" - source type(c) "pngerror.c" - source type(c) "pngget.c" - source type(c) "pngmem.c" - source type(c) "pngpread.c" - source type(c) "pngread.c" - source type(c) "pngrio.c" - source type(c) "pngrtran.c" - source type(c) "pngrutil.c" - source type(c) "pngset.c" - source type(c) "pngtrans.c" - source type(c) "pngwio.c" - source type(c) "pngwrite.c" - source type(c) "pngwtran.c" - source type(c) "pngwutil.c" - } -} - -option incl(searchpath, "../zlib"), opt(level, "2"), - link(libsearchpath, "../zlib") -{ - target type(exe) "pngtest.exe" - { - source type(c) "pngtest.c" - source type(lib) "libpng.lib" - source type(lib) "zlib.lib" - } -} diff --git a/source/Irrlicht/libpng/scripts/libpng.pc.in b/source/Irrlicht/libpng/scripts/libpng.pc.in index e46b80dd..77a31ac1 100644 --- a/source/Irrlicht/libpng/scripts/libpng.pc.in +++ b/source/Irrlicht/libpng/scripts/libpng.pc.in @@ -1,10 +1,10 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ -includedir=@includedir@/libpng12 +includedir=@includedir@/libpng14 Name: libpng Description: Loads and saves PNG files -Version: 1.2.39 -Libs: -L${libdir} -lpng12 +Version: 1.4.3 +Libs: -L${libdir} -lpng14 Cflags: -I${includedir} diff --git a/source/Irrlicht/libpng/scripts/makefile.32sunu b/source/Irrlicht/libpng/scripts/makefile.32sunu index de629a1a..3b6a3be7 100644 --- a/source/Irrlicht/libpng/scripts/makefile.32sunu +++ b/source/Irrlicht/libpng/scripts/makefile.32sunu @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -9,18 +9,14 @@ # and license in png.h # Library name: -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME=libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: CC=cc @@ -33,7 +29,7 @@ RM_F=/bin/rm -f SUN_CC_FLAGS=-fast -xtarget=ultra SUN_LD_FLAGS=-fast -xtarget=ultra -# where make install puts libpng.a, libpng12.so and libpng12/png.h +# where make install puts libpng.a, libpng14.so and libpng14/png.h prefix=/a exec_prefix=$(prefix) @@ -95,7 +91,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -106,17 +102,14 @@ libpng-config: echo R_opts=\"-R$(LIBPATH)\"; \ echo ccopts=\"-xtarget=ultra\"; \ echo ldopts=\"-xtarget=ultra\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ @@ -130,11 +123,7 @@ $(LIBSOVER): $(OBJSDLL) ;; \ esac $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -158,24 +147,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -229,7 +210,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -238,20 +218,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.64sunu b/source/Irrlicht/libpng/scripts/makefile.64sunu index 668716e7..c02a8673 100644 --- a/source/Irrlicht/libpng/scripts/makefile.64sunu +++ b/source/Irrlicht/libpng/scripts/makefile.64sunu @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -9,18 +9,14 @@ # and license in png.h # Library name: -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME=libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: CC=cc @@ -33,7 +29,7 @@ RM_F=/bin/rm -f SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9 SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9 -# where make install puts libpng.a, libpng12.so and libpng12/png.h +# where make install puts libpng.a, libpng14.so and libpng14/png.h prefix=/a exec_prefix=$(prefix) @@ -51,7 +47,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \ # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -95,7 +91,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -106,17 +102,14 @@ libpng-config: echo R_opts=\"-R$(LIBPATH)\"; \ echo ccopts=\"-xtarget=ultra -xarch=v9\"; \ echo ldopts=\"-xtarget=ultra -xarch=v9\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ @@ -130,11 +123,7 @@ $(LIBSOVER): $(OBJSDLL) ;; \ esac $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -158,24 +147,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -229,7 +210,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -238,20 +218,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.aix b/source/Irrlicht/libpng/scripts/makefile.aix index 9e139102..07500512 100644 --- a/source/Irrlicht/libpng/scripts/makefile.aix +++ b/source/Irrlicht/libpng/scripts/makefile.aix @@ -3,7 +3,7 @@ # Copyright (C) 2000 Cosmin Truta # Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc) # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -21,10 +21,8 @@ RANLIB = ranlib RM_F = rm -f LN_SF = ln -f -s -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME=libpng14 +PNGMAJ = 14 prefix=/usr/local INCPATH=$(prefix)/include @@ -48,8 +46,8 @@ LDDEBUG = CRELEASE = -O2 LDRELEASE = -s WARNMORE=-W -Wall -CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE) -LDFLAGS = -L. -L$(ZLIBLIB) -lpng12 -lz -lm $(LDRELEASE) +CFLAGS = -D_ALL_SOURCE -I$(ZLIBINC) $(WARNMORE) $(CRELEASE) +LDFLAGS = -L. -L$(ZLIBLIB) -lpng14 -lz -lm $(LDRELEASE) # File extensions O=.o @@ -97,20 +95,20 @@ install: $(LIBNAME)$(A) clean: $(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png -png$(O): png.h pngconf.h -pngerror$(O): png.h pngconf.h -pngget$(O): png.h pngconf.h -pngmem$(O): png.h pngconf.h -pngpread$(O): png.h pngconf.h -pngread$(O): png.h pngconf.h -pngrio$(O): png.h pngconf.h -pngrtran$(O): png.h pngconf.h -pngrutil$(O): png.h pngconf.h -pngset$(O): png.h pngconf.h -pngtrans$(O): png.h pngconf.h -pngwio$(O): png.h pngconf.h -pngwrite$(O): png.h pngconf.h -pngwtran$(O): png.h pngconf.h -pngwutil$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h +pngerror$(O): png.h pngconf.h pngpriv.h +pngget$(O): png.h pngconf.h pngpriv.h +pngmem$(O): png.h pngconf.h pngpriv.h +pngpread$(O): png.h pngconf.h pngpriv.h +pngread$(O): png.h pngconf.h pngpriv.h +pngrio$(O): png.h pngconf.h pngpriv.h +pngrtran$(O): png.h pngconf.h pngpriv.h +pngrutil$(O): png.h pngconf.h pngpriv.h +pngset$(O): png.h pngconf.h pngpriv.h +pngtrans$(O): png.h pngconf.h pngpriv.h +pngwio$(O): png.h pngconf.h pngpriv.h +pngwrite$(O): png.h pngconf.h pngpriv.h +pngwtran$(O): png.h pngconf.h pngpriv.h +pngwutil$(O): png.h pngconf.h pngpriv.h pngtest$(O): png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.amiga b/source/Irrlicht/libpng/scripts/makefile.amiga index ff57a872..f1801135 100644 --- a/source/Irrlicht/libpng/scripts/makefile.amiga +++ b/source/Irrlicht/libpng/scripts/makefile.amiga @@ -1,7 +1,7 @@ # Commodore Amiga Makefile # makefile for libpng and SAS C V6.5x compiler # Copyright (C) 1995-2000 Wolf Faust - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h diff --git a/source/Irrlicht/libpng/scripts/makefile.atari b/source/Irrlicht/libpng/scripts/makefile.atari index 4b899e6e..8dabec3e 100644 --- a/source/Irrlicht/libpng/scripts/makefile.atari +++ b/source/Irrlicht/libpng/scripts/makefile.atari @@ -1,11 +1,11 @@ # makefile for libpng # Copyright (C) 2002 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h - +# # Modified for LC56/ATARI assumes libz.lib is in same dir and uses default # rules for library management # diff --git a/source/Irrlicht/libpng/scripts/makefile.bc32 b/source/Irrlicht/libpng/scripts/makefile.bc32 index ca5643ca..204688c7 100644 --- a/source/Irrlicht/libpng/scripts/makefile.bc32 +++ b/source/Irrlicht/libpng/scripts/makefile.bc32 @@ -109,21 +109,21 @@ test: pngtest.exe ## Minor Targets -png.obj: png.c png.h pngconf.h -pngerror.obj: pngerror.c png.h pngconf.h -pngget.obj: pngget.c png.h pngconf.h -pngmem.obj: pngmem.c png.h pngconf.h -pngpread.obj: pngpread.c png.h pngconf.h -pngread.obj: pngread.c png.h pngconf.h -pngrio.obj: pngrio.c png.h pngconf.h -pngrtran.obj: pngrtran.c png.h pngconf.h -pngrutil.obj: pngrutil.c png.h pngconf.h -pngset.obj: pngset.c png.h pngconf.h -pngtrans.obj: pngtrans.c png.h pngconf.h -pngwio.obj: pngwio.c png.h pngconf.h -pngwrite.obj: pngwrite.c png.h pngconf.h -pngwtran.obj: pngwtran.c png.h pngconf.h -pngwutil.obj: pngwutil.c png.h pngconf.h +png.obj: png.c png.h pngconf.h pngpriv.h +pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h +pngget.obj: pngget.c png.h pngconf.h pngpriv.h +pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h +pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h +pngread.obj: pngread.c png.h pngconf.h pngpriv.h +pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h +pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h +pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h +pngset.obj: pngset.c png.h pngconf.h pngpriv.h +pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h +pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h +pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h +pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h +pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h pngtest.obj: pngtest.c png.h pngconf.h $(LIBNAME): $(OBJS) diff --git a/source/Irrlicht/libpng/scripts/makefile.beos b/source/Irrlicht/libpng/scripts/makefile.beos index 0d6f74a0..4361c49a 100644 --- a/source/Irrlicht/libpng/scripts/makefile.beos +++ b/source/Irrlicht/libpng/scripts/makefile.beos @@ -1,26 +1,22 @@ # makefile for libpng on BeOS x86 ELF with gcc # modified from makefile.linux by Sander Stoks -# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME=libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: CC=gcc @@ -49,7 +45,7 @@ CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \ # LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz -# where make install puts libpng.a, libpng12.so*, and png.h +# where make install puts libpng.a, libpng14.so*, and png.h prefix=/usr/local exec_prefix=$(prefix) INCPATH=$(prefix)/include @@ -91,13 +87,13 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo libs=\"-lpng12 -lz \"; \ + echo libs=\"-lpng14 -lz \"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config @@ -105,19 +101,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) cp $(LIBSO)* /boot/home/config/lib -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \ - $(LIBSOVER) $(OBJSDLL) $(LDFLAGS) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -nostart -Wl,-soname,$(OLDSOMAJ) -o \ - $(OLDSOVER) $(OBJSDLL) $(LDFLAGS) + $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS) pngtest: pngtest.o $(LIBSO) - $(CC) -L$(ZLIBLIB) -L. -lz -lpng12 -o pngtest pngtest.o + $(CC) -L$(ZLIBLIB) -L. -lz -lpng14 -o pngtest pngtest.o test: pngtest ./pngtest @@ -138,23 +127,17 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -206,25 +189,24 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtesti \ - $(OLDSOVER) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.bor b/source/Irrlicht/libpng/scripts/makefile.bor index f14d8b42..65e5abfe 100644 --- a/source/Irrlicht/libpng/scripts/makefile.bor +++ b/source/Irrlicht/libpng/scripts/makefile.bor @@ -117,21 +117,21 @@ test: pngtest$(MODEL).exe ## Minor Targets -png.obj: png.c png.h pngconf.h -pngerror.obj: pngerror.c png.h pngconf.h -pngget.obj: pngget.c png.h pngconf.h -pngmem.obj: pngmem.c png.h pngconf.h -pngpread.obj: pngpread.c png.h pngconf.h -pngread.obj: pngread.c png.h pngconf.h -pngrio.obj: pngrio.c png.h pngconf.h -pngrtran.obj: pngrtran.c png.h pngconf.h -pngrutil.obj: pngrutil.c png.h pngconf.h -pngset.obj: pngset.c png.h pngconf.h -pngtrans.obj: pngtrans.c png.h pngconf.h -pngwio.obj: pngwio.c png.h pngconf.h -pngwrite.obj: pngwrite.c png.h pngconf.h -pngwtran.obj: pngwtran.c png.h pngconf.h -pngwutil.obj: pngwutil.c png.h pngconf.h +png.obj: png.c png.h pngconf.h pngpriv.h +pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h +pngget.obj: pngget.c png.h pngconf.h pngpriv.h +pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h +pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h +pngread.obj: pngread.c png.h pngconf.h pngpriv.h +pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h +pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h +pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h +pngset.obj: pngset.c png.h pngconf.h pngpriv.h +pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h +pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h +pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h +pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h +pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h $(LIBNAME): $(OBJS) -del $(LIBNAME) @@ -139,7 +139,7 @@ $(LIBNAME): $(OBJS) $(LIBOBJS), libpng$(MODEL) | -pngtest$(MODEL).obj: pngtest.c +pngtest$(MODEL).obj: pngtest.c png.h pngconf.h $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c pngtest$(MODEL).exe: pngtest$(MODEL).obj diff --git a/source/Irrlicht/libpng/scripts/makefile.cegcc b/source/Irrlicht/libpng/scripts/makefile.cegcc new file mode 100644 index 00000000..f54e0752 --- /dev/null +++ b/source/Irrlicht/libpng/scripts/makefile.cegcc @@ -0,0 +1,113 @@ +# Makefile for creating Windows CE release archives, with the +# mingw32ce compiler. + +# Last updated: 22-Jul-2008 + +# Copyright (C) 2008 Vincent Torri + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# To get some help, type +# +# make help +# +# To create the archives +# +# make +# +# To remove everything, type: +# +# make clean + +VERMAJ = 1 +VERMIN = 4 +VERMIC = 3 +VER = $(VERMAJ).$(VERMIN).$(VERMIC) +NAME = libpng +PACKAGE = $(NAME)-$(VER) + +BIN = libpng14-0.dll +LIB = libpng14.a libpng14.dll.a libpng.a libpng.dll.a scripts/png32ce.def +INCLUDE = png.h pngconf.h pngpriv.h +PC = libpng14.pc libpng.pc + +MANIFESTVERBIN = "Libpng-$(VER): Binary files" +MANIFESTVERDEV = "Libpng-$(VER): Developer files" +MANIFESTVERDESC = "Libpng: the official PNG reference library" + +all: $(NAME) + +$(NAME): remove-old copy-src compilation copy manifest archive + @echo " * Removal of the directories" + @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/ + +remove-old: + @echo " * Removal of the old files" + @rm -rf $(PACKAGE)-bin* + @rm -rf $(PACKAGE)-dev* + +copy-src: + @echo " * Copy of source files" + @cp -R ../src/$(PACKAGE) . + @echo " * Creation of directories and files" + @mkdir -p $(PACKAGE)-bin/bin + @mkdir -p $(PACKAGE)-bin/manifest + @mkdir -p $(PACKAGE)-dev/lib/pkgconfig + @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN) + @mkdir -p $(PACKAGE)-dev/manifest + @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft + @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver + @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft + @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver + +compilation: + @echo " * Compilation of $(PACKAGE)" + cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make + +copy: + @echo " * Copy of binary and development files" + @for i in $(BIN); do \ + cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \ + done + @for i in $(LIB); do \ + cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \ + done + @for i in $(INCLUDE); do \ + cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \ + done + @for i in $(PC); do \ + cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \ + done + +manifest: + @echo " * Creation of the manifest" + @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft + @cd $(PACKAGE)-bin && \ + echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \ + echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver + @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft + @cd $(PACKAGE)-dev && \ + echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \ + echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver + +archive: + @echo " * Creation of the archives" + @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin + @bzip2 -9 $(PACKAGE)-bin.tar + @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev + @bzip2 -9 $(PACKAGE)-dev.tar + +clean: + @echo " * Cleaning" + @rm -rf $(PACKAGE)* + +help: + @echo + @echo "To create the archives, type:" + @echo " make" + @echo + @echo "To remove everything, type:" + @echo " make clean" + @echo diff --git a/source/Irrlicht/libpng/scripts/makefile.cygwin b/source/Irrlicht/libpng/scripts/makefile.cygwin index 54cf60ab..15422812 100644 --- a/source/Irrlicht/libpng/scripts/makefile.cygwin +++ b/source/Irrlicht/libpng/scripts/makefile.cygwin @@ -7,7 +7,7 @@ # and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by: # Copyright (C) 1998-2000 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -61,24 +61,13 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wmissing-declarations -Wtraditional -Wcast-align \ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -### if you don't need thread safety, but want the asm accel -#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK \ -# $(addprefix -I,$(ZLIBINC)) -W -Wall -O $(ALIGN) -funroll-loops \ -# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -### if you need thread safety and want (minimal) asm accel -#CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ -# -W -Wall -O $(ALIGN) -funroll-loops \ -# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -### Normal (non-asm) compilation CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ - -W -Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \ + -W -Wall -O3 $(ALIGN) -funroll-loops \ -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -LIBNAME = libpng12 -PNGMAJ = 0 -CYGDLL = 12 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 +CYGDLL = 14 SHAREDLIB=cygpng$(CYGDLL).dll STATLIB=libpng.a @@ -141,7 +130,7 @@ libpng.pc: scripts/libpng.pc.in -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz! > libpng.pc + -e s!-lpng14!-lpng14\ -lz! > libpng.pc libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in @echo -e Making $(LIBNAME) libpng-config file for this libpng \ @@ -163,7 +152,7 @@ $(STATLIB): $(OBJS) ar rc $@ $(OBJS) $(RANLIB) $@ -$(SHAREDDEF): scripts/pngw32.def +$(SHAREDDEF): scripts/pngwin.def cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \ sed -e 's/\([^;]*\);/;/' > $@ @@ -254,16 +243,16 @@ test-dd: echo echo Testing installed dynamic shared library in $(DL). $(CC) -I$(DI) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + `$(BINPATH)/libpng14-config --cflags` pngtest.c \ -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/libpng12-config --ldflags` + -o pngtestd `$(BINPATH)/libpng14-config --ldflags` ./pngtestd pngtest.png test-installed: $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + `$(BINPATH)/libpng14-config --cflags` pngtest.c \ -L$(ZLIBLIB) \ - -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags` + -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags` ./pngtesti$(EXE) pngtest.png clean: @@ -279,21 +268,21 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h png.c -pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c -pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c -pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c -pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c -pngset.o pngset.pic.o: png.h pngconf.h pngset.c -pngget.o pngget.pic.o: png.h pngconf.h pngget.c -pngread.o pngread.pic.o: png.h pngconf.h pngread.c -pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c -pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c -pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c -pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c -pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c -pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c -pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c +png.o png.pic.o: png.h pngconf.h pngpriv.h png.c +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c pngtest.o: png.h pngconf.h pngtest.c pngtest-stat.o: png.h pngconf.h pngtest.c diff --git a/source/Irrlicht/libpng/scripts/makefile.darwin b/source/Irrlicht/libpng/scripts/makefile.darwin index 8820e9fd..04f26725 100644 --- a/source/Irrlicht/libpng/scripts/makefile.darwin +++ b/source/Irrlicht/libpng/scripts/makefile.darwin @@ -1,15 +1,15 @@ # makefile for libpng on Darwin / Mac OS X -# Copyright (C) 2002, 2004, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2004, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 2001 Christoph Pfisterer # derived from makefile.linux: # Copyright (C) 1998, 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h -# where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h +# where "make install" puts libpng.a, libpng14.dylib, png.h and pngconf.h prefix=/usr/local exec_prefix=$(prefix) @@ -20,18 +20,14 @@ ZLIBLIB=../zlib ZLIBINC=../zlib # Library name: -LIBNAME = libpng12 -PNGMAJ = 12 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).dylib LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib -LIBSOVER=$(LIBNAME).$(PNGVER).dylib +LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib OLDSO=libpng.dylib -OLDSOMAJ=libpng.3.dylib -OLDSOVER=libpng.3.$(PNGMIN).dylib # Utilities: CC=cc @@ -41,9 +37,9 @@ LN_SF=ln -sf RANLIB=ranlib RM_F=/bin/rm -f -# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE +# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops -LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz +LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -87,35 +83,25 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz! > libpng.pc + -e s!-lpng14!-lpng14\ -lz! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz\"; \ + echo libs=\"-lpng14 -lz\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(CC) -dynamiclib \ -install_name $(LIBPATH)/$(LIBSOMAJ) \ - -current_version 0 -compatibility_version 0 \ - -o $(LIBSOVER) \ - $(OBJSDLL) -L$(ZLIBLIB) -lz - -$(OLDSOVER): $(OBJSDLL) - $(CC) -dynamiclib \ - -install_name $(LIBPATH)/$(OLDSOMAJ) \ - -current_version 3 -compatibility_version 3 \ - -o $(OLDSOVER) \ + -current_version 14 -compatibility_version 14 \ + -o $(LIBSOMAJ) \ $(OBJSDLL) -L$(ZLIBLIB) -lz pngtest: pngtest.o $(LIBSO) @@ -141,24 +127,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSO) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBNAME).$(PNGVER)*.dylib - -@$(RM_F) $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/libpng.3.$(PNGMIN)*.dylib - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -209,7 +187,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - $(OLDSOVER) \ libpng.pc $(LIBNAME).*dylib pngtesti DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -218,20 +195,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.dec b/source/Irrlicht/libpng/scripts/makefile.dec index 91146fe5..bb044693 100644 --- a/source/Irrlicht/libpng/scripts/makefile.dec +++ b/source/Irrlicht/libpng/scripts/makefile.dec @@ -1,24 +1,20 @@ # makefile for libpng on DEC Alpha Unix -# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2000-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 +PNGMAJ = 14 +LIBNAME = libpng14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -75,7 +71,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -83,24 +79,17 @@ libpng-config: echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo ccopts=\"-std\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ -soname $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ - -soname $(OLDSOMAJ) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -123,29 +112,22 @@ install-static: install-headers libpng.a -@/bin/rm -f $(DL)/libpng.a (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@/bin/rm -f $(DL)/$(LIBSOMAJ) - -@/bin/rm -f $(DL)/$(OLDSO) - -@/bin/rm -f $(DL)/$(OLDSOMAJ) - -@/bin/rm -f $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF)(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF)(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF)(LIBNAME).pc libpng.pc) + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi @@ -193,25 +175,24 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.dj2 b/source/Irrlicht/libpng/scripts/makefile.dj2 index bbc1181a..d23723b3 100644 --- a/source/Irrlicht/libpng/scripts/makefile.dj2 +++ b/source/Irrlicht/libpng/scripts/makefile.dj2 @@ -1,7 +1,7 @@ # DJGPP (DOS gcc) makefile for libpng # Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -39,20 +39,20 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.elf b/source/Irrlicht/libpng/scripts/makefile.elf index 35d3b66e..bc1d1229 100644 --- a/source/Irrlicht/libpng/scripts/makefile.elf +++ b/source/Irrlicht/libpng/scripts/makefile.elf @@ -1,8 +1,8 @@ -# makefile for libpng.a and libpng12.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs +# makefile for libpng.a and libpng14.so on Linux ELF with gcc +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010 Greg Roelofs # and Glenn Randers-Pehrson # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -10,22 +10,19 @@ # Modified for Debian by Junichi Uekawa and Josselin Mouette # Major modifications are: # * link libpng explicitly with libz and libm -# * $(OLDSO).3 is a symlink rather than a different library +# * $(OLDSO).14 is a symlink rather than a different library # * versioned symbols # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) +OLDSOMAJ=libpng.so.14 # Utilities: AR_RC=ar rc @@ -35,8 +32,8 @@ LN_SF=ln -sf RANLIB=ranlib RM_F=/bin/rm -f -# where "make install" puts libpng12.a, libpng12.so*, -# libpng12/png.h and libpng12/pngconf.h +# where "make install" puts libpng14.a, libpng14.so*, +# libpng14/png.h and libpng14/pngconf.h # Prefix must be a full pathname. prefix=/usr/local exec_prefix=$(prefix) @@ -60,7 +57,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ CFLAGS=-W -Wall -D_REENTRANT -O2 \ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -lpng12 +LDFLAGS=-L. -lpng14 LDFLAGS_A=libpng.a -lz -lm LIBADDFLAGS=-lz -lm @@ -107,11 +104,11 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng.syms: png.h pngconf.h $(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\ - awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG12_%s {global:\n",PNGMAJ)}\ + awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG14_%s {global:\n",PNGMAJ)}\ { for (i=1;i+2<=NF;++i)\ if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\ print $$(i+1) ";";\ @@ -128,27 +125,18 @@ libpng-config: echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo L_opts=\"\"; \ echo R_opts=\"\"; \ - echo libs=\"-lpng12\"; \ - echo all_libs=\"-lpng12 $(LIBADDFLAGS)\"; \ + echo libs=\"-lpng14\"; \ + echo all_libs=\"-lpng14 $(LIBADDFLAGS)\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) libpng.syms +$(LIBSOMAJ): $(OBJSDLL) libpng.syms $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \ -Wl,-version-script,libpng.syms \ - -o $(LIBSOVER) \ - $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) libpng.syms - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -Wl,-version-script,libpng.syms \ - -o $(OLDSOVER) \ + -o $(LIBSOMAJ) \ $(OBJSDLL) pngtest: pngtest.o $(LIBSO) @@ -183,23 +171,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -251,7 +232,6 @@ test-installed: clean: $(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -260,20 +240,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.freebsd b/source/Irrlicht/libpng/scripts/makefile.freebsd index a426b6e3..bd8f6485 100644 --- a/source/Irrlicht/libpng/scripts/makefile.freebsd +++ b/source/Irrlicht/libpng/scripts/makefile.freebsd @@ -1,12 +1,12 @@ # makefile for libpng under FreeBSD # Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h PREFIX?= /usr/local -SHLIB_VER?= 5 +SHLIB_VER?= 14 LIB= png SHLIB_MAJOR= ${SHLIB_VER} @@ -17,7 +17,7 @@ NOOBJ= YES # where make install puts libpng.a and png.h DESTDIR= ${PREFIX} LIBDIR= /lib -INCS= png.h pngconf.h +INCS= png.h pngconf.h pngpriv.h INCSDIR= /include/libpng INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk MAN= libpng.3 libpngpf.3 png.5 @@ -28,9 +28,6 @@ LDADD+= -lm -lz DPADD+= ${LIBM} ${LIBZ} CFLAGS+= -I. -.if (${MACHINE_ARCH} != "i386") -CFLAGS+= -DPNG_NO_MMX_CODE -.endif SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ diff --git a/source/Irrlicht/libpng/scripts/makefile.gcc b/source/Irrlicht/libpng/scripts/makefile.gcc index 8ad172f2..0ab8a3ba 100644 --- a/source/Irrlicht/libpng/scripts/makefile.gcc +++ b/source/Irrlicht/libpng/scripts/makefile.gcc @@ -2,7 +2,7 @@ # Copyright (C) 2008 Glenn Randers-Pehrson # Copyright (C) 2000 Cosmin Truta # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -64,20 +64,20 @@ pngtest$(EXE): pngtest$(O) libpng$(A) clean: $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png -png$(O): png.h pngconf.h -pngerror$(O): png.h pngconf.h -pngget$(O): png.h pngconf.h -pngmem$(O): png.h pngconf.h -pngpread$(O): png.h pngconf.h -pngread$(O): png.h pngconf.h -pngrio$(O): png.h pngconf.h -pngrtran$(O): png.h pngconf.h -pngrutil$(O): png.h pngconf.h -pngset$(O): png.h pngconf.h -pngtrans$(O): png.h pngconf.h -pngwio$(O): png.h pngconf.h -pngwrite$(O): png.h pngconf.h -pngwtran$(O): png.h pngconf.h -pngwutil$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h +pngerror$(O): png.h pngconf.h pngpriv.h +pngget$(O): png.h pngconf.h pngpriv.h +pngmem$(O): png.h pngconf.h pngpriv.h +pngpread$(O): png.h pngconf.h pngpriv.h +pngread$(O): png.h pngconf.h pngpriv.h +pngrio$(O): png.h pngconf.h pngpriv.h +pngrtran$(O): png.h pngconf.h pngpriv.h +pngrutil$(O): png.h pngconf.h pngpriv.h +pngset$(O): png.h pngconf.h pngpriv.h +pngtrans$(O): png.h pngconf.h pngpriv.h +pngwio$(O): png.h pngconf.h pngpriv.h +pngwrite$(O): png.h pngconf.h pngpriv.h +pngwtran$(O): png.h pngconf.h pngpriv.h +pngwutil$(O): png.h pngconf.h pngpriv.h pngtest$(O): png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.gcmmx b/source/Irrlicht/libpng/scripts/makefile.gcmmx deleted file mode 100644 index 84058c07..00000000 --- a/source/Irrlicht/libpng/scripts/makefile.gcmmx +++ /dev/null @@ -1,274 +0,0 @@ -# makefile for libpng.a and libpng12.so on Linux ELF with gcc using MMX -# assembler code -# Copyright 2002, 2006, 2008 Greg Roelofs and Glenn Randers-Pehrson -# Copyright 1998-2001 Greg Roelofs -# Copyright 1996-1997 Andreas Dilger - -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier. - -# NOTE: When testing MMX performance on a multitasking system, make sure -# there are no floating-point programs (e.g., SETI@Home) running in -# the background! Context switches between MMX and FPU are expensive. - -# Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) - -# Shared library names: -LIBSO=$(LIBNAME).so -LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) -OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) - -# Utilities: -CC = gcc -LD = $(CC) -AR_RC = ar rc -LN_SF = ln -sf -MKDIR_P = mkdir -p -RANLIB = ranlib -RM_F = /bin/rm -f - -# where "make install" puts libpng12.a, libpng12.so*, -# libpng12/png.h and libpng12/pngconf.h -# Prefix must be a full pathname. -prefix=/usr/local -exec_prefix=$(prefix) - -# Where the zlib library and include files are located. -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -ALIGN= -# for i386: -#ALIGN=-malign-loops=2 -malign-functions=2 - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion - -# for pgcc version 2.95.1, -O3 is buggy; don't use it. - -# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety -### for generic gcc: -CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -W -Wall -O \ - $(ALIGN) -funroll-loops \ - -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5 -### for gcc 2.95.2 on 686: -#CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -W -Wall -O \ -# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \ -# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer -### for gcc 2.7.2.3 on 486 and up: -#CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -W -Wall -O \ -# -m486 -malign-double -ffast-math \ -# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer - -LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm -LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm - - -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c - -all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config - -libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo cppflags=\"-DPNG_THREAD_UNSAFE_OK \"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBSO): $(LIBSOMAJ) - $(LN_SF) $(LIBSOMAJ) $(LIBSO) - -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \ - -o $(LIBSOVER) \ - $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -o $(OLDSOVER) \ - $(OBJSDLL) - -pngtest: pngtest.o $(LIBSO) - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -pngtest-static: pngtest.o libpng.a - $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) - -test: pngtest pngtest-static - @echo "" - @echo " Running pngtest dynamically linked with $(LIBSO):" - @echo "" - ./pngtest - @echo "" - @echo " Running pngtest statically linked with libpng.a:" - @echo "" - ./pngtest-static - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) - -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) - (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) -I$(ZLIBINC) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png - -clean: - $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -png.o png.pic.o: png.h pngconf.h png.c -pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c -pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c -pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c -pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c -pngset.o pngset.pic.o: png.h pngconf.h pngset.c -pngget.o pngget.pic.o: png.h pngconf.h pngget.c -pngread.o pngread.pic.o: png.h pngconf.h pngread.c -pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c -pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c -pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c -pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c -pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c -pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c -pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c - -pngtest.o: png.h pngconf.h pngtest.c diff --git a/source/Irrlicht/libpng/scripts/makefile.hp64 b/source/Irrlicht/libpng/scripts/makefile.hp64 index c45dab41..31c5bf19 100644 --- a/source/Irrlicht/libpng/scripts/makefile.hp64 +++ b/source/Irrlicht/libpng/scripts/makefile.hp64 @@ -1,8 +1,8 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 1999-2002, 2006, 2009 Glenn Randers-Pehrson +# Copyright (C) 1999-2002, 2006, 2009, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -19,18 +19,14 @@ ZLIBINC=/opt/zlib/include # SHAREDLIB=libz.sl # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.3 -OLDSOVER=libpng.sl.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -48,7 +44,7 @@ CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm -# where make install puts libpng.a, libpng12.sl, and png.h +# where make install puts libpng.a, libpng14.sl, and png.h prefix=/opt/libpng exec_prefix=$(prefix) INCPATH=$(prefix)/include @@ -93,7 +89,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -101,23 +97,16 @@ libpng-config: echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) @@ -141,23 +130,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -211,7 +193,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -220,20 +201,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.hpgcc b/source/Irrlicht/libpng/scripts/makefile.hpgcc index bc3c3f7c..16082b82 100644 --- a/source/Irrlicht/libpng/scripts/makefile.hpgcc +++ b/source/Irrlicht/libpng/scripts/makefile.hpgcc @@ -1,26 +1,22 @@ # makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. -# Copyright (C) 2002, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006-2008, 2010 Glenn Randers-Pehrson # Copyright (C) 2001, Laurent faillie # Copyright (C) 1998, 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.3 -OLDSOVER=libpng.sl.3.$(PNGMIN) # Utilities: CC=gcc @@ -58,8 +54,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 -#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm -LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm +#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm +LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -103,29 +99,22 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -150,23 +139,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -220,7 +202,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -229,20 +210,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.hpux b/source/Irrlicht/libpng/scripts/makefile.hpux index f75aa259..41254c1a 100644 --- a/source/Irrlicht/libpng/scripts/makefile.hpux +++ b/source/Irrlicht/libpng/scripts/makefile.hpux @@ -1,8 +1,8 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 1999-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 1999-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -19,18 +19,14 @@ ZLIBINC=/opt/zlib/include # SHAREDLIB=libz.sl # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.3 -OLDSOVER=libpng.sl.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -40,7 +36,7 @@ LN_SF=ln -sf RANLIB=ranlib RM_F=/bin/rm -f -# where make install puts libpng.a, libpng12.sl, and png.h +# where make install puts libpng.a, libpng14.sl, and png.h prefix=/opt/libpng exec_prefix=$(prefix) INCPATH=$(prefix)/include @@ -48,7 +44,7 @@ LIBPATH=$(exec_prefix)/lib MANPATH=$(prefix)/man BINPATH=$(exec_prefix)/bin -CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 -DPNG_NO_MMX_CODE +CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 # Caution: be sure you have built zlib with the same CFLAGS. CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm @@ -90,7 +86,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -98,23 +94,16 @@ libpng-config: echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) @@ -138,23 +127,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -208,7 +190,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -217,20 +198,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.ibmc b/source/Irrlicht/libpng/scripts/makefile.ibmc index d28ee018..edfdbbcb 100644 --- a/source/Irrlicht/libpng/scripts/makefile.ibmc +++ b/source/Irrlicht/libpng/scripts/makefile.ibmc @@ -2,11 +2,11 @@ # IBM C version 3.x for Win32 and OS/2 # Copyright (C) 2006 Glenn Randers-Pehrson # Copyright (C) 2000 Cosmin Truta - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h - +# # Notes: # Derived from makefile.std # All modules are compiled in C mode @@ -58,20 +58,20 @@ clean: $(RM) pngtest$(E) $(RM) pngout.png -png$(O): png.h pngconf.h -pngerror$(O): png.h pngconf.h -pngget$(O): png.h pngconf.h -pngmem$(O): png.h pngconf.h -pngpread$(O): png.h pngconf.h -pngread$(O): png.h pngconf.h -pngrio$(O): png.h pngconf.h -pngrtran$(O): png.h pngconf.h -pngrutil$(O): png.h pngconf.h -pngset$(O): png.h pngconf.h -pngtrans$(O): png.h pngconf.h -pngwio$(O): png.h pngconf.h -pngwrite$(O): png.h pngconf.h -pngwtran$(O): png.h pngconf.h -pngwutil$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h +pngerror$(O): png.h pngconf.h pngpriv.h +pngget$(O): png.h pngconf.h pngpriv.h +pngmem$(O): png.h pngconf.h pngpriv.h +pngpread$(O): png.h pngconf.h pngpriv.h +pngread$(O): png.h pngconf.h pngpriv.h +pngrio$(O): png.h pngconf.h pngpriv.h +pngrtran$(O): png.h pngconf.h pngpriv.h +pngrutil$(O): png.h pngconf.h pngpriv.h +pngset$(O): png.h pngconf.h pngpriv.h +pngtrans$(O): png.h pngconf.h pngpriv.h +pngwio$(O): png.h pngconf.h pngpriv.h +pngwrite$(O): png.h pngconf.h pngpriv.h +pngwtran$(O): png.h pngconf.h pngpriv.h +pngwutil$(O): png.h pngconf.h pngpriv.h pngtest$(O): png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.intel b/source/Irrlicht/libpng/scripts/makefile.intel index d8df4244..5caa3d69 100644 --- a/source/Irrlicht/libpng/scripts/makefile.intel +++ b/source/Irrlicht/libpng/scripts/makefile.intel @@ -4,13 +4,13 @@ # Copyright (C) 2006 Glenn Randers-Pehrson # Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is # copyright 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h - +# # To use, do "nmake /f scripts\makefile.intel" - +# # ------------------- Intel C/C++ Compiler 4.0 and later ------------------- # Where the zlib library and include files are located @@ -44,49 +44,49 @@ pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) all: test -png$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngset$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngget$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngpread$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngrtran$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngrutil$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngerror$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngmem$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngrio$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwio$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngtrans$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwrite$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwtran$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwutil$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) libpng.lib: $(OBJS) diff --git a/source/Irrlicht/libpng/scripts/makefile.knr b/source/Irrlicht/libpng/scripts/makefile.knr index f290705b..e5b13e95 100644 --- a/source/Irrlicht/libpng/scripts/makefile.knr +++ b/source/Irrlicht/libpng/scripts/makefile.knr @@ -1,11 +1,11 @@ # makefile for libpng # Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h - +# # This makefile requires the file ansi2knr.c, which you can get # from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/ # If you have libjpeg, you probably already have ansi2knr.c in the jpeg @@ -84,20 +84,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.linux b/source/Irrlicht/libpng/scripts/makefile.linux index 4c6b54ad..5ab5147c 100644 --- a/source/Irrlicht/libpng/scripts/makefile.linux +++ b/source/Irrlicht/libpng/scripts/makefile.linux @@ -1,25 +1,22 @@ -# makefile for libpng.a and libpng12.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs and +# makefile for libpng.a and libpng14.so on Linux ELF with gcc +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010 Greg Roelofs and # Glenn Randers-Pehrson # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 +RELEASE = 3 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -29,8 +26,8 @@ LN_SF=ln -sf RANLIB=ranlib RM_F=/bin/rm -f -# where "make install" puts libpng12.a, libpng12.so*, -# libpng12/png.h and libpng12/pngconf.h +# where "make install" puts libpng14.a, libpng14.so*, +# libpng14/png.h and libpng14/pngconf.h # Prefix must be a full pathname. prefix=/usr/local exec_prefix=$(prefix) @@ -51,10 +48,10 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ # for pgcc version 2.95.1, -O3 is buggy; don't use it. -CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \ +CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm INCPATH=$(prefix)/include @@ -99,7 +96,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -107,23 +104,15 @@ libpng-config: echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -o $(OLDSOVER) \ - $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -157,23 +146,17 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -225,7 +208,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -234,20 +216,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.mingw b/source/Irrlicht/libpng/scripts/makefile.mingw index 5486c0a9..1a13c9bf 100644 --- a/source/Irrlicht/libpng/scripts/makefile.mingw +++ b/source/Irrlicht/libpng/scripts/makefile.mingw @@ -7,13 +7,17 @@ # and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by: # Copyright (C) 1998-2000, 2007 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Built from makefile.cygwin +# This makefile expects to be run under the MSYS shell (part of +# the MINGW project) and not under CMD.EXE which does not provide +# "cat" or "sed". + # This makefile intends to support building outside the src directory # if desired. When invoking it, specify an argument to SRCDIR on the # command line that points to the top of the directory where your source @@ -61,24 +65,13 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wmissing-declarations -Wtraditional -Wcast-align \ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -### if you don't need thread safety, but want the asm accel -#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK \ -# $(addprefix -I,$(ZLIBINC)) -W -Wall -O $(ALIGN) -funroll-loops \ -# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -### if you need thread safety and want (minimal) asm accel -#CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ -# -W -Wall -O $(ALIGN) -funroll-loops \ -# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -### Normal (non-asm) compilation CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ - -W -Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \ + -W -Wall -O3 $(ALIGN) -funroll-loops \ -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -LIBNAME = libpng12 -PNGMAJ = 0 -MINGDLL = 12 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 +MINGDLL = 14 SHAREDLIB=libpng$(MINGDLL).dll STATLIB=libpng.a @@ -138,7 +131,7 @@ libpng.pc: scripts/libpng.pc.in -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in @echo -e Making $(LIBNAME) libpng-config file for this libpng \ @@ -160,7 +153,7 @@ $(STATLIB): $(OBJS) $(AR) rc $@ $(OBJS) $(RANLIB) $@ -$(SHAREDDEF): scripts/pngw32.def +$(SHAREDDEF): scripts/pngwin.def cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \ sed -e 's/\([^;]*\);/;/' > $@ @@ -245,16 +238,16 @@ test-dd: echo echo Testing installed dynamic shared library in $(DL). $(CC) -I$(DI) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + `$(BINPATH)/libpng14-config --cflags` pngtest.c \ -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/libpng12-config --ldflags` + -o pngtestd `$(BINPATH)/libpng14-config --ldflags` ./pngtestd pngtest.png test-installed: $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + `$(BINPATH)/libpng14-config --cflags` pngtest.c \ -L$(ZLIBLIB) \ - -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags` + -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags` ./pngtesti$(EXE) pngtest.png clean: @@ -270,20 +263,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h png.c -pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c -pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c -pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c -pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c -pngset.o pngset.pic.o: png.h pngconf.h pngset.c -pngget.o pngget.pic.o: png.h pngconf.h pngget.c -pngread.o pngread.pic.o: png.h pngconf.h pngread.c -pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c -pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c -pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c -pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c -pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c -pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c -pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c +png.o png.pic.o: png.h pngconf.h pngpriv.h png.c +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c pngtest.o pngtest.pic.o: png.h pngconf.h pngtest.c diff --git a/source/Irrlicht/libpng/scripts/makefile.mips b/source/Irrlicht/libpng/scripts/makefile.mips index c1fe097d..70aa4915 100644 --- a/source/Irrlicht/libpng/scripts/makefile.mips +++ b/source/Irrlicht/libpng/scripts/makefile.mips @@ -1,7 +1,7 @@ # makefile for libpng # Copyright (C) Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -68,20 +68,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.msc b/source/Irrlicht/libpng/scripts/makefile.msc index 961e3d9b..143b227e 100644 --- a/source/Irrlicht/libpng/scripts/makefile.msc +++ b/source/Irrlicht/libpng/scripts/makefile.msc @@ -1,11 +1,11 @@ # makefile for libpng # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # Copyright (C) 2006, 2009 Glenn Randers-Pehrson - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h - +# # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib # -------- Microsoft C 5.1 and later, does not use assembler code -------- @@ -27,49 +27,49 @@ OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) all: libpng.lib -png$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngset$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngget$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngpread$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngrtran$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngrutil$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngerror$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngmem$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngrio$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwio$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngtrans$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwrite$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwtran$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwutil$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) diff --git a/source/Irrlicht/libpng/scripts/makefile.ne12bsd b/source/Irrlicht/libpng/scripts/makefile.ne12bsd index 87dfa522..e4033506 100644 --- a/source/Irrlicht/libpng/scripts/makefile.ne12bsd +++ b/source/Irrlicht/libpng/scripts/makefile.ne12bsd @@ -3,7 +3,7 @@ # make includes && make install # Copyright (C) 2002 Patrick R.L. Welche # Copyright (C) 2007, 2009 Glenn Randers-Pehrson - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -13,11 +13,11 @@ LOCALBASE?=/usr/local LIBDIR= ${LOCALBASE}/lib MANDIR= ${LOCALBASE}/man -INCSDIR=${LOCALBASE}/include/libpng12 +INCSDIR=${LOCALBASE}/include/libpng14 -LIB= png12 +LIB= png14 SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.2.39 +SHLIB_MINOR= 1.4.3 SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c @@ -29,10 +29,7 @@ CPPFLAGS+=-I${.CURDIR} # We should be able to do something like this instead of the manual # uncommenting, but it core dumps for me at the moment: # .if ${MACHINE_ARCH} == "i386" -# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK # MKLINT= no -# .else - CPPFLAGS+=-DPNG_NO_MMX_CODE # .endif CLEANFILES+=pngtest.o pngtest diff --git a/source/Irrlicht/libpng/scripts/makefile.netbsd b/source/Irrlicht/libpng/scripts/makefile.netbsd index 6e887d4a..b78c866a 100644 --- a/source/Irrlicht/libpng/scripts/makefile.netbsd +++ b/source/Irrlicht/libpng/scripts/makefile.netbsd @@ -2,22 +2,22 @@ # make obj && make depend && make && make test # make includes && make install # Copyright (C) 2002 Patrick R.L. Welche -# Copyright (C) 2007, 2009 Glenn Randers-Pehrson - +# Copyright (C) 2007-2009 Glenn Randers-Pehrson +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h -# You should also run makefile.ne0bsd +# You should also run makefile.ne14bsd LOCALBASE?=/usr/local LIBDIR= ${LOCALBASE}/lib MANDIR= ${LOCALBASE}/man -INCSDIR=${LOCALBASE}/include/libpng +INCSDIR=${LOCALBASE}/include LIB= png SHLIB_MAJOR= 3 -SHLIB_MINOR= 1.2.39 +SHLIB_MINOR= 1.4.3 SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c @@ -29,10 +29,7 @@ CPPFLAGS+=-I${.CURDIR} # We should be able to do something like this instead of the manual # uncommenting, but it core dumps for me at the moment: # .if ${MACHINE_ARCH} == "i386" -# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK # MKLINT= no -# .else - CPPFLAGS+=-DPNG_NO_MMX_CODE # .endif CLEANFILES+=pngtest.o pngtest diff --git a/source/Irrlicht/libpng/scripts/makefile.nommx b/source/Irrlicht/libpng/scripts/makefile.nommx deleted file mode 100644 index 3d0bc049..00000000 --- a/source/Irrlicht/libpng/scripts/makefile.nommx +++ /dev/null @@ -1,255 +0,0 @@ -# makefile for libpng.a and libpng12.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002, 2006-2008 Greg Roelofs and -# Glenn Randers-Pehrson -# Copyright (C) 1996, 1997 Andreas Dilger - -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -# Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) - -# Shared library names: -LIBSO=$(LIBNAME).so -LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) -OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) - -# Utilities: -AR_RC=ar rc -CC=gcc -MKDIR_P=mkdir -p -LN_SF=ln -sf -RANLIB=ranlib -RM_F=/bin/rm -f - -# where "make install" puts libpng12.a, libpng12.so*, -# libpng12/png.h and libpng12/pngconf.h -# Prefix must be a full pathname. -prefix=/usr/local -exec_prefix=$(prefix) - -# Where the zlib library and include files are located. -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -ALIGN= -# for i386: -#ALIGN=-malign-loops=2 -malign-functions=2 - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion - -# for pgcc version 2.95.1, -O3 is buggy; don't use it. - -CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \ - $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 - -LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm -LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm - -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c - -all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config - -libpng.a: $(OBJS) - $(AR_RC) $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! \ - -e s!Cflags: !Cflags:\ -DPNG_NO_MMX_CODE!> libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME) -DPNG_NO_MMX_CODE\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBSO): $(LIBSOMAJ) - $(LN_SF) $(LIBSOMAJ) $(LIBSO) - -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -o $(OLDSOVER) \ - $(OBJSDLL) - -pngtest: pngtest.o $(LIBSO) - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -pngtest-static: pngtest.o libpng.a - $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) - -test: pngtest pngtest-static - @echo "" - @echo " Running pngtest dynamically linked with $(LIBSO):" - @echo "" - ./pngtest - @echo "" - @echo " Running pngtest statically linked with libpng.a:" - @echo "" - ./pngtest-static - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) - -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) - (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) -I$(ZLIBINC) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png - -clean: - $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h png.c -pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c -pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c -pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c -pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c -pngset.o pngset.pic.o: png.h pngconf.h pngset.c -pngget.o pngget.pic.o: png.h pngconf.h pngget.c -pngread.o pngread.pic.o: png.h pngconf.h pngread.c -pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c -pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c -pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c -pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c -pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c -pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c -pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c - -pngtest.o: png.h pngconf.h pngtest.c diff --git a/source/Irrlicht/libpng/scripts/makefile.openbsd b/source/Irrlicht/libpng/scripts/makefile.openbsd index f58607cb..e3eb9541 100644 --- a/source/Irrlicht/libpng/scripts/makefile.openbsd +++ b/source/Irrlicht/libpng/scripts/makefile.openbsd @@ -1,7 +1,7 @@ # makefile for libpng # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# Copyright (C) 2007-2008 Glenn Randers-Pehrson - +# Copyright (C) 2007-2009 Glenn Randers-Pehrson +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib MANDIR= ${PREFIX}/man/cat SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.2.39 +SHLIB_MINOR= 1.4.3 LIB= png SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ @@ -21,7 +21,7 @@ SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ HDRS= png.h pngconf.h CFLAGS+= -W -Wall -CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE +CPPFLAGS+= -I${.CURDIR} NOPROFILE= Yes @@ -42,7 +42,7 @@ test: pngtest beforeinstall: if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \ fi if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ @@ -67,7 +67,7 @@ afterinstall: @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng + -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ diff --git a/source/Irrlicht/libpng/scripts/makefile.os2 b/source/Irrlicht/libpng/scripts/makefile.os2 index 5fb349be..20535f70 100644 --- a/source/Irrlicht/libpng/scripts/makefile.os2 +++ b/source/Irrlicht/libpng/scripts/makefile.os2 @@ -1,5 +1,5 @@ # makefile for libpng on OS/2 with gcc - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -53,20 +53,20 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.sco b/source/Irrlicht/libpng/scripts/makefile.sco index 015c1eb7..20d1e63a 100644 --- a/source/Irrlicht/libpng/scripts/makefile.sco +++ b/source/Irrlicht/libpng/scripts/makefile.sco @@ -1,27 +1,23 @@ # makefile for SCO OSr5 ELF and Unixware 7 with Native cc # Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx # force ELF build dynamic linking, SONAME setting in lib and RPATH in app -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: CC=cc @@ -41,10 +37,10 @@ exec_prefix=$(prefix) ZLIBLIB=../zlib ZLIBINC=../zlib -CFLAGS= -dy -belf -I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE -LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm +CFLAGS= -dy -belf -I$(ZLIBINC) -O3 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm -INCPATH=$(prefix)/include/libpng +INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib MANPATH=$(prefix)/man BINPATH=$(exec_prefix)/bin @@ -86,7 +82,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -94,24 +90,17 @@ libpng-config: echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo ccopts=\"-belf\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOVER) \ +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOMAJ) \ $(OBJSDLL) -$(OLDSOVER): $(OBJSDLL) - $(CC) -G -Wl,-h,$(OLDSOMAJ) -o $(OLDSOVER) \ - $(OBJSDLL) - pngtest: pngtest.o $(LIBSO) LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -136,23 +125,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -204,7 +186,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -213,20 +194,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.sggcc b/source/Irrlicht/libpng/scripts/makefile.sggcc index 51e997e9..ecbbfd64 100644 --- a/source/Irrlicht/libpng/scripts/makefile.sggcc +++ b/source/Irrlicht/libpng/scripts/makefile.sggcc @@ -1,24 +1,20 @@ -# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002, 2006 Glenn Randers-Pehrson +# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc' +# Copyright (C) 2001-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME=libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -28,7 +24,7 @@ LN_SF=ln -sf RANLIB=echo RM_F=/bin/rm -f -# Where make install puts libpng.a, libpng12.so, and libpng12/png.h +# Where make install puts libpng.a, libpng14.so, and libpng14/png.h # Prefix must be a full pathname. prefix=/usr/local @@ -47,12 +43,10 @@ ZLIBINC=../zlib ABI= WARNMORE= # -g -DPNG_DEBUG=5 -CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32 -DPNG_NO_MMX_CODE +CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \ - -set_version sgi$3.0 # See "man dso" for info about shared objects INCPATH=$(prefix)/include @@ -86,41 +80,35 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -shared: $(LIBSOVER) +shared: $(LIBSOMAJ) libpng.pc: cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo ccopts=\"$(ABI)\"; \ - echo cppflags=\"-DPNG_NO_MMX_CODE\"; \ + echo cppflags=\"\"; \ echo ldopts=\"$(ABI)\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ echo libdir=\"$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(LDSHARED) -o $@ $(OBJS) $(RM_F) $(LIBSO) $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -145,23 +133,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -216,7 +197,7 @@ test-installed: clean: $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \ - so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* $(OLDSOVER) + so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: @@ -224,20 +205,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.sgi b/source/Irrlicht/libpng/scripts/makefile.sgi index 5cebd3e7..d61ca853 100644 --- a/source/Irrlicht/libpng/scripts/makefile.sgi +++ b/source/Irrlicht/libpng/scripts/makefile.sgi @@ -1,24 +1,20 @@ -# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002, 2006, 2007 Glenn Randers-Pehrson +# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc' +# Copyright (C) 2001-2002, 2006, 2007, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME=libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -28,7 +24,7 @@ LN_SF=ln -sf RANLIB=echo RM_F=/bin/rm -f -# Where make install puts libpng.a, libpng12.so, and libpng12/png.h +# Where make install puts libpng.a, libpng14.so, and libpng14/png.h # Prefix must be a full pathname. prefix=/usr/local @@ -48,14 +44,12 @@ ABI= WARNMORE=-fullwarn # Note: -KPIC is the default anyhow -#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_NO_MMX_CODE # -g -DPNG_DEBUG=5 -CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_NO_MMX_CODE -LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm +#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5 +CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) +LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng14 -lz -lm LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \ - -set_version sgi$3.0 # See "man dso" for info about shared objects INCPATH=$(prefix)/include @@ -89,41 +83,32 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -shared: $(LIBSOVER) - libpng.pc: cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo cppflags=\"-DPNG_NO_MMX_CODE\"; \ echo ccopts=\"$(ABI)\"; \ echo ldopts=\"$(ABI)\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ echo libdir=\"$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(LDSHARED) -o $@ $(OBJS) $(RM_F) $(LIBSO) $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -148,23 +133,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -220,7 +198,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ so_locations DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -229,20 +206,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.so9 b/source/Irrlicht/libpng/scripts/makefile.so9 index 5ade1b7a..049ac7a2 100644 --- a/source/Irrlicht/libpng/scripts/makefile.so9 +++ b/source/Irrlicht/libpng/scripts/makefile.so9 @@ -1,27 +1,23 @@ # makefile for libpng on Solaris 9 (beta) with Forte cc # Updated by Chad Schrock for Solaris 9 # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 1998-2001 Greg Roelofs # Copyright (C) 1996-1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 +PNGMAJ = 14 +LIBNAME = libpng14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: # gcc 2.95 doesn't work. @@ -52,7 +48,7 @@ ZLIBINC=/usr/include -Wstrict-prototypes -Wmissing-prototypes #-Wconversion #CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -96,7 +92,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -104,17 +100,14 @@ libpng-config: echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ echo R_opts=\"-R$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ @@ -128,11 +121,7 @@ $(LIBSOVER): $(OBJSDLL) ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -156,23 +145,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -226,7 +208,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -235,20 +216,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.solaris b/source/Irrlicht/libpng/scripts/makefile.solaris index 300d7761..fc243419 100644 --- a/source/Irrlicht/libpng/scripts/makefile.solaris +++ b/source/Irrlicht/libpng/scripts/makefile.solaris @@ -1,26 +1,22 @@ # makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2004, 2006-2008, 2010 Glenn Randers-Pehrson # Contributed by William L. Sebok, based on makefile.linux # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -30,7 +26,7 @@ LN_SF=ln -f -s RANLIB=echo RM_F=/bin/rm -f -# Where make install puts libpng.a, libpng12.so*, and png.h +# Where make install puts libpng.a, libpng14.so*, and png.h prefix=/usr/local exec_prefix=$(prefix) @@ -46,9 +42,9 @@ ZLIBINC=/usr/local/include WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wmissing-declarations -Wtraditional -Wcast-align \ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -CFLAGS=-I$(ZLIBINC) -W -Wall -O -DPNG_NO_MMX_CODE; \ +CFLAGS=-I$(ZLIBINC) -W -Wall -O \ # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -92,26 +88,23 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo cppflags=\"-DPNG_NO_MMX_CODE\"; \ + echo cppflags=\"\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ echo R_opts=\"-R$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ @@ -125,11 +118,7 @@ $(LIBSOVER): $(OBJSDLL) ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -153,23 +142,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -223,7 +205,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -232,20 +213,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.solaris-x86 b/source/Irrlicht/libpng/scripts/makefile.solaris-x86 index e1d0a41d..35212f49 100644 --- a/source/Irrlicht/libpng/scripts/makefile.solaris-x86 +++ b/source/Irrlicht/libpng/scripts/makefile.solaris-x86 @@ -1,5 +1,5 @@ # makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2004, 2006-2008, 2010 Glenn Randers-Pehrson # Contributed by William L. Sebok, based on makefile.linux # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -9,18 +9,14 @@ # and license in png.h # Library name: -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.39 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng14 +PNGMAJ = 14 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.3 -OLDSOVER=libpng.so.3.$(PNGMIN) # Utilities: AR_RC=ar rc @@ -30,7 +26,7 @@ LN_SF=ln -f -s RANLIB=echo RM_F=/bin/rm -f -# Where make install puts libpng.a, libpng12.so*, and png.h +# Where make install puts libpng.a, libpng14.so*, and png.h prefix=/usr/local exec_prefix=$(prefix) @@ -48,7 +44,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion CFLAGS=-I$(ZLIBINC) -W -Wall -O \ # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -92,7 +88,7 @@ libpng.pc: -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc + -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ @@ -101,17 +97,14 @@ libpng-config: echo cppflags=\""; \ echo L_opts=\"-L$(LIBPATH)\"; \ echo R_opts=\"-R$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ + echo libs=\"-lpng14 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ @@ -125,11 +118,7 @@ $(LIBSOVER): $(OBJSDLL) ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -153,23 +142,16 @@ install-static: install-headers libpng.a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc @@ -223,7 +205,6 @@ test-installed: clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO @@ -232,20 +213,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h +png.o png.pic.o: png.h pngconf.h pngpriv.h +pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h +pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h +pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h +pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h +pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h +pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h +pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h +pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.std b/source/Irrlicht/libpng/scripts/makefile.std index ea565bbc..609f4d53 100644 --- a/source/Irrlicht/libpng/scripts/makefile.std +++ b/source/Irrlicht/libpng/scripts/makefile.std @@ -1,7 +1,7 @@ # makefile for libpng # Copyright (C) 2002, 2006 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -76,20 +76,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.sunos b/source/Irrlicht/libpng/scripts/makefile.sunos index a98ac61f..11733f1e 100644 --- a/source/Irrlicht/libpng/scripts/makefile.sunos +++ b/source/Irrlicht/libpng/scripts/makefile.sunos @@ -1,7 +1,7 @@ # makefile for libpng # Copyright (C) 2002, 2006 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -81,20 +81,20 @@ writelock: # DO NOT DELETE THIS LINE -- make depend depends on it. -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h +png.o: png.h pngconf.h pngpriv.h +pngerror.o: png.h pngconf.h pngpriv.h +pngrio.o: png.h pngconf.h pngpriv.h +pngwio.o: png.h pngconf.h pngpriv.h +pngmem.o: png.h pngconf.h pngpriv.h +pngset.o: png.h pngconf.h pngpriv.h +pngget.o: png.h pngconf.h pngpriv.h +pngread.o: png.h pngconf.h pngpriv.h +pngrtran.o: png.h pngconf.h pngpriv.h +pngrutil.o: png.h pngconf.h pngpriv.h +pngtrans.o: png.h pngconf.h pngpriv.h +pngwrite.o: png.h pngconf.h pngpriv.h +pngwtran.o: png.h pngconf.h pngpriv.h +pngwutil.o: png.h pngconf.h pngpriv.h +pngpread.o: png.h pngconf.h pngpriv.h pngtest.o: png.h pngconf.h diff --git a/source/Irrlicht/libpng/scripts/makefile.tc3 b/source/Irrlicht/libpng/scripts/makefile.tc3 index cedefc41..884ad506 100644 --- a/source/Irrlicht/libpng/scripts/makefile.tc3 +++ b/source/Irrlicht/libpng/scripts/makefile.tc3 @@ -30,52 +30,52 @@ pngtest: pngtest$(E) test: pngtest$(E) pngtest$(E) -png$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngset$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngget$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngpread$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngrtran$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngrutil$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngerror$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngmem$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngrio$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngwio$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c pngtest$(O): png.h pngconf.h $(CC) -c $(CFLAGS) $*.c -pngtrans$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngwrite$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngwtran$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c -pngwutil$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3) diff --git a/source/Irrlicht/libpng/scripts/makefile.vcawin32 b/source/Irrlicht/libpng/scripts/makefile.vcawin32 deleted file mode 100644 index 66f9742a..00000000 --- a/source/Irrlicht/libpng/scripts/makefile.vcawin32 +++ /dev/null @@ -1,104 +0,0 @@ -# makefile for libpng -# Copyright (C) 2006,2009 Glenn Randers-Pehrson -# Copyright (C) 1998 Tim Wegner - -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib -# To use, do "nmake /f scripts\makefile.vcawin32" - -# -------- Microsoft Visual C++ 2.0 and later, no assembler code -------- -# If you don't want to use assembler (MMX) code, use makefile.vcwin32 instead. - -# Compiler, linker, librarian, and other tools -CC = cl -LD = link -AR = lib -CFLAGS = -nologo -DPNG_USE_PNGVCRD -MD -O2 -W3 -I..\zlib -LDFLAGS = -nologo -ARFLAGS = -nologo -RM = del - -# File extensions -O=.obj - -#uncomment next to put error messages in a file -#ERRFILE= >> pngerrs.log - -# Variables -OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) -OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) -OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) -OBJS = $(OBJS1) $(OBJS2) $(OBJS3) - -# Targets -all: libpng.lib - -png$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS) - -$(RM) $@ - $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtest.exe: pngtest$(O) libpng.lib - $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) - -test: pngtest.exe - pngtest - -clean: - -$(RM) *$(O) - -$(RM) libpng.lib - -$(RM) pngtest.exe - -$(RM) pngout.png - -# End of makefile for libpng - diff --git a/source/Irrlicht/libpng/scripts/makefile.vcwin32 b/source/Irrlicht/libpng/scripts/makefile.vcwin32 index 0dce11b1..ed09d81f 100644 --- a/source/Irrlicht/libpng/scripts/makefile.vcwin32 +++ b/source/Irrlicht/libpng/scripts/makefile.vcwin32 @@ -1,22 +1,21 @@ # makefile for libpng # Copyright (C) 1998 Tim Wegner # Copyright (C) 2006,2009 Glenn Randers-Pehrson - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h - +# # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib # To use, do "nmake /f scripts\makefile.vcwin32" # -------- Microsoft Visual C++ 2.0 and later, no assembler code -------- -# If you want to use assembler (MMX) code, use makefile.vcawin32 instead. # Compiler, linker, librarian, and other tools CC = cl LD = link AR = lib -CFLAGS = -nologo -DPNG_NO_MMX_CODE -MD -O2 -W3 -I..\zlib +CFLAGS = -nologo -MD -O2 -W3 -I..\zlib LDFLAGS = -nologo ARFLAGS = -nologo RM = del @@ -36,49 +35,49 @@ OBJS = $(OBJS1) $(OBJS2) $(OBJS3) # Targets all: libpng.lib -png$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngset$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngget$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngpread$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngrtran$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngrutil$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngerror$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngmem$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngrio$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwio$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngtrans$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwrite$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwtran$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) -pngwutil$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h pngpriv.h $(CC) -c $(CFLAGS) $*.c $(ERRFILE) libpng.lib: $(OBJS) diff --git a/source/Irrlicht/libpng/scripts/makefile.watcom b/source/Irrlicht/libpng/scripts/makefile.watcom index 54d70e27..63ffdc73 100644 --- a/source/Irrlicht/libpng/scripts/makefile.watcom +++ b/source/Irrlicht/libpng/scripts/makefile.watcom @@ -3,7 +3,7 @@ # Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is # copyright 1995 Guy Eric Schalnat, Group 42, Inc. - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h @@ -49,52 +49,52 @@ OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) all: test -png$(O): png.h pngconf.h +png$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngset$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngget$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngpread$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngrtran$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngrutil$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngerror$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngmem$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngrio$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwio$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) pngtest$(O): png.h pngconf.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngtrans$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwrite$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwtran$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) -pngwutil$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h pngpriv.h $(CC) $(CFLAGS) $*.c $(ERRFILE) libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) diff --git a/source/Irrlicht/libpng/scripts/makevms.com b/source/Irrlicht/libpng/scripts/makevms.com index d448ec92..a83e7941 100755 --- a/source/Irrlicht/libpng/scripts/makevms.com +++ b/source/Irrlicht/libpng/scripts/makevms.com @@ -54,35 +54,35 @@ $ if make.eqs."" $ then $ dele pngtest.obj;* $ CALL MAKE png.OBJ "cc ''CCOPT' png" - - png.c png.h pngconf.h + png.c png.h pngconf.h pngpriv.h $ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" - - pngset.c png.h pngconf.h + pngset.c png.h pngconf.h pngpriv.h $ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" - - pngget.c png.h pngconf.h + pngget.c png.h pngconf.h pngpriv.h $ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" - - pngread.c png.h pngconf.h + pngread.c png.h pngconf.h pngpriv.h $ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - - pngpread.c png.h pngconf.h + pngpread.c png.h pngconf.h pngpriv.h $ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" - - pngrtran.c png.h pngconf.h + pngrtran.c png.h pngconf.h pngpriv.h $ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" - - pngrutil.c png.h pngconf.h + pngrutil.c png.h pngconf.h pngpriv.h $ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" - - pngerror.c png.h pngconf.h + pngerror.c png.h pngconf.h pngpriv.h $ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" - - pngmem.c png.h pngconf.h + pngmem.c png.h pngconf.h pngpriv.h $ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" - - pngrio.c png.h pngconf.h + pngrio.c png.h pngconf.h pngpriv.h $ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" - - pngwio.c png.h pngconf.h + pngwio.c png.h pngconf.h pngpriv.h $ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" - - pngtrans.c png.h pngconf.h + pngtrans.c png.h pngconf.h pngpriv.h $ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" - - pngwrite.c png.h pngconf.h + pngwrite.c png.h pngconf.h pngpriv.h $ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" - - pngwtran.c png.h pngconf.h + pngwtran.c png.h pngconf.h pngpriv.h $ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" - - pngwutil.c png.h pngconf.h + pngwutil.c png.h pngconf.h pngpriv.h $ write sys$output "Building Libpng ..." $ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ $ write sys$output "Building pngtest..." diff --git a/source/Irrlicht/libpng/scripts/pngw32.def b/source/Irrlicht/libpng/scripts/png32ce.def similarity index 75% rename from source/Irrlicht/libpng/scripts/pngw32.def rename to source/Irrlicht/libpng/scripts/png32ce.def index b3bc1903..18effd37 100644 --- a/source/Irrlicht/libpng/scripts/pngw32.def +++ b/source/Irrlicht/libpng/scripts/png32ce.def @@ -2,16 +2,26 @@ ; LIBPNG module definition file for Windows ;------------------------------------------ -LIBRARY +LIBRARY lpngce + + png_memcpy_check + png_memset_check + png_set_quantize + png_read_init_3 + png_write_init_3 + png_set_strip_error_numbers + png_get_uint_32 + png_get_uint_16 + png_get_int_32 EXPORTS -;Version 1.2.39 +;Version 1.4.3 png_build_grayscale_palette @1 - png_check_sig @2 +; png_check_sig @2 png_chunk_error @3 png_chunk_warning @4 - png_convert_from_struct_tm @5 - png_convert_from_time_t @6 +; png_convert_from_struct_tm @5 +; png_convert_from_time_t @6 png_create_info_struct @7 png_create_read_struct @8 png_create_write_struct @9 @@ -45,7 +55,7 @@ EXPORTS png_get_image_width @37 png_get_interlace_type @38 png_get_io_ptr @39 - ; png_get_libpng_ver @40 + png_get_libpng_ver @40 png_get_oFFs @41 png_get_pCAL @42 png_get_pHYs @43 @@ -74,9 +84,8 @@ EXPORTS png_get_y_offset_pixels @66 png_get_y_pixels_per_meter @67 png_malloc @68 - png_memcpy_check @69 - png_memset_check @70 -; png_permit_empty_plte is deprecated +; png_memcpy_check @69 +; png_memset_check @70 png_permit_empty_plte @71 png_process_data @72 png_progressive_combine_row @73 @@ -104,7 +113,7 @@ EXPORTS png_set_compression_strategy @94 png_set_compression_window_bits @95 png_set_crc_action @96 - png_set_dither @97 + png_set_quantize @97 png_set_error_fn @98 png_set_expand @99 png_set_filler @100 @@ -114,8 +123,7 @@ EXPORTS png_set_gAMA @104 png_set_gAMA_fixed @105 png_set_gamma @106 -; png_set_gray_1_2_4_to_8 is deprecated - png_set_gray_1_2_4_to_8 @107 + png_set_gray_1_2_4_to_8 @107 ; deprecated png_set_gray_to_rgb @108 png_set_hIST @109 png_set_iCCP @110 @@ -179,48 +187,45 @@ EXPORTS png_read_init_2 @166 png_write_init_2 @167 png_access_version_number @168 -; png_sig_bytes @169 -; Removed from version 1.2.20 -; png_libpng_ver @170 -; +; png_sig_bytes @169 +; png_libpng_ver @170 png_init_io @171 png_convert_to_rfc1123 @172 png_set_invalid @173 ; Added at version 1.0.12 -; For compatibility with 1.0.7-1.0.11 -; png_info_init @174 -; png_read_init_3, png_info_init_3, and png_write_init_3 are deprecated. - png_read_init_3 @175 - png_write_init_3 @176 +; For compatiblity with 1.0.7-1.0.11 + png_info_init @174 +; png_read_init_3 @175 +; png_write_init_3 @176 png_info_init_3 @177 png_destroy_struct @178 ; Added at version 1.2.0 ; For use with PNG_USER_MEM_SUPPORTED - png_destroy_struct_2 @179 - png_create_read_struct_2 @180 - png_create_write_struct_2 @181 - png_malloc_default @182 - png_free_default @183 +; png_destroy_struct_2 @179 +; png_create_read_struct_2 @180 +; png_create_write_struct_2 @181 +; png_malloc_default @182 +; png_free_default @183 ; MNG features - png_permit_mng_features @184 +; png_permit_mng_features @184 ; MMX support - png_mmx_support @185 +; png_mmx_support @185 ; png_get_mmx_flagmask @186 - png_get_asm_flagmask @187 - png_get_asm_flags @188 +; png_get_asm_flagmask @187 +; png_get_asm_flags @188 ; png_get_mmx_bitdepth_threshold @189 ; png_get_mmx_rowbytes_threshold @190 - png_set_asm_flags @191 +; png_set_asm_flags @191 ; png_init_mmx_flags @192 ; Strip error numbers - png_set_strip_error_numbers @193 +; png_set_strip_error_numbers @193 ; Added at version 1.2.2 - png_handle_as_unknown @194 -; Added at version 1.2.2 and deleted from 1.2.3 + png_handle_as_unknown @179 + png_zalloc @180 + png_zfree @181 +; png_handle_as_unknown @194 ; png_zalloc @195 ; png_zfree @196 -; Added at version 1.2.4 - png_malloc_warn @195 ; Added at version 1.2.6 png_malloc_warn @195 png_get_user_height_max @196 @@ -229,11 +234,26 @@ EXPORTS ; Added at version 1.2.7 png_set_add_alpha @199 ; Added at version 1.2.9 - png_get_uint_32 @200 +; png_get_uint_32 @200 png_save_uint_32 @201 - png_get_uint_16 @202 +; png_get_uint_16 @202 png_save_uint_16 @203 - png_get_int_32 @204 +; png_get_int_32 @204 png_save_int_32 @205 png_get_uint_31 @206 png_set_expand_gray_1_2_4_to_8 @207 +; Added at version 1.2.41 + png_write_sig @208 + png_benign_error @209 + png_benign_chunk_error @210 + png_set_benign_error @211 + png_get_io_chunk_name @212 + png_get_io_state @213 + png_get_chunk_cache_max @215 + png_set_chunk_cache_max @216 + png_check_cHRM_fixed @217 + png_calloc @218 + png_set_longjmp_fn @219 +; Added at version 1.4.1 + png_get_chunk_malloc_max @220 + png_set_chunk_malloc_max @221 diff --git a/source/Irrlicht/libpng/scripts/pngos2.def b/source/Irrlicht/libpng/scripts/pngos2.def index 337a534e..36c2d38a 100644 --- a/source/Irrlicht/libpng/scripts/pngos2.def +++ b/source/Irrlicht/libpng/scripts/pngos2.def @@ -2,7 +2,7 @@ ; PNG.LIB module definition file for OS/2 ;---------------------------------------- -; Version 1.2.39 +; Version 1.4.3 LIBRARY PNG DESCRIPTION "PNG image compression library for OS/2" @@ -11,9 +11,7 @@ DATA PRELOAD MOVEABLE MULTIPLE EXPORTS - png_build_grayscale_palette - png_check_sig png_chunk_error png_chunk_warning png_convert_from_struct_tm @@ -80,15 +78,11 @@ EXPORTS png_get_y_offset_pixels png_get_y_pixels_per_meter png_malloc - png_memcpy_check - png_memset_check - png_permit_empty_plte png_process_data png_progressive_combine_row png_read_end png_read_image png_read_info -; png_read_init ; deprecated png_read_png png_read_row png_read_rows @@ -108,7 +102,6 @@ EXPORTS png_set_compression_strategy png_set_compression_window_bits png_set_crc_action - png_set_dither png_set_error_fn png_set_expand png_set_filler @@ -118,7 +111,6 @@ EXPORTS png_set_gAMA png_set_gAMA_fixed png_set_gamma -; png_set_gray_1_2_4_to_8 ; deprecated as of libpng-1.2.9 png_set_gray_to_rgb png_set_hIST png_set_iCCP @@ -173,28 +165,18 @@ EXPORTS png_write_image png_write_info png_write_info_before_PLTE -; png_write_init ; deprecated png_write_png png_write_row png_write_rows - png_read_init_2 - png_write_init_2 + png_write_sig png_access_version_number png_init_io png_convert_to_rfc1123 png_set_invalid ; Added at version 1.2.0: - png_mmx_support png_permit_empty_plte png_permit_mng_features - png_get_mmx_flagmask - png_get_asm_flagmask - png_get_asm_flags - png_get_mmx_bitdepth_threshold - png_get_mmx_rowbytes_threshold - png_set_asm_flags - png_init_mmx_flags ; Added at version 1.2.2: png_handle_as_unknown @@ -214,16 +196,32 @@ EXPORTS png_set_add_alpha ; Added at version 1.2.9 - png_get_uint_32 png_save_uint_32 - png_get_uint_16 png_save_uint_16 - png_get_int_32 png_save_int_32 png_get_uint_31 png_set_expand_gray_1_2_4_to_8 +; Added at version 1.2.41 + png_write_sig +; png_benign_error +; png_benign_chunk_error +; png_set_benign_error + png_get_io_chunk_name + png_get_io_state + png_get_chunk_cache_max + png_set_chunk_cache_max + png_check_cHRM_fixed + png_calloc + png_set_longjmp_fn +; Added at version 1.4.1 + png_get_chunk_malloc_max + png_set_chunk_malloc_max +; Added at version 1.4.2 + png_set_quantize + ; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS + png_libpng_ver png_pass_start png_pass_inc png_pass_ystart diff --git a/source/Irrlicht/libpng/scripts/pngwin.def b/source/Irrlicht/libpng/scripts/pngwin.def new file mode 100644 index 00000000..f93aada7 --- /dev/null +++ b/source/Irrlicht/libpng/scripts/pngwin.def @@ -0,0 +1,216 @@ +;------------------------------------------ +; LIBPNG module definition file for Windows +;------------------------------------------ + +LIBRARY + +EXPORTS +;Version 1.4.3 + png_build_grayscale_palette + png_chunk_error + png_chunk_warning + png_convert_from_struct_tm + png_convert_from_time_t + png_create_info_struct + png_create_read_struct + png_create_write_struct + png_data_freer + png_destroy_info_struct + png_destroy_read_struct + png_destroy_write_struct + png_error + png_free + png_free_data + png_get_IHDR + png_get_PLTE + png_get_bKGD + png_get_bit_depth + png_get_cHRM + png_get_cHRM_fixed + png_get_channels + png_get_color_type + png_get_compression_buffer_size + png_get_compression_type + png_get_copyright + png_get_error_ptr + png_get_filter_type + png_get_gAMA + png_get_gAMA_fixed + png_get_hIST + png_get_header_ver + png_get_header_version + png_get_iCCP + png_get_image_height + png_get_image_width + png_get_interlace_type + png_get_io_ptr + png_get_libpng_ver + png_get_oFFs + png_get_pCAL + png_get_pHYs + png_get_pixel_aspect_ratio + png_get_pixels_per_meter + png_get_progressive_ptr + png_get_rgb_to_gray_status + png_get_rowbytes + png_get_rows + png_get_sBIT + png_get_sCAL + png_get_sPLT + png_get_sRGB + png_get_signature + png_get_tIME + png_get_tRNS + png_get_text + png_get_unknown_chunks + png_get_user_chunk_ptr + png_get_user_transform_ptr + png_get_valid + png_get_x_offset_microns + png_get_x_offset_pixels + png_get_x_pixels_per_meter + png_get_y_offset_microns + png_get_y_offset_pixels + png_get_y_pixels_per_meter + png_malloc + png_process_data + png_progressive_combine_row + png_read_end + png_read_image + png_read_info + png_read_png + png_read_row + png_read_rows + png_read_update_info + png_reset_zstream + png_set_IHDR + png_set_PLTE + png_set_bKGD + png_set_background + png_set_bgr + png_set_cHRM + png_set_cHRM_fixed + png_set_compression_buffer_size + png_set_compression_level + png_set_compression_mem_level + png_set_compression_method + png_set_compression_strategy + png_set_compression_window_bits + png_set_crc_action + png_set_error_fn + png_set_expand + png_set_filler + png_set_filter + png_set_filter_heuristics + png_set_flush + png_set_gAMA + png_set_gAMA_fixed + png_set_gamma + png_set_gray_to_rgb + png_set_hIST + png_set_iCCP + png_set_interlace_handling + png_set_invert_alpha + png_set_invert_mono + png_set_keep_unknown_chunks + png_set_oFFs + png_set_pCAL + png_set_pHYs + png_set_packing + png_set_packswap + png_set_palette_to_rgb + png_set_progressive_read_fn + png_set_read_fn + png_set_read_status_fn + png_set_read_user_chunk_fn + png_set_read_user_transform_fn + png_set_rgb_to_gray + png_set_rgb_to_gray_fixed + png_set_rows + png_set_sBIT + png_set_sCAL + png_set_sPLT + png_set_sRGB + png_set_sRGB_gAMA_and_cHRM + png_set_shift + png_set_sig_bytes + png_set_strip_16 + png_set_strip_alpha + png_set_swap + png_set_swap_alpha + png_set_tIME + png_set_tRNS + png_set_tRNS_to_alpha + png_set_text + png_set_unknown_chunk_location + png_set_unknown_chunks + png_set_user_transform_info + png_set_write_fn + png_set_write_status_fn + png_set_write_user_transform_fn + png_sig_cmp + png_start_read_image + png_warning + png_write_chunk + png_write_chunk_data + png_write_chunk_end + png_write_chunk_start + png_write_end + png_write_flush + png_write_image + png_write_info + png_write_info_before_PLTE + png_write_png + png_write_row + png_write_rows + png_access_version_number + png_init_io + png_convert_to_rfc1123 + png_set_invalid +; Added at version 1.0.12 + png_info_init_3 + png_destroy_struct +; Added at version 1.2.0 +; For use with PNG_USER_MEM_SUPPORTED + png_destroy_struct_2 + png_create_read_struct_2 + png_create_write_struct_2 + png_malloc_default + png_free_default +; MNG features + png_permit_mng_features +; Added at version 1.2.2 + png_handle_as_unknown +; Added at version 1.2.2 and deleted from 1.2.3 +; png_zalloc +; png_zfree +; Added at version 1.2.4 + png_malloc_warn + png_get_user_height_max + png_get_user_width_max + png_set_user_limits +; Added at version 1.2.7 + png_set_add_alpha +; Added at version 1.2.9 + png_save_uint_32 + png_save_uint_16 + png_save_int_32 + png_get_uint_31 + png_set_expand_gray_1_2_4_to_8 +; Added at version 1.2.41 + png_write_sig +; png_benign_error +; png_benign_chunk_error +; png_set_benign_error + png_get_io_chunk_name + png_get_io_state + png_get_chunk_cache_max + png_set_chunk_cache_max + png_check_cHRM_fixed + png_calloc + png_set_longjmp_fn +; Added at version 1.4.1 + png_get_chunk_malloc_max + png_set_chunk_malloc_max +; Added at version 1.4.2 + png_set_quantize diff --git a/source/Irrlicht/libpng/scripts/pngw32.rc b/source/Irrlicht/libpng/scripts/pngwin.rc similarity index 95% rename from source/Irrlicht/libpng/scripts/pngw32.rc rename to source/Irrlicht/libpng/scripts/pngwin.rc index f6cb0f0e..ccca0d32 100644 --- a/source/Irrlicht/libpng/scripts/pngw32.rc +++ b/source/Irrlicht/libpng/scripts/pngwin.rc @@ -90,7 +90,7 @@ BEGIN VALUE "FileDescription", "PNG image compression library\000" VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000" VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000" - VALUE "LegalCopyright", "\251 1998-2004 Glenn Randers-Pehrson et al.\000" + VALUE "LegalCopyright", "\251 1998-2009 Glenn Randers-Pehrson et al.\000" #ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000" #endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */ diff --git a/source/Irrlicht/libpng/scripts/smakefile.ppc b/source/Irrlicht/libpng/scripts/smakefile.ppc index 4eefb515..719f01a2 100644 --- a/source/Irrlicht/libpng/scripts/smakefile.ppc +++ b/source/Irrlicht/libpng/scripts/smakefile.ppc @@ -1,7 +1,7 @@ # Amiga powerUP (TM) Makefile # makefile for libpng and SAS C V6.58/7.00 PPC compiler # Copyright (C) 1998 by Andreas R. Kleinert - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h diff --git a/source/Irrlicht/zlib/ChangeLog b/source/Irrlicht/zlib/ChangeLog index 1ac94630..f310bb0f 100644 --- a/source/Irrlicht/zlib/ChangeLog +++ b/source/Irrlicht/zlib/ChangeLog @@ -1,855 +1,1208 @@ - - ChangeLog file for zlib - -Changes in 1.2.3 (18 July 2005) -- Apply security vulnerability fixes to contrib/infback9 as well -- Clean up some text files (carriage returns, trailing space) -- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant] - -Changes in 1.2.2.4 (11 July 2005) -- Add inflatePrime() function for starting inflation at bit boundary -- Avoid some Visual C warnings in deflate.c -- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit - compile -- Fix some spelling errors in comments [Betts] -- Correct inflateInit2() error return documentation in zlib.h -- Added zran.c example of compressed data random access to examples - directory, shows use of inflatePrime() -- Fix cast for assignments to strm->state in inflate.c and infback.c -- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] -- Move declarations of gf2 functions to right place in crc32.c [Oberhumer] -- Add cast in trees.c t avoid a warning [Oberhumer] -- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer] -- Update make_vms.com [Zinser] -- Initialize state->write in inflateReset() since copied in inflate_fast() -- Be more strict on incomplete code sets in inflate_table() and increase - ENOUGH and MAXD -- this repairs a possible security vulnerability for - invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for - discovering the vulnerability and providing test cases. -- Add ia64 support to configure for HP-UX [Smith] -- Add error return to gzread() for format or i/o error [Levin] -- Use malloc.h for OS/2 [Necasek] - -Changes in 1.2.2.3 (27 May 2005) -- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile -- Typecast fread() return values in gzio.c [Vollant] -- Remove trailing space in minigzip.c outmode (VC++ can't deal with it) -- Fix crc check bug in gzread() after gzungetc() [Heiner] -- Add the deflateTune() function to adjust internal compression parameters -- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack) -- Remove an incorrect assertion in examples/zpipe.c -- Add C++ wrapper in infback9.h [Donais] -- Fix bug in inflateCopy() when decoding fixed codes -- Note in zlib.h how much deflateSetDictionary() actually uses -- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used) -- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer] -- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer] -- Add gzdirect() function to indicate transparent reads -- Update contrib/minizip [Vollant] -- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer] -- Add casts in crc32.c to avoid warnings [Oberhumer] -- Add contrib/masmx64 [Vollant] -- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant] - -Changes in 1.2.2.2 (30 December 2004) -- Replace structure assignments in deflate.c and inflate.c with zmemcpy to - avoid implicit memcpy calls (portability for no-library compilation) -- Increase sprintf() buffer size in gzdopen() to allow for large numbers -- Add INFLATE_STRICT to check distances against zlib header -- Improve WinCE errno handling and comments [Chang] -- Remove comment about no gzip header processing in FAQ -- Add Z_FIXED strategy option to deflateInit2() to force fixed trees -- Add updated make_vms.com [Coghlan], update README -- Create a new "examples" directory, move gzappend.c there, add zpipe.c, - fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html. -- Add FAQ entry and comments in deflate.c on uninitialized memory access -- Add Solaris 9 make options in configure [Gilbert] -- Allow strerror() usage in gzio.c for STDC -- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer] -- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant] -- Use z_off_t for adler32_combine() and crc32_combine() lengths -- Make adler32() much faster for small len -- Use OS_CODE in deflate() default gzip header - -Changes in 1.2.2.1 (31 October 2004) -- Allow inflateSetDictionary() call for raw inflate -- Fix inflate header crc check bug for file names and comments -- Add deflateSetHeader() and gz_header structure for custom gzip headers -- Add inflateGetheader() to retrieve gzip headers -- Add crc32_combine() and adler32_combine() functions -- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list -- Use zstreamp consistently in zlib.h (inflate_back functions) -- Remove GUNZIP condition from definition of inflate_mode in inflate.h - and in contrib/inflate86/inffast.S [Truta, Anderson] -- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson] -- Update projects/README.projects and projects/visualc6 [Truta] -- Update win32/DLL_FAQ.txt [Truta] -- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta] -- Deprecate Z_ASCII; use Z_TEXT instead [Truta] -- Use a new algorithm for setting strm->data_type in trees.c [Truta] -- Do not define an exit() prototype in zutil.c unless DEBUG defined -- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta] -- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate() -- Fix Darwin build version identification [Peterson] - -Changes in 1.2.2 (3 October 2004) -- Update zlib.h comments on gzip in-memory processing -- Set adler to 1 in inflateReset() to support Java test suite [Walles] -- Add contrib/dotzlib [Ravn] -- Update win32/DLL_FAQ.txt [Truta] -- Update contrib/minizip [Vollant] -- Move contrib/visual-basic.txt to old/ [Truta] -- Fix assembler builds in projects/visualc6/ [Truta] - -Changes in 1.2.1.2 (9 September 2004) -- Update INDEX file -- Fix trees.c to update strm->data_type (no one ever noticed!) -- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] -- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) -- Add limited multitasking protection to DYNAMIC_CRC_TABLE -- Add NO_vsnprintf for VMS in zutil.h [Mozilla] -- Don't declare strerror() under VMS [Mozilla] -- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize -- Update contrib/ada [Anisimkov] -- Update contrib/minizip [Vollant] -- Fix configure to not hardcode directories for Darwin [Peterson] -- Fix gzio.c to not return error on empty files [Brown] -- Fix indentation; update version in contrib/delphi/ZLib.pas and - contrib/pascal/zlibpas.pas [Truta] -- Update mkasm.bat in contrib/masmx86 [Truta] -- Update contrib/untgz [Truta] -- Add projects/README.projects [Truta] -- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] -- Update win32/DLL_FAQ.txt [Truta] -- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] -- Remove an unnecessary assignment to curr in inftrees.c [Truta] -- Add OS/2 to exe builds in configure [Poltorak] -- Remove err dummy parameter in zlib.h [Kientzle] - -Changes in 1.2.1.1 (9 January 2004) -- Update email address in README -- Several FAQ updates -- Fix a big fat bug in inftrees.c that prevented decoding valid - dynamic blocks with only literals and no distance codes -- - Thanks to "Hot Emu" for the bug report and sample file -- Add a note to puff.c on no distance codes case. - -Changes in 1.2.1 (17 November 2003) -- Remove a tab in contrib/gzappend/gzappend.c -- Update some interfaces in contrib for new zlib functions -- Update zlib version number in some contrib entries -- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta] -- Support shared libraries on Hurd and KFreeBSD [Brown] -- Fix error in NO_DIVIDE option of adler32.c - -Changes in 1.2.0.8 (4 November 2003) -- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas -- Add experimental NO_DIVIDE #define in adler32.c - - Possibly faster on some processors (let me know if it is) -- Correct Z_BLOCK to not return on first inflate call if no wrap -- Fix strm->data_type on inflate() return to correctly indicate EOB -- Add deflatePrime() function for appending in the middle of a byte -- Add contrib/gzappend for an example of appending to a stream -- Update win32/DLL_FAQ.txt [Truta] -- Delete Turbo C comment in README [Truta] -- Improve some indentation in zconf.h [Truta] -- Fix infinite loop on bad input in configure script [Church] -- Fix gzeof() for concatenated gzip files [Johnson] -- Add example to contrib/visual-basic.txt [Michael B.] -- Add -p to mkdir's in Makefile.in [vda] -- Fix configure to properly detect presence or lack of printf functions -- Add AS400 support [Monnerat] -- Add a little Cygwin support [Wilson] - -Changes in 1.2.0.7 (21 September 2003) -- Correct some debug formats in contrib/infback9 -- Cast a type in a debug statement in trees.c -- Change search and replace delimiter in configure from % to # [Beebe] -- Update contrib/untgz to 0.2 with various fixes [Truta] -- Add build support for Amiga [Nikl] -- Remove some directories in old that have been updated to 1.2 -- Add dylib building for Mac OS X in configure and Makefile.in -- Remove old distribution stuff from Makefile -- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X -- Update links in README - -Changes in 1.2.0.6 (13 September 2003) -- Minor FAQ updates -- Update contrib/minizip to 1.00 [Vollant] -- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta] -- Update POSTINC comment for 68060 [Nikl] -- Add contrib/infback9 with deflate64 decoding (unsupported) -- For MVS define NO_vsnprintf and undefine FAR [van Burik] -- Add pragma for fdopen on MVS [van Burik] - -Changes in 1.2.0.5 (8 September 2003) -- Add OF to inflateBackEnd() declaration in zlib.h -- Remember start when using gzdopen in the middle of a file -- Use internal off_t counters in gz* functions to properly handle seeks -- Perform more rigorous check for distance-too-far in inffast.c -- Add Z_BLOCK flush option to return from inflate at block boundary -- Set strm->data_type on return from inflate - - Indicate bits unused, if at block boundary, and if in last block -- Replace size_t with ptrdiff_t in crc32.c, and check for correct size -- Add condition so old NO_DEFLATE define still works for compatibility -- FAQ update regarding the Windows DLL [Truta] -- INDEX update: add qnx entry, remove aix entry [Truta] -- Install zlib.3 into mandir [Wilson] -- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta] -- Adapt the zlib interface to the new DLL convention guidelines [Truta] -- Introduce ZLIB_WINAPI macro to allow the export of functions using - the WINAPI calling convention, for Visual Basic [Vollant, Truta] -- Update msdos and win32 scripts and makefiles [Truta] -- Export symbols by name, not by ordinal, in win32/zlib.def [Truta] -- Add contrib/ada [Anisimkov] -- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta] -- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant] -- Add contrib/masm686 [Truta] -- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm - [Truta, Vollant] -- Update contrib/delphi; rename to contrib/pascal; add example [Truta] -- Remove contrib/delphi2; add a new contrib/delphi [Truta] -- Avoid inclusion of the nonstandard in contrib/iostream, - and fix some method prototypes [Truta] -- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip - [Truta] -- Avoid the use of backslash (\) in contrib/minizip [Vollant] -- Fix file time handling in contrib/untgz; update makefiles [Truta] -- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines - [Vollant] -- Remove contrib/vstudio/vc15_16 [Vollant] -- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta] -- Update README.contrib [Truta] -- Invert the assignment order of match_head and s->prev[...] in - INSERT_STRING [Truta] -- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings - [Truta] -- Compare function pointers with 0, not with NULL or Z_NULL [Truta] -- Fix prototype of syncsearch in inflate.c [Truta] -- Introduce ASMINF macro to be enabled when using an ASM implementation - of inflate_fast [Truta] -- Change NO_DEFLATE to NO_GZCOMPRESS [Truta] -- Modify test_gzio in example.c to take a single file name as a - parameter [Truta] -- Exit the example.c program if gzopen fails [Truta] -- Add type casts around strlen in example.c [Truta] -- Remove casting to sizeof in minigzip.c; give a proper type - to the variable compared with SUFFIX_LEN [Truta] -- Update definitions of STDC and STDC99 in zconf.h [Truta] -- Synchronize zconf.h with the new Windows DLL interface [Truta] -- Use SYS16BIT instead of __32BIT__ to distinguish between - 16- and 32-bit platforms [Truta] -- Use far memory allocators in small 16-bit memory models for - Turbo C [Truta] -- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in - zlibCompileFlags [Truta] -- Cygwin has vsnprintf [Wilson] -- In Windows16, OS_CODE is 0, as in MSDOS [Truta] -- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson] - -Changes in 1.2.0.4 (10 August 2003) -- Minor FAQ updates -- Be more strict when checking inflateInit2's windowBits parameter -- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well -- Add gzip wrapper option to deflateInit2 using windowBits -- Add updated QNX rule in configure and qnx directory [Bonnefoy] -- Make inflate distance-too-far checks more rigorous -- Clean up FAR usage in inflate -- Add casting to sizeof() in gzio.c and minigzip.c - -Changes in 1.2.0.3 (19 July 2003) -- Fix silly error in gzungetc() implementation [Vollant] -- Update contrib/minizip and contrib/vstudio [Vollant] -- Fix printf format in example.c -- Correct cdecl support in zconf.in.h [Anisimkov] -- Minor FAQ updates - -Changes in 1.2.0.2 (13 July 2003) -- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons -- Attempt to avoid warnings in crc32.c for pointer-int conversion -- Add AIX to configure, remove aix directory [Bakker] -- Add some casts to minigzip.c -- Improve checking after insecure sprintf() or vsprintf() calls -- Remove #elif's from crc32.c -- Change leave label to inf_leave in inflate.c and infback.c to avoid - library conflicts -- Remove inflate gzip decoding by default--only enable gzip decoding by - special request for stricter backward compatibility -- Add zlibCompileFlags() function to return compilation information -- More typecasting in deflate.c to avoid warnings -- Remove leading underscore from _Capital #defines [Truta] -- Fix configure to link shared library when testing -- Add some Windows CE target adjustments [Mai] -- Remove #define ZLIB_DLL in zconf.h [Vollant] -- Add zlib.3 [Rodgers] -- Update RFC URL in deflate.c and algorithm.txt [Mai] -- Add zlib_dll_FAQ.txt to contrib [Truta] -- Add UL to some constants [Truta] -- Update minizip and vstudio [Vollant] -- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h -- Expand use of NO_DUMMY_DECL to avoid all dummy structures -- Added iostream3 to contrib [Schwardt] -- Replace rewind() with fseek() for WinCE [Truta] -- Improve setting of zlib format compression level flags - - Report 0 for huffman and rle strategies and for level == 0 or 1 - - Report 2 only for level == 6 -- Only deal with 64K limit when necessary at compile time [Truta] -- Allow TOO_FAR check to be turned off at compile time [Truta] -- Add gzclearerr() function [Souza] -- Add gzungetc() function - -Changes in 1.2.0.1 (17 March 2003) -- Add Z_RLE strategy for run-length encoding [Truta] - - When Z_RLE requested, restrict matches to distance one - - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE -- Correct FASTEST compilation to allow level == 0 -- Clean up what gets compiled for FASTEST -- Incorporate changes to zconf.in.h [Vollant] - - Refine detection of Turbo C need for dummy returns - - Refine ZLIB_DLL compilation - - Include additional header file on VMS for off_t typedef -- Try to use _vsnprintf where it supplants vsprintf [Vollant] -- Add some casts in inffast.c -- Enchance comments in zlib.h on what happens if gzprintf() tries to - write more than 4095 bytes before compression -- Remove unused state from inflateBackEnd() -- Remove exit(0) from minigzip.c, example.c -- Get rid of all those darn tabs -- Add "check" target to Makefile.in that does the same thing as "test" -- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in -- Update contrib/inflate86 [Anderson] -- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant] -- Add msdos and win32 directories with makefiles [Truta] -- More additions and improvements to the FAQ - -Changes in 1.2.0 (9 March 2003) -- New and improved inflate code - - About 20% faster - - Does not allocate 32K window unless and until needed - - Automatically detects and decompresses gzip streams - - Raw inflate no longer needs an extra dummy byte at end - - Added inflateBack functions using a callback interface--even faster - than inflate, useful for file utilities (gzip, zip) - - Added inflateCopy() function to record state for random access on - externally generated deflate streams (e.g. in gzip files) - - More readable code (I hope) -- New and improved crc32() - - About 50% faster, thanks to suggestions from Rodney Brown -- Add deflateBound() and compressBound() functions -- Fix memory leak in deflateInit2() -- Permit setting dictionary for raw deflate (for parallel deflate) -- Fix const declaration for gzwrite() -- Check for some malloc() failures in gzio.c -- Fix bug in gzopen() on single-byte file 0x1f -- Fix bug in gzread() on concatenated file with 0x1f at end of buffer - and next buffer doesn't start with 0x8b -- Fix uncompress() to return Z_DATA_ERROR on truncated input -- Free memory at end of example.c -- Remove MAX #define in trees.c (conflicted with some libraries) -- Fix static const's in deflate.c, gzio.c, and zutil.[ch] -- Declare malloc() and free() in gzio.c if STDC not defined -- Use malloc() instead of calloc() in zutil.c if int big enough -- Define STDC for AIX -- Add aix/ with approach for compiling shared library on AIX -- Add HP-UX support for shared libraries in configure -- Add OpenUNIX support for shared libraries in configure -- Use $cc instead of gcc to build shared library -- Make prefix directory if needed when installing -- Correct Macintosh avoidance of typedef Byte in zconf.h -- Correct Turbo C memory allocation when under Linux -- Use libz.a instead of -lz in Makefile (assure use of compiled library) -- Update configure to check for snprintf or vsnprintf functions and their - return value, warn during make if using an insecure function -- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that - is lost when library is used--resolution is to build new zconf.h -- Documentation improvements (in zlib.h): - - Document raw deflate and inflate - - Update RFCs URL - - Point out that zlib and gzip formats are different - - Note that Z_BUF_ERROR is not fatal - - Document string limit for gzprintf() and possible buffer overflow - - Note requirement on avail_out when flushing - - Note permitted values of flush parameter of inflate() -- Add some FAQs (and even answers) to the FAQ -- Add contrib/inflate86/ for x86 faster inflate -- Add contrib/blast/ for PKWare Data Compression Library decompression -- Add contrib/puff/ simple inflate for deflate format description - -Changes in 1.1.4 (11 March 2002) -- ZFREE was repeated on same allocation on some error conditions. - This creates a security problem described in - http://www.zlib.org/advisory-2002-03-11.txt -- Returned incorrect error (Z_MEM_ERROR) on some invalid data -- Avoid accesses before window for invalid distances with inflate window - less than 32K. -- force windowBits > 8 to avoid a bug in the encoder for a window size - of 256 bytes. (A complete fix will be available in 1.1.5). - -Changes in 1.1.3 (9 July 1998) -- fix "an inflate input buffer bug that shows up on rare but persistent - occasions" (Mark) -- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) -- fix gzseek(..., SEEK_SET) in write mode -- fix crc check after a gzeek (Frank Faubert) -- fix miniunzip when the last entry in a zip file is itself a zip file - (J Lillge) -- add contrib/asm586 and contrib/asm686 (Brian Raiter) - See http://www.muppetlabs.com/~breadbox/software/assembly.html -- add support for Delphi 3 in contrib/delphi (Bob Dellaca) -- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) -- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) -- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) -- added a FAQ file - -- Support gzdopen on Mac with Metrowerks (Jason Linhart) -- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) -- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) -- avoid some warnings with Borland C (Tom Tanner) -- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant) -- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant) -- allow several arguments to configure (Tim Mooney, Frodo Looijaard) -- use libdir and includedir in Makefile.in (Tim Mooney) -- support shared libraries on OSF1 V4 (Tim Mooney) -- remove so_locations in "make clean" (Tim Mooney) -- fix maketree.c compilation error (Glenn, Mark) -- Python interface to zlib now in Python 1.5 (Jeremy Hylton) -- new Makefile.riscos (Rich Walker) -- initialize static descriptors in trees.c for embedded targets (Nick Smith) -- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith) -- add the OS/2 files in Makefile.in too (Andrew Zabolotny) -- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane) -- fix maketree.c to allow clean compilation of inffixed.h (Mark) -- fix parameter check in deflateCopy (Gunther Nikl) -- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler) -- Many portability patches by Christian Spieler: - . zutil.c, zutil.h: added "const" for zmem* - . Make_vms.com: fixed some typos - . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists - . msdos/Makefile.msc: remove "default rtl link library" info from obj files - . msdos/Makefile.*: use model-dependent name for the built zlib library - . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc: - new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT) -- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane) -- replace __far with _far for better portability (Christian Spieler, Tom Lane) -- fix test for errno.h in configure (Tim Newsham) - -Changes in 1.1.2 (19 March 98) -- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) - See http://www.winimage.com/zLibDll/unzip.html -- preinitialize the inflate tables for fixed codes, to make the code - completely thread safe (Mark) -- some simplifications and slight speed-up to the inflate code (Mark) -- fix gzeof on non-compressed files (Allan Schrum) -- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) -- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) -- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) -- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) -- do not wrap extern "C" around system includes (Tom Lane) -- mention zlib binding for TCL in README (Andreas Kupries) -- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) -- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) -- allow "configure --prefix $HOME" (Tim Mooney) -- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) -- move Makefile.sas to amiga/Makefile.sas - -Changes in 1.1.1 (27 Feb 98) -- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) -- remove block truncation heuristic which had very marginal effect for zlib - (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the - compression ratio on some files. This also allows inlining _tr_tally for - matches in deflate_slow. -- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) - -Changes in 1.1.0 (24 Feb 98) -- do not return STREAM_END prematurely in inflate (John Bowler) -- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) -- compile with -DFASTEST to get compression code optimized for speed only -- in minigzip, try mmap'ing the input file first (Miguel Albrecht) -- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain - on Sun but significant on HP) - -- add a pointer to experimental unzip library in README (Gilles Vollant) -- initialize variable gcc in configure (Chris Herborth) - -Changes in 1.0.9 (17 Feb 1998) -- added gzputs and gzgets functions -- do not clear eof flag in gzseek (Mark Diekhans) -- fix gzseek for files in transparent mode (Mark Diekhans) -- do not assume that vsprintf returns the number of bytes written (Jens Krinke) -- replace EXPORT with ZEXPORT to avoid conflict with other programs -- added compress2 in zconf.h, zlib.def, zlib.dnt -- new asm code from Gilles Vollant in contrib/asm386 -- simplify the inflate code (Mark): - . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() - . ZALLOC the length list in inflate_trees_fixed() instead of using stack - . ZALLOC the value area for huft_build() instead of using stack - . Simplify Z_FINISH check in inflate() - -- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 -- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) -- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with - the declaration of FAR (Gilles VOllant) -- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) -- read_buf buf parameter of type Bytef* instead of charf* -- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) -- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) -- fix check for presence of directories in "make install" (Ian Willis) - -Changes in 1.0.8 (27 Jan 1998) -- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) -- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) -- added compress2() to allow setting the compression level -- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) -- use constant arrays for the static trees in trees.c instead of computing - them at run time (thanks to Ken Raeburn for this suggestion). To create - trees.h, compile with GEN_TREES_H and run "make test". -- check return code of example in "make test" and display result -- pass minigzip command line options to file_compress -- simplifying code of inflateSync to avoid gcc 2.8 bug - -- support CC="gcc -Wall" in configure -s (QingLong) -- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) -- fix test for shared library support to avoid compiler warnings -- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) -- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) -- do not use fdopen for Metrowerks on Mac (Brad Pettit)) -- add checks for gzputc and gzputc in example.c -- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) -- use const for the CRC table (Ken Raeburn) -- fixed "make uninstall" for shared libraries -- use Tracev instead of Trace in infblock.c -- in example.c use correct compressed length for test_sync -- suppress +vnocompatwarnings in configure for HPUX (not always supported) - -Changes in 1.0.7 (20 Jan 1998) -- fix gzseek which was broken in write mode -- return error for gzseek to negative absolute position -- fix configure for Linux (Chun-Chung Chen) -- increase stack space for MSC (Tim Wegner) -- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) -- define EXPORTVA for gzprintf (Gilles Vollant) -- added man page zlib.3 (Rick Rodgers) -- for contrib/untgz, fix makedir() and improve Makefile - -- check gzseek in write mode in example.c -- allocate extra buffer for seeks only if gzseek is actually called -- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) -- add inflateSyncPoint in zconf.h -- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def - -Changes in 1.0.6 (19 Jan 1998) -- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and - gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) -- Fix a deflate bug occurring only with compression level 0 (thanks to - Andy Buckler for finding this one). -- In minigzip, pass transparently also the first byte for .Z files. -- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() -- check Z_FINISH in inflate (thanks to Marc Schluper) -- Implement deflateCopy (thanks to Adam Costello) -- make static libraries by default in configure, add --shared option. -- move MSDOS or Windows specific files to directory msdos -- suppress the notion of partial flush to simplify the interface - (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) -- suppress history buffer provided by application to simplify the interface - (this feature was not implemented anyway in 1.0.4) -- next_in and avail_in must be initialized before calling inflateInit or - inflateInit2 -- add EXPORT in all exported functions (for Windows DLL) -- added Makefile.nt (thanks to Stephen Williams) -- added the unsupported "contrib" directory: - contrib/asm386/ by Gilles Vollant - 386 asm code replacing longest_match(). - contrib/iostream/ by Kevin Ruland - A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset - Another C++ I/O streams interface - contrib/untgz/ by "Pedro A. Aranda Guti\irrez" - A very simple tar.gz file extractor using zlib - contrib/visual-basic.txt by Carlos Rios - How to use compress(), uncompress() and the gz* functions from VB. -- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression - level) in minigzip (thanks to Tom Lane) - -- use const for rommable constants in deflate -- added test for gzseek and gztell in example.c -- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) -- add undocumented function zError to convert error code to string - (for Tim Smithers) -- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code. -- Use default memcpy for Symantec MSDOS compiler. -- Add EXPORT keyword for check_func (needed for Windows DLL) -- add current directory to LD_LIBRARY_PATH for "make test" -- create also a link for libz.so.1 -- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) -- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) -- added -soname for Linux in configure (Chun-Chung Chen, -- assign numbers to the exported functions in zlib.def (for Windows DLL) -- add advice in zlib.h for best usage of deflateSetDictionary -- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) -- allow compilation with ANSI keywords only enabled for TurboC in large model -- avoid "versionString"[0] (Borland bug) -- add NEED_DUMMY_RETURN for Borland -- use variable z_verbose for tracing in debug mode (L. Peter Deutsch). -- allow compilation with CC -- defined STDC for OS/2 (David Charlap) -- limit external names to 8 chars for MVS (Thomas Lund) -- in minigzip.c, use static buffers only for 16-bit systems -- fix suffix check for "minigzip -d foo.gz" -- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) -- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) -- added makelcc.bat for lcc-win32 (Tom St Denis) -- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. -- check for unistd.h in configure (for off_t) -- remove useless check parameter in inflate_blocks_free -- avoid useless assignment of s->check to itself in inflate_blocks_new -- do not flush twice in gzclose (thanks to Ken Raeburn) -- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h -- use NO_ERRNO_H instead of enumeration of operating systems with errno.h -- work around buggy fclose on pipes for HP/UX -- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) -- fix configure if CC is already equal to gcc - -Changes in 1.0.5 (3 Jan 98) -- Fix inflate to terminate gracefully when fed corrupted or invalid data -- Use const for rommable constants in inflate -- Eliminate memory leaks on error conditions in inflate -- Removed some vestigial code in inflate -- Update web address in README - -Changes in 1.0.4 (24 Jul 96) -- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF - bit, so the decompressor could decompress all the correct data but went - on to attempt decompressing extra garbage data. This affected minigzip too. -- zlibVersion and gzerror return const char* (needed for DLL) -- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) -- use z_error only for DEBUG (avoid problem with DLLs) - -Changes in 1.0.3 (2 Jul 96) -- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS - small and medium models; this makes the library incompatible with previous - versions for these models. (No effect in large model or on other systems.) -- return OK instead of BUF_ERROR if previous deflate call returned with - avail_out as zero but there is nothing to do -- added memcmp for non STDC compilers -- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) -- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) -- better check for 16-bit mode MSC (avoids problem with Symantec) - -Changes in 1.0.2 (23 May 96) -- added Windows DLL support -- added a function zlibVersion (for the DLL support) -- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) -- Bytef is define's instead of typedef'd only for Borland C -- avoid reading uninitialized memory in example.c -- mention in README that the zlib format is now RFC1950 -- updated Makefile.dj2 -- added algorithm.doc - -Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] -- fix array overlay in deflate.c which sometimes caused bad compressed data -- fix inflate bug with empty stored block -- fix MSDOS medium model which was broken in 0.99 -- fix deflateParams() which could generated bad compressed data. -- Bytef is define'd instead of typedef'ed (work around Borland bug) -- added an INDEX file -- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), - Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) -- speed up adler32 for modern machines without auto-increment -- added -ansi for IRIX in configure -- static_init_done in trees.c is an int -- define unlink as delete for VMS -- fix configure for QNX -- add configure branch for SCO and HPUX -- avoid many warnings (unused variables, dead assignments, etc...) -- no fdopen for BeOS -- fix the Watcom fix for 32 bit mode (define FAR as empty) -- removed redefinition of Byte for MKWERKS -- work around an MWKERKS bug (incorrect merge of all .h files) - -Changes in 0.99 (27 Jan 96) -- allow preset dictionary shared between compressor and decompressor -- allow compression level 0 (no compression) -- add deflateParams in zlib.h: allow dynamic change of compression level - and compression strategy. -- test large buffers and deflateParams in example.c -- add optional "configure" to build zlib as a shared library -- suppress Makefile.qnx, use configure instead -- fixed deflate for 64-bit systems (detected on Cray) -- fixed inflate_blocks for 64-bit systems (detected on Alpha) -- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) -- always return Z_BUF_ERROR when deflate() has nothing to do -- deflateInit and inflateInit are now macros to allow version checking -- prefix all global functions and types with z_ with -DZ_PREFIX -- make falloc completely reentrant (inftrees.c) -- fixed very unlikely race condition in ct_static_init -- free in reverse order of allocation to help memory manager -- use zlib-1.0/* instead of zlib/* inside the tar.gz -- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith - -Wconversion -Wstrict-prototypes -Wmissing-prototypes" -- allow gzread on concatenated .gz files -- deflateEnd now returns Z_DATA_ERROR if it was premature -- deflate is finally (?) fully deterministic (no matches beyond end of input) -- Document Z_SYNC_FLUSH -- add uninstall in Makefile -- Check for __cpluplus in zlib.h -- Better test in ct_align for partial flush -- avoid harmless warnings for Borland C++ -- initialize hash_head in deflate.c -- avoid warning on fdopen (gzio.c) for HP cc -Aa -- include stdlib.h for STDC compilers -- include errno.h for Cray -- ignore error if ranlib doesn't exist -- call ranlib twice for NeXTSTEP -- use exec_prefix instead of prefix for libz.a -- renamed ct_* as _tr_* to avoid conflict with applications -- clear z->msg in inflateInit2 before any error return -- initialize opaque in example.c, gzio.c, deflate.c and inflate.c -- fixed typo in zconf.h (_GNUC__ => __GNUC__) -- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) -- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) -- in fcalloc, normalize pointer if size > 65520 bytes -- don't use special fcalloc for 32 bit Borland C++ -- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... -- use Z_BINARY instead of BINARY -- document that gzclose after gzdopen will close the file -- allow "a" as mode in gzopen. -- fix error checking in gzread -- allow skipping .gz extra-field on pipes -- added reference to Perl interface in README -- put the crc table in FAR data (I dislike more and more the medium model :) -- added get_crc_table -- added a dimension to all arrays (Borland C can't count). -- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast -- guard against multiple inclusion of *.h (for precompiled header on Mac) -- Watcom C pretends to be Microsoft C small model even in 32 bit mode. -- don't use unsized arrays to avoid silly warnings by Visual C++: - warning C4746: 'inflate_mask' : unsized array treated as '__far' - (what's wrong with far data in far model?). -- define enum out of inflate_blocks_state to allow compilation with C++ - -Changes in 0.95 (16 Aug 95) -- fix MSDOS small and medium model (now easier to adapt to any compiler) -- inlined send_bits -- fix the final (:-) bug for deflate with flush (output was correct but - not completely flushed in rare occasions). -- default window size is same for compression and decompression - (it's now sufficient to set MAX_WBITS in zconf.h). -- voidp -> voidpf and voidnp -> voidp (for consistency with other - typedefs and because voidnp was not near in large model). - -Changes in 0.94 (13 Aug 95) -- support MSDOS medium model -- fix deflate with flush (could sometimes generate bad output) -- fix deflateReset (zlib header was incorrectly suppressed) -- added support for VMS -- allow a compression level in gzopen() -- gzflush now calls fflush -- For deflate with flush, flush even if no more input is provided. -- rename libgz.a as libz.a -- avoid complex expression in infcodes.c triggering Turbo C bug -- work around a problem with gcc on Alpha (in INSERT_STRING) -- don't use inline functions (problem with some gcc versions) -- allow renaming of Byte, uInt, etc... with #define. -- avoid warning about (unused) pointer before start of array in deflate.c -- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c -- avoid reserved word 'new' in trees.c - -Changes in 0.93 (25 June 95) -- temporarily disable inline functions -- make deflate deterministic -- give enough lookahead for PARTIAL_FLUSH -- Set binary mode for stdin/stdout in minigzip.c for OS/2 -- don't even use signed char in inflate (not portable enough) -- fix inflate memory leak for segmented architectures - -Changes in 0.92 (3 May 95) -- don't assume that char is signed (problem on SGI) -- Clear bit buffer when starting a stored block -- no memcpy on Pyramid -- suppressed inftest.c -- optimized fill_window, put longest_match inline for gcc -- optimized inflate on stored blocks. -- untabify all sources to simplify patches - -Changes in 0.91 (2 May 95) -- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h -- Document the memory requirements in zconf.h -- added "make install" -- fix sync search logic in inflateSync -- deflate(Z_FULL_FLUSH) now works even if output buffer too short -- after inflateSync, don't scare people with just "lo world" -- added support for DJGPP - -Changes in 0.9 (1 May 95) -- don't assume that zalloc clears the allocated memory (the TurboC bug - was Mark's bug after all :) -- let again gzread copy uncompressed data unchanged (was working in 0.71) -- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented -- added a test of inflateSync in example.c -- moved MAX_WBITS to zconf.h because users might want to change that. -- document explicitly that zalloc(64K) on MSDOS must return a normalized - pointer (zero offset) -- added Makefiles for Microsoft C, Turbo C, Borland C++ -- faster crc32() - -Changes in 0.8 (29 April 95) -- added fast inflate (inffast.c) -- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this - is incompatible with previous versions of zlib which returned Z_OK. -- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) - (actually that was not a compiler bug, see 0.81 above) -- gzread no longer reads one extra byte in certain cases -- In gzio destroy(), don't reference a freed structure -- avoid many warnings for MSDOS -- avoid the ERROR symbol which is used by MS Windows - -Changes in 0.71 (14 April 95) -- Fixed more MSDOS compilation problems :( There is still a bug with - TurboC large model. - -Changes in 0.7 (14 April 95) -- Added full inflate support. -- Simplified the crc32() interface. The pre- and post-conditioning - (one's complement) is now done inside crc32(). WARNING: this is - incompatible with previous versions; see zlib.h for the new usage. - -Changes in 0.61 (12 April 95) -- workaround for a bug in TurboC. example and minigzip now work on MSDOS. - -Changes in 0.6 (11 April 95) -- added minigzip.c -- added gzdopen to reopen a file descriptor as gzFile -- added transparent reading of non-gziped files in gzread. -- fixed bug in gzread (don't read crc as data) -- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose). -- don't allocate big arrays in the stack (for MSDOS) -- fix some MSDOS compilation problems - -Changes in 0.5: -- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but - not yet Z_FULL_FLUSH. -- support decompression but only in a single step (forced Z_FINISH) -- added opaque object for zalloc and zfree. -- added deflateReset and inflateReset -- added a variable zlib_version for consistency checking. -- renamed the 'filter' parameter of deflateInit2 as 'strategy'. - Added Z_FILTERED and Z_HUFFMAN_ONLY constants. - -Changes in 0.4: -- avoid "zip" everywhere, use zlib instead of ziplib. -- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush - if compression method == 8. -- added adler32 and crc32 -- renamed deflateOptions as deflateInit2, call one or the other but not both -- added the method parameter for deflateInit2. -- added inflateInit2 -- simplied considerably deflateInit and inflateInit by not supporting - user-provided history buffer. This is supported only in deflateInit2 - and inflateInit2. - -Changes in 0.3: -- prefix all macro names with Z_ -- use Z_FINISH instead of deflateEnd to finish compression. -- added Z_HUFFMAN_ONLY -- added gzerror() + + ChangeLog file for zlib + +Changes in 1.2.5 (19 Apr 2010) +- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev] +- Default to libdir as sharedlibdir in configure [Nieder] +- Update copyright dates on modified source files +- Update trees.c to be able to generate modified trees.h +- Exit configure for MinGW, suggesting win32/Makefile.gcc + +Changes in 1.2.4.5 (18 Apr 2010) +- Set sharedlibdir in configure [Torok] +- Set LDFLAGS in Makefile.in [Bar-Lev] +- Avoid mkdir objs race condition in Makefile.in [Bowler] +- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays +- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C +- Don't use hidden attribute when it is a warning generator (e.g. Solaris) + +Changes in 1.2.4.4 (18 Apr 2010) +- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok] +- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty +- Try to use bash or ksh regardless of functionality of /bin/sh +- Fix configure incompatibility with NetBSD sh +- Remove attempt to run under bash or ksh since have better NetBSD fix +- Fix win32/Makefile.gcc for MinGW [Bar-Lev] +- Add diagnostic messages when using CROSS_PREFIX in configure +- Added --sharedlibdir option to configure [Weigelt] +- Use hidden visibility attribute when available [Frysinger] + +Changes in 1.2.4.3 (10 Apr 2010) +- Only use CROSS_PREFIX in configure for ar and ranlib if they exist +- Use CROSS_PREFIX for nm [Bar-Lev] +- Assume _LARGEFILE64_SOURCE defined is equivalent to true +- Avoid use of undefined symbols in #if with && and || +- Make *64 prototypes in gzguts.h consistent with functions +- Add -shared load option for MinGW in configure [Bowler] +- Move z_off64_t to public interface, use instead of off64_t +- Remove ! from shell test in configure (not portable to Solaris) +- Change +0 macro tests to -0 for possibly increased portability + +Changes in 1.2.4.2 (9 Apr 2010) +- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 +- Really provide prototypes for *64 functions when building without LFS +- Only define unlink() in minigzip.c if unistd.h not included +- Update README to point to contrib/vstudio project files +- Move projects/vc6 to old/ and remove projects/ +- Include stdlib.h in minigzip.c for setmode() definition under WinCE +- Clean up assembler builds in win32/Makefile.msc [Rowe] +- Include sys/types.h for Microsoft for off_t definition +- Fix memory leak on error in gz_open() +- Symbolize nm as $NM in configure [Weigelt] +- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] +- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined +- Fix bug in gzeof() to take into account unused input data +- Avoid initialization of structures with variables in puff.c +- Updated win32/README-WIN32.txt [Rowe] + +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + +Changes in 1.2.4 (14 Mar 2010) +- Fix VER3 extraction in configure for no fourth subversion +- Update zlib.3, add docs to Makefile.in to make .pdf out of it +- Add zlib.3.pdf to distribution +- Don't set error code in gzerror() if passed pointer is NULL +- Apply destination directory fixes to CMakeLists.txt [Lowman] +- Move #cmakedefine's to a new zconf.in.cmakein +- Restore zconf.h for builds that don't use configure or cmake +- Add distclean to dummy Makefile for convenience +- Update and improve INDEX, README, and FAQ +- Update CMakeLists.txt for the return of zconf.h [Lowman] +- Update contrib/vstudio/vc9 and vc10 [Vollant] +- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc +- Apply license and readme changes to contrib/asm686 [Raiter] +- Check file name lengths and add -c option in minigzip.c [Li] +- Update contrib/amd64 and contrib/masmx86/ [Vollant] +- Avoid use of "eof" parameter in trees.c to not shadow library variable +- Update make_vms.com for removal of zlibdefs.h [Zinser] +- Update assembler code and vstudio projects in contrib [Vollant] +- Remove outdated assembler code contrib/masm686 and contrib/asm586 +- Remove old vc7 and vc8 from contrib/vstudio +- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] +- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() +- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] +- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) +- Fix bug in void-returning vsprintf() case in gzwrite.c +- Fix name change from inflate.h in contrib/inflate86/inffas86.c +- Check if temporary file exists before removing in make_vms.com [Zinser] +- Fix make install and uninstall for --static option +- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] +- Update readme.txt in contrib/masmx64 and masmx86 to assemble + +Changes in 1.2.3.9 (21 Feb 2010) +- Expunge gzio.c +- Move as400 build information to old +- Fix updates in contrib/minizip and contrib/vstudio +- Add const to vsnprintf test in configure to avoid warnings [Weigelt] +- Delete zconf.h (made by configure) [Weigelt] +- Change zconf.in.h to zconf.h.in per convention [Weigelt] +- Check for NULL buf in gzgets() +- Return empty string for gzgets() with len == 1 (like fgets()) +- Fix description of gzgets() in zlib.h for end-of-file, NULL return +- Update minizip to 1.1 [Vollant] +- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c +- Note in zlib.h that gzerror() should be used to distinguish from EOF +- Remove use of snprintf() from gzlib.c +- Fix bug in gzseek() +- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] +- Fix zconf.h generation in CMakeLists.txt [Lowman] +- Improve comments in zconf.h where modified by configure + +Changes in 1.2.3.8 (13 Feb 2010) +- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] +- Use z_off64_t in gz_zero() and gz_skip() to match state->skip +- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) +- Revert to Makefile.in from 1.2.3.6 (live with the clutter) +- Fix missing error return in gzflush(), add zlib.h note +- Add *64 functions to zlib.map [Levin] +- Fix signed/unsigned comparison in gz_comp() +- Use SFLAGS when testing shared linking in configure +- Add --64 option to ./configure to use -m64 with gcc +- Fix ./configure --help to correctly name options +- Have make fail if a test fails [Levin] +- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] +- Remove assembler object files from contrib + +Changes in 1.2.3.7 (24 Jan 2010) +- Always gzopen() with O_LARGEFILE if available +- Fix gzdirect() to work immediately after gzopen() or gzdopen() +- Make gzdirect() more precise when the state changes while reading +- Improve zlib.h documentation in many places +- Catch memory allocation failure in gz_open() +- Complete close operation if seek forward in gzclose_w() fails +- Return Z_ERRNO from gzclose_r() if close() fails +- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL +- Return zero for gzwrite() errors to match zlib.h description +- Return -1 on gzputs() error to match zlib.h description +- Add zconf.in.h to allow recovery from configure modification [Weigelt] +- Fix static library permissions in Makefile.in [Weigelt] +- Avoid warnings in configure tests that hide functionality [Weigelt] +- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] +- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] +- Avoid access of uninitialized data for first inflateReset2 call [Gomes] +- Keep object files in subdirectories to reduce the clutter somewhat +- Remove default Makefile and zlibdefs.h, add dummy Makefile +- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ +- Remove zlibdefs.h completely -- modify zconf.h instead + +Changes in 1.2.3.6 (17 Jan 2010) +- Avoid void * arithmetic in gzread.c and gzwrite.c +- Make compilers happier with const char * for gz_error message +- Avoid unused parameter warning in inflate.c +- Avoid signed-unsigned comparison warning in inflate.c +- Indent #pragma's for traditional C +- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() +- Correct email address in configure for system options +- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] +- Update zlib.map [Brown] +- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok] +- Apply various fixes to CMakeLists.txt [Lowman] +- Add checks on len in gzread() and gzwrite() +- Add error message for no more room for gzungetc() +- Remove zlib version check in gzwrite() +- Defer compression of gzprintf() result until need to +- Use snprintf() in gzdopen() if available +- Remove USE_MMAP configuration determination (only used by minigzip) +- Remove examples/pigz.c (available separately) +- Update examples/gun.c to 1.6 + +Changes in 1.2.3.5 (8 Jan 2010) +- Add space after #if in zutil.h for some compilers +- Fix relatively harmless bug in deflate_fast() [Exarevsky] +- Fix same problem in deflate_slow() +- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] +- Add deflate_rle() for faster Z_RLE strategy run-length encoding +- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding +- Change name of "write" variable in inffast.c to avoid library collisions +- Fix premature EOF from gzread() in gzio.c [Brown] +- Use zlib header window size if windowBits is 0 in inflateInit2() +- Remove compressBound() call in deflate.c to avoid linking compress.o +- Replace use of errno in gz* with functions, support WinCE [Alves] +- Provide alternative to perror() in minigzip.c for WinCE [Alves] +- Don't use _vsnprintf on later versions of MSVC [Lowman] +- Add CMake build script and input file [Lowman] +- Update contrib/minizip to 1.1 [Svensson, Vollant] +- Moved nintendods directory from contrib to . +- Replace gzio.c with a new set of routines with the same functionality +- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above +- Update contrib/minizip to 1.1b +- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h + +Changes in 1.2.3.4 (21 Dec 2009) +- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility +- Update comments in configure and Makefile.in for default --shared +- Fix test -z's in configure [Marquess] +- Build examplesh and minigzipsh when not testing +- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h +- Import LDFLAGS from the environment in configure +- Fix configure to populate SFLAGS with discovered CFLAGS options +- Adapt make_vms.com to the new Makefile.in [Zinser] +- Add zlib2ansi script for C++ compilation [Marquess] +- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) +- Add AMD64 assembler code for longest match to contrib [Teterin] +- Include options from $SFLAGS when doing $LDSHARED +- Simplify 64-bit file support by introducing z_off64_t type +- Make shared object files in objs directory to work around old Sun cc +- Use only three-part version number for Darwin shared compiles +- Add rc option to ar in Makefile.in for when ./configure not run +- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* +- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile +- Protect against _FILE_OFFSET_BITS being defined when compiling zlib +- Rename Makefile.in targets allstatic to static and allshared to shared +- Fix static and shared Makefile.in targets to be independent +- Correct error return bug in gz_open() by setting state [Brown] +- Put spaces before ;;'s in configure for better sh compatibility +- Add pigz.c (parallel implementation of gzip) to examples/ +- Correct constant in crc32.c to UL [Leventhal] +- Reject negative lengths in crc32_combine() +- Add inflateReset2() function to work like inflateEnd()/inflateInit2() +- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] +- Correct typo in doc/algorithm.txt [Janik] +- Fix bug in adler32_combine() [Zhu] +- Catch missing-end-of-block-code error in all inflates and in puff + Assures that random input to inflate eventually results in an error +- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ +- Update ENOUGH and its usage to reflect discovered bounds +- Fix gzerror() error report on empty input file [Brown] +- Add ush casts in trees.c to avoid pedantic runtime errors +- Fix typo in zlib.h uncompress() description [Reiss] +- Correct inflate() comments with regard to automatic header detection +- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) +- Put new version of gzlog (2.0) in examples with interruption recovery +- Add puff compile option to permit invalid distance-too-far streams +- Add puff TEST command options, ability to read piped input +- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but + _LARGEFILE64_SOURCE not defined +- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart +- Fix deflateSetDictionary() to use all 32K for output consistency +- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) +- Clear bytes after deflate lookahead to avoid use of uninitialized data +- Change a limit in inftrees.c to be more transparent to Coverity Prevent +- Update win32/zlib.def with exported symbols from zlib.h +- Correct spelling error in zlib.h [Willem] +- Allow Z_BLOCK for deflate() to force a new block +- Allow negative bits in inflatePrime() to delete existing bit buffer +- Add Z_TREES flush option to inflate() to return at end of trees +- Add inflateMark() to return current state information for random access +- Add Makefile for NintendoDS to contrib [Costa] +- Add -w in configure compile tests to avoid spurious warnings [Beucler] +- Fix typos in zlib.h comments for deflateSetDictionary() +- Fix EOF detection in transparent gzread() [Maier] + +Changes in 1.2.3.3 (2 October 2006) +- Make --shared the default for configure, add a --static option +- Add compile option to permit invalid distance-too-far streams +- Add inflateUndermine() function which is required to enable above +- Remove use of "this" variable name for C++ compatibility [Marquess] +- Add testing of shared library in make test, if shared library built +- Use ftello() and fseeko() if available instead of ftell() and fseek() +- Provide two versions of all functions that use the z_off_t type for + binary compatibility -- a normal version and a 64-bit offset version, + per the Large File Support Extension when _LARGEFILE64_SOURCE is + defined; use the 64-bit versions by default when _FILE_OFFSET_BITS + is defined to be 64 +- Add a --uname= option to configure to perhaps help with cross-compiling + +Changes in 1.2.3.2 (3 September 2006) +- Turn off silly Borland warnings [Hay] +- Use off64_t and define _LARGEFILE64_SOURCE when present +- Fix missing dependency on inffixed.h in Makefile.in +- Rig configure --shared to build both shared and static [Teredesai, Truta] +- Remove zconf.in.h and instead create a new zlibdefs.h file +- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] +- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] + +Changes in 1.2.3.1 (16 August 2006) +- Add watcom directory with OpenWatcom make files [Daniel] +- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] +- Update make_vms.com [Zinser] +- Use -fPIC for shared build in configure [Teredesai, Nicholson] +- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck] +- Add some FAQ entries about the contrib directory +- Update the MVS question in the FAQ +- Avoid extraneous reads after EOF in gzio.c [Brown] +- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] +- Add comments to zlib.h about gzerror() usage [Brown] +- Set extra flags in gzip header in gzopen() like deflate() does +- Make configure options more compatible with double-dash conventions + [Weigelt] +- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] +- Fix uninstall target in Makefile.in [Truta] +- Add pkgconfig support [Weigelt] +- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] +- Replace set_data_type() with a more accurate detect_data_type() in + trees.c, according to the txtvsbin.txt document [Truta] +- Swap the order of #include and #include "zlib.h" in + gzio.c, example.c and minigzip.c [Truta] +- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, + Truta] (where?) +- Fix target "clean" from win32/Makefile.bor [Truta] +- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] +- Update zlib www home address in win32/DLL_FAQ.txt [Truta] +- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] +- Enable browse info in the "Debug" and "ASM Debug" configurations in + the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] +- Add pkgconfig support [Weigelt] +- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, + for use in win32/zlib1.rc [Polushin, Rowe, Truta] +- Add a document that explains the new text detection scheme to + doc/txtvsbin.txt [Truta] +- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] +- Move algorithm.txt into doc/ [Truta] +- Synchronize FAQ with website +- Fix compressBound(), was low for some pathological cases [Fearnley] +- Take into account wrapper variations in deflateBound() +- Set examples/zpipe.c input and output to binary mode for Windows +- Update examples/zlib_how.html with new zpipe.c (also web site) +- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems + that gcc became pickier in 4.0) +- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain + un-versioned, the patch adds versioning only for symbols introduced in + zlib-1.2.0 or later. It also declares as local those symbols which are + not designed to be exported." [Levin] +- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure +- Do not initialize global static by default in trees.c, add a response + NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] +- Don't use strerror() in gzio.c under WinCE [Yakimov] +- Don't use errno.h in zutil.h under WinCE [Yakimov] +- Move arguments for AR to its usage to allow replacing ar [Marot] +- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] +- Improve inflateInit() and inflateInit2() documentation +- Fix structure size comment in inflate.h +- Change configure help option from --h* to --help [Santos] + +Changes in 1.2.3 (18 July 2005) +- Apply security vulnerability fixes to contrib/infback9 as well +- Clean up some text files (carriage returns, trailing space) +- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant] + +Changes in 1.2.2.4 (11 July 2005) +- Add inflatePrime() function for starting inflation at bit boundary +- Avoid some Visual C warnings in deflate.c +- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit + compile +- Fix some spelling errors in comments [Betts] +- Correct inflateInit2() error return documentation in zlib.h +- Add zran.c example of compressed data random access to examples + directory, shows use of inflatePrime() +- Fix cast for assignments to strm->state in inflate.c and infback.c +- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] +- Move declarations of gf2 functions to right place in crc32.c [Oberhumer] +- Add cast in trees.c t avoid a warning [Oberhumer] +- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer] +- Update make_vms.com [Zinser] +- Initialize state->write in inflateReset() since copied in inflate_fast() +- Be more strict on incomplete code sets in inflate_table() and increase + ENOUGH and MAXD -- this repairs a possible security vulnerability for + invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for + discovering the vulnerability and providing test cases. +- Add ia64 support to configure for HP-UX [Smith] +- Add error return to gzread() for format or i/o error [Levin] +- Use malloc.h for OS/2 [Necasek] + +Changes in 1.2.2.3 (27 May 2005) +- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile +- Typecast fread() return values in gzio.c [Vollant] +- Remove trailing space in minigzip.c outmode (VC++ can't deal with it) +- Fix crc check bug in gzread() after gzungetc() [Heiner] +- Add the deflateTune() function to adjust internal compression parameters +- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack) +- Remove an incorrect assertion in examples/zpipe.c +- Add C++ wrapper in infback9.h [Donais] +- Fix bug in inflateCopy() when decoding fixed codes +- Note in zlib.h how much deflateSetDictionary() actually uses +- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used) +- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer] +- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer] +- Add gzdirect() function to indicate transparent reads +- Update contrib/minizip [Vollant] +- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer] +- Add casts in crc32.c to avoid warnings [Oberhumer] +- Add contrib/masmx64 [Vollant] +- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant] + +Changes in 1.2.2.2 (30 December 2004) +- Replace structure assignments in deflate.c and inflate.c with zmemcpy to + avoid implicit memcpy calls (portability for no-library compilation) +- Increase sprintf() buffer size in gzdopen() to allow for large numbers +- Add INFLATE_STRICT to check distances against zlib header +- Improve WinCE errno handling and comments [Chang] +- Remove comment about no gzip header processing in FAQ +- Add Z_FIXED strategy option to deflateInit2() to force fixed trees +- Add updated make_vms.com [Coghlan], update README +- Create a new "examples" directory, move gzappend.c there, add zpipe.c, + fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html. +- Add FAQ entry and comments in deflate.c on uninitialized memory access +- Add Solaris 9 make options in configure [Gilbert] +- Allow strerror() usage in gzio.c for STDC +- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer] +- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant] +- Use z_off_t for adler32_combine() and crc32_combine() lengths +- Make adler32() much faster for small len +- Use OS_CODE in deflate() default gzip header + +Changes in 1.2.2.1 (31 October 2004) +- Allow inflateSetDictionary() call for raw inflate +- Fix inflate header crc check bug for file names and comments +- Add deflateSetHeader() and gz_header structure for custom gzip headers +- Add inflateGetheader() to retrieve gzip headers +- Add crc32_combine() and adler32_combine() functions +- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list +- Use zstreamp consistently in zlib.h (inflate_back functions) +- Remove GUNZIP condition from definition of inflate_mode in inflate.h + and in contrib/inflate86/inffast.S [Truta, Anderson] +- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson] +- Update projects/README.projects and projects/visualc6 [Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta] +- Deprecate Z_ASCII; use Z_TEXT instead [Truta] +- Use a new algorithm for setting strm->data_type in trees.c [Truta] +- Do not define an exit() prototype in zutil.c unless DEBUG defined +- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta] +- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate() +- Fix Darwin build version identification [Peterson] + +Changes in 1.2.2 (3 October 2004) +- Update zlib.h comments on gzip in-memory processing +- Set adler to 1 in inflateReset() to support Java test suite [Walles] +- Add contrib/dotzlib [Ravn] +- Update win32/DLL_FAQ.txt [Truta] +- Update contrib/minizip [Vollant] +- Move contrib/visual-basic.txt to old/ [Truta] +- Fix assembler builds in projects/visualc6/ [Truta] + +Changes in 1.2.1.2 (9 September 2004) +- Update INDEX file +- Fix trees.c to update strm->data_type (no one ever noticed!) +- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] +- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) +- Add limited multitasking protection to DYNAMIC_CRC_TABLE +- Add NO_vsnprintf for VMS in zutil.h [Mozilla] +- Don't declare strerror() under VMS [Mozilla] +- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize +- Update contrib/ada [Anisimkov] +- Update contrib/minizip [Vollant] +- Fix configure to not hardcode directories for Darwin [Peterson] +- Fix gzio.c to not return error on empty files [Brown] +- Fix indentation; update version in contrib/delphi/ZLib.pas and + contrib/pascal/zlibpas.pas [Truta] +- Update mkasm.bat in contrib/masmx86 [Truta] +- Update contrib/untgz [Truta] +- Add projects/README.projects [Truta] +- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] +- Remove an unnecessary assignment to curr in inftrees.c [Truta] +- Add OS/2 to exe builds in configure [Poltorak] +- Remove err dummy parameter in zlib.h [Kientzle] + +Changes in 1.2.1.1 (9 January 2004) +- Update email address in README +- Several FAQ updates +- Fix a big fat bug in inftrees.c that prevented decoding valid + dynamic blocks with only literals and no distance codes -- + Thanks to "Hot Emu" for the bug report and sample file +- Add a note to puff.c on no distance codes case. + +Changes in 1.2.1 (17 November 2003) +- Remove a tab in contrib/gzappend/gzappend.c +- Update some interfaces in contrib for new zlib functions +- Update zlib version number in some contrib entries +- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta] +- Support shared libraries on Hurd and KFreeBSD [Brown] +- Fix error in NO_DIVIDE option of adler32.c + +Changes in 1.2.0.8 (4 November 2003) +- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas +- Add experimental NO_DIVIDE #define in adler32.c + - Possibly faster on some processors (let me know if it is) +- Correct Z_BLOCK to not return on first inflate call if no wrap +- Fix strm->data_type on inflate() return to correctly indicate EOB +- Add deflatePrime() function for appending in the middle of a byte +- Add contrib/gzappend for an example of appending to a stream +- Update win32/DLL_FAQ.txt [Truta] +- Delete Turbo C comment in README [Truta] +- Improve some indentation in zconf.h [Truta] +- Fix infinite loop on bad input in configure script [Church] +- Fix gzeof() for concatenated gzip files [Johnson] +- Add example to contrib/visual-basic.txt [Michael B.] +- Add -p to mkdir's in Makefile.in [vda] +- Fix configure to properly detect presence or lack of printf functions +- Add AS400 support [Monnerat] +- Add a little Cygwin support [Wilson] + +Changes in 1.2.0.7 (21 September 2003) +- Correct some debug formats in contrib/infback9 +- Cast a type in a debug statement in trees.c +- Change search and replace delimiter in configure from % to # [Beebe] +- Update contrib/untgz to 0.2 with various fixes [Truta] +- Add build support for Amiga [Nikl] +- Remove some directories in old that have been updated to 1.2 +- Add dylib building for Mac OS X in configure and Makefile.in +- Remove old distribution stuff from Makefile +- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X +- Update links in README + +Changes in 1.2.0.6 (13 September 2003) +- Minor FAQ updates +- Update contrib/minizip to 1.00 [Vollant] +- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta] +- Update POSTINC comment for 68060 [Nikl] +- Add contrib/infback9 with deflate64 decoding (unsupported) +- For MVS define NO_vsnprintf and undefine FAR [van Burik] +- Add pragma for fdopen on MVS [van Burik] + +Changes in 1.2.0.5 (8 September 2003) +- Add OF to inflateBackEnd() declaration in zlib.h +- Remember start when using gzdopen in the middle of a file +- Use internal off_t counters in gz* functions to properly handle seeks +- Perform more rigorous check for distance-too-far in inffast.c +- Add Z_BLOCK flush option to return from inflate at block boundary +- Set strm->data_type on return from inflate + - Indicate bits unused, if at block boundary, and if in last block +- Replace size_t with ptrdiff_t in crc32.c, and check for correct size +- Add condition so old NO_DEFLATE define still works for compatibility +- FAQ update regarding the Windows DLL [Truta] +- INDEX update: add qnx entry, remove aix entry [Truta] +- Install zlib.3 into mandir [Wilson] +- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta] +- Adapt the zlib interface to the new DLL convention guidelines [Truta] +- Introduce ZLIB_WINAPI macro to allow the export of functions using + the WINAPI calling convention, for Visual Basic [Vollant, Truta] +- Update msdos and win32 scripts and makefiles [Truta] +- Export symbols by name, not by ordinal, in win32/zlib.def [Truta] +- Add contrib/ada [Anisimkov] +- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta] +- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant] +- Add contrib/masm686 [Truta] +- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm + [Truta, Vollant] +- Update contrib/delphi; rename to contrib/pascal; add example [Truta] +- Remove contrib/delphi2; add a new contrib/delphi [Truta] +- Avoid inclusion of the nonstandard in contrib/iostream, + and fix some method prototypes [Truta] +- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip + [Truta] +- Avoid the use of backslash (\) in contrib/minizip [Vollant] +- Fix file time handling in contrib/untgz; update makefiles [Truta] +- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines + [Vollant] +- Remove contrib/vstudio/vc15_16 [Vollant] +- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta] +- Update README.contrib [Truta] +- Invert the assignment order of match_head and s->prev[...] in + INSERT_STRING [Truta] +- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings + [Truta] +- Compare function pointers with 0, not with NULL or Z_NULL [Truta] +- Fix prototype of syncsearch in inflate.c [Truta] +- Introduce ASMINF macro to be enabled when using an ASM implementation + of inflate_fast [Truta] +- Change NO_DEFLATE to NO_GZCOMPRESS [Truta] +- Modify test_gzio in example.c to take a single file name as a + parameter [Truta] +- Exit the example.c program if gzopen fails [Truta] +- Add type casts around strlen in example.c [Truta] +- Remove casting to sizeof in minigzip.c; give a proper type + to the variable compared with SUFFIX_LEN [Truta] +- Update definitions of STDC and STDC99 in zconf.h [Truta] +- Synchronize zconf.h with the new Windows DLL interface [Truta] +- Use SYS16BIT instead of __32BIT__ to distinguish between + 16- and 32-bit platforms [Truta] +- Use far memory allocators in small 16-bit memory models for + Turbo C [Truta] +- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in + zlibCompileFlags [Truta] +- Cygwin has vsnprintf [Wilson] +- In Windows16, OS_CODE is 0, as in MSDOS [Truta] +- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson] + +Changes in 1.2.0.4 (10 August 2003) +- Minor FAQ updates +- Be more strict when checking inflateInit2's windowBits parameter +- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well +- Add gzip wrapper option to deflateInit2 using windowBits +- Add updated QNX rule in configure and qnx directory [Bonnefoy] +- Make inflate distance-too-far checks more rigorous +- Clean up FAR usage in inflate +- Add casting to sizeof() in gzio.c and minigzip.c + +Changes in 1.2.0.3 (19 July 2003) +- Fix silly error in gzungetc() implementation [Vollant] +- Update contrib/minizip and contrib/vstudio [Vollant] +- Fix printf format in example.c +- Correct cdecl support in zconf.in.h [Anisimkov] +- Minor FAQ updates + +Changes in 1.2.0.2 (13 July 2003) +- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons +- Attempt to avoid warnings in crc32.c for pointer-int conversion +- Add AIX to configure, remove aix directory [Bakker] +- Add some casts to minigzip.c +- Improve checking after insecure sprintf() or vsprintf() calls +- Remove #elif's from crc32.c +- Change leave label to inf_leave in inflate.c and infback.c to avoid + library conflicts +- Remove inflate gzip decoding by default--only enable gzip decoding by + special request for stricter backward compatibility +- Add zlibCompileFlags() function to return compilation information +- More typecasting in deflate.c to avoid warnings +- Remove leading underscore from _Capital #defines [Truta] +- Fix configure to link shared library when testing +- Add some Windows CE target adjustments [Mai] +- Remove #define ZLIB_DLL in zconf.h [Vollant] +- Add zlib.3 [Rodgers] +- Update RFC URL in deflate.c and algorithm.txt [Mai] +- Add zlib_dll_FAQ.txt to contrib [Truta] +- Add UL to some constants [Truta] +- Update minizip and vstudio [Vollant] +- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h +- Expand use of NO_DUMMY_DECL to avoid all dummy structures +- Added iostream3 to contrib [Schwardt] +- Replace rewind() with fseek() for WinCE [Truta] +- Improve setting of zlib format compression level flags + - Report 0 for huffman and rle strategies and for level == 0 or 1 + - Report 2 only for level == 6 +- Only deal with 64K limit when necessary at compile time [Truta] +- Allow TOO_FAR check to be turned off at compile time [Truta] +- Add gzclearerr() function [Souza] +- Add gzungetc() function + +Changes in 1.2.0.1 (17 March 2003) +- Add Z_RLE strategy for run-length encoding [Truta] + - When Z_RLE requested, restrict matches to distance one + - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE +- Correct FASTEST compilation to allow level == 0 +- Clean up what gets compiled for FASTEST +- Incorporate changes to zconf.in.h [Vollant] + - Refine detection of Turbo C need for dummy returns + - Refine ZLIB_DLL compilation + - Include additional header file on VMS for off_t typedef +- Try to use _vsnprintf where it supplants vsprintf [Vollant] +- Add some casts in inffast.c +- Enchance comments in zlib.h on what happens if gzprintf() tries to + write more than 4095 bytes before compression +- Remove unused state from inflateBackEnd() +- Remove exit(0) from minigzip.c, example.c +- Get rid of all those darn tabs +- Add "check" target to Makefile.in that does the same thing as "test" +- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in +- Update contrib/inflate86 [Anderson] +- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant] +- Add msdos and win32 directories with makefiles [Truta] +- More additions and improvements to the FAQ + +Changes in 1.2.0 (9 March 2003) +- New and improved inflate code + - About 20% faster + - Does not allocate 32K window unless and until needed + - Automatically detects and decompresses gzip streams + - Raw inflate no longer needs an extra dummy byte at end + - Added inflateBack functions using a callback interface--even faster + than inflate, useful for file utilities (gzip, zip) + - Added inflateCopy() function to record state for random access on + externally generated deflate streams (e.g. in gzip files) + - More readable code (I hope) +- New and improved crc32() + - About 50% faster, thanks to suggestions from Rodney Brown +- Add deflateBound() and compressBound() functions +- Fix memory leak in deflateInit2() +- Permit setting dictionary for raw deflate (for parallel deflate) +- Fix const declaration for gzwrite() +- Check for some malloc() failures in gzio.c +- Fix bug in gzopen() on single-byte file 0x1f +- Fix bug in gzread() on concatenated file with 0x1f at end of buffer + and next buffer doesn't start with 0x8b +- Fix uncompress() to return Z_DATA_ERROR on truncated input +- Free memory at end of example.c +- Remove MAX #define in trees.c (conflicted with some libraries) +- Fix static const's in deflate.c, gzio.c, and zutil.[ch] +- Declare malloc() and free() in gzio.c if STDC not defined +- Use malloc() instead of calloc() in zutil.c if int big enough +- Define STDC for AIX +- Add aix/ with approach for compiling shared library on AIX +- Add HP-UX support for shared libraries in configure +- Add OpenUNIX support for shared libraries in configure +- Use $cc instead of gcc to build shared library +- Make prefix directory if needed when installing +- Correct Macintosh avoidance of typedef Byte in zconf.h +- Correct Turbo C memory allocation when under Linux +- Use libz.a instead of -lz in Makefile (assure use of compiled library) +- Update configure to check for snprintf or vsnprintf functions and their + return value, warn during make if using an insecure function +- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that + is lost when library is used--resolution is to build new zconf.h +- Documentation improvements (in zlib.h): + - Document raw deflate and inflate + - Update RFCs URL + - Point out that zlib and gzip formats are different + - Note that Z_BUF_ERROR is not fatal + - Document string limit for gzprintf() and possible buffer overflow + - Note requirement on avail_out when flushing + - Note permitted values of flush parameter of inflate() +- Add some FAQs (and even answers) to the FAQ +- Add contrib/inflate86/ for x86 faster inflate +- Add contrib/blast/ for PKWare Data Compression Library decompression +- Add contrib/puff/ simple inflate for deflate format description + +Changes in 1.1.4 (11 March 2002) +- ZFREE was repeated on same allocation on some error conditions. + This creates a security problem described in + http://www.zlib.org/advisory-2002-03-11.txt +- Returned incorrect error (Z_MEM_ERROR) on some invalid data +- Avoid accesses before window for invalid distances with inflate window + less than 32K. +- force windowBits > 8 to avoid a bug in the encoder for a window size + of 256 bytes. (A complete fix will be available in 1.1.5). + +Changes in 1.1.3 (9 July 1998) +- fix "an inflate input buffer bug that shows up on rare but persistent + occasions" (Mark) +- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) +- fix gzseek(..., SEEK_SET) in write mode +- fix crc check after a gzeek (Frank Faubert) +- fix miniunzip when the last entry in a zip file is itself a zip file + (J Lillge) +- add contrib/asm586 and contrib/asm686 (Brian Raiter) + See http://www.muppetlabs.com/~breadbox/software/assembly.html +- add support for Delphi 3 in contrib/delphi (Bob Dellaca) +- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) +- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) +- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) +- added a FAQ file + +- Support gzdopen on Mac with Metrowerks (Jason Linhart) +- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) +- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) +- avoid some warnings with Borland C (Tom Tanner) +- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant) +- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant) +- allow several arguments to configure (Tim Mooney, Frodo Looijaard) +- use libdir and includedir in Makefile.in (Tim Mooney) +- support shared libraries on OSF1 V4 (Tim Mooney) +- remove so_locations in "make clean" (Tim Mooney) +- fix maketree.c compilation error (Glenn, Mark) +- Python interface to zlib now in Python 1.5 (Jeremy Hylton) +- new Makefile.riscos (Rich Walker) +- initialize static descriptors in trees.c for embedded targets (Nick Smith) +- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith) +- add the OS/2 files in Makefile.in too (Andrew Zabolotny) +- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane) +- fix maketree.c to allow clean compilation of inffixed.h (Mark) +- fix parameter check in deflateCopy (Gunther Nikl) +- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler) +- Many portability patches by Christian Spieler: + . zutil.c, zutil.h: added "const" for zmem* + . Make_vms.com: fixed some typos + . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists + . msdos/Makefile.msc: remove "default rtl link library" info from obj files + . msdos/Makefile.*: use model-dependent name for the built zlib library + . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc: + new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT) +- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane) +- replace __far with _far for better portability (Christian Spieler, Tom Lane) +- fix test for errno.h in configure (Tim Newsham) + +Changes in 1.1.2 (19 March 98) +- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) + See http://www.winimage.com/zLibDll/unzip.html +- preinitialize the inflate tables for fixed codes, to make the code + completely thread safe (Mark) +- some simplifications and slight speed-up to the inflate code (Mark) +- fix gzeof on non-compressed files (Allan Schrum) +- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) +- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) +- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) +- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) +- do not wrap extern "C" around system includes (Tom Lane) +- mention zlib binding for TCL in README (Andreas Kupries) +- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) +- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) +- allow "configure --prefix $HOME" (Tim Mooney) +- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) +- move Makefile.sas to amiga/Makefile.sas + +Changes in 1.1.1 (27 Feb 98) +- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) +- remove block truncation heuristic which had very marginal effect for zlib + (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the + compression ratio on some files. This also allows inlining _tr_tally for + matches in deflate_slow. +- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) + +Changes in 1.1.0 (24 Feb 98) +- do not return STREAM_END prematurely in inflate (John Bowler) +- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) +- compile with -DFASTEST to get compression code optimized for speed only +- in minigzip, try mmap'ing the input file first (Miguel Albrecht) +- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain + on Sun but significant on HP) + +- add a pointer to experimental unzip library in README (Gilles Vollant) +- initialize variable gcc in configure (Chris Herborth) + +Changes in 1.0.9 (17 Feb 1998) +- added gzputs and gzgets functions +- do not clear eof flag in gzseek (Mark Diekhans) +- fix gzseek for files in transparent mode (Mark Diekhans) +- do not assume that vsprintf returns the number of bytes written (Jens Krinke) +- replace EXPORT with ZEXPORT to avoid conflict with other programs +- added compress2 in zconf.h, zlib.def, zlib.dnt +- new asm code from Gilles Vollant in contrib/asm386 +- simplify the inflate code (Mark): + . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() + . ZALLOC the length list in inflate_trees_fixed() instead of using stack + . ZALLOC the value area for huft_build() instead of using stack + . Simplify Z_FINISH check in inflate() + +- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 +- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) +- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with + the declaration of FAR (Gilles VOllant) +- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) +- read_buf buf parameter of type Bytef* instead of charf* +- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) +- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) +- fix check for presence of directories in "make install" (Ian Willis) + +Changes in 1.0.8 (27 Jan 1998) +- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) +- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) +- added compress2() to allow setting the compression level +- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) +- use constant arrays for the static trees in trees.c instead of computing + them at run time (thanks to Ken Raeburn for this suggestion). To create + trees.h, compile with GEN_TREES_H and run "make test". +- check return code of example in "make test" and display result +- pass minigzip command line options to file_compress +- simplifying code of inflateSync to avoid gcc 2.8 bug + +- support CC="gcc -Wall" in configure -s (QingLong) +- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) +- fix test for shared library support to avoid compiler warnings +- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) +- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) +- do not use fdopen for Metrowerks on Mac (Brad Pettit)) +- add checks for gzputc and gzputc in example.c +- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) +- use const for the CRC table (Ken Raeburn) +- fixed "make uninstall" for shared libraries +- use Tracev instead of Trace in infblock.c +- in example.c use correct compressed length for test_sync +- suppress +vnocompatwarnings in configure for HPUX (not always supported) + +Changes in 1.0.7 (20 Jan 1998) +- fix gzseek which was broken in write mode +- return error for gzseek to negative absolute position +- fix configure for Linux (Chun-Chung Chen) +- increase stack space for MSC (Tim Wegner) +- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) +- define EXPORTVA for gzprintf (Gilles Vollant) +- added man page zlib.3 (Rick Rodgers) +- for contrib/untgz, fix makedir() and improve Makefile + +- check gzseek in write mode in example.c +- allocate extra buffer for seeks only if gzseek is actually called +- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) +- add inflateSyncPoint in zconf.h +- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def + +Changes in 1.0.6 (19 Jan 1998) +- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and + gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) +- Fix a deflate bug occurring only with compression level 0 (thanks to + Andy Buckler for finding this one). +- In minigzip, pass transparently also the first byte for .Z files. +- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() +- check Z_FINISH in inflate (thanks to Marc Schluper) +- Implement deflateCopy (thanks to Adam Costello) +- make static libraries by default in configure, add --shared option. +- move MSDOS or Windows specific files to directory msdos +- suppress the notion of partial flush to simplify the interface + (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) +- suppress history buffer provided by application to simplify the interface + (this feature was not implemented anyway in 1.0.4) +- next_in and avail_in must be initialized before calling inflateInit or + inflateInit2 +- add EXPORT in all exported functions (for Windows DLL) +- added Makefile.nt (thanks to Stephen Williams) +- added the unsupported "contrib" directory: + contrib/asm386/ by Gilles Vollant + 386 asm code replacing longest_match(). + contrib/iostream/ by Kevin Ruland + A C++ I/O streams interface to the zlib gz* functions + contrib/iostream2/ by Tyge Løvset + Another C++ I/O streams interface + contrib/untgz/ by "Pedro A. Aranda Guti\irrez" + A very simple tar.gz file extractor using zlib + contrib/visual-basic.txt by Carlos Rios + How to use compress(), uncompress() and the gz* functions from VB. +- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression + level) in minigzip (thanks to Tom Lane) + +- use const for rommable constants in deflate +- added test for gzseek and gztell in example.c +- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) +- add undocumented function zError to convert error code to string + (for Tim Smithers) +- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code. +- Use default memcpy for Symantec MSDOS compiler. +- Add EXPORT keyword for check_func (needed for Windows DLL) +- add current directory to LD_LIBRARY_PATH for "make test" +- create also a link for libz.so.1 +- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) +- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) +- added -soname for Linux in configure (Chun-Chung Chen, +- assign numbers to the exported functions in zlib.def (for Windows DLL) +- add advice in zlib.h for best usage of deflateSetDictionary +- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) +- allow compilation with ANSI keywords only enabled for TurboC in large model +- avoid "versionString"[0] (Borland bug) +- add NEED_DUMMY_RETURN for Borland +- use variable z_verbose for tracing in debug mode (L. Peter Deutsch). +- allow compilation with CC +- defined STDC for OS/2 (David Charlap) +- limit external names to 8 chars for MVS (Thomas Lund) +- in minigzip.c, use static buffers only for 16-bit systems +- fix suffix check for "minigzip -d foo.gz" +- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) +- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) +- added makelcc.bat for lcc-win32 (Tom St Denis) +- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) +- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- check for unistd.h in configure (for off_t) +- remove useless check parameter in inflate_blocks_free +- avoid useless assignment of s->check to itself in inflate_blocks_new +- do not flush twice in gzclose (thanks to Ken Raeburn) +- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h +- use NO_ERRNO_H instead of enumeration of operating systems with errno.h +- work around buggy fclose on pipes for HP/UX +- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) +- fix configure if CC is already equal to gcc + +Changes in 1.0.5 (3 Jan 98) +- Fix inflate to terminate gracefully when fed corrupted or invalid data +- Use const for rommable constants in inflate +- Eliminate memory leaks on error conditions in inflate +- Removed some vestigial code in inflate +- Update web address in README + +Changes in 1.0.4 (24 Jul 96) +- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF + bit, so the decompressor could decompress all the correct data but went + on to attempt decompressing extra garbage data. This affected minigzip too. +- zlibVersion and gzerror return const char* (needed for DLL) +- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) +- use z_error only for DEBUG (avoid problem with DLLs) + +Changes in 1.0.3 (2 Jul 96) +- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS + small and medium models; this makes the library incompatible with previous + versions for these models. (No effect in large model or on other systems.) +- return OK instead of BUF_ERROR if previous deflate call returned with + avail_out as zero but there is nothing to do +- added memcmp for non STDC compilers +- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) +- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) +- better check for 16-bit mode MSC (avoids problem with Symantec) + +Changes in 1.0.2 (23 May 96) +- added Windows DLL support +- added a function zlibVersion (for the DLL support) +- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) +- Bytef is define's instead of typedef'd only for Borland C +- avoid reading uninitialized memory in example.c +- mention in README that the zlib format is now RFC1950 +- updated Makefile.dj2 +- added algorithm.doc + +Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] +- fix array overlay in deflate.c which sometimes caused bad compressed data +- fix inflate bug with empty stored block +- fix MSDOS medium model which was broken in 0.99 +- fix deflateParams() which could generated bad compressed data. +- Bytef is define'd instead of typedef'ed (work around Borland bug) +- added an INDEX file +- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), + Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) +- speed up adler32 for modern machines without auto-increment +- added -ansi for IRIX in configure +- static_init_done in trees.c is an int +- define unlink as delete for VMS +- fix configure for QNX +- add configure branch for SCO and HPUX +- avoid many warnings (unused variables, dead assignments, etc...) +- no fdopen for BeOS +- fix the Watcom fix for 32 bit mode (define FAR as empty) +- removed redefinition of Byte for MKWERKS +- work around an MWKERKS bug (incorrect merge of all .h files) + +Changes in 0.99 (27 Jan 96) +- allow preset dictionary shared between compressor and decompressor +- allow compression level 0 (no compression) +- add deflateParams in zlib.h: allow dynamic change of compression level + and compression strategy. +- test large buffers and deflateParams in example.c +- add optional "configure" to build zlib as a shared library +- suppress Makefile.qnx, use configure instead +- fixed deflate for 64-bit systems (detected on Cray) +- fixed inflate_blocks for 64-bit systems (detected on Alpha) +- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) +- always return Z_BUF_ERROR when deflate() has nothing to do +- deflateInit and inflateInit are now macros to allow version checking +- prefix all global functions and types with z_ with -DZ_PREFIX +- make falloc completely reentrant (inftrees.c) +- fixed very unlikely race condition in ct_static_init +- free in reverse order of allocation to help memory manager +- use zlib-1.0/* instead of zlib/* inside the tar.gz +- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith + -Wconversion -Wstrict-prototypes -Wmissing-prototypes" +- allow gzread on concatenated .gz files +- deflateEnd now returns Z_DATA_ERROR if it was premature +- deflate is finally (?) fully deterministic (no matches beyond end of input) +- Document Z_SYNC_FLUSH +- add uninstall in Makefile +- Check for __cpluplus in zlib.h +- Better test in ct_align for partial flush +- avoid harmless warnings for Borland C++ +- initialize hash_head in deflate.c +- avoid warning on fdopen (gzio.c) for HP cc -Aa +- include stdlib.h for STDC compilers +- include errno.h for Cray +- ignore error if ranlib doesn't exist +- call ranlib twice for NeXTSTEP +- use exec_prefix instead of prefix for libz.a +- renamed ct_* as _tr_* to avoid conflict with applications +- clear z->msg in inflateInit2 before any error return +- initialize opaque in example.c, gzio.c, deflate.c and inflate.c +- fixed typo in zconf.h (_GNUC__ => __GNUC__) +- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) +- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) +- in fcalloc, normalize pointer if size > 65520 bytes +- don't use special fcalloc for 32 bit Borland C++ +- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... +- use Z_BINARY instead of BINARY +- document that gzclose after gzdopen will close the file +- allow "a" as mode in gzopen. +- fix error checking in gzread +- allow skipping .gz extra-field on pipes +- added reference to Perl interface in README +- put the crc table in FAR data (I dislike more and more the medium model :) +- added get_crc_table +- added a dimension to all arrays (Borland C can't count). +- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast +- guard against multiple inclusion of *.h (for precompiled header on Mac) +- Watcom C pretends to be Microsoft C small model even in 32 bit mode. +- don't use unsized arrays to avoid silly warnings by Visual C++: + warning C4746: 'inflate_mask' : unsized array treated as '__far' + (what's wrong with far data in far model?). +- define enum out of inflate_blocks_state to allow compilation with C++ + +Changes in 0.95 (16 Aug 95) +- fix MSDOS small and medium model (now easier to adapt to any compiler) +- inlined send_bits +- fix the final (:-) bug for deflate with flush (output was correct but + not completely flushed in rare occasions). +- default window size is same for compression and decompression + (it's now sufficient to set MAX_WBITS in zconf.h). +- voidp -> voidpf and voidnp -> voidp (for consistency with other + typedefs and because voidnp was not near in large model). + +Changes in 0.94 (13 Aug 95) +- support MSDOS medium model +- fix deflate with flush (could sometimes generate bad output) +- fix deflateReset (zlib header was incorrectly suppressed) +- added support for VMS +- allow a compression level in gzopen() +- gzflush now calls fflush +- For deflate with flush, flush even if no more input is provided. +- rename libgz.a as libz.a +- avoid complex expression in infcodes.c triggering Turbo C bug +- work around a problem with gcc on Alpha (in INSERT_STRING) +- don't use inline functions (problem with some gcc versions) +- allow renaming of Byte, uInt, etc... with #define. +- avoid warning about (unused) pointer before start of array in deflate.c +- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c +- avoid reserved word 'new' in trees.c + +Changes in 0.93 (25 June 95) +- temporarily disable inline functions +- make deflate deterministic +- give enough lookahead for PARTIAL_FLUSH +- Set binary mode for stdin/stdout in minigzip.c for OS/2 +- don't even use signed char in inflate (not portable enough) +- fix inflate memory leak for segmented architectures + +Changes in 0.92 (3 May 95) +- don't assume that char is signed (problem on SGI) +- Clear bit buffer when starting a stored block +- no memcpy on Pyramid +- suppressed inftest.c +- optimized fill_window, put longest_match inline for gcc +- optimized inflate on stored blocks. +- untabify all sources to simplify patches + +Changes in 0.91 (2 May 95) +- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h +- Document the memory requirements in zconf.h +- added "make install" +- fix sync search logic in inflateSync +- deflate(Z_FULL_FLUSH) now works even if output buffer too short +- after inflateSync, don't scare people with just "lo world" +- added support for DJGPP + +Changes in 0.9 (1 May 95) +- don't assume that zalloc clears the allocated memory (the TurboC bug + was Mark's bug after all :) +- let again gzread copy uncompressed data unchanged (was working in 0.71) +- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented +- added a test of inflateSync in example.c +- moved MAX_WBITS to zconf.h because users might want to change that. +- document explicitly that zalloc(64K) on MSDOS must return a normalized + pointer (zero offset) +- added Makefiles for Microsoft C, Turbo C, Borland C++ +- faster crc32() + +Changes in 0.8 (29 April 95) +- added fast inflate (inffast.c) +- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this + is incompatible with previous versions of zlib which returned Z_OK. +- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) + (actually that was not a compiler bug, see 0.81 above) +- gzread no longer reads one extra byte in certain cases +- In gzio destroy(), don't reference a freed structure +- avoid many warnings for MSDOS +- avoid the ERROR symbol which is used by MS Windows + +Changes in 0.71 (14 April 95) +- Fixed more MSDOS compilation problems :( There is still a bug with + TurboC large model. + +Changes in 0.7 (14 April 95) +- Added full inflate support. +- Simplified the crc32() interface. The pre- and post-conditioning + (one's complement) is now done inside crc32(). WARNING: this is + incompatible with previous versions; see zlib.h for the new usage. + +Changes in 0.61 (12 April 95) +- workaround for a bug in TurboC. example and minigzip now work on MSDOS. + +Changes in 0.6 (11 April 95) +- added minigzip.c +- added gzdopen to reopen a file descriptor as gzFile +- added transparent reading of non-gziped files in gzread. +- fixed bug in gzread (don't read crc as data) +- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose). +- don't allocate big arrays in the stack (for MSDOS) +- fix some MSDOS compilation problems + +Changes in 0.5: +- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but + not yet Z_FULL_FLUSH. +- support decompression but only in a single step (forced Z_FINISH) +- added opaque object for zalloc and zfree. +- added deflateReset and inflateReset +- added a variable zlib_version for consistency checking. +- renamed the 'filter' parameter of deflateInit2 as 'strategy'. + Added Z_FILTERED and Z_HUFFMAN_ONLY constants. + +Changes in 0.4: +- avoid "zip" everywhere, use zlib instead of ziplib. +- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush + if compression method == 8. +- added adler32 and crc32 +- renamed deflateOptions as deflateInit2, call one or the other but not both +- added the method parameter for deflateInit2. +- added inflateInit2 +- simplied considerably deflateInit and inflateInit by not supporting + user-provided history buffer. This is supported only in deflateInit2 + and inflateInit2. + +Changes in 0.3: +- prefix all macro names with Z_ +- use Z_FINISH instead of deflateEnd to finish compression. +- added Z_HUFFMAN_ONLY +- added gzerror() diff --git a/source/Irrlicht/zlib/FAQ b/source/Irrlicht/zlib/FAQ index 15d04361..1a22750a 100644 --- a/source/Irrlicht/zlib/FAQ +++ b/source/Irrlicht/zlib/FAQ @@ -1,339 +1,366 @@ - - Frequently Asked Questions about zlib - - -If your question is not there, please check the zlib home page -http://www.zlib.org which may have more recent information. -The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html - - - 1. Is zlib Y2K-compliant? - - Yes. zlib doesn't handle dates. - - 2. Where can I get a Windows DLL version? - - The zlib sources can be compiled without change to produce a DLL. - See the file win32/DLL_FAQ.txt in the zlib distribution. - Pointers to the precompiled DLL are found in the zlib web site at - http://www.zlib.org. - - 3. Where can I get a Visual Basic interface to zlib? - - See - * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm - * contrib/visual-basic.txt in the zlib distribution - * win32/DLL_FAQ.txt in the zlib distribution - - 4. compress() returns Z_BUF_ERROR. - - Make sure that before the call of compress, the length of the compressed - buffer is equal to the total size of the compressed buffer and not - zero. For Visual Basic, check that this parameter is passed by reference - ("as any"), not by value ("as long"). - - 5. deflate() or inflate() returns Z_BUF_ERROR. - - Before making the call, make sure that avail_in and avail_out are not - zero. When setting the parameter flush equal to Z_FINISH, also make sure - that avail_out is big enough to allow processing all pending input. - Note that a Z_BUF_ERROR is not fatal--another call to deflate() or - inflate() can be made with more input or output space. A Z_BUF_ERROR - may in fact be unavoidable depending on how the functions are used, since - it is not possible to tell whether or not there is more output pending - when strm.avail_out returns with zero. - - 6. Where's the zlib documentation (man pages, etc.)? - - It's in zlib.h for the moment, and Francis S. Lin has converted it to a - web page zlib.html. Volunteers to transform this to Unix-style man pages, - please contact us (zlib@gzip.org). Examples of zlib usage are in the files - example.c and minigzip.c. - - 7. Why don't you use GNU autoconf or libtool or ...? - - Because we would like to keep zlib as a very small and simple - package. zlib is rather portable and doesn't need much configuration. - - 8. I found a bug in zlib. - - Most of the time, such problems are due to an incorrect usage of - zlib. Please try to reproduce the problem with a small program and send - the corresponding source to us at zlib@gzip.org . Do not send - multi-megabyte data files without prior agreement. - - 9. Why do I get "undefined reference to gzputc"? - - If "make test" produces something like - - example.o(.text+0x154): undefined reference to `gzputc' - - check that you don't have old files libz.* in /usr/lib, /usr/local/lib or - /usr/X11R6/lib. Remove any old versions, then do "make install". - -10. I need a Delphi interface to zlib. - - See the contrib/delphi directory in the zlib distribution. - -11. Can zlib handle .zip archives? - - Not by itself, no. See the directory contrib/minizip in the zlib - distribution. - -12. Can zlib handle .Z files? - - No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt - the code of uncompress on your own. - -13. How can I make a Unix shared library? - - make clean - ./configure -s - make - -14. How do I install a shared zlib library on Unix? - - After the above, then: - - make install - - However, many flavors of Unix come with a shared zlib already installed. - Before going to the trouble of compiling a shared version of zlib and - trying to install it, you may want to check if it's already there! If you - can #include , it's there. The -lz option will probably link to it. - -15. I have a question about OttoPDF. - - We are not the authors of OttoPDF. The real author is on the OttoPDF web - site: Joel Hainley, jhainley@myndkryme.com. - -16. Can zlib decode Flate data in an Adobe PDF file? - - Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ . - To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ . - -17. Why am I getting this "register_frame_info not found" error on Solaris? - - After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib - generates an error such as: - - ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: - symbol __register_frame_info: referenced symbol not found - - The symbol __register_frame_info is not part of zlib, it is generated by - the C compiler (cc or gcc). You must recompile applications using zlib - which have this problem. This problem is specific to Solaris. See - http://www.sunfreeware.com for Solaris versions of zlib and applications - using zlib. - -18. Why does gzip give an error on a file I make with compress/deflate? - - The compress and deflate functions produce data in the zlib format, which - is different and incompatible with the gzip format. The gz* functions in - zlib on the other hand use the gzip format. Both the zlib and gzip - formats use the same compressed data format internally, but have different - headers and trailers around the compressed data. - -19. Ok, so why are there two different formats? - - The gzip format was designed to retain the directory information about - a single file, such as the name and last modification date. The zlib - format on the other hand was designed for in-memory and communication - channel applications, and has a much more compact header and trailer and - uses a faster integrity check than gzip. - -20. Well that's nice, but how do I make a gzip file in memory? - - You can request that deflate write the gzip format instead of the zlib - format using deflateInit2(). You can also request that inflate decode - the gzip format using inflateInit2(). Read zlib.h for more details. - -21. Is zlib thread-safe? - - Yes. However any library routines that zlib uses and any application- - provided memory allocation routines must also be thread-safe. zlib's gz* - functions use stdio library routines, and most of zlib's functions use the - library memory allocation routines by default. zlib's Init functions allow - for the application to provide custom memory allocation routines. - - Of course, you should only operate on any given zlib or gzip stream from a - single thread at a time. - -22. Can I use zlib in my commercial application? - - Yes. Please read the license in zlib.h. - -23. Is zlib under the GNU license? - - No. Please read the license in zlib.h. - -24. The license says that altered source versions must be "plainly marked". So - what exactly do I need to do to meet that requirement? - - You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In - particular, the final version number needs to be changed to "f", and an - identification string should be appended to ZLIB_VERSION. Version numbers - x.x.x.f are reserved for modifications to zlib by others than the zlib - maintainers. For example, if the version of the base zlib you are altering - is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and - ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also - update the version strings in deflate.c and inftrees.c. - - For altered source distributions, you should also note the origin and - nature of the changes in zlib.h, as well as in ChangeLog and README, along - with the dates of the alterations. The origin should include at least your - name (or your company's name), and an email address to contact for help or - issues with the library. - - Note that distributing a compiled zlib library along with zlib.h and - zconf.h is also a source distribution, and so you should change - ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes - in zlib.h as you would for a full source distribution. - -25. Will zlib work on a big-endian or little-endian architecture, and can I - exchange compressed data between them? - - Yes and yes. - -26. Will zlib work on a 64-bit machine? - - It should. It has been tested on 64-bit machines, and has no dependence - on any data types being limited to 32-bits in length. If you have any - difficulties, please provide a complete problem report to zlib@gzip.org - -27. Will zlib decompress data from the PKWare Data Compression Library? - - No. The PKWare DCL uses a completely different compressed data format - than does PKZIP and zlib. However, you can look in zlib's contrib/blast - directory for a possible solution to your problem. - -28. Can I access data randomly in a compressed stream? - - No, not without some preparation. If when compressing you periodically - use Z_FULL_FLUSH, carefully write all the pending data at those points, - and keep an index of those locations, then you can start decompression - at those points. You have to be careful to not use Z_FULL_FLUSH too - often, since it can significantly degrade compression. - -29. Does zlib work on MVS, OS/390, CICS, etc.? - - We don't know for sure. We have heard occasional reports of success on - these systems. If you do use it on one of these, please provide us with - a report, instructions, and patches that we can reference when we get - these questions. Thanks. - -30. Is there some simpler, easier to read version of inflate I can look at - to understand the deflate format? - - First off, you should read RFC 1951. Second, yes. Look in zlib's - contrib/puff directory. - -31. Does zlib infringe on any patents? - - As far as we know, no. In fact, that was originally the whole point behind - zlib. Look here for some more information: - - http://www.gzip.org/#faq11 - -32. Can zlib work with greater than 4 GB of data? - - Yes. inflate() and deflate() will process any amount of data correctly. - Each call of inflate() or deflate() is limited to input and output chunks - of the maximum value that can be stored in the compiler's "unsigned int" - type, but there is no limit to the number of chunks. Note however that the - strm.total_in and strm_total_out counters may be limited to 4 GB. These - counters are provided as a convenience and are not used internally by - inflate() or deflate(). The application can easily set up its own counters - updated after each call of inflate() or deflate() to count beyond 4 GB. - compress() and uncompress() may be limited to 4 GB, since they operate in a - single call. gzseek() and gztell() may be limited to 4 GB depending on how - zlib is compiled. See the zlibCompileFlags() function in zlib.h. - - The word "may" appears several times above since there is a 4 GB limit - only if the compiler's "long" type is 32 bits. If the compiler's "long" - type is 64 bits, then the limit is 16 exabytes. - -33. Does zlib have any security vulnerabilities? - - The only one that we are aware of is potentially in gzprintf(). If zlib - is compiled to use sprintf() or vsprintf(), then there is no protection - against a buffer overflow of a 4K string space, other than the caller of - gzprintf() assuring that the output will not exceed 4K. On the other - hand, if zlib is compiled to use snprintf() or vsnprintf(), which should - normally be the case, then there is no vulnerability. The ./configure - script will display warnings if an insecure variation of sprintf() will - be used by gzprintf(). Also the zlibCompileFlags() function will return - information on what variant of sprintf() is used by gzprintf(). - - If you don't have snprintf() or vsnprintf() and would like one, you can - find a portable implementation here: - - http://www.ijs.si/software/snprintf/ - - Note that you should be using the most recent version of zlib. Versions - 1.1.3 and before were subject to a double-free vulnerability. - -34. Is there a Java version of zlib? - - Probably what you want is to use zlib in Java. zlib is already included - as part of the Java SDK in the java.util.zip package. If you really want - a version of zlib written in the Java language, look on the zlib home - page for links: http://www.zlib.org/ - -35. I get this or that compiler or source-code scanner warning when I crank it - up to maximally-pedantic. Can't you guys write proper code? - - Many years ago, we gave up attempting to avoid warnings on every compiler - in the universe. It just got to be a waste of time, and some compilers - were downright silly. So now, we simply make sure that the code always - works. - -36. Valgrind (or some similar memory access checker) says that deflate is - performing a conditional jump that depends on an uninitialized value. - Isn't that a bug? - - No. That is intentional for performance reasons, and the output of - deflate is not affected. This only started showing up recently since - zlib 1.2.x uses malloc() by default for allocations, whereas earlier - versions used calloc(), which zeros out the allocated memory. - -37. Will zlib read the (insert any ancient or arcane format here) compressed - data format? - - Probably not. Look in the comp.compression FAQ for pointers to various - formats and associated software. - -38. How can I encrypt/decrypt zip files with zlib? - - zlib doesn't support encryption. The original PKZIP encryption is very weak - and can be broken with freely available programs. To get strong encryption, - use GnuPG, http://www.gnupg.org/ , which already includes zlib compression. - For PKZIP compatible "encryption", look at http://www.info-zip.org/ - -39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? - - "gzip" is the gzip format, and "deflate" is the zlib format. They should - probably have called the second one "zlib" instead to avoid confusion - with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 - correctly points to the zlib specification in RFC 1950 for the "deflate" - transfer encoding, there have been reports of servers and browsers that - incorrectly produce or expect raw deflate data per the deflate - specficiation in RFC 1951, most notably Microsoft. So even though the - "deflate" transfer encoding using the zlib format would be the more - efficient approach (and in fact exactly what the zlib format was designed - for), using the "gzip" transfer encoding is probably more reliable due to - an unfortunate choice of name on the part of the HTTP 1.1 authors. - - Bottom line: use the gzip format for HTTP 1.1 encoding. - -40. Does zlib support the new "Deflate64" format introduced by PKWare? - - No. PKWare has apparently decided to keep that format proprietary, since - they have not documented it as they have previous compression formats. - In any case, the compression improvements are so modest compared to other - more modern approaches, that it's not worth the effort to implement. - -41. Can you please sign these lengthy legal documents and fax them back to us - so that we can use your software in our product? - - No. Go away. Shoo. + + Frequently Asked Questions about zlib + + +If your question is not there, please check the zlib home page +http://zlib.net/ which may have more recent information. +The lastest zlib FAQ is at http://zlib.net/zlib_faq.html + + + 1. Is zlib Y2K-compliant? + + Yes. zlib doesn't handle dates. + + 2. Where can I get a Windows DLL version? + + The zlib sources can be compiled without change to produce a DLL. See the + file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the + precompiled DLL are found in the zlib web site at http://zlib.net/ . + + 3. Where can I get a Visual Basic interface to zlib? + + See + * http://marknelson.us/1997/01/01/zlib-engine/ + * win32/DLL_FAQ.txt in the zlib distribution + + 4. compress() returns Z_BUF_ERROR. + + Make sure that before the call of compress(), the length of the compressed + buffer is equal to the available size of the compressed buffer and not + zero. For Visual Basic, check that this parameter is passed by reference + ("as any"), not by value ("as long"). + + 5. deflate() or inflate() returns Z_BUF_ERROR. + + Before making the call, make sure that avail_in and avail_out are not zero. + When setting the parameter flush equal to Z_FINISH, also make sure that + avail_out is big enough to allow processing all pending input. Note that a + Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be + made with more input or output space. A Z_BUF_ERROR may in fact be + unavoidable depending on how the functions are used, since it is not + possible to tell whether or not there is more output pending when + strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a + heavily annotated example. + + 6. Where's the zlib documentation (man pages, etc.)? + + It's in zlib.h . Examples of zlib usage are in the files example.c and + minigzip.c, with more in examples/ . + + 7. Why don't you use GNU autoconf or libtool or ...? + + Because we would like to keep zlib as a very small and simple package. + zlib is rather portable and doesn't need much configuration. + + 8. I found a bug in zlib. + + Most of the time, such problems are due to an incorrect usage of zlib. + Please try to reproduce the problem with a small program and send the + corresponding source to us at zlib@gzip.org . Do not send multi-megabyte + data files without prior agreement. + + 9. Why do I get "undefined reference to gzputc"? + + If "make test" produces something like + + example.o(.text+0x154): undefined reference to `gzputc' + + check that you don't have old files libz.* in /usr/lib, /usr/local/lib or + /usr/X11R6/lib. Remove any old versions, then do "make install". + +10. I need a Delphi interface to zlib. + + See the contrib/delphi directory in the zlib distribution. + +11. Can zlib handle .zip archives? + + Not by itself, no. See the directory contrib/minizip in the zlib + distribution. + +12. Can zlib handle .Z files? + + No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt + the code of uncompress on your own. + +13. How can I make a Unix shared library? + + make clean + ./configure -s + make + +14. How do I install a shared zlib library on Unix? + + After the above, then: + + make install + + However, many flavors of Unix come with a shared zlib already installed. + Before going to the trouble of compiling a shared version of zlib and + trying to install it, you may want to check if it's already there! If you + can #include , it's there. The -lz option will probably link to + it. You can check the version at the top of zlib.h or with the + ZLIB_VERSION symbol defined in zlib.h . + +15. I have a question about OttoPDF. + + We are not the authors of OttoPDF. The real author is on the OttoPDF web + site: Joel Hainley, jhainley@myndkryme.com. + +16. Can zlib decode Flate data in an Adobe PDF file? + + Yes. See http://www.pdflib.com/ . To modify PDF forms, see + http://sourceforge.net/projects/acroformtool/ . + +17. Why am I getting this "register_frame_info not found" error on Solaris? + + After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib + generates an error such as: + + ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: + symbol __register_frame_info: referenced symbol not found + + The symbol __register_frame_info is not part of zlib, it is generated by + the C compiler (cc or gcc). You must recompile applications using zlib + which have this problem. This problem is specific to Solaris. See + http://www.sunfreeware.com for Solaris versions of zlib and applications + using zlib. + +18. Why does gzip give an error on a file I make with compress/deflate? + + The compress and deflate functions produce data in the zlib format, which + is different and incompatible with the gzip format. The gz* functions in + zlib on the other hand use the gzip format. Both the zlib and gzip formats + use the same compressed data format internally, but have different headers + and trailers around the compressed data. + +19. Ok, so why are there two different formats? + + The gzip format was designed to retain the directory information about a + single file, such as the name and last modification date. The zlib format + on the other hand was designed for in-memory and communication channel + applications, and has a much more compact header and trailer and uses a + faster integrity check than gzip. + +20. Well that's nice, but how do I make a gzip file in memory? + + You can request that deflate write the gzip format instead of the zlib + format using deflateInit2(). You can also request that inflate decode the + gzip format using inflateInit2(). Read zlib.h for more details. + +21. Is zlib thread-safe? + + Yes. However any library routines that zlib uses and any application- + provided memory allocation routines must also be thread-safe. zlib's gz* + functions use stdio library routines, and most of zlib's functions use the + library memory allocation routines by default. zlib's *Init* functions + allow for the application to provide custom memory allocation routines. + + Of course, you should only operate on any given zlib or gzip stream from a + single thread at a time. + +22. Can I use zlib in my commercial application? + + Yes. Please read the license in zlib.h. + +23. Is zlib under the GNU license? + + No. Please read the license in zlib.h. + +24. The license says that altered source versions must be "plainly marked". So + what exactly do I need to do to meet that requirement? + + You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In + particular, the final version number needs to be changed to "f", and an + identification string should be appended to ZLIB_VERSION. Version numbers + x.x.x.f are reserved for modifications to zlib by others than the zlib + maintainers. For example, if the version of the base zlib you are altering + is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and + ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also + update the version strings in deflate.c and inftrees.c. + + For altered source distributions, you should also note the origin and + nature of the changes in zlib.h, as well as in ChangeLog and README, along + with the dates of the alterations. The origin should include at least your + name (or your company's name), and an email address to contact for help or + issues with the library. + + Note that distributing a compiled zlib library along with zlib.h and + zconf.h is also a source distribution, and so you should change + ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes + in zlib.h as you would for a full source distribution. + +25. Will zlib work on a big-endian or little-endian architecture, and can I + exchange compressed data between them? + + Yes and yes. + +26. Will zlib work on a 64-bit machine? + + Yes. It has been tested on 64-bit machines, and has no dependence on any + data types being limited to 32-bits in length. If you have any + difficulties, please provide a complete problem report to zlib@gzip.org + +27. Will zlib decompress data from the PKWare Data Compression Library? + + No. The PKWare DCL uses a completely different compressed data format than + does PKZIP and zlib. However, you can look in zlib's contrib/blast + directory for a possible solution to your problem. + +28. Can I access data randomly in a compressed stream? + + No, not without some preparation. If when compressing you periodically use + Z_FULL_FLUSH, carefully write all the pending data at those points, and + keep an index of those locations, then you can start decompression at those + points. You have to be careful to not use Z_FULL_FLUSH too often, since it + can significantly degrade compression. Alternatively, you can scan a + deflate stream once to generate an index, and then use that index for + random access. See examples/zran.c . + +29. Does zlib work on MVS, OS/390, CICS, etc.? + + It has in the past, but we have not heard of any recent evidence. There + were working ports of zlib 1.1.4 to MVS, but those links no longer work. + If you know of recent, successful applications of zlib on these operating + systems, please let us know. Thanks. + +30. Is there some simpler, easier to read version of inflate I can look at to + understand the deflate format? + + First off, you should read RFC 1951. Second, yes. Look in zlib's + contrib/puff directory. + +31. Does zlib infringe on any patents? + + As far as we know, no. In fact, that was originally the whole point behind + zlib. Look here for some more information: + + http://www.gzip.org/#faq11 + +32. Can zlib work with greater than 4 GB of data? + + Yes. inflate() and deflate() will process any amount of data correctly. + Each call of inflate() or deflate() is limited to input and output chunks + of the maximum value that can be stored in the compiler's "unsigned int" + type, but there is no limit to the number of chunks. Note however that the + strm.total_in and strm_total_out counters may be limited to 4 GB. These + counters are provided as a convenience and are not used internally by + inflate() or deflate(). The application can easily set up its own counters + updated after each call of inflate() or deflate() to count beyond 4 GB. + compress() and uncompress() may be limited to 4 GB, since they operate in a + single call. gzseek() and gztell() may be limited to 4 GB depending on how + zlib is compiled. See the zlibCompileFlags() function in zlib.h. + + The word "may" appears several times above since there is a 4 GB limit only + if the compiler's "long" type is 32 bits. If the compiler's "long" type is + 64 bits, then the limit is 16 exabytes. + +33. Does zlib have any security vulnerabilities? + + The only one that we are aware of is potentially in gzprintf(). If zlib is + compiled to use sprintf() or vsprintf(), then there is no protection + against a buffer overflow of an 8K string space (or other value as set by + gzbuffer()), other than the caller of gzprintf() assuring that the output + will not exceed 8K. On the other hand, if zlib is compiled to use + snprintf() or vsnprintf(), which should normally be the case, then there is + no vulnerability. The ./configure script will display warnings if an + insecure variation of sprintf() will be used by gzprintf(). Also the + zlibCompileFlags() function will return information on what variant of + sprintf() is used by gzprintf(). + + If you don't have snprintf() or vsnprintf() and would like one, you can + find a portable implementation here: + + http://www.ijs.si/software/snprintf/ + + Note that you should be using the most recent version of zlib. Versions + 1.1.3 and before were subject to a double-free vulnerability, and versions + 1.2.1 and 1.2.2 were subject to an access exception when decompressing + invalid compressed data. + +34. Is there a Java version of zlib? + + Probably what you want is to use zlib in Java. zlib is already included + as part of the Java SDK in the java.util.zip package. If you really want + a version of zlib written in the Java language, look on the zlib home + page for links: http://zlib.net/ . + +35. I get this or that compiler or source-code scanner warning when I crank it + up to maximally-pedantic. Can't you guys write proper code? + + Many years ago, we gave up attempting to avoid warnings on every compiler + in the universe. It just got to be a waste of time, and some compilers + were downright silly as well as contradicted each other. So now, we simply + make sure that the code always works. + +36. Valgrind (or some similar memory access checker) says that deflate is + performing a conditional jump that depends on an uninitialized value. + Isn't that a bug? + + No. That is intentional for performance reasons, and the output of deflate + is not affected. This only started showing up recently since zlib 1.2.x + uses malloc() by default for allocations, whereas earlier versions used + calloc(), which zeros out the allocated memory. Even though the code was + correct, versions 1.2.4 and later was changed to not stimulate these + checkers. + +37. Will zlib read the (insert any ancient or arcane format here) compressed + data format? + + Probably not. Look in the comp.compression FAQ for pointers to various + formats and associated software. + +38. How can I encrypt/decrypt zip files with zlib? + + zlib doesn't support encryption. The original PKZIP encryption is very + weak and can be broken with freely available programs. To get strong + encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib + compression. For PKZIP compatible "encryption", look at + http://www.info-zip.org/ + +39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? + + "gzip" is the gzip format, and "deflate" is the zlib format. They should + probably have called the second one "zlib" instead to avoid confusion with + the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 + correctly points to the zlib specification in RFC 1950 for the "deflate" + transfer encoding, there have been reports of servers and browsers that + incorrectly produce or expect raw deflate data per the deflate + specficiation in RFC 1951, most notably Microsoft. So even though the + "deflate" transfer encoding using the zlib format would be the more + efficient approach (and in fact exactly what the zlib format was designed + for), using the "gzip" transfer encoding is probably more reliable due to + an unfortunate choice of name on the part of the HTTP 1.1 authors. + + Bottom line: use the gzip format for HTTP 1.1 encoding. + +40. Does zlib support the new "Deflate64" format introduced by PKWare? + + No. PKWare has apparently decided to keep that format proprietary, since + they have not documented it as they have previous compression formats. In + any case, the compression improvements are so modest compared to other more + modern approaches, that it's not worth the effort to implement. + +41. I'm having a problem with the zip functions in zlib, can you help? + + There are no zip functions in zlib. You are probably using minizip by + Giles Vollant, which is found in the contrib directory of zlib. It is not + part of zlib. In fact none of the stuff in contrib is part of zlib. The + files in there are not supported by the zlib authors. You need to contact + the authors of the respective contribution for help. + +42. The match.asm code in contrib is under the GNU General Public License. + Since it's part of zlib, doesn't that mean that all of zlib falls under the + GNU GPL? + + No. The files in contrib are not part of zlib. They were contributed by + other authors and are provided as a convenience to the user within the zlib + distribution. Each item in contrib has its own license. + +43. Is zlib subject to export controls? What is its ECCN? + + zlib is not subject to export controls, and so is classified as EAR99. + +44. Can you please sign these lengthy legal documents and fax them back to us + so that we can use your software in our product? + + No. Go away. Shoo. diff --git a/source/Irrlicht/zlib/INDEX b/source/Irrlicht/zlib/INDEX index 4d7eac44..f6c51ca1 100644 --- a/source/Irrlicht/zlib/INDEX +++ b/source/Irrlicht/zlib/INDEX @@ -1,51 +1,65 @@ -ChangeLog history of changes -FAQ Frequently Asked Questions about zlib -INDEX this file -Makefile makefile for Unix (generated by configure) -Makefile.in makefile for Unix (template for configure) -README guess what -algorithm.txt description of the (de)compression algorithm -configure configure script for Unix -zconf.in.h template for zconf.h (used by configure) - -amiga/ makefiles for Amiga SAS C -as400/ makefiles for IBM AS/400 -msdos/ makefiles for MSDOS -old/ makefiles for various architectures and zlib documentation - files that have not yet been updated for zlib 1.2.x -projects/ projects for various Integrated Development Environments -qnx/ makefiles for QNX -win32/ makefiles for Windows - - zlib public header files (must be kept): -zconf.h -zlib.h - - private source files used to build the zlib library: -adler32.c -compress.c -crc32.c -crc32.h -deflate.c -deflate.h -gzio.c -infback.c -inffast.c -inffast.h -inffixed.h -inflate.c -inflate.h -inftrees.c -inftrees.h -trees.c -trees.h -uncompr.c -zutil.c -zutil.h - - source files for sample programs: -example.c -minigzip.c - - unsupported contribution by third parties -See contrib/README.contrib +CMakeLists.txt cmake build file +ChangeLog history of changes +FAQ Frequently Asked Questions about zlib +INDEX this file +Makefile dummy Makefile that tells you to ./configure +Makefile.in template for Unix Makefile +README guess what +configure configure script for Unix +make_vms.com makefile for VMS +treebuild.xml XML description of source file dependencies +zconf.h.cmakein zconf.h template for cmake +zconf.h.in zconf.h template for configure +zlib.3 Man page for zlib +zlib.3.pdf Man page in PDF format +zlib.map Linux symbol information +zlib.pc.in Template for pkg-config descriptor +zlib2ansi perl script to convert source files for C++ compilation + +amiga/ makefiles for Amiga SAS C +doc/ documentation for formats and algorithms +msdos/ makefiles for MSDOS +nintendods/ makefile for Nintendo DS +old/ makefiles for various architectures and zlib documentation + files that have not yet been updated for zlib 1.2.x +qnx/ makefiles for QNX +watcom/ makefiles for OpenWatcom +win32/ makefiles for Windows + + zlib public header files (required for library use): +zconf.h +zlib.h + + private source files used to build the zlib library: +adler32.c +compress.c +crc32.c +crc32.h +deflate.c +deflate.h +gzclose.c +gzguts.h +gzlib.c +gzread.c +gzwrite.c +infback.c +inffast.c +inffast.h +inffixed.h +inflate.c +inflate.h +inftrees.c +inftrees.h +trees.c +trees.h +uncompr.c +zutil.c +zutil.h + + source files for sample programs: +example.c +minigzip.c +See examples/README.examples for more + + unsupported contribution by third parties +See contrib/README.contrib diff --git a/source/Irrlicht/zlib/README b/source/Irrlicht/zlib/README index 80f71ae8..d4219bf8 100644 --- a/source/Irrlicht/zlib/README +++ b/source/Irrlicht/zlib/README @@ -1,125 +1,115 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.2.3 is a general purpose data compression library. All the code is -thread safe. The data format used by the zlib library is described by RFCs -(Request for Comments) 1950 to 1952 in the files -http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) -and rfc1952.txt (gzip format). These documents are also available in other -formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html - -All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example -of the library is given in the file example.c which also tests that the library -is working correctly. Another example is given in the file minigzip.c. The -compression library itself is composed of all source files except example.c and -minigzip.c. - -To compile all files and run the test program, follow the instructions given at -the top of Makefile. In short "make test; make install" should work for most -machines. For Unix: "./configure; make test; make install". For MSDOS, use one -of the special makefiles such as Makefile.msc. For VMS, use make_vms.com. - -Questions about zlib should be sent to , or to Gilles Vollant - for the Windows DLL version. The zlib home page is -http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem, -please check this site to verify that you have the latest version of zlib; -otherwise get the latest version and check whether the problem still exists or -not. - -PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking -for help. - -Mark Nelson wrote an article about zlib for the Jan. 1997 -issue of Dr. Dobb's Journal; a copy of the article is available in -http://dogma.net/markn/articles/zlibtool/zlibtool.htm - -The changes made in version 1.2.3 are documented in the file ChangeLog. - -Unsupported third party contributions are provided in directory "contrib". - -A Java implementation of zlib is available in the Java Development Kit -http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html -See the zlib home page http://www.zlib.org for details. - -A Perl interface to zlib written by Paul Marquess is in the -CPAN (Comprehensive Perl Archive Network) sites -http://www.cpan.org/modules/by-module/Compress/ - -A Python interface to zlib written by A.M. Kuchling is -available in Python 1.5 and later versions, see -http://www.python.org/doc/lib/module-zlib.html - -A zlib binding for TCL written by Andreas Kupries is -availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html - -An experimental package to read and write files in .zip format, written on top -of zlib by Gilles Vollant , is available in the -contrib/minizip directory of zlib. - - -Notes for some targets: - -- For Windows DLL versions, please see win32/DLL_FAQ.txt - -- For 64-bit Irix, deflate.c must be compiled without any optimization. With - -O, one libpng test fails. The test works in 32 bit mode (with the -n32 - compiler flag). The compiler bug has been reported to SGI. - -- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works - when compiled with cc. - -- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is - necessary to get gzprintf working correctly. This is done by configure. - -- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with - other compilers. Use "make test" to check your compiler. - -- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers. - -- For PalmOs, see http://palmzlib.sourceforge.net/ - -- When building a shared, i.e. dynamic library on Mac OS X, the library must be - installed before testing (do "make install" before "make test"), since the - library location is specified in the library. - - -Acknowledgments: - - The deflate format used by zlib was defined by Phil Katz. The deflate - and zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; - they are too numerous to cite here. - -Copyright notice: - - (C) 1995-2004 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* -receiving lengthy legal documents to sign. The sources are provided -for free but without warranty of any kind. The library has been -entirely written by Jean-loup Gailly and Mark Adler; it does not -include third-party code. - -If you redistribute modified sources, we would appreciate that you include -in the file ChangeLog history information documenting your changes. Please -read the FAQ for more information on the distribution of modified source -versions. +ZLIB DATA COMPRESSION LIBRARY + +zlib 1.2.5 is a general purpose data compression library. All the code is +thread safe. The data format used by the zlib library is described by RFCs +(Request for Comments) 1950 to 1952 in the files +http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) +and rfc1952.txt (gzip format). + +All functions of the compression library are documented in the file zlib.h +(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example +of the library is given in the file example.c which also tests that the library +is working correctly. Another example is given in the file minigzip.c. The +compression library itself is composed of all source files except example.c and +minigzip.c. + +To compile all files and run the test program, follow the instructions given at +the top of Makefile.in. In short "./configure; make test", and if that goes +well, "make install" should work for most flavors of Unix. For Windows, use one +of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use +make_vms.com. + +Questions about zlib should be sent to , or to Gilles Vollant + for the Windows DLL version. The zlib home page is +http://zlib.net/ . Before reporting a problem, please check this site to +verify that you have the latest version of zlib; otherwise get the latest +version and check whether the problem still exists or not. + +PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. + +Mark Nelson wrote an article about zlib for the Jan. 1997 +issue of Dr. Dobb's Journal; a copy of the article is available at +http://marknelson.us/1997/01/01/zlib-engine/ . + +The changes made in version 1.2.5 are documented in the file ChangeLog. + +Unsupported third party contributions are provided in directory contrib/ . + +zlib is available in Java using the java.util.zip package, documented at +http://java.sun.com/developer/technicalArticles/Programming/compression/ . + +A Perl interface to zlib written by Paul Marquess is available +at CPAN (Comprehensive Perl Archive Network) sites, including +http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . + +A Python interface to zlib written by A.M. Kuchling is +available in Python 1.5 and later versions, see +http://www.python.org/doc/lib/module-zlib.html . + +zlib is built into tcl: http://wiki.tcl.tk/4610 . + +An experimental package to read and write files in .zip format, written on top +of zlib by Gilles Vollant , is available in the +contrib/minizip directory of zlib. + + +Notes for some targets: + +- For Windows DLL versions, please see win32/DLL_FAQ.txt + +- For 64-bit Irix, deflate.c must be compiled without any optimization. With + -O, one libpng test fails. The test works in 32 bit mode (with the -n32 + compiler flag). The compiler bug has been reported to SGI. + +- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works + when compiled with cc. + +- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is + necessary to get gzprintf working correctly. This is done by configure. + +- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with + other compilers. Use "make test" to check your compiler. + +- gzdopen is not supported on RISCOS or BEOS. + +- For PalmOs, see http://palmzlib.sourceforge.net/ + + +Acknowledgments: + + The deflate format used by zlib was defined by Phil Katz. The deflate and + zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; they + are too numerous to cite here. + +Copyright notice: + + (C) 1995-2010 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. diff --git a/source/Irrlicht/zlib/adler32.c b/source/Irrlicht/zlib/adler32.c index f201d670..5f2bc6bf 100644 --- a/source/Irrlicht/zlib/adler32.c +++ b/source/Irrlicht/zlib/adler32.c @@ -1,12 +1,15 @@ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2004 Mark Adler + * Copyright (C) 1995-2007 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ -#define ZLIB_INTERNAL -#include "zlib.h" +#include "zutil.h" + +#define local static + +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2); #define BASE 65521UL /* largest prime smaller than 65536 */ #define NMAX 5552 @@ -125,10 +128,10 @@ uLong ZEXPORT adler32(adler, buf, len) } /* ========================================================================= */ -uLong ZEXPORT adler32_combine(adler1, adler2, len2) +local uLong adler32_combine_(adler1, adler2, len2) uLong adler1; uLong adler2; - z_off_t len2; + z_off64_t len2; { unsigned long sum1; unsigned long sum2; @@ -141,9 +144,26 @@ uLong ZEXPORT adler32_combine(adler1, adler2, len2) MOD(sum2); sum1 += (adler2 & 0xffff) + BASE - 1; sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; - if (sum1 > BASE) sum1 -= BASE; - if (sum1 > BASE) sum1 -= BASE; - if (sum2 > (BASE << 1)) sum2 -= (BASE << 1); - if (sum2 > BASE) sum2 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; return sum1 | (sum2 << 16); } + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} + +uLong ZEXPORT adler32_combine64(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} diff --git a/source/Irrlicht/zlib/algorithm.txt b/source/Irrlicht/zlib/algorithm.txt index 9f6b0680..34960bdd 100644 --- a/source/Irrlicht/zlib/algorithm.txt +++ b/source/Irrlicht/zlib/algorithm.txt @@ -1,209 +1,209 @@ -1. Compression algorithm (deflate) - -The deflation algorithm used by gzip (also zip and zlib) is a variation of -LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in -the input data. The second occurrence of a string is replaced by a -pointer to the previous string, in the form of a pair (distance, -length). Distances are limited to 32K bytes, and lengths are limited -to 258 bytes. When a string does not occur anywhere in the previous -32K bytes, it is emitted as a sequence of literal bytes. (In this -description, `string' must be taken as an arbitrary sequence of bytes, -and is not restricted to printable characters.) - -Literals or match lengths are compressed with one Huffman tree, and -match distances are compressed with another tree. The trees are stored -in a compact form at the start of each block. The blocks can have any -size (except that the compressed data for one block must fit in -available memory). A block is terminated when deflate() determines that -it would be useful to start another block with fresh trees. (This is -somewhat similar to the behavior of LZW-based _compress_.) - -Duplicated strings are found using a hash table. All input strings of -length 3 are inserted in the hash table. A hash index is computed for -the next 3 bytes. If the hash chain for this index is not empty, all -strings in the chain are compared with the current input string, and -the longest match is selected. - -The hash chains are searched starting with the most recent strings, to -favor small distances and thus take advantage of the Huffman encoding. -The hash chains are singly linked. There are no deletions from the -hash chains, the algorithm simply discards matches that are too old. - -To avoid a worst-case situation, very long hash chains are arbitrarily -truncated at a certain length, determined by a runtime option (level -parameter of deflateInit). So deflate() does not always find the longest -possible match but generally finds a match which is long enough. - -deflate() also defers the selection of matches with a lazy evaluation -mechanism. After a match of length N has been found, deflate() searches for -a longer match at the next input byte. If a longer match is found, the -previous match is truncated to a length of one (thus producing a single -literal byte) and the process of lazy evaluation begins again. Otherwise, -the original match is kept, and the next match search is attempted only N -steps later. - -The lazy match evaluation is also subject to a runtime parameter. If -the current match is long enough, deflate() reduces the search for a longer -match, thus speeding up the whole process. If compression ratio is more -important than speed, deflate() attempts a complete second search even if -the first match is already long enough. - -The lazy match evaluation is not performed for the fastest compression -modes (level parameter 1 to 3). For these fast modes, new strings -are inserted in the hash table only when no match was found, or -when the match is not too long. This degrades the compression ratio -but saves time since there are both fewer insertions and fewer searches. - - -2. Decompression algorithm (inflate) - -2.1 Introduction - -The key question is how to represent a Huffman code (or any prefix code) so -that you can decode fast. The most important characteristic is that shorter -codes are much more common than longer codes, so pay attention to decoding the -short codes fast, and let the long codes take longer to decode. - -inflate() sets up a first level table that covers some number of bits of -input less than the length of longest code. It gets that many bits from the -stream, and looks it up in the table. The table will tell if the next -code is that many bits or less and how many, and if it is, it will tell -the value, else it will point to the next level table for which inflate() -grabs more bits and tries to decode a longer code. - -How many bits to make the first lookup is a tradeoff between the time it -takes to decode and the time it takes to build the table. If building the -table took no time (and if you had infinite memory), then there would only -be a first level table to cover all the way to the longest code. However, -building the table ends up taking a lot longer for more bits since short -codes are replicated many times in such a table. What inflate() does is -simply to make the number of bits in the first table a variable, and then -to set that variable for the maximum speed. - -For inflate, which has 286 possible codes for the literal/length tree, the size -of the first table is nine bits. Also the distance trees have 30 possible -values, and the size of the first table is six bits. Note that for each of -those cases, the table ended up one bit longer than the ``average'' code -length, i.e. the code length of an approximately flat code which would be a -little more than eight bits for 286 symbols and a little less than five bits -for 30 symbols. - - -2.2 More details on the inflate table lookup - -Ok, you want to know what this cleverly obfuscated inflate tree actually -looks like. You are correct that it's not a Huffman tree. It is simply a -lookup table for the first, let's say, nine bits of a Huffman symbol. The -symbol could be as short as one bit or as long as 15 bits. If a particular -symbol is shorter than nine bits, then that symbol's translation is duplicated -in all those entries that start with that symbol's bits. For example, if the -symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a -symbol is nine bits long, it appears in the table once. - -If the symbol is longer than nine bits, then that entry in the table points -to another similar table for the remaining bits. Again, there are duplicated -entries as needed. The idea is that most of the time the symbol will be short -and there will only be one table look up. (That's whole idea behind data -compression in the first place.) For the less frequent long symbols, there -will be two lookups. If you had a compression method with really long -symbols, you could have as many levels of lookups as is efficient. For -inflate, two is enough. - -So a table entry either points to another table (in which case nine bits in -the above example are gobbled), or it contains the translation for the symbol -and the number of bits to gobble. Then you start again with the next -ungobbled bit. - -You may wonder: why not just have one lookup table for how ever many bits the -longest symbol is? The reason is that if you do that, you end up spending -more time filling in duplicate symbol entries than you do actually decoding. -At least for deflate's output that generates new trees every several 10's of -kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code -would take too long if you're only decoding several thousand symbols. At the -other extreme, you could make a new table for every bit in the code. In fact, -that's essentially a Huffman tree. But then you spend two much time -traversing the tree while decoding, even for short symbols. - -So the number of bits for the first lookup table is a trade of the time to -fill out the table vs. the time spent looking at the second level and above of -the table. - -Here is an example, scaled down: - -The code being decoded, with 10 symbols, from 1 to 6 bits long: - -A: 0 -B: 10 -C: 1100 -D: 11010 -E: 11011 -F: 11100 -G: 11101 -H: 11110 -I: 111110 -J: 111111 - -Let's make the first table three bits long (eight entries): - -000: A,1 -001: A,1 -010: A,1 -011: A,1 -100: B,2 -101: B,2 -110: -> table X (gobble 3 bits) -111: -> table Y (gobble 3 bits) - -Each entry is what the bits decode as and how many bits that is, i.e. how -many bits to gobble. Or the entry points to another table, with the number of -bits to gobble implicit in the size of the table. - -Table X is two bits long since the longest code starting with 110 is five bits -long: - -00: C,1 -01: C,1 -10: D,2 -11: E,2 - -Table Y is three bits long since the longest code starting with 111 is six -bits long: - -000: F,2 -001: F,2 -010: G,2 -011: G,2 -100: H,2 -101: H,2 -110: I,3 -111: J,3 - -So what we have here are three tables with a total of 20 entries that had to -be constructed. That's compared to 64 entries for a single table. Or -compared to 16 entries for a Huffman tree (six two entry tables and one four -entry table). Assuming that the code ideally represents the probability of -the symbols, it takes on the average 1.25 lookups per symbol. That's compared -to one lookup for the single table, or 1.66 lookups per symbol for the -Huffman tree. - -There, I think that gives you a picture of what's going on. For inflate, the -meaning of a particular symbol is often more than just a letter. It can be a -byte (a "literal"), or it can be either a length or a distance which -indicates a base value and a number of bits to fetch after the code that is -added to the base value. Or it might be the special end-of-block code. The -data structures created in inftrees.c try to encode all that information -compactly in the tables. - - -Jean-loup Gailly Mark Adler -jloup@gzip.org madler@alumni.caltech.edu - - -References: - -[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data -Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, -pp. 337-343. - -``DEFLATE Compressed Data Format Specification'' available in -http://www.ietf.org/rfc/rfc1951.txt +1. Compression algorithm (deflate) + +The deflation algorithm used by gzip (also zip and zlib) is a variation of +LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in +the input data. The second occurrence of a string is replaced by a +pointer to the previous string, in the form of a pair (distance, +length). Distances are limited to 32K bytes, and lengths are limited +to 258 bytes. When a string does not occur anywhere in the previous +32K bytes, it is emitted as a sequence of literal bytes. (In this +description, `string' must be taken as an arbitrary sequence of bytes, +and is not restricted to printable characters.) + +Literals or match lengths are compressed with one Huffman tree, and +match distances are compressed with another tree. The trees are stored +in a compact form at the start of each block. The blocks can have any +size (except that the compressed data for one block must fit in +available memory). A block is terminated when deflate() determines that +it would be useful to start another block with fresh trees. (This is +somewhat similar to the behavior of LZW-based _compress_.) + +Duplicated strings are found using a hash table. All input strings of +length 3 are inserted in the hash table. A hash index is computed for +the next 3 bytes. If the hash chain for this index is not empty, all +strings in the chain are compared with the current input string, and +the longest match is selected. + +The hash chains are searched starting with the most recent strings, to +favor small distances and thus take advantage of the Huffman encoding. +The hash chains are singly linked. There are no deletions from the +hash chains, the algorithm simply discards matches that are too old. + +To avoid a worst-case situation, very long hash chains are arbitrarily +truncated at a certain length, determined by a runtime option (level +parameter of deflateInit). So deflate() does not always find the longest +possible match but generally finds a match which is long enough. + +deflate() also defers the selection of matches with a lazy evaluation +mechanism. After a match of length N has been found, deflate() searches for +a longer match at the next input byte. If a longer match is found, the +previous match is truncated to a length of one (thus producing a single +literal byte) and the process of lazy evaluation begins again. Otherwise, +the original match is kept, and the next match search is attempted only N +steps later. + +The lazy match evaluation is also subject to a runtime parameter. If +the current match is long enough, deflate() reduces the search for a longer +match, thus speeding up the whole process. If compression ratio is more +important than speed, deflate() attempts a complete second search even if +the first match is already long enough. + +The lazy match evaluation is not performed for the fastest compression +modes (level parameter 1 to 3). For these fast modes, new strings +are inserted in the hash table only when no match was found, or +when the match is not too long. This degrades the compression ratio +but saves time since there are both fewer insertions and fewer searches. + + +2. Decompression algorithm (inflate) + +2.1 Introduction + +The key question is how to represent a Huffman code (or any prefix code) so +that you can decode fast. The most important characteristic is that shorter +codes are much more common than longer codes, so pay attention to decoding the +short codes fast, and let the long codes take longer to decode. + +inflate() sets up a first level table that covers some number of bits of +input less than the length of longest code. It gets that many bits from the +stream, and looks it up in the table. The table will tell if the next +code is that many bits or less and how many, and if it is, it will tell +the value, else it will point to the next level table for which inflate() +grabs more bits and tries to decode a longer code. + +How many bits to make the first lookup is a tradeoff between the time it +takes to decode and the time it takes to build the table. If building the +table took no time (and if you had infinite memory), then there would only +be a first level table to cover all the way to the longest code. However, +building the table ends up taking a lot longer for more bits since short +codes are replicated many times in such a table. What inflate() does is +simply to make the number of bits in the first table a variable, and then +to set that variable for the maximum speed. + +For inflate, which has 286 possible codes for the literal/length tree, the size +of the first table is nine bits. Also the distance trees have 30 possible +values, and the size of the first table is six bits. Note that for each of +those cases, the table ended up one bit longer than the ``average'' code +length, i.e. the code length of an approximately flat code which would be a +little more than eight bits for 286 symbols and a little less than five bits +for 30 symbols. + + +2.2 More details on the inflate table lookup + +Ok, you want to know what this cleverly obfuscated inflate tree actually +looks like. You are correct that it's not a Huffman tree. It is simply a +lookup table for the first, let's say, nine bits of a Huffman symbol. The +symbol could be as short as one bit or as long as 15 bits. If a particular +symbol is shorter than nine bits, then that symbol's translation is duplicated +in all those entries that start with that symbol's bits. For example, if the +symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a +symbol is nine bits long, it appears in the table once. + +If the symbol is longer than nine bits, then that entry in the table points +to another similar table for the remaining bits. Again, there are duplicated +entries as needed. The idea is that most of the time the symbol will be short +and there will only be one table look up. (That's whole idea behind data +compression in the first place.) For the less frequent long symbols, there +will be two lookups. If you had a compression method with really long +symbols, you could have as many levels of lookups as is efficient. For +inflate, two is enough. + +So a table entry either points to another table (in which case nine bits in +the above example are gobbled), or it contains the translation for the symbol +and the number of bits to gobble. Then you start again with the next +ungobbled bit. + +You may wonder: why not just have one lookup table for how ever many bits the +longest symbol is? The reason is that if you do that, you end up spending +more time filling in duplicate symbol entries than you do actually decoding. +At least for deflate's output that generates new trees every several 10's of +kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code +would take too long if you're only decoding several thousand symbols. At the +other extreme, you could make a new table for every bit in the code. In fact, +that's essentially a Huffman tree. But then you spend too much time +traversing the tree while decoding, even for short symbols. + +So the number of bits for the first lookup table is a trade of the time to +fill out the table vs. the time spent looking at the second level and above of +the table. + +Here is an example, scaled down: + +The code being decoded, with 10 symbols, from 1 to 6 bits long: + +A: 0 +B: 10 +C: 1100 +D: 11010 +E: 11011 +F: 11100 +G: 11101 +H: 11110 +I: 111110 +J: 111111 + +Let's make the first table three bits long (eight entries): + +000: A,1 +001: A,1 +010: A,1 +011: A,1 +100: B,2 +101: B,2 +110: -> table X (gobble 3 bits) +111: -> table Y (gobble 3 bits) + +Each entry is what the bits decode as and how many bits that is, i.e. how +many bits to gobble. Or the entry points to another table, with the number of +bits to gobble implicit in the size of the table. + +Table X is two bits long since the longest code starting with 110 is five bits +long: + +00: C,1 +01: C,1 +10: D,2 +11: E,2 + +Table Y is three bits long since the longest code starting with 111 is six +bits long: + +000: F,2 +001: F,2 +010: G,2 +011: G,2 +100: H,2 +101: H,2 +110: I,3 +111: J,3 + +So what we have here are three tables with a total of 20 entries that had to +be constructed. That's compared to 64 entries for a single table. Or +compared to 16 entries for a Huffman tree (six two entry tables and one four +entry table). Assuming that the code ideally represents the probability of +the symbols, it takes on the average 1.25 lookups per symbol. That's compared +to one lookup for the single table, or 1.66 lookups per symbol for the +Huffman tree. + +There, I think that gives you a picture of what's going on. For inflate, the +meaning of a particular symbol is often more than just a letter. It can be a +byte (a "literal"), or it can be either a length or a distance which +indicates a base value and a number of bits to fetch after the code that is +added to the base value. Or it might be the special end-of-block code. The +data structures created in inftrees.c try to encode all that information +compactly in the tables. + + +Jean-loup Gailly Mark Adler +jloup@gzip.org madler@alumni.caltech.edu + + +References: + +[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data +Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, +pp. 337-343. + +``DEFLATE Compressed Data Format Specification'' available in +http://www.ietf.org/rfc/rfc1951.txt diff --git a/source/Irrlicht/zlib/compress.c b/source/Irrlicht/zlib/compress.c index d37e84f5..c46727a4 100644 --- a/source/Irrlicht/zlib/compress.c +++ b/source/Irrlicht/zlib/compress.c @@ -1,5 +1,5 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2005 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -75,5 +75,6 @@ int ZEXPORT compress (dest, destLen, source, sourceLen) uLong ZEXPORT compressBound (sourceLen) uLong sourceLen; { - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13; } diff --git a/source/Irrlicht/zlib/crc32.c b/source/Irrlicht/zlib/crc32.c index 32814c20..8cb3d8ff 100644 --- a/source/Irrlicht/zlib/crc32.c +++ b/source/Irrlicht/zlib/crc32.c @@ -1,5 +1,5 @@ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2006, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster @@ -53,7 +53,7 @@ /* Definitions for doing the crc four data bytes at a time. */ #ifdef BYFOUR -# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \ +# define REV(w) ((((w)>>24)&0xff)+(((w)>>8)&0xff00)+ \ (((w)&0xff00)<<8)+(((w)&0xff)<<24)) local unsigned long crc32_little OF((unsigned long, const unsigned char FAR *, unsigned)); @@ -68,6 +68,8 @@ local unsigned long gf2_matrix_times OF((unsigned long *mat, unsigned long vec)); local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); +local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2); + #ifdef DYNAMIC_CRC_TABLE @@ -219,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_crc_table() unsigned long ZEXPORT crc32(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + uInt len; { if (buf == Z_NULL) return 0UL; @@ -367,22 +369,22 @@ local void gf2_matrix_square(square, mat) } /* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) +local uLong crc32_combine_(crc1, crc2, len2) uLong crc1; uLong crc2; - z_off_t len2; + z_off64_t len2; { int n; unsigned long row; unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */ unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */ - /* degenerate case */ - if (len2 == 0) + /* degenerate case (also disallow negative lengths) */ + if (len2 <= 0) return crc1; /* put operator for one zero bit in odd */ - odd[0] = 0xedb88320L; /* CRC-32 polynomial */ + odd[0] = 0xedb88320UL; /* CRC-32 polynomial */ row = 1; for (n = 1; n < GF2_DIM; n++) { odd[n] = row; @@ -421,3 +423,20 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2) crc1 ^= crc2; return crc1; } + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} + +uLong ZEXPORT crc32_combine64(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off64_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} diff --git a/source/Irrlicht/zlib/deflate.c b/source/Irrlicht/zlib/deflate.c index 529f716b..fa001811 100644 --- a/source/Irrlicht/zlib/deflate.c +++ b/source/Irrlicht/zlib/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly "; + " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -79,19 +79,18 @@ local block_state deflate_fast OF((deflate_state *s, int flush)); #ifndef FASTEST local block_state deflate_slow OF((deflate_state *s, int flush)); #endif +local block_state deflate_rle OF((deflate_state *s, int flush)); +local block_state deflate_huff OF((deflate_state *s, int flush)); local void lm_init OF((deflate_state *s)); local void putShortMSB OF((deflate_state *s, uInt b)); local void flush_pending OF((z_streamp strm)); local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifndef FASTEST #ifdef ASMV void match_init OF((void)); /* asm code initialization */ uInt longest_match OF((deflate_state *s, IPos cur_match)); #else local uInt longest_match OF((deflate_state *s, IPos cur_match)); #endif -#endif -local uInt longest_match_fast OF((deflate_state *s, IPos cur_match)); #ifdef DEBUG local void check_match OF((deflate_state *s, IPos start, IPos match, @@ -110,11 +109,6 @@ local void check_match OF((deflate_state *s, IPos start, IPos match, #endif /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - /* Values for max_lazy_match, good_match and max_chain_length, depending on * the desired pack level (0..9). The values given below have been tuned to * exclude worst case performance for pathological files. Better values may be @@ -288,6 +282,8 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + s->high_water = 0; /* nothing written to s->window yet */ + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); @@ -332,8 +328,8 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) strm->adler = adler32(strm->adler, dictionary, dictLength); if (length < MIN_MATCH) return Z_OK; - if (length > MAX_DIST(s)) { - length = MAX_DIST(s); + if (length > s->w_size) { + length = s->w_size; dictionary += dictLength - length; /* use the tail of the dictionary */ } zmemcpy(s->window, dictionary, length); @@ -435,9 +431,10 @@ int ZEXPORT deflateParams(strm, level, strategy) } func = configuration_table[s->level].func; - if (func != configuration_table[level].func && strm->total_in != 0) { + if ((strategy != s->strategy || func != configuration_table[level].func) && + strm->total_in != 0) { /* Flush the last buffer: */ - err = deflate(strm, Z_PARTIAL_FLUSH); + err = deflate(strm, Z_BLOCK); } if (s->level != level) { s->level = level; @@ -481,33 +478,66 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) * resulting from using fixed blocks instead of stored blocks, which deflate * can emit on compressed data for some combinations of the parameters. * - * This function could be more sophisticated to provide closer upper bounds - * for every combination of windowBits and memLevel, as well as wrap. - * But even the conservative upper bound of about 14% expansion does not - * seem onerous for output buffer allocation. + * This function could be more sophisticated to provide closer upper bounds for + * every combination of windowBits and memLevel. But even the conservative + * upper bound of about 14% expansion does not seem onerous for output buffer + * allocation. */ uLong ZEXPORT deflateBound(strm, sourceLen) z_streamp strm; uLong sourceLen; { deflate_state *s; - uLong destLen; + uLong complen, wraplen; + Bytef *str; - /* conservative upper bound */ - destLen = sourceLen + - ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11; + /* conservative upper bound for compressed data */ + complen = sourceLen + + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; - /* if can't get parameters, return conservative bound */ + /* if can't get parameters, return conservative bound plus zlib wrapper */ if (strm == Z_NULL || strm->state == Z_NULL) - return destLen; + return complen + 6; + + /* compute wrapper length */ + s = strm->state; + switch (s->wrap) { + case 0: /* raw deflate */ + wraplen = 0; + break; + case 1: /* zlib wrapper */ + wraplen = 6 + (s->strstart ? 4 : 0); + break; + case 2: /* gzip wrapper */ + wraplen = 18; + if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ + if (s->gzhead->extra != Z_NULL) + wraplen += 2 + s->gzhead->extra_len; + str = s->gzhead->name; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + str = s->gzhead->comment; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + if (s->gzhead->hcrc) + wraplen += 2; + } + break; + default: /* for compiler happiness */ + wraplen = 6; + } /* if not default parameters, return conservative bound */ - s = strm->state; if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return destLen; + return complen + wraplen; /* default settings: return tight bound for that case */ - return compressBound(sourceLen); + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13 - 6 + wraplen; } /* ========================================================================= @@ -557,7 +587,7 @@ int ZEXPORT deflate (strm, flush) deflate_state *s; if (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_FINISH || flush < 0) { + flush > Z_BLOCK || flush < 0) { return Z_STREAM_ERROR; } s = strm->state; @@ -581,7 +611,7 @@ int ZEXPORT deflate (strm, flush) put_byte(s, 31); put_byte(s, 139); put_byte(s, 8); - if (s->gzhead == NULL) { + if (s->gzhead == Z_NULL) { put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); @@ -608,7 +638,7 @@ int ZEXPORT deflate (strm, flush) (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? 4 : 0)); put_byte(s, s->gzhead->os & 0xff); - if (s->gzhead->extra != NULL) { + if (s->gzhead->extra != Z_NULL) { put_byte(s, s->gzhead->extra_len & 0xff); put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); } @@ -650,7 +680,7 @@ int ZEXPORT deflate (strm, flush) } #ifdef GZIP if (s->status == EXTRA_STATE) { - if (s->gzhead->extra != NULL) { + if (s->gzhead->extra != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { @@ -678,7 +708,7 @@ int ZEXPORT deflate (strm, flush) s->status = NAME_STATE; } if (s->status == NAME_STATE) { - if (s->gzhead->name != NULL) { + if (s->gzhead->name != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ int val; @@ -709,7 +739,7 @@ int ZEXPORT deflate (strm, flush) s->status = COMMENT_STATE; } if (s->status == COMMENT_STATE) { - if (s->gzhead->comment != NULL) { + if (s->gzhead->comment != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ int val; @@ -787,7 +817,9 @@ int ZEXPORT deflate (strm, flush) (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { block_state bstate; - bstate = (*(configuration_table[s->level].func))(s, flush); + bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : + (s->strategy == Z_RLE ? deflate_rle(s, flush) : + (*(configuration_table[s->level].func))(s, flush)); if (bstate == finish_started || bstate == finish_done) { s->status = FINISH_STATE; @@ -808,13 +840,17 @@ int ZEXPORT deflate (strm, flush) if (bstate == block_done) { if (flush == Z_PARTIAL_FLUSH) { _tr_align(s); - } else { /* FULL_FLUSH or SYNC_FLUSH */ + } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ _tr_stored_block(s, (char*)0, 0L, 0); /* For a full flush, this empty block will be recognized * as a special marker by inflate_sync(). */ if (flush == Z_FULL_FLUSH) { CLEAR_HASH(s); /* forget history */ + if (s->lookahead == 0) { + s->strstart = 0; + s->block_start = 0L; + } } } flush_pending(strm); @@ -1167,12 +1203,13 @@ local uInt longest_match(s, cur_match) return s->lookahead; } #endif /* ASMV */ -#endif /* FASTEST */ + +#else /* FASTEST */ /* --------------------------------------------------------------------------- - * Optimized version for level == 1 or strategy == Z_RLE only + * Optimized version for FASTEST only */ -local uInt longest_match_fast(s, cur_match) +local uInt longest_match(s, cur_match) deflate_state *s; IPos cur_match; /* current match */ { @@ -1225,6 +1262,8 @@ local uInt longest_match_fast(s, cur_match) return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; } +#endif /* FASTEST */ + #ifdef DEBUG /* =========================================================================== * Check that the match at match_start is indeed a match. @@ -1303,7 +1342,6 @@ local void fill_window(s) later. (Using level 0 permanently is not an optimal usage of zlib, so we don't care about this pathological case.) */ - /* %%% avoid this when Z_RLE */ n = s->hash_size; p = &s->head[n]; do { @@ -1355,27 +1393,61 @@ local void fill_window(s) */ } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ + if (s->high_water < s->window_size) { + ulg curr = s->strstart + (ulg)(s->lookahead); + ulg init; + + if (s->high_water < curr) { + /* Previous high water mark below current data -- zero WIN_INIT + * bytes or up to end of window, whichever is less. + */ + init = s->window_size - curr; + if (init > WIN_INIT) + init = WIN_INIT; + zmemzero(s->window + curr, (unsigned)init); + s->high_water = curr + init; + } + else if (s->high_water < (ulg)curr + WIN_INIT) { + /* High water mark at or above current data, but below current data + * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up + * to end of window, whichever is less. + */ + init = (ulg)curr + WIN_INIT - s->high_water; + if (init > s->window_size - s->high_water) + init = s->window_size - s->high_water; + zmemzero(s->window + s->high_water, (unsigned)init); + s->high_water += init; + } + } } /* =========================================================================== * Flush the current block, with given end-of-file flag. * IN assertion: strstart is set to the end of the current match. */ -#define FLUSH_BLOCK_ONLY(s, eof) { \ +#define FLUSH_BLOCK_ONLY(s, last) { \ _tr_flush_block(s, (s->block_start >= 0L ? \ (charf *)&s->window[(unsigned)s->block_start] : \ (charf *)Z_NULL), \ (ulg)((long)s->strstart - s->block_start), \ - (eof)); \ + (last)); \ s->block_start = s->strstart; \ flush_pending(s->strm); \ Tracev((stderr,"[FLUSH]")); \ } /* Same but force premature exit if necessary. */ -#define FLUSH_BLOCK(s, eof) { \ - FLUSH_BLOCK_ONLY(s, eof); \ - if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ +#define FLUSH_BLOCK(s, last) { \ + FLUSH_BLOCK_ONLY(s, last); \ + if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ } /* =========================================================================== @@ -1449,7 +1521,7 @@ local block_state deflate_fast(s, flush) deflate_state *s; int flush; { - IPos hash_head = NIL; /* head of the hash chain */ + IPos hash_head; /* head of the hash chain */ int bflush; /* set if current block must be flushed */ for (;;) { @@ -1469,6 +1541,7 @@ local block_state deflate_fast(s, flush) /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ + hash_head = NIL; if (s->lookahead >= MIN_MATCH) { INSERT_STRING(s, s->strstart, hash_head); } @@ -1481,19 +1554,8 @@ local block_state deflate_fast(s, flush) * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ -#ifdef FASTEST - if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) || - (s->strategy == Z_RLE && s->strstart - hash_head == 1)) { - s->match_length = longest_match_fast (s, hash_head); - } -#else - if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { - s->match_length = longest_match (s, hash_head); - } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { - s->match_length = longest_match_fast (s, hash_head); - } -#endif - /* longest_match() or longest_match_fast() sets match_start */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ } if (s->match_length >= MIN_MATCH) { check_match(s, s->strstart, s->match_start, s->match_length); @@ -1555,7 +1617,7 @@ local block_state deflate_slow(s, flush) deflate_state *s; int flush; { - IPos hash_head = NIL; /* head of hash chain */ + IPos hash_head; /* head of hash chain */ int bflush; /* set if current block must be flushed */ /* Process the input block. */ @@ -1576,6 +1638,7 @@ local block_state deflate_slow(s, flush) /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ + hash_head = NIL; if (s->lookahead >= MIN_MATCH) { INSERT_STRING(s, s->strstart, hash_head); } @@ -1591,12 +1654,8 @@ local block_state deflate_slow(s, flush) * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ - if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { - s->match_length = longest_match (s, hash_head); - } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { - s->match_length = longest_match_fast (s, hash_head); - } - /* longest_match() or longest_match_fast() sets match_start */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ if (s->match_length <= 5 && (s->strategy == Z_FILTERED #if TOO_FAR <= 32767 @@ -1674,7 +1733,6 @@ local block_state deflate_slow(s, flush) } #endif /* FASTEST */ -#if 0 /* =========================================================================== * For Z_RLE, simply look for runs of bytes, generate matches only of distance * one. Do not maintain a hash table. (It will be regenerated if this run of @@ -1684,11 +1742,9 @@ local block_state deflate_rle(s, flush) deflate_state *s; int flush; { - int bflush; /* set if current block must be flushed */ - uInt run; /* length of run */ - uInt max; /* maximum length of run */ - uInt prev; /* byte at distance one to match */ - Bytef *scan; /* scan for end of run */ + int bflush; /* set if current block must be flushed */ + uInt prev; /* byte at distance one to match */ + Bytef *scan, *strend; /* scan goes up to strend for length of run */ for (;;) { /* Make sure that we always have enough lookahead, except @@ -1704,23 +1760,33 @@ local block_state deflate_rle(s, flush) } /* See how many times the previous byte repeats */ - run = 0; - if (s->strstart > 0) { /* if there is a previous byte, that is */ - max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH; + s->match_length = 0; + if (s->lookahead >= MIN_MATCH && s->strstart > 0) { scan = s->window + s->strstart - 1; - prev = *scan++; - do { - if (*scan++ != prev) - break; - } while (++run < max); + prev = *scan; + if (prev == *++scan && prev == *++scan && prev == *++scan) { + strend = s->window + s->strstart + MAX_MATCH; + do { + } while (prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + scan < strend); + s->match_length = MAX_MATCH - (int)(strend - scan); + if (s->match_length > s->lookahead) + s->match_length = s->lookahead; + } } /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (run >= MIN_MATCH) { - check_match(s, s->strstart, s->strstart - 1, run); - _tr_tally_dist(s, 1, run - MIN_MATCH, bflush); - s->lookahead -= run; - s->strstart += run; + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->strstart - 1, s->match_length); + + _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + s->strstart += s->match_length; + s->match_length = 0; } else { /* No match, output a literal byte */ Tracevv((stderr,"%c", s->window[s->strstart])); @@ -1733,4 +1799,36 @@ local block_state deflate_rle(s, flush) FLUSH_BLOCK(s, flush == Z_FINISH); return flush == Z_FINISH ? finish_done : block_done; } -#endif + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +local block_state deflate_huff(s, flush) + deflate_state *s; + int flush; +{ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s->lookahead == 0) { + fill_window(s); + if (s->lookahead == 0) { + if (flush == Z_NO_FLUSH) + return need_more; + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s->match_length = 0; + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + if (bflush) FLUSH_BLOCK(s, 0); + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} diff --git a/source/Irrlicht/zlib/deflate.h b/source/Irrlicht/zlib/deflate.h index 222c53e0..e9044c1d 100644 --- a/source/Irrlicht/zlib/deflate.h +++ b/source/Irrlicht/zlib/deflate.h @@ -1,5 +1,5 @@ /* deflate.h -- internal compression state - * Copyright (C) 1995-2004 Jean-loup Gailly + * Copyright (C) 1995-2010 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -260,6 +260,13 @@ typedef struct internal_state { * are always zero. */ + ulg high_water; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ + } FAR deflate_state; /* Output a byte on the stream. @@ -278,14 +285,18 @@ typedef struct internal_state { * distances are limited to MAX_DIST instead of WSIZE. */ +#define WIN_INIT MAX_MATCH +/* Number of bytes after end of data in window to initialize in order to avoid + memory checker errors from longest match routines */ + /* in trees.c */ -void _tr_init OF((deflate_state *s)); -int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); -void _tr_align OF((deflate_state *s)); -void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); +void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); +int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); +void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); +void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); #define d_code(dist) \ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) @@ -298,11 +309,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, /* Inline versions of _tr_tally for speed: */ #if defined(GEN_TREES_H) || !defined(STDC) - extern uch _length_code[]; - extern uch _dist_code[]; + extern uch ZLIB_INTERNAL _length_code[]; + extern uch ZLIB_INTERNAL _dist_code[]; #else - extern const uch _length_code[]; - extern const uch _dist_code[]; + extern const uch ZLIB_INTERNAL _length_code[]; + extern const uch ZLIB_INTERNAL _dist_code[]; #endif # define _tr_tally_lit(s, c, flush) \ diff --git a/source/Irrlicht/zlib/gzclose.c b/source/Irrlicht/zlib/gzclose.c new file mode 100644 index 00000000..caeb99a3 --- /dev/null +++ b/source/Irrlicht/zlib/gzclose.c @@ -0,0 +1,25 @@ +/* gzclose.c -- zlib gzclose() function + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* gzclose() is in a separate file so that it is linked in only if it is used. + That way the other gzclose functions can be used instead to avoid linking in + unneeded compression or decompression routines. */ +int ZEXPORT gzclose(file) + gzFile file; +{ +#ifndef NO_GZCOMPRESS + gz_statep state; + + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); +#else + return gzclose_r(file); +#endif +} diff --git a/source/Irrlicht/zlib/gzguts.h b/source/Irrlicht/zlib/gzguts.h new file mode 100644 index 00000000..0f8fb79f --- /dev/null +++ b/source/Irrlicht/zlib/gzguts.h @@ -0,0 +1,132 @@ +/* gzguts.h -- zlib internal header definitions for gz* operations + * Copyright (C) 2004, 2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#ifdef _LARGEFILE64_SOURCE +# ifndef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 +# endif +# ifdef _FILE_OFFSET_BITS +# undef _FILE_OFFSET_BITS +# endif +#endif + +#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + +#include +#include "zlib.h" +#ifdef STDC +# include +# include +# include +#endif +#include + +#ifdef NO_DEFLATE /* for compatibility with old definition */ +# define NO_GZCOMPRESS +#endif + +#ifdef _MSC_VER +# include +# define vsnprintf _vsnprintf +#endif + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +/* gz* functions always use library allocation functions */ +#ifndef STDC + extern voidp malloc OF((uInt size)); + extern void free OF((voidpf ptr)); +#endif + +/* get errno and strerror definition */ +#if defined UNDER_CE +# include +# define zstrerror() gz_strwinerror((DWORD)GetLastError()) +#else +# ifdef STDC +# include +# define zstrerror() strerror(errno) +# else +# define zstrerror() "stdio error (consult errno)" +# endif +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); +#endif + +/* default i/o buffer size -- double this for output when reading */ +#define GZBUFSIZE 8192 + +/* gzip modes, also provide a little integrity check on the passed structure */ +#define GZ_NONE 0 +#define GZ_READ 7247 +#define GZ_WRITE 31153 +#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ + +/* values for gz_state how */ +#define LOOK 0 /* look for a gzip header */ +#define COPY 1 /* copy input directly */ +#define GZIP 2 /* decompress a gzip stream */ + +/* internal gzip file state data structure */ +typedef struct { + /* used for both reading and writing */ + int mode; /* see gzip modes above */ + int fd; /* file descriptor */ + char *path; /* path or fd for error messages */ + z_off64_t pos; /* current position in uncompressed data */ + unsigned size; /* buffer size, zero if not allocated yet */ + unsigned want; /* requested buffer size, default is GZBUFSIZE */ + unsigned char *in; /* input buffer */ + unsigned char *out; /* output buffer (double-sized when reading) */ + unsigned char *next; /* next output data to deliver or write */ + /* just for reading */ + unsigned have; /* amount of output data unused at next */ + int eof; /* true if end of input file reached */ + z_off64_t start; /* where the gzip data started, for rewinding */ + z_off64_t raw; /* where the raw data started, for seeking */ + int how; /* 0: get header, 1: copy, 2: decompress */ + int direct; /* true if last read direct, false if gzip */ + /* just for writing */ + int level; /* compression level */ + int strategy; /* compression strategy */ + /* seek request */ + z_off64_t skip; /* amount to skip (already rewound if backwards) */ + int seek; /* true if seek request pending */ + /* error information */ + int err; /* error code */ + char *msg; /* error message */ + /* zlib inflate or deflate stream */ + z_stream strm; /* stream structure in-place (not a pointer) */ +} gz_state; +typedef gz_state FAR *gz_statep; + +/* shared functions */ +void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); +#if defined UNDER_CE +char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); +#endif + +/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t + value -- needed when comparing unsigned to z_off64_t, which is signed + (possible z_off64_t types off_t, off64_t, and long are all signed) */ +#ifdef INT_MAX +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) +#else +unsigned ZLIB_INTERNAL gz_intmax OF((void)); +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) +#endif diff --git a/source/Irrlicht/zlib/gzio.c b/source/Irrlicht/zlib/gzio.c deleted file mode 100644 index 5e20a4aa..00000000 --- a/source/Irrlicht/zlib/gzio.c +++ /dev/null @@ -1,1026 +0,0 @@ -/* gzio.c -- IO on .gz files - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Compile this file with -DNO_GZCOMPRESS to avoid the compression code. - */ - -/* @(#) $Id$ */ - -#include - -#include "zutil.h" - -#ifdef NO_DEFLATE /* for compatibility with old definition */ -# define NO_GZCOMPRESS -#endif - -#ifndef NO_DUMMY_DECL -struct internal_state {int dummy;}; /* for buggy compilers */ -#endif - -#ifndef Z_BUFSIZE -# ifdef MAXSEG_64K -# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ -# else -# define Z_BUFSIZE 16384 -# endif -#endif -#ifndef Z_PRINTF_BUFSIZE -# define Z_PRINTF_BUFSIZE 4096 -#endif - -#ifdef __MVS__ -# pragma map (fdopen , "\174\174FDOPEN") - FILE *fdopen(int, const char *); -#endif - -#ifndef STDC -extern voidp malloc OF((uInt size)); -extern void free OF((voidpf ptr)); -#endif - -#define ALLOC(size) malloc(size) -#define TRYFREE(p) {if (p) free(p);} - -static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ - -/* gzip flag byte */ -#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ -#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ -#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ -#define COMMENT 0x10 /* bit 4 set: file comment present */ -#define RESERVED 0xE0 /* bits 5..7: reserved */ - -typedef struct gz_stream { - z_stream stream; - int z_err; /* error code for last stream operation */ - int z_eof; /* set if end of input file */ - FILE *file; /* .gz file */ - Byte *inbuf; /* input buffer */ - Byte *outbuf; /* output buffer */ - uLong crc; /* crc32 of uncompressed data */ - char *msg; /* error message */ - char *path; /* path name for debugging only */ - int transparent; /* 1 if input file is not a .gz file */ - char mode; /* 'w' or 'r' */ - z_off_t start; /* start of compressed data in file (header skipped) */ - z_off_t in; /* bytes into deflate or inflate */ - z_off_t out; /* bytes out of deflate or inflate */ - int back; /* one character push-back */ - int last; /* true if push-back is last character */ -} gz_stream; - - -local gzFile gz_open OF((const char *path, const char *mode, int fd)); -local int do_flush OF((gzFile file, int flush)); -local int get_byte OF((gz_stream *s)); -local void check_header OF((gz_stream *s)); -local int destroy OF((gz_stream *s)); -local void putLong OF((FILE *file, uLong x)); -local uLong getLong OF((gz_stream *s)); - -/* =========================================================================== - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb"). The file is given either by file descriptor - or path name (if fd == -1). - gz_open returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). -*/ -local gzFile gz_open (path, mode, fd) - const char *path; - const char *mode; - int fd; -{ - int err; - int level = Z_DEFAULT_COMPRESSION; /* compression level */ - int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ - char *p = (char*)mode; - gz_stream *s; - char fmode[80]; /* copy of mode, without the compression level */ - char *m = fmode; - - if (!path || !mode) return Z_NULL; - - s = (gz_stream *)ALLOC(sizeof(gz_stream)); - if (!s) return Z_NULL; - - s->stream.zalloc = (alloc_func)0; - s->stream.zfree = (free_func)0; - s->stream.opaque = (voidpf)0; - s->stream.next_in = s->inbuf = Z_NULL; - s->stream.next_out = s->outbuf = Z_NULL; - s->stream.avail_in = s->stream.avail_out = 0; - s->file = NULL; - s->z_err = Z_OK; - s->z_eof = 0; - s->in = 0; - s->out = 0; - s->back = EOF; - s->crc = crc32(0L, Z_NULL, 0); - s->msg = NULL; - s->transparent = 0; - - s->path = (char*)ALLOC(strlen(path)+1); - if (s->path == NULL) { - return destroy(s), (gzFile)Z_NULL; - } - strcpy(s->path, path); /* do this early for debugging */ - - s->mode = '\0'; - do { - if (*p == 'r') s->mode = 'r'; - if (*p == 'w' || *p == 'a') s->mode = 'w'; - if (*p >= '0' && *p <= '9') { - level = *p - '0'; - } else if (*p == 'f') { - strategy = Z_FILTERED; - } else if (*p == 'h') { - strategy = Z_HUFFMAN_ONLY; - } else if (*p == 'R') { - strategy = Z_RLE; - } else { - *m++ = *p; /* copy the mode */ - } - } while (*p++ && m != fmode + sizeof(fmode)); - if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL; - - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - err = Z_STREAM_ERROR; -#else - err = deflateInit2(&(s->stream), level, - Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); - /* windowBits is passed < 0 to suppress zlib header */ - - s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); -#endif - if (err != Z_OK || s->outbuf == Z_NULL) { - return destroy(s), (gzFile)Z_NULL; - } - } else { - s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); - - err = inflateInit2(&(s->stream), -MAX_WBITS); - /* windowBits is passed < 0 to tell that there is no zlib header. - * Note that in this case inflate *requires* an extra "dummy" byte - * after the compressed stream in order to complete decompression and - * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are - * present after the compressed stream. - */ - if (err != Z_OK || s->inbuf == Z_NULL) { - return destroy(s), (gzFile)Z_NULL; - } - } - s->stream.avail_out = Z_BUFSIZE; - - errno = 0; - s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); - - if (s->file == NULL) { - return destroy(s), (gzFile)Z_NULL; - } - if (s->mode == 'w') { - /* Write a very simple .gz header: - */ - fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], - Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); - s->start = 10L; - /* We use 10L instead of ftell(s->file) to because ftell causes an - * fflush on some systems. This version of the library doesn't use - * start anyway in write mode, so this initialization is not - * necessary. - */ - } else { - check_header(s); /* skip the .gz header */ - s->start = ftell(s->file) - s->stream.avail_in; - } - - return (gzFile)s; -} - -/* =========================================================================== - Opens a gzip (.gz) file for reading or writing. -*/ -gzFile ZEXPORT gzopen (path, mode) - const char *path; - const char *mode; -{ - return gz_open (path, mode, -1); -} - -/* =========================================================================== - Associate a gzFile with the file descriptor fd. fd is not dup'ed here - to mimic the behavio(u)r of fdopen. -*/ -gzFile ZEXPORT gzdopen (fd, mode) - int fd; - const char *mode; -{ - char name[46]; /* allow for up to 128-bit integers */ - - if (fd < 0) return (gzFile)Z_NULL; - sprintf(name, "", fd); /* for debugging */ - - return gz_open (name, mode, fd); -} - -/* =========================================================================== - * Update the compression level and strategy - */ -int ZEXPORT gzsetparams (file, level, strategy) - gzFile file; - int level; - int strategy; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - /* Make room to allow flushing */ - if (s->stream.avail_out == 0) { - - s->stream.next_out = s->outbuf; - if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { - s->z_err = Z_ERRNO; - } - s->stream.avail_out = Z_BUFSIZE; - } - - return deflateParams (&(s->stream), level, strategy); -} - -/* =========================================================================== - Read a byte from a gz_stream; update next_in and avail_in. Return EOF - for end of file. - IN assertion: the stream s has been sucessfully opened for reading. -*/ -local int get_byte(s) - gz_stream *s; -{ - if (s->z_eof) return EOF; - if (s->stream.avail_in == 0) { - errno = 0; - s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file); - if (s->stream.avail_in == 0) { - s->z_eof = 1; - if (ferror(s->file)) s->z_err = Z_ERRNO; - return EOF; - } - s->stream.next_in = s->inbuf; - } - s->stream.avail_in--; - return *(s->stream.next_in)++; -} - -/* =========================================================================== - Check the gzip header of a gz_stream opened for reading. Set the stream - mode to transparent if the gzip magic header is not present; set s->err - to Z_DATA_ERROR if the magic header is present but the rest of the header - is incorrect. - IN assertion: the stream s has already been created sucessfully; - s->stream.avail_in is zero for the first time, but may be non-zero - for concatenated .gz files. -*/ -local void check_header(s) - gz_stream *s; -{ - int method; /* method byte */ - int flags; /* flags byte */ - uInt len; - int c; - - /* Assure two bytes in the buffer so we can peek ahead -- handle case - where first byte of header is at the end of the buffer after the last - gzip segment */ - len = s->stream.avail_in; - if (len < 2) { - if (len) s->inbuf[0] = s->stream.next_in[0]; - errno = 0; - len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file); - if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO; - s->stream.avail_in += len; - s->stream.next_in = s->inbuf; - if (s->stream.avail_in < 2) { - s->transparent = s->stream.avail_in; - return; - } - } - - /* Peek ahead to check the gzip magic header */ - if (s->stream.next_in[0] != gz_magic[0] || - s->stream.next_in[1] != gz_magic[1]) { - s->transparent = 1; - return; - } - s->stream.avail_in -= 2; - s->stream.next_in += 2; - - /* Check the rest of the gzip header */ - method = get_byte(s); - flags = get_byte(s); - if (method != Z_DEFLATED || (flags & RESERVED) != 0) { - s->z_err = Z_DATA_ERROR; - return; - } - - /* Discard time, xflags and OS code: */ - for (len = 0; len < 6; len++) (void)get_byte(s); - - if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ - len = (uInt)get_byte(s); - len += ((uInt)get_byte(s))<<8; - /* len is garbage if EOF but the loop below will quit anyway */ - while (len-- != 0 && get_byte(s) != EOF) ; - } - if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ - while ((c = get_byte(s)) != 0 && c != EOF) ; - } - if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ - while ((c = get_byte(s)) != 0 && c != EOF) ; - } - if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ - for (len = 0; len < 2; len++) (void)get_byte(s); - } - s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK; -} - - /* =========================================================================== - * Cleanup then free the given gz_stream. Return a zlib error code. - Try freeing in the reverse order of allocations. - */ -local int destroy (s) - gz_stream *s; -{ - int err = Z_OK; - - if (!s) return Z_STREAM_ERROR; - - TRYFREE(s->msg); - - if (s->stream.state != NULL) { - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - err = Z_STREAM_ERROR; -#else - err = deflateEnd(&(s->stream)); -#endif - } else if (s->mode == 'r') { - err = inflateEnd(&(s->stream)); - } - } - if (s->file != NULL && fclose(s->file)) { -#ifdef ESPIPE - if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */ -#endif - err = Z_ERRNO; - } - if (s->z_err < 0) err = s->z_err; - - TRYFREE(s->inbuf); - TRYFREE(s->outbuf); - TRYFREE(s->path); - TRYFREE(s); - return err; -} - -/* =========================================================================== - Reads the given number of uncompressed bytes from the compressed file. - gzread returns the number of bytes actually read (0 for end of file). -*/ -int ZEXPORT gzread (file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ - gz_stream *s = (gz_stream*)file; - Bytef *start = (Bytef*)buf; /* starting point for crc computation */ - Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ - - if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR; - - if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1; - if (s->z_err == Z_STREAM_END) return 0; /* EOF */ - - next_out = (Byte*)buf; - s->stream.next_out = (Bytef*)buf; - s->stream.avail_out = len; - - if (s->stream.avail_out && s->back != EOF) { - *next_out++ = s->back; - s->stream.next_out++; - s->stream.avail_out--; - s->back = EOF; - s->out++; - start++; - if (s->last) { - s->z_err = Z_STREAM_END; - return 1; - } - } - - while (s->stream.avail_out != 0) { - - if (s->transparent) { - /* Copy first the lookahead bytes: */ - uInt n = s->stream.avail_in; - if (n > s->stream.avail_out) n = s->stream.avail_out; - if (n > 0) { - zmemcpy(s->stream.next_out, s->stream.next_in, n); - next_out += n; - s->stream.next_out = next_out; - s->stream.next_in += n; - s->stream.avail_out -= n; - s->stream.avail_in -= n; - } - if (s->stream.avail_out > 0) { - s->stream.avail_out -= - (uInt)fread(next_out, 1, s->stream.avail_out, s->file); - } - len -= s->stream.avail_out; - s->in += len; - s->out += len; - if (len == 0) s->z_eof = 1; - return (int)len; - } - if (s->stream.avail_in == 0 && !s->z_eof) { - - errno = 0; - s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file); - if (s->stream.avail_in == 0) { - s->z_eof = 1; - if (ferror(s->file)) { - s->z_err = Z_ERRNO; - break; - } - } - s->stream.next_in = s->inbuf; - } - s->in += s->stream.avail_in; - s->out += s->stream.avail_out; - s->z_err = inflate(&(s->stream), Z_NO_FLUSH); - s->in -= s->stream.avail_in; - s->out -= s->stream.avail_out; - - if (s->z_err == Z_STREAM_END) { - /* Check CRC and original size */ - s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); - start = s->stream.next_out; - - if (getLong(s) != s->crc) { - s->z_err = Z_DATA_ERROR; - } else { - (void)getLong(s); - /* The uncompressed length returned by above getlong() may be - * different from s->out in case of concatenated .gz files. - * Check for such files: - */ - check_header(s); - if (s->z_err == Z_OK) { - inflateReset(&(s->stream)); - s->crc = crc32(0L, Z_NULL, 0); - } - } - } - if (s->z_err != Z_OK || s->z_eof) break; - } - s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); - - if (len == s->stream.avail_out && - (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO)) - return -1; - return (int)(len - s->stream.avail_out); -} - - -/* =========================================================================== - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. -*/ -int ZEXPORT gzgetc(file) - gzFile file; -{ - unsigned char c; - - return gzread(file, &c, 1) == 1 ? c : -1; -} - - -/* =========================================================================== - Push one byte back onto the stream. -*/ -int ZEXPORT gzungetc(c, file) - int c; - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF; - s->back = c; - s->out--; - s->last = (s->z_err == Z_STREAM_END); - if (s->last) s->z_err = Z_OK; - s->z_eof = 0; - return c; -} - - -/* =========================================================================== - Reads bytes from the compressed file until len-1 characters are - read, or a newline character is read and transferred to buf, or an - end-of-file condition is encountered. The string is then terminated - with a null character. - gzgets returns buf, or Z_NULL in case of error. - - The current implementation is not optimized at all. -*/ -char * ZEXPORT gzgets(file, buf, len) - gzFile file; - char *buf; - int len; -{ - char *b = buf; - if (buf == Z_NULL || len <= 0) return Z_NULL; - - while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; - *buf = '\0'; - return b == buf && len > 0 ? Z_NULL : b; -} - - -#ifndef NO_GZCOMPRESS -/* =========================================================================== - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of bytes actually written (0 in case of error). -*/ -int ZEXPORT gzwrite (file, buf, len) - gzFile file; - voidpc buf; - unsigned len; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - s->stream.next_in = (Bytef*)buf; - s->stream.avail_in = len; - - while (s->stream.avail_in != 0) { - - if (s->stream.avail_out == 0) { - - s->stream.next_out = s->outbuf; - if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { - s->z_err = Z_ERRNO; - break; - } - s->stream.avail_out = Z_BUFSIZE; - } - s->in += s->stream.avail_in; - s->out += s->stream.avail_out; - s->z_err = deflate(&(s->stream), Z_NO_FLUSH); - s->in -= s->stream.avail_in; - s->out -= s->stream.avail_out; - if (s->z_err != Z_OK) break; - } - s->crc = crc32(s->crc, (const Bytef *)buf, len); - - return (int)(len - s->stream.avail_in); -} - - -/* =========================================================================== - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). -*/ -#ifdef STDC -#include - -int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) -{ - char buf[Z_PRINTF_BUFSIZE]; - va_list va; - int len; - - buf[sizeof(buf) - 1] = 0; - va_start(va, format); -#ifdef NO_vsnprintf -# ifdef HAS_vsprintf_void - (void)vsprintf(buf, format, va); - va_end(va); - for (len = 0; len < sizeof(buf); len++) - if (buf[len] == 0) break; -# else - len = vsprintf(buf, format, va); - va_end(va); -# endif -#else -# ifdef HAS_vsnprintf_void - (void)vsnprintf(buf, sizeof(buf), format, va); - va_end(va); - len = strlen(buf); -# else - len = vsnprintf(buf, sizeof(buf), format, va); - va_end(va); -# endif -#endif - if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0) - return 0; - return gzwrite(file, buf, (unsigned)len); -} -#else /* not ANSI C */ - -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; -{ - char buf[Z_PRINTF_BUFSIZE]; - int len; - - buf[sizeof(buf) - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - for (len = 0; len < sizeof(buf); len++) - if (buf[len] == 0) break; -# else - len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#else -# ifdef HAS_snprintf_void - snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen(buf); -# else - len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#endif - if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0) - return 0; - return gzwrite(file, buf, len); -} -#endif - -/* =========================================================================== - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. -*/ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ - unsigned char cc = (unsigned char) c; /* required for big endian systems */ - - return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; -} - - -/* =========================================================================== - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. -*/ -int ZEXPORT gzputs(file, s) - gzFile file; - const char *s; -{ - return gzwrite(file, (char*)s, (unsigned)strlen(s)); -} - - -/* =========================================================================== - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. -*/ -local int do_flush (file, flush) - gzFile file; - int flush; -{ - uInt len; - int done = 0; - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - s->stream.avail_in = 0; /* should be zero already anyway */ - - for (;;) { - len = Z_BUFSIZE - s->stream.avail_out; - - if (len != 0) { - if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) { - s->z_err = Z_ERRNO; - return Z_ERRNO; - } - s->stream.next_out = s->outbuf; - s->stream.avail_out = Z_BUFSIZE; - } - if (done) break; - s->out += s->stream.avail_out; - s->z_err = deflate(&(s->stream), flush); - s->out -= s->stream.avail_out; - - /* Ignore the second of two consecutive flushes: */ - if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; - - /* deflate has finished flushing only when it hasn't used up - * all the available space in the output buffer: - */ - done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); - - if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; - } - return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; -} - -int ZEXPORT gzflush (file, flush) - gzFile file; - int flush; -{ - gz_stream *s = (gz_stream*)file; - int err = do_flush (file, flush); - - if (err) return err; - fflush(s->file); - return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; -} -#endif /* NO_GZCOMPRESS */ - -/* =========================================================================== - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error. - SEEK_END is not implemented, returns error. - In this version of the library, gzseek can be extremely slow. -*/ -z_off_t ZEXPORT gzseek (file, offset, whence) - gzFile file; - z_off_t offset; - int whence; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || whence == SEEK_END || - s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) { - return -1L; - } - - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - return -1L; -#else - if (whence == SEEK_SET) { - offset -= s->in; - } - if (offset < 0) return -1L; - - /* At this point, offset is the number of zero bytes to write. */ - if (s->inbuf == Z_NULL) { - s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */ - if (s->inbuf == Z_NULL) return -1L; - zmemzero(s->inbuf, Z_BUFSIZE); - } - while (offset > 0) { - uInt size = Z_BUFSIZE; - if (offset < Z_BUFSIZE) size = (uInt)offset; - - size = gzwrite(file, s->inbuf, size); - if (size == 0) return -1L; - - offset -= size; - } - return s->in; -#endif - } - /* Rest of function is for reading only */ - - /* compute absolute position */ - if (whence == SEEK_CUR) { - offset += s->out; - } - if (offset < 0) return -1L; - - if (s->transparent) { - /* map to fseek */ - s->back = EOF; - s->stream.avail_in = 0; - s->stream.next_in = s->inbuf; - if (fseek(s->file, offset, SEEK_SET) < 0) return -1L; - - s->in = s->out = offset; - return offset; - } - - /* For a negative seek, rewind and use positive seek */ - if (offset >= s->out) { - offset -= s->out; - } else if (gzrewind(file) < 0) { - return -1L; - } - /* offset is now the number of bytes to skip. */ - - if (offset != 0 && s->outbuf == Z_NULL) { - s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); - if (s->outbuf == Z_NULL) return -1L; - } - if (offset && s->back != EOF) { - s->back = EOF; - s->out++; - offset--; - if (s->last) s->z_err = Z_STREAM_END; - } - while (offset > 0) { - int size = Z_BUFSIZE; - if (offset < Z_BUFSIZE) size = (int)offset; - - size = gzread(file, s->outbuf, (uInt)size); - if (size <= 0) return -1L; - offset -= size; - } - return s->out; -} - -/* =========================================================================== - Rewinds input file. -*/ -int ZEXPORT gzrewind (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'r') return -1; - - s->z_err = Z_OK; - s->z_eof = 0; - s->back = EOF; - s->stream.avail_in = 0; - s->stream.next_in = s->inbuf; - s->crc = crc32(0L, Z_NULL, 0); - if (!s->transparent) (void)inflateReset(&s->stream); - s->in = 0; - s->out = 0; - return fseek(s->file, s->start, SEEK_SET); -} - -/* =========================================================================== - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. -*/ -z_off_t ZEXPORT gztell (file) - gzFile file; -{ - return gzseek(file, 0L, SEEK_CUR); -} - -/* =========================================================================== - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. -*/ -int ZEXPORT gzeof (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - /* With concatenated compressed files that can have embedded - * crc trailers, z_eof is no longer the only/best indicator of EOF - * on a gz_stream. Handle end-of-stream error explicitly here. - */ - if (s == NULL || s->mode != 'r') return 0; - if (s->z_eof) return 1; - return s->z_err == Z_STREAM_END; -} - -/* =========================================================================== - Returns 1 if reading and doing so transparently, otherwise zero. -*/ -int ZEXPORT gzdirect (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'r') return 0; - return s->transparent; -} - -/* =========================================================================== - Outputs a long in LSB order to the given file -*/ -local void putLong (file, x) - FILE *file; - uLong x; -{ - int n; - for (n = 0; n < 4; n++) { - fputc((int)(x & 0xff), file); - x >>= 8; - } -} - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets z_err in case - of error. -*/ -local uLong getLong (s) - gz_stream *s; -{ - uLong x = (uLong)get_byte(s); - int c; - - x += ((uLong)get_byte(s))<<8; - x += ((uLong)get_byte(s))<<16; - c = get_byte(s); - if (c == EOF) s->z_err = Z_DATA_ERROR; - x += ((uLong)c)<<24; - return x; -} - -/* =========================================================================== - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. -*/ -int ZEXPORT gzclose (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL) return Z_STREAM_ERROR; - - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - return Z_STREAM_ERROR; -#else - if (do_flush (file, Z_FINISH) != Z_OK) - return destroy((gz_stream*)file); - - putLong (s->file, s->crc); - putLong (s->file, (uLong)(s->in & 0xffffffff)); -#endif - } - return destroy((gz_stream*)file); -} - -#ifdef STDC -# define zstrerror(errnum) strerror(errnum) -#else -# define zstrerror(errnum) "" -#endif - -/* =========================================================================== - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. -*/ -const char * ZEXPORT gzerror (file, errnum) - gzFile file; - int *errnum; -{ - char *m; - gz_stream *s = (gz_stream*)file; - - if (s == NULL) { - *errnum = Z_STREAM_ERROR; - return (const char*)ERR_MSG(Z_STREAM_ERROR); - } - *errnum = s->z_err; - if (*errnum == Z_OK) return (const char*)""; - - m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg); - - if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); - - TRYFREE(s->msg); - s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); - if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR); - strcpy(s->msg, s->path); - strcat(s->msg, ": "); - strcat(s->msg, m); - return (const char*)s->msg; -} - -/* =========================================================================== - Clear the error and end-of-file flags, and do the same for the real file. -*/ -void ZEXPORT gzclearerr (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL) return; - if (s->z_err != Z_STREAM_END) s->z_err = Z_OK; - s->z_eof = 0; - clearerr(s->file); -} diff --git a/source/Irrlicht/zlib/gzlib.c b/source/Irrlicht/zlib/gzlib.c new file mode 100644 index 00000000..603e60ed --- /dev/null +++ b/source/Irrlicht/zlib/gzlib.c @@ -0,0 +1,537 @@ +/* gzlib.c -- zlib functions common to reading and writing gzip files + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define LSEEK lseek64 +#else +# define LSEEK lseek +#endif + +/* Local functions */ +local void gz_reset OF((gz_statep)); +local gzFile gz_open OF((const char *, int, const char *)); + +#if defined UNDER_CE + +/* Map the Windows error number in ERROR to a locale-dependent error message + string and return a pointer to it. Typically, the values for ERROR come + from GetLastError. + + The string pointed to shall not be modified by the application, but may be + overwritten by a subsequent call to gz_strwinerror + + The gz_strwinerror function does not change the current setting of + GetLastError. */ +char ZLIB_INTERNAL *gz_strwinerror (error) + DWORD error; +{ + static char buf[1024]; + + wchar_t *msgbuf; + DWORD lasterr = GetLastError(); + DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, + error, + 0, /* Default language */ + (LPVOID)&msgbuf, + 0, + NULL); + if (chars != 0) { + /* If there is an \r\n appended, zap it. */ + if (chars >= 2 + && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { + chars -= 2; + msgbuf[chars] = 0; + } + + if (chars > sizeof (buf) - 1) { + chars = sizeof (buf) - 1; + msgbuf[chars] = 0; + } + + wcstombs(buf, msgbuf, chars + 1); + LocalFree(msgbuf); + } + else { + sprintf(buf, "unknown win32 error (%ld)", error); + } + + SetLastError(lasterr); + return buf; +} + +#endif /* UNDER_CE */ + +/* Reset gzip file state */ +local void gz_reset(state) + gz_statep state; +{ + if (state->mode == GZ_READ) { /* for reading ... */ + state->have = 0; /* no output data available */ + state->eof = 0; /* not at end of file */ + state->how = LOOK; /* look for gzip header */ + state->direct = 1; /* default for empty file */ + } + state->seek = 0; /* no seek request pending */ + gz_error(state, Z_OK, NULL); /* clear error */ + state->pos = 0; /* no uncompressed data yet */ + state->strm.avail_in = 0; /* no input data yet */ +} + +/* Open a gzip file either by name or file descriptor. */ +local gzFile gz_open(path, fd, mode) + const char *path; + int fd; + const char *mode; +{ + gz_statep state; + + /* allocate gzFile structure to return */ + state = malloc(sizeof(gz_state)); + if (state == NULL) + return NULL; + state->size = 0; /* no buffers allocated yet */ + state->want = GZBUFSIZE; /* requested buffer size */ + state->msg = NULL; /* no error message yet */ + + /* interpret mode */ + state->mode = GZ_NONE; + state->level = Z_DEFAULT_COMPRESSION; + state->strategy = Z_DEFAULT_STRATEGY; + while (*mode) { + if (*mode >= '0' && *mode <= '9') + state->level = *mode - '0'; + else + switch (*mode) { + case 'r': + state->mode = GZ_READ; + break; +#ifndef NO_GZCOMPRESS + case 'w': + state->mode = GZ_WRITE; + break; + case 'a': + state->mode = GZ_APPEND; + break; +#endif + case '+': /* can't read and write at the same time */ + free(state); + return NULL; + case 'b': /* ignore -- will request binary anyway */ + break; + case 'f': + state->strategy = Z_FILTERED; + break; + case 'h': + state->strategy = Z_HUFFMAN_ONLY; + break; + case 'R': + state->strategy = Z_RLE; + break; + case 'F': + state->strategy = Z_FIXED; + default: /* could consider as an error, but just ignore */ + ; + } + mode++; + } + + /* must provide an "r", "w", or "a" */ + if (state->mode == GZ_NONE) { + free(state); + return NULL; + } + + /* save the path name for error messages */ + state->path = malloc(strlen(path) + 1); + if (state->path == NULL) { + free(state); + return NULL; + } + strcpy(state->path, path); + + /* open the file with the appropriate mode (or just use fd) */ + state->fd = fd != -1 ? fd : + open(path, +#ifdef O_LARGEFILE + O_LARGEFILE | +#endif +#ifdef O_BINARY + O_BINARY | +#endif + (state->mode == GZ_READ ? + O_RDONLY : + (O_WRONLY | O_CREAT | ( + state->mode == GZ_WRITE ? + O_TRUNC : + O_APPEND))), + 0666); + if (state->fd == -1) { + free(state->path); + free(state); + return NULL; + } + if (state->mode == GZ_APPEND) + state->mode = GZ_WRITE; /* simplify later checks */ + + /* save the current position for rewinding (only if reading) */ + if (state->mode == GZ_READ) { + state->start = LSEEK(state->fd, 0, SEEK_CUR); + if (state->start == -1) state->start = 0; + } + + /* initialize stream */ + gz_reset(state); + + /* return stream */ + return (gzFile)state; +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen64(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzdopen(fd, mode) + int fd; + const char *mode; +{ + char *path; /* identifier for error messages */ + gzFile gz; + + if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) + return NULL; + sprintf(path, "", fd); /* for debugging */ + gz = gz_open(path, fd, mode); + free(path); + return gz; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzbuffer(file, size) + gzFile file; + unsigned size; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* make sure we haven't already allocated memory */ + if (state->size != 0) + return -1; + + /* check and set requested size */ + if (size == 0) + return -1; + state->want = size; + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzrewind(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* back up and start over */ + if (LSEEK(state->fd, state->start, SEEK_SET) == -1) + return -1; + gz_reset(state); + return 0; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzseek64(file, offset, whence) + gzFile file; + z_off64_t offset; + int whence; +{ + unsigned n; + z_off64_t ret; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* check that there's no error */ + if (state->err != Z_OK) + return -1; + + /* can only seek from start or relative to current position */ + if (whence != SEEK_SET && whence != SEEK_CUR) + return -1; + + /* normalize offset to a SEEK_CUR specification */ + if (whence == SEEK_SET) + offset -= state->pos; + else if (state->seek) + offset += state->skip; + state->seek = 0; + + /* if within raw area while reading, just go there */ + if (state->mode == GZ_READ && state->how == COPY && + state->pos + offset >= state->raw) { + ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); + if (ret == -1) + return -1; + state->have = 0; + state->eof = 0; + state->seek = 0; + gz_error(state, Z_OK, NULL); + state->strm.avail_in = 0; + state->pos += offset; + return state->pos; + } + + /* calculate skip amount, rewinding if needed for back seek when reading */ + if (offset < 0) { + if (state->mode != GZ_READ) /* writing -- can't go backwards */ + return -1; + offset += state->pos; + if (offset < 0) /* before start of file! */ + return -1; + if (gzrewind(file) == -1) /* rewind, then skip to offset */ + return -1; + } + + /* if reading, skip what's in output buffer (one less gzgetc() check) */ + if (state->mode == GZ_READ) { + n = GT_OFF(state->have) || (z_off64_t)state->have > offset ? + (unsigned)offset : state->have; + state->have -= n; + state->next += n; + state->pos += n; + offset -= n; + } + + /* request skip (if not zero) */ + if (offset) { + state->seek = 1; + state->skip = offset; + } + return state->pos + offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzseek(file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + z_off64_t ret; + + ret = gzseek64(file, (z_off64_t)offset, whence); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gztell64(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* return position */ + return state->pos + (state->seek ? state->skip : 0); +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gztell(file) + gzFile file; +{ + z_off64_t ret; + + ret = gztell64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzoffset64(file) + gzFile file; +{ + z_off64_t offset; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* compute and return effective offset in file */ + offset = LSEEK(state->fd, 0, SEEK_CUR); + if (offset == -1) + return -1; + if (state->mode == GZ_READ) /* reading */ + offset -= state->strm.avail_in; /* don't count buffered input */ + return offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzoffset(file) + gzFile file; +{ + z_off64_t ret; + + ret = gzoffset64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzeof(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return 0; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return 0; + + /* return end-of-file state */ + return state->mode == GZ_READ ? + (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0; +} + +/* -- see zlib.h -- */ +const char * ZEXPORT gzerror(file, errnum) + gzFile file; + int *errnum; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return NULL; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return NULL; + + /* return error information */ + if (errnum != NULL) + *errnum = state->err; + return state->msg == NULL ? "" : state->msg; +} + +/* -- see zlib.h -- */ +void ZEXPORT gzclearerr(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return; + + /* clear error and end-of-file */ + if (state->mode == GZ_READ) + state->eof = 0; + gz_error(state, Z_OK, NULL); +} + +/* Create an error message in allocated memory and set state->err and + state->msg accordingly. Free any previous error message already there. Do + not try to free or allocate space if the error is Z_MEM_ERROR (out of + memory). Simply save the error message as a static string. If there is an + allocation failure constructing the error message, then convert the error to + out of memory. */ +void ZLIB_INTERNAL gz_error(state, err, msg) + gz_statep state; + int err; + const char *msg; +{ + /* free previously allocated message and clear */ + if (state->msg != NULL) { + if (state->err != Z_MEM_ERROR) + free(state->msg); + state->msg = NULL; + } + + /* set error code, and if no message, then done */ + state->err = err; + if (msg == NULL) + return; + + /* for an out of memory error, save as static string */ + if (err == Z_MEM_ERROR) { + state->msg = (char *)msg; + return; + } + + /* construct error message with path */ + if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { + state->err = Z_MEM_ERROR; + state->msg = (char *)"out of memory"; + return; + } + strcpy(state->msg, state->path); + strcat(state->msg, ": "); + strcat(state->msg, msg); + return; +} + +#ifndef INT_MAX +/* portably return maximum value for an int (when limits.h presumed not + available) -- we need to do this to cover cases where 2's complement not + used, since C standard permits 1's complement and sign-bit representations, + otherwise we could just use ((unsigned)-1) >> 1 */ +unsigned ZLIB_INTERNAL gz_intmax() +{ + unsigned p, q; + + p = 1; + do { + q = p; + p <<= 1; + p++; + } while (p > q); + return q >> 1; +} +#endif diff --git a/source/Irrlicht/zlib/gzread.c b/source/Irrlicht/zlib/gzread.c new file mode 100644 index 00000000..548201ab --- /dev/null +++ b/source/Irrlicht/zlib/gzread.c @@ -0,0 +1,653 @@ +/* gzread.c -- zlib functions for reading gzip files + * Copyright (C) 2004, 2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); +local int gz_avail OF((gz_statep)); +local int gz_next4 OF((gz_statep, unsigned long *)); +local int gz_head OF((gz_statep)); +local int gz_decomp OF((gz_statep)); +local int gz_make OF((gz_statep)); +local int gz_skip OF((gz_statep, z_off64_t)); + +/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from + state->fd, and update state->eof, state->err, and state->msg as appropriate. + This function needs to loop on read(), since read() is not guaranteed to + read the number of bytes requested, depending on the type of descriptor. */ +local int gz_load(state, buf, len, have) + gz_statep state; + unsigned char *buf; + unsigned len; + unsigned *have; +{ + int ret; + + *have = 0; + do { + ret = read(state->fd, buf + *have, len - *have); + if (ret <= 0) + break; + *have += ret; + } while (*have < len); + if (ret < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (ret == 0) + state->eof = 1; + return 0; +} + +/* Load up input buffer and set eof flag if last data loaded -- return -1 on + error, 0 otherwise. Note that the eof flag is set when the end of the input + file is reached, even though there may be unused data in the buffer. Once + that data has been used, no more attempts will be made to read the file. + gz_avail() assumes that strm->avail_in == 0. */ +local int gz_avail(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + if (state->err != Z_OK) + return -1; + if (state->eof == 0) { + if (gz_load(state, state->in, state->size, + (unsigned *)&(strm->avail_in)) == -1) + return -1; + strm->next_in = state->in; + } + return 0; +} + +/* Get next byte from input, or -1 if end or error. */ +#define NEXT() ((strm->avail_in == 0 && gz_avail(state) == -1) ? -1 : \ + (strm->avail_in == 0 ? -1 : \ + (strm->avail_in--, *(strm->next_in)++))) + +/* Get a four-byte little-endian integer and return 0 on success and the value + in *ret. Otherwise -1 is returned and *ret is not modified. */ +local int gz_next4(state, ret) + gz_statep state; + unsigned long *ret; +{ + int ch; + unsigned long val; + z_streamp strm = &(state->strm); + + val = NEXT(); + val += (unsigned)NEXT() << 8; + val += (unsigned long)NEXT() << 16; + ch = NEXT(); + if (ch == -1) + return -1; + val += (unsigned long)ch << 24; + *ret = val; + return 0; +} + +/* Look for gzip header, set up for inflate or copy. state->have must be zero. + If this is the first time in, allocate required memory. state->how will be + left unchanged if there is no more input data available, will be set to COPY + if there is no gzip header and direct copying will be performed, or it will + be set to GZIP for decompression, and the gzip header will be skipped so + that the next available input data is the raw deflate stream. If direct + copying, then leftover input data from the input buffer will be copied to + the output buffer. In that case, all further file reads will be directly to + either the output buffer or a user buffer. If decompressing, the inflate + state and the check value will be initialized. gz_head() will return 0 on + success or -1 on failure. Failures may include read errors or gzip header + errors. */ +local int gz_head(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + int flags; + unsigned len; + + /* allocate read buffers and inflate memory */ + if (state->size == 0) { + /* allocate buffers */ + state->in = malloc(state->want); + state->out = malloc(state->want << 1); + if (state->in == NULL || state->out == NULL) { + if (state->out != NULL) + free(state->out); + if (state->in != NULL) + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + state->size = state->want; + + /* allocate inflate memory */ + state->strm.zalloc = Z_NULL; + state->strm.zfree = Z_NULL; + state->strm.opaque = Z_NULL; + state->strm.avail_in = 0; + state->strm.next_in = Z_NULL; + if (inflateInit2(&(state->strm), -15) != Z_OK) { /* raw inflate */ + free(state->out); + free(state->in); + state->size = 0; + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + } + + /* get some data in the input buffer */ + if (strm->avail_in == 0) { + if (gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) + return 0; + } + + /* look for the gzip magic header bytes 31 and 139 */ + if (strm->next_in[0] == 31) { + strm->avail_in--; + strm->next_in++; + if (strm->avail_in == 0 && gz_avail(state) == -1) + return -1; + if (strm->avail_in && strm->next_in[0] == 139) { + /* we have a gzip header, woo hoo! */ + strm->avail_in--; + strm->next_in++; + + /* skip rest of header */ + if (NEXT() != 8) { /* compression method */ + gz_error(state, Z_DATA_ERROR, "unknown compression method"); + return -1; + } + flags = NEXT(); + if (flags & 0xe0) { /* reserved flag bits */ + gz_error(state, Z_DATA_ERROR, "unknown header flags set"); + return -1; + } + NEXT(); /* modification time */ + NEXT(); + NEXT(); + NEXT(); + NEXT(); /* extra flags */ + NEXT(); /* operating system */ + if (flags & 4) { /* extra field */ + len = (unsigned)NEXT(); + len += (unsigned)NEXT() << 8; + while (len--) + if (NEXT() < 0) + break; + } + if (flags & 8) /* file name */ + while (NEXT() > 0) + ; + if (flags & 16) /* comment */ + while (NEXT() > 0) + ; + if (flags & 2) { /* header crc */ + NEXT(); + NEXT(); + } + /* an unexpected end of file is not checked for here -- it will be + noticed on the first request for uncompressed data */ + + /* set up for decompression */ + inflateReset(strm); + strm->adler = crc32(0L, Z_NULL, 0); + state->how = GZIP; + state->direct = 0; + return 0; + } + else { + /* not a gzip file -- save first byte (31) and fall to raw i/o */ + state->out[0] = 31; + state->have = 1; + } + } + + /* doing raw i/o, save start of raw data for seeking, copy any leftover + input to output -- this assumes that the output buffer is larger than + the input buffer, which also assures space for gzungetc() */ + state->raw = state->pos; + state->next = state->out; + if (strm->avail_in) { + memcpy(state->next + state->have, strm->next_in, strm->avail_in); + state->have += strm->avail_in; + strm->avail_in = 0; + } + state->how = COPY; + state->direct = 1; + return 0; +} + +/* Decompress from input to the provided next_out and avail_out in the state. + If the end of the compressed data is reached, then verify the gzip trailer + check value and length (modulo 2^32). state->have and state->next are set + to point to the just decompressed data, and the crc is updated. If the + trailer is verified, state->how is reset to LOOK to look for the next gzip + stream or raw data, once state->have is depleted. Returns 0 on success, -1 + on failure. Failures may include invalid compressed data or a failed gzip + trailer verification. */ +local int gz_decomp(state) + gz_statep state; +{ + int ret; + unsigned had; + unsigned long crc, len; + z_streamp strm = &(state->strm); + + /* fill output buffer up to end of deflate stream */ + had = strm->avail_out; + do { + /* get more input for inflate() */ + if (strm->avail_in == 0 && gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) { + gz_error(state, Z_DATA_ERROR, "unexpected end of file"); + return -1; + } + + /* decompress and handle errors */ + ret = inflate(strm, Z_NO_FLUSH); + if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { + gz_error(state, Z_STREAM_ERROR, + "internal error: inflate stream corrupt"); + return -1; + } + if (ret == Z_MEM_ERROR) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ + gz_error(state, Z_DATA_ERROR, + strm->msg == NULL ? "compressed data error" : strm->msg); + return -1; + } + } while (strm->avail_out && ret != Z_STREAM_END); + + /* update available output and crc check value */ + state->have = had - strm->avail_out; + state->next = strm->next_out - state->have; + strm->adler = crc32(strm->adler, state->next, state->have); + + /* check gzip trailer if at end of deflate stream */ + if (ret == Z_STREAM_END) { + if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) { + gz_error(state, Z_DATA_ERROR, "unexpected end of file"); + return -1; + } + if (crc != strm->adler) { + gz_error(state, Z_DATA_ERROR, "incorrect data check"); + return -1; + } + if (len != (strm->total_out & 0xffffffffL)) { + gz_error(state, Z_DATA_ERROR, "incorrect length check"); + return -1; + } + state->how = LOOK; /* ready for next stream, once have is 0 (leave + state->direct unchanged to remember how) */ + } + + /* good decompression */ + return 0; +} + +/* Make data and put in the output buffer. Assumes that state->have == 0. + Data is either copied from the input file or decompressed from the input + file depending on state->how. If state->how is LOOK, then a gzip header is + looked for (and skipped if found) to determine wither to copy or decompress. + Returns -1 on error, otherwise 0. gz_make() will leave state->have as COPY + or GZIP unless the end of the input file has been reached and all data has + been processed. */ +local int gz_make(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + if (state->how == LOOK) { /* look for gzip header */ + if (gz_head(state) == -1) + return -1; + if (state->have) /* got some data from gz_head() */ + return 0; + } + if (state->how == COPY) { /* straight copy */ + if (gz_load(state, state->out, state->size << 1, &(state->have)) == -1) + return -1; + state->next = state->out; + } + else if (state->how == GZIP) { /* decompress */ + strm->avail_out = state->size << 1; + strm->next_out = state->out; + if (gz_decomp(state) == -1) + return -1; + } + return 0; +} + +/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ +local int gz_skip(state, len) + gz_statep state; + z_off64_t len; +{ + unsigned n; + + /* skip over len bytes or reach end-of-file, whichever comes first */ + while (len) + /* skip over whatever is in output buffer */ + if (state->have) { + n = GT_OFF(state->have) || (z_off64_t)state->have > len ? + (unsigned)len : state->have; + state->have -= n; + state->next += n; + state->pos += n; + len -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) + break; + + /* need more data to skip -- load up output buffer */ + else { + /* get more output, looking for header if required */ + if (gz_make(state) == -1) + return -1; + } + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzread(file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + unsigned got, n; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids the flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_BUF_ERROR, "requested length does not fit in int"); + return -1; + } + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return -1; + } + + /* get len bytes to buf, or less than len if at the end */ + got = 0; + do { + /* first just try copying data from the output buffer */ + if (state->have) { + n = state->have > len ? len : state->have; + memcpy(buf, state->next, n); + state->next += n; + state->have -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && strm->avail_in == 0) + break; + + /* need output data -- for small len or new stream load up our output + buffer */ + else if (state->how == LOOK || len < (state->size << 1)) { + /* get more output, looking for header if required */ + if (gz_make(state) == -1) + return -1; + continue; /* no progress yet -- go back to memcpy() above */ + /* the copy above assures that we will leave with space in the + output buffer, allowing at least one gzungetc() to succeed */ + } + + /* large len -- read directly into user buffer */ + else if (state->how == COPY) { /* read directly */ + if (gz_load(state, buf, len, &n) == -1) + return -1; + } + + /* large len -- decompress directly into user buffer */ + else { /* state->how == GZIP */ + strm->avail_out = len; + strm->next_out = buf; + if (gz_decomp(state) == -1) + return -1; + n = state->have; + state->have = 0; + } + + /* update progress */ + len -= n; + buf = (char *)buf + n; + got += n; + state->pos += n; + } while (len); + + /* return number of bytes read into user buffer (will fit in int) */ + return (int)got; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzgetc(file) + gzFile file; +{ + int ret; + unsigned char buf[1]; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* try output buffer (no need to check for skip request) */ + if (state->have) { + state->have--; + state->pos++; + return *(state->next)++; + } + + /* nothing there -- try gzread() */ + ret = gzread(file, buf, 1); + return ret < 1 ? -1 : buf[0]; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzungetc(c, file) + int c; + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return -1; + } + + /* can't push EOF */ + if (c < 0) + return -1; + + /* if output buffer empty, put byte at end (allows more pushing) */ + if (state->have == 0) { + state->have = 1; + state->next = state->out + (state->size << 1) - 1; + state->next[0] = c; + state->pos--; + return c; + } + + /* if no room, give up (must have already done a gzungetc()) */ + if (state->have == (state->size << 1)) { + gz_error(state, Z_BUF_ERROR, "out of room to push characters"); + return -1; + } + + /* slide output data if needed and insert byte before existing data */ + if (state->next == state->out) { + unsigned char *src = state->out + state->have; + unsigned char *dest = state->out + (state->size << 1); + while (src > state->out) + *--dest = *--src; + state->next = dest; + } + state->have++; + state->next--; + state->next[0] = c; + state->pos--; + return c; +} + +/* -- see zlib.h -- */ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + unsigned left, n; + char *str; + unsigned char *eol; + gz_statep state; + + /* check parameters and get internal structure */ + if (file == NULL || buf == NULL || len < 1) + return NULL; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return NULL; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return NULL; + } + + /* copy output bytes up to new line or len - 1, whichever comes first -- + append a terminating zero to the string (we don't check for a zero in + the contents, let the user worry about that) */ + str = buf; + left = (unsigned)len - 1; + if (left) do { + /* assure that something is in the output buffer */ + if (state->have == 0) { + if (gz_make(state) == -1) + return NULL; /* error */ + if (state->have == 0) { /* end of file */ + if (buf == str) /* got bupkus */ + return NULL; + break; /* got something -- return it */ + } + } + + /* look for end-of-line in current output buffer */ + n = state->have > left ? left : state->have; + eol = memchr(state->next, '\n', n); + if (eol != NULL) + n = (unsigned)(eol - state->next) + 1; + + /* copy through end-of-line, or remainder if not found */ + memcpy(buf, state->next, n); + state->have -= n; + state->next += n; + state->pos += n; + left -= n; + buf += n; + } while (left && eol == NULL); + + /* found end-of-line or out of space -- terminate string and return it */ + buf[0] = 0; + return str; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzdirect(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're reading */ + if (state->mode != GZ_READ) + return 0; + + /* if the state is not known, but we can find out, then do so (this is + mainly for right after a gzopen() or gzdopen()) */ + if (state->how == LOOK && state->have == 0) + (void)gz_head(state); + + /* return 1 if reading direct, 0 if decompressing a gzip stream */ + return state->direct; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_r(file) + gzFile file; +{ + int ret; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're reading */ + if (state->mode != GZ_READ) + return Z_STREAM_ERROR; + + /* free memory and close file */ + if (state->size) { + inflateEnd(&(state->strm)); + free(state->out); + free(state->in); + } + gz_error(state, Z_OK, NULL); + free(state->path); + ret = close(state->fd); + free(state); + return ret ? Z_ERRNO : Z_OK; +} diff --git a/source/Irrlicht/zlib/gzwrite.c b/source/Irrlicht/zlib/gzwrite.c new file mode 100644 index 00000000..e8defc68 --- /dev/null +++ b/source/Irrlicht/zlib/gzwrite.c @@ -0,0 +1,531 @@ +/* gzwrite.c -- zlib functions for writing gzip files + * Copyright (C) 2004, 2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_init OF((gz_statep)); +local int gz_comp OF((gz_statep, int)); +local int gz_zero OF((gz_statep, z_off64_t)); + +/* Initialize state for writing a gzip file. Mark initialization by setting + state->size to non-zero. Return -1 on failure or 0 on success. */ +local int gz_init(state) + gz_statep state; +{ + int ret; + z_streamp strm = &(state->strm); + + /* allocate input and output buffers */ + state->in = malloc(state->want); + state->out = malloc(state->want); + if (state->in == NULL || state->out == NULL) { + if (state->out != NULL) + free(state->out); + if (state->in != NULL) + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* allocate deflate memory, set up for gzip compression */ + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = deflateInit2(strm, state->level, Z_DEFLATED, + 15 + 16, 8, state->strategy); + if (ret != Z_OK) { + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* mark state as initialized */ + state->size = state->want; + + /* initialize write buffer */ + strm->avail_out = state->size; + strm->next_out = state->out; + state->next = strm->next_out; + return 0; +} + +/* Compress whatever is at avail_in and next_in and write to the output file. + Return -1 if there is an error writing to the output file, otherwise 0. + flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH, + then the deflate() state is reset to start a new gzip stream. */ +local int gz_comp(state, flush) + gz_statep state; + int flush; +{ + int ret, got; + unsigned have; + z_streamp strm = &(state->strm); + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return -1; + + /* run deflate() on provided input until it produces no more output */ + ret = Z_OK; + do { + /* write out current buffer contents if full, or if flushing, but if + doing Z_FINISH then don't write until we get to Z_STREAM_END */ + if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && + (flush != Z_FINISH || ret == Z_STREAM_END))) { + have = (unsigned)(strm->next_out - state->next); + if (have && ((got = write(state->fd, state->next, have)) < 0 || + (unsigned)got != have)) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (strm->avail_out == 0) { + strm->avail_out = state->size; + strm->next_out = state->out; + } + state->next = strm->next_out; + } + + /* compress */ + have = strm->avail_out; + ret = deflate(strm, flush); + if (ret == Z_STREAM_ERROR) { + gz_error(state, Z_STREAM_ERROR, + "internal error: deflate stream corrupt"); + return -1; + } + have -= strm->avail_out; + } while (have); + + /* if that completed a deflate stream, allow another to start */ + if (flush == Z_FINISH) + deflateReset(strm); + + /* all done, no errors */ + return 0; +} + +/* Compress len zeros to output. Return -1 on error, 0 on success. */ +local int gz_zero(state, len) + gz_statep state; + z_off64_t len; +{ + int first; + unsigned n; + z_streamp strm = &(state->strm); + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + + /* compress len zeros (len guaranteed > 0) */ + first = 1; + while (len) { + n = GT_OFF(state->size) || (z_off64_t)state->size > len ? + (unsigned)len : state->size; + if (first) { + memset(state->in, 0, n); + first = 0; + } + strm->avail_in = n; + strm->next_in = state->in; + state->pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + len -= n; + } + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzwrite(file, buf, len) + gzFile file; + voidpc buf; + unsigned len; +{ + unsigned put = len; + unsigned n; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids the flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_BUF_ERROR, "requested length does not fit in int"); + return 0; + } + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* for small len, copy to input buffer, otherwise compress directly */ + if (len < state->size) { + /* copy to input buffer, compress when full */ + do { + if (strm->avail_in == 0) + strm->next_in = state->in; + n = state->size - strm->avail_in; + if (n > len) + n = len; + memcpy(strm->next_in + strm->avail_in, buf, n); + strm->avail_in += n; + state->pos += n; + buf = (char *)buf + n; + len -= n; + if (len && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } while (len); + } + else { + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* directly compress user buffer to file */ + strm->avail_in = len; + strm->next_in = (voidp)buf; + state->pos += len; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } + + /* input was all buffered or compressed (put will fit in int) */ + return (int)put; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned char buf[1]; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* try writing to input buffer for speed (state->size == 0 if buffer not + initialized) */ + if (strm->avail_in < state->size) { + if (strm->avail_in == 0) + strm->next_in = state->in; + strm->next_in[strm->avail_in++] = c; + state->pos++; + return c; + } + + /* no room in buffer or not initialized, use gz_write() */ + buf[0] = c; + if (gzwrite(file, buf, 1) != 1) + return -1; + return c; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputs(file, str) + gzFile file; + const char *str; +{ + int ret; + unsigned len; + + /* write string */ + len = (unsigned)strlen(str); + ret = gzwrite(file, str, len); + return ret == 0 && len != 0 ? -1 : ret; +} + +#ifdef STDC +#include + +/* -- see zlib.h -- */ +int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) +{ + int size, len; + gz_statep state; + z_streamp strm; + va_list va; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* do the printf() into the input buffer, put length in len */ + size = (int)(state->size); + state->in[size - 1] = 0; + va_start(va, format); +#ifdef NO_vsnprintf +# ifdef HAS_vsprintf_void + (void)vsprintf(state->in, format, va); + va_end(va); + for (len = 0; len < size; len++) + if (state->in[len] == 0) break; +# else + len = vsprintf(state->in, format, va); + va_end(va); +# endif +#else +# ifdef HAS_vsnprintf_void + (void)vsnprintf(state->in, size, format, va); + va_end(va); + len = strlen(state->in); +# else + len = vsnprintf((char *)(state->in), size, format, va); + va_end(va); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) + return 0; + + /* update buffer and position, defer compression until needed */ + strm->avail_in = (unsigned)len; + strm->next_in = state->in; + state->pos += len; + return len; +} + +#else /* !STDC */ + +/* -- see zlib.h -- */ +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + int size, len; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* do the printf() into the input buffer, put length in len */ + size = (int)(state->size); + state->in[size - 1] = 0; +#ifdef NO_snprintf +# ifdef HAS_sprintf_void + sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + for (len = 0; len < size; len++) + if (state->in[len] == 0) break; +# else + len = sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#else +# ifdef HAS_snprintf_void + snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + len = strlen(state->in); +# else + len = snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) + return 0; + + /* update buffer and position, defer compression until needed */ + strm->avail_in = (unsigned)len; + strm->next_in = state->in; + state->pos += len; + return len; +} + +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzflush(file, flush) + gzFile file; + int flush; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* check flush parameter */ + if (flush < 0 || flush > Z_FINISH) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* compress remaining data with requested flush */ + gz_comp(state, flush); + return state->err; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzsetparams(file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* if no change is requested, then do nothing */ + if (level == state->level && strategy == state->strategy) + return Z_OK; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* change compression parameters for subsequent input */ + if (state->size) { + /* flush previous input with previous parameters before changing */ + if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1) + return state->err; + deflateParams(strm, level, strategy); + } + state->level = level; + state->strategy = strategy; + return Z_OK; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_w(file) + gzFile file; +{ + int ret = 0; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing */ + if (state->mode != GZ_WRITE) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + ret += gz_zero(state, state->skip); + } + + /* flush, free memory, and close file */ + ret += gz_comp(state, Z_FINISH); + (void)deflateEnd(&(state->strm)); + free(state->out); + free(state->in); + gz_error(state, Z_OK, NULL); + free(state->path); + ret += close(state->fd); + free(state); + return ret ? Z_ERRNO : Z_OK; +} diff --git a/source/Irrlicht/zlib/infback.c b/source/Irrlicht/zlib/infback.c index 1e03e1ba..14770c56 100644 --- a/source/Irrlicht/zlib/infback.c +++ b/source/Irrlicht/zlib/infback.c @@ -1,5 +1,5 @@ /* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2009 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -55,7 +55,7 @@ int stream_size; state->wbits = windowBits; state->wsize = 1U << windowBits; state->window = window; - state->write = 0; + state->wnext = 0; state->whave = 0; return Z_OK; } @@ -253,7 +253,7 @@ void FAR *out_desc; unsigned bits; /* bits in bit buffer */ unsigned copy; /* number of stored or match bytes to copy */ unsigned char FAR *from; /* where to copy match bytes from */ - code this; /* current decoding table entry */ + code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ int ret; /* return code */ @@ -389,19 +389,19 @@ void FAR *out_desc; state->have = 0; while (state->have < state->nlen + state->ndist) { for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.val < 16) { - NEEDBITS(this.bits); - DROPBITS(this.bits); - state->lens[state->have++] = this.val; + if (here.val < 16) { + NEEDBITS(here.bits); + DROPBITS(here.bits); + state->lens[state->have++] = here.val; } else { - if (this.val == 16) { - NEEDBITS(this.bits + 2); - DROPBITS(this.bits); + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); if (state->have == 0) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; @@ -411,16 +411,16 @@ void FAR *out_desc; copy = 3 + BITS(2); DROPBITS(2); } - else if (this.val == 17) { - NEEDBITS(this.bits + 3); - DROPBITS(this.bits); + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); len = 0; copy = 3 + BITS(3); DROPBITS(3); } else { - NEEDBITS(this.bits + 7); - DROPBITS(this.bits); + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); len = 0; copy = 11 + BITS(7); DROPBITS(7); @@ -438,7 +438,16 @@ void FAR *out_desc; /* handle error breaks in while */ if (state->mode == BAD) break; - /* build code tables */ + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 9; @@ -474,28 +483,28 @@ void FAR *out_desc; /* get a literal, length, or end-of-block code */ for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.op && (this.op & 0xf0) == 0) { - last = this; + if (here.op && (here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->lencode[last.val + + here = state->lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } - DROPBITS(this.bits); - state->length = (unsigned)this.val; + DROPBITS(here.bits); + state->length = (unsigned)here.val; /* process literal */ - if (this.op == 0) { - Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + if (here.op == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", this.val)); + "inflate: literal 0x%02x\n", here.val)); ROOM(); *put++ = (unsigned char)(state->length); left--; @@ -504,21 +513,21 @@ void FAR *out_desc; } /* process end of block */ - if (this.op & 32) { + if (here.op & 32) { Tracevv((stderr, "inflate: end of block\n")); state->mode = TYPE; break; } /* invalid code */ - if (this.op & 64) { + if (here.op & 64) { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } /* length code -- get extra bits, if any */ - state->extra = (unsigned)(this.op) & 15; + state->extra = (unsigned)(here.op) & 15; if (state->extra != 0) { NEEDBITS(state->extra); state->length += BITS(state->extra); @@ -528,30 +537,30 @@ void FAR *out_desc; /* get distance code */ for (;;) { - this = state->distcode[BITS(state->distbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if ((this.op & 0xf0) == 0) { - last = this; + if ((here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->distcode[last.val + + here = state->distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } - DROPBITS(this.bits); - if (this.op & 64) { + DROPBITS(here.bits); + if (here.op & 64) { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } - state->offset = (unsigned)this.val; + state->offset = (unsigned)here.val; /* get distance extra bits, if any */ - state->extra = (unsigned)(this.op) & 15; + state->extra = (unsigned)(here.op) & 15; if (state->extra != 0) { NEEDBITS(state->extra); state->offset += BITS(state->extra); diff --git a/source/Irrlicht/zlib/inffast.c b/source/Irrlicht/zlib/inffast.c index fa31cad9..2dfd4127 100644 --- a/source/Irrlicht/zlib/inffast.c +++ b/source/Irrlicht/zlib/inffast.c @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2004 Mark Adler + * Copyright (C) 1995-2008, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -64,7 +64,7 @@ requires strm->avail_out >= 258 for each loop to avoid checking for output space. */ -void inflate_fast(strm, start) +void ZLIB_INTERNAL inflate_fast(strm, start) z_streamp strm; unsigned start; /* inflate()'s starting value for strm->avail_out */ { @@ -79,7 +79,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ #endif unsigned wsize; /* window size or zero if not using window */ unsigned whave; /* valid bytes in the window */ - unsigned write; /* window write index */ + unsigned wnext; /* window write index */ unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ unsigned long hold; /* local strm->hold */ unsigned bits; /* local strm->bits */ @@ -87,7 +87,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ code const FAR *dcode; /* local strm->distcode */ unsigned lmask; /* mask for first level of length codes */ unsigned dmask; /* mask for first level of distance codes */ - code this; /* retrieved table entry */ + code here; /* retrieved table entry */ unsigned op; /* code bits, operation, extra bits, or */ /* window position, window bytes to copy */ unsigned len; /* match length, unused bytes */ @@ -106,7 +106,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ #endif wsize = state->wsize; whave = state->whave; - write = state->write; + wnext = state->wnext; window = state->window; hold = state->hold; bits = state->bits; @@ -124,20 +124,20 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ hold += (unsigned long)(PUP(in)) << bits; bits += 8; } - this = lcode[hold & lmask]; + here = lcode[hold & lmask]; dolen: - op = (unsigned)(this.bits); + op = (unsigned)(here.bits); hold >>= op; bits -= op; - op = (unsigned)(this.op); + op = (unsigned)(here.op); if (op == 0) { /* literal */ - Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", this.val)); - PUP(out) = (unsigned char)(this.val); + "inflate: literal 0x%02x\n", here.val)); + PUP(out) = (unsigned char)(here.val); } else if (op & 16) { /* length base */ - len = (unsigned)(this.val); + len = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (op) { if (bits < op) { @@ -155,14 +155,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ hold += (unsigned long)(PUP(in)) << bits; bits += 8; } - this = dcode[hold & dmask]; + here = dcode[hold & dmask]; dodist: - op = (unsigned)(this.bits); + op = (unsigned)(here.bits); hold >>= op; bits -= op; - op = (unsigned)(this.op); + op = (unsigned)(here.op); if (op & 16) { /* distance base */ - dist = (unsigned)(this.val); + dist = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (bits < op) { hold += (unsigned long)(PUP(in)) << bits; @@ -187,12 +187,34 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ if (dist > op) { /* see if copy from window */ op = dist - op; /* distance back in window */ if (op > whave) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; + if (state->sane) { + strm->msg = + (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + if (len <= op - whave) { + do { + PUP(out) = 0; + } while (--len); + continue; + } + len -= op - whave; + do { + PUP(out) = 0; + } while (--op > whave); + if (op == 0) { + from = out - dist; + do { + PUP(out) = PUP(from); + } while (--len); + continue; + } +#endif } from = window - OFF; - if (write == 0) { /* very common case */ + if (wnext == 0) { /* very common case */ from += wsize - op; if (op < len) { /* some from window */ len -= op; @@ -202,17 +224,17 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ from = out - dist; /* rest from output */ } } - else if (write < op) { /* wrap around window */ - from += wsize + write - op; - op -= write; + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; if (op < len) { /* some from end of window */ len -= op; do { PUP(out) = PUP(from); } while (--op); from = window - OFF; - if (write < len) { /* some from start of window */ - op = write; + if (wnext < len) { /* some from start of window */ + op = wnext; len -= op; do { PUP(out) = PUP(from); @@ -222,7 +244,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else { /* contiguous in window */ - from += write - op; + from += wnext - op; if (op < len) { /* some from window */ len -= op; do { @@ -259,7 +281,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else if ((op & 64) == 0) { /* 2nd level distance code */ - this = dcode[this.val + (hold & ((1U << op) - 1))]; + here = dcode[here.val + (hold & ((1U << op) - 1))]; goto dodist; } else { @@ -269,7 +291,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else if ((op & 64) == 0) { /* 2nd level length code */ - this = lcode[this.val + (hold & ((1U << op) - 1))]; + here = lcode[here.val + (hold & ((1U << op) - 1))]; goto dolen; } else if (op & 32) { /* end-of-block */ @@ -305,7 +327,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - Using bit fields for code structure - Different op definition to avoid & for extra bits (do & for table bits) - - Three separate decoding do-loops for direct, window, and write == 0 + - Three separate decoding do-loops for direct, window, and wnext == 0 - Special case for distance > 1 copies to do overlapped load and store copy - Explicit branch predictions (based on measured branch probabilities) - Deferring match copy and interspersed it with decoding subsequent codes diff --git a/source/Irrlicht/zlib/inffast.h b/source/Irrlicht/zlib/inffast.h index 614fa787..e1e6db4a 100644 --- a/source/Irrlicht/zlib/inffast.h +++ b/source/Irrlicht/zlib/inffast.h @@ -1,5 +1,5 @@ /* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003 Mark Adler + * Copyright (C) 1995-2003, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,4 +8,4 @@ subject to change. Applications should only use zlib.h. */ -void inflate_fast OF((z_streamp strm, unsigned start)); +void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/source/Irrlicht/zlib/inflate.c b/source/Irrlicht/zlib/inflate.c index 33ea9029..5bec31e2 100644 --- a/source/Irrlicht/zlib/inflate.c +++ b/source/Irrlicht/zlib/inflate.c @@ -1,5 +1,5 @@ /* inflate.c -- zlib decompression - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -45,7 +45,7 @@ * - Rearrange window copies in inflate_fast() for speed and simplification * - Unroll last copy for window match in inflate_fast() * - Use local copies of window variables in inflate_fast() for speed - * - Pull out common write == 0 case for speed in inflate_fast() + * - Pull out common wnext == 0 case for speed in inflate_fast() * - Make op and len in inflate_fast() unsigned for consistency * - Add FAR to lcode and dcode declarations in inflate_fast() * - Simplified bad distance check in inflate_fast() @@ -117,28 +117,52 @@ z_streamp strm; state->head = Z_NULL; state->wsize = 0; state->whave = 0; - state->write = 0; + state->wnext = 0; state->hold = 0; state->bits = 0; state->lencode = state->distcode = state->next = state->codes; + state->sane = 1; + state->back = -1; Tracev((stderr, "inflate: reset\n")); return Z_OK; } -int ZEXPORT inflatePrime(strm, bits, value) +int ZEXPORT inflateReset2(strm, windowBits) z_streamp strm; -int bits; -int value; +int windowBits; { + int wrap; struct inflate_state FAR *state; + /* get the state */ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; - if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += value << state->bits; - state->bits += bits; - return Z_OK; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; +#ifdef GUNZIP + if (windowBits < 48) + windowBits &= 15; +#endif + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) + return Z_STREAM_ERROR; + if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { + ZFREE(strm, state->window); + state->window = Z_NULL; + } + + /* update state and reset the rest of it */ + state->wrap = wrap; + state->wbits = (unsigned)windowBits; + return inflateReset(strm); } int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) @@ -147,6 +171,7 @@ int windowBits; const char *version; int stream_size; { + int ret; struct inflate_state FAR *state; if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || @@ -164,24 +189,13 @@ int stream_size; if (state == Z_NULL) return Z_MEM_ERROR; Tracev((stderr, "inflate: allocated\n")); strm->state = (struct internal_state FAR *)state; - if (windowBits < 0) { - state->wrap = 0; - windowBits = -windowBits; - } - else { - state->wrap = (windowBits >> 4) + 1; -#ifdef GUNZIP - if (windowBits < 48) windowBits &= 15; -#endif - } - if (windowBits < 8 || windowBits > 15) { + state->window = Z_NULL; + ret = inflateReset2(strm, windowBits); + if (ret != Z_OK) { ZFREE(strm, state); strm->state = Z_NULL; - return Z_STREAM_ERROR; } - state->wbits = (unsigned)windowBits; - state->window = Z_NULL; - return inflateReset(strm); + return ret; } int ZEXPORT inflateInit_(strm, version, stream_size) @@ -192,6 +206,27 @@ int stream_size; return inflateInit2_(strm, DEF_WBITS, version, stream_size); } +int ZEXPORT inflatePrime(strm, bits, value) +z_streamp strm; +int bits; +int value; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (bits < 0) { + state->hold = 0; + state->bits = 0; + return Z_OK; + } + if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; + value &= (1L << bits) - 1; + state->hold += value << state->bits; + state->bits += bits; + return Z_OK; +} + /* Return state with length and distance decoding tables and index sizes set to fixed code decoding. Normally this returns fixed tables from inffixed.h. @@ -340,7 +375,7 @@ unsigned out; /* if window not in use yet, initialize */ if (state->wsize == 0) { state->wsize = 1U << state->wbits; - state->write = 0; + state->wnext = 0; state->whave = 0; } @@ -348,22 +383,22 @@ unsigned out; copy = out - strm->avail_out; if (copy >= state->wsize) { zmemcpy(state->window, strm->next_out - state->wsize, state->wsize); - state->write = 0; + state->wnext = 0; state->whave = state->wsize; } else { - dist = state->wsize - state->write; + dist = state->wsize - state->wnext; if (dist > copy) dist = copy; - zmemcpy(state->window + state->write, strm->next_out - copy, dist); + zmemcpy(state->window + state->wnext, strm->next_out - copy, dist); copy -= dist; if (copy) { zmemcpy(state->window, strm->next_out - copy, copy); - state->write = copy; + state->wnext = copy; state->whave = state->wsize; } else { - state->write += dist; - if (state->write == state->wsize) state->write = 0; + state->wnext += dist; + if (state->wnext == state->wsize) state->wnext = 0; if (state->whave < state->wsize) state->whave += dist; } } @@ -564,7 +599,7 @@ int flush; unsigned in, out; /* save starting available input and output */ unsigned copy; /* number of stored or match bytes to copy */ unsigned char FAR *from; /* where to copy match bytes from */ - code this; /* current decoding table entry */ + code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ int ret; /* return code */ @@ -619,7 +654,9 @@ int flush; } DROPBITS(4); len = BITS(4) + 8; - if (len > state->wbits) { + if (state->wbits == 0) + state->wbits = len; + else if (len > state->wbits) { strm->msg = (char *)"invalid window size"; state->mode = BAD; break; @@ -771,7 +808,7 @@ int flush; strm->adler = state->check = adler32(0L, Z_NULL, 0); state->mode = TYPE; case TYPE: - if (flush == Z_BLOCK) goto inf_leave; + if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; case TYPEDO: if (state->last) { BYTEBITS(); @@ -791,7 +828,11 @@ int flush; fixedtables(state); Tracev((stderr, "inflate: fixed codes block%s\n", state->last ? " (last)" : "")); - state->mode = LEN; /* decode codes */ + state->mode = LEN_; /* decode codes */ + if (flush == Z_TREES) { + DROPBITS(2); + goto inf_leave; + } break; case 2: /* dynamic block */ Tracev((stderr, "inflate: dynamic codes block%s\n", @@ -816,6 +857,9 @@ int flush; Tracev((stderr, "inflate: stored length %u\n", state->length)); INITBITS(); + state->mode = COPY_; + if (flush == Z_TREES) goto inf_leave; + case COPY_: state->mode = COPY; case COPY: copy = state->length; @@ -876,19 +920,19 @@ int flush; case CODELENS: while (state->have < state->nlen + state->ndist) { for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.val < 16) { - NEEDBITS(this.bits); - DROPBITS(this.bits); - state->lens[state->have++] = this.val; + if (here.val < 16) { + NEEDBITS(here.bits); + DROPBITS(here.bits); + state->lens[state->have++] = here.val; } else { - if (this.val == 16) { - NEEDBITS(this.bits + 2); - DROPBITS(this.bits); + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); if (state->have == 0) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; @@ -898,16 +942,16 @@ int flush; copy = 3 + BITS(2); DROPBITS(2); } - else if (this.val == 17) { - NEEDBITS(this.bits + 3); - DROPBITS(this.bits); + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); len = 0; copy = 3 + BITS(3); DROPBITS(3); } else { - NEEDBITS(this.bits + 7); - DROPBITS(this.bits); + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); len = 0; copy = 11 + BITS(7); DROPBITS(7); @@ -925,7 +969,16 @@ int flush; /* handle error breaks in while */ if (state->mode == BAD) break; - /* build code tables */ + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 9; @@ -946,88 +999,102 @@ int flush; break; } Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN_; + if (flush == Z_TREES) goto inf_leave; + case LEN_: state->mode = LEN; case LEN: if (have >= 6 && left >= 258) { RESTORE(); inflate_fast(strm, out); LOAD(); + if (state->mode == TYPE) + state->back = -1; break; } + state->back = 0; for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.op && (this.op & 0xf0) == 0) { - last = this; + if (here.op && (here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->lencode[last.val + + here = state->lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); + state->back += last.bits; } - DROPBITS(this.bits); - state->length = (unsigned)this.val; - if ((int)(this.op) == 0) { - Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + DROPBITS(here.bits); + state->back += here.bits; + state->length = (unsigned)here.val; + if ((int)(here.op) == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", this.val)); + "inflate: literal 0x%02x\n", here.val)); state->mode = LIT; break; } - if (this.op & 32) { + if (here.op & 32) { Tracevv((stderr, "inflate: end of block\n")); + state->back = -1; state->mode = TYPE; break; } - if (this.op & 64) { + if (here.op & 64) { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } - state->extra = (unsigned)(this.op) & 15; + state->extra = (unsigned)(here.op) & 15; state->mode = LENEXT; case LENEXT: if (state->extra) { NEEDBITS(state->extra); state->length += BITS(state->extra); DROPBITS(state->extra); + state->back += state->extra; } Tracevv((stderr, "inflate: length %u\n", state->length)); + state->was = state->length; state->mode = DIST; case DIST: for (;;) { - this = state->distcode[BITS(state->distbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if ((this.op & 0xf0) == 0) { - last = this; + if ((here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->distcode[last.val + + here = state->distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); + state->back += last.bits; } - DROPBITS(this.bits); - if (this.op & 64) { + DROPBITS(here.bits); + state->back += here.bits; + if (here.op & 64) { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } - state->offset = (unsigned)this.val; - state->extra = (unsigned)(this.op) & 15; + state->offset = (unsigned)here.val; + state->extra = (unsigned)(here.op) & 15; state->mode = DISTEXT; case DISTEXT: if (state->extra) { NEEDBITS(state->extra); state->offset += BITS(state->extra); DROPBITS(state->extra); + state->back += state->extra; } #ifdef INFLATE_STRICT if (state->offset > state->dmax) { @@ -1036,11 +1103,6 @@ int flush; break; } #endif - if (state->offset > state->whave + out - left) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } Tracevv((stderr, "inflate: distance %u\n", state->offset)); state->mode = MATCH; case MATCH: @@ -1048,12 +1110,32 @@ int flush; copy = out - left; if (state->offset > copy) { /* copy from window */ copy = state->offset - copy; - if (copy > state->write) { - copy -= state->write; + if (copy > state->whave) { + if (state->sane) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + Trace((stderr, "inflate.c too far\n")); + copy -= state->whave; + if (copy > state->length) copy = state->length; + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = 0; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; +#endif + } + if (copy > state->wnext) { + copy -= state->wnext; from = state->window + (state->wsize - copy); } else - from = state->window + (state->write - copy); + from = state->window + (state->wnext - copy); if (copy > state->length) copy = state->length; } else { /* copy from output */ @@ -1146,7 +1228,8 @@ int flush; strm->adler = state->check = UPDATE(state->check, strm->next_out - out, out); strm->data_type = state->bits + (state->last ? 64 : 0) + - (state->mode == TYPE ? 128 : 0); + (state->mode == TYPE ? 128 : 0) + + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) ret = Z_BUF_ERROR; return ret; @@ -1366,3 +1449,32 @@ z_streamp source; dest->state = (struct internal_state FAR *)copy; return Z_OK; } + +int ZEXPORT inflateUndermine(strm, subvert) +z_streamp strm; +int subvert; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + state->sane = !subvert; +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + return Z_OK; +#else + state->sane = 1; + return Z_DATA_ERROR; +#endif +} + +long ZEXPORT inflateMark(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; + state = (struct inflate_state FAR *)strm->state; + return ((long)(state->back) << 16) + + (state->mode == COPY ? state->length : + (state->mode == MATCH ? state->was - state->length : 0)); +} diff --git a/source/Irrlicht/zlib/inflate.h b/source/Irrlicht/zlib/inflate.h index fbbc8714..a8ef4287 100644 --- a/source/Irrlicht/zlib/inflate.h +++ b/source/Irrlicht/zlib/inflate.h @@ -1,5 +1,5 @@ /* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2004 Mark Adler + * Copyright (C) 1995-2009 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -32,11 +32,13 @@ typedef enum { TYPE, /* i: waiting for type bits, including last-flag bit */ TYPEDO, /* i: same, but skip check to exit inflate on new block */ STORED, /* i: waiting for stored size (length and complement) */ + COPY_, /* i/o: same as COPY below, but only first time in */ COPY, /* i/o: waiting for input or output to copy stored block */ TABLE, /* i: waiting for dynamic block table lengths */ LENLENS, /* i: waiting for code length code lengths */ CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN, /* i: waiting for length/lit code */ + LEN_, /* i: same as LEN below, but only first time in */ + LEN, /* i: waiting for length/lit/eob code */ LENEXT, /* i: waiting for length extra bits */ DIST, /* i: waiting for distance code */ DISTEXT, /* i: waiting for distance extra bits */ @@ -53,19 +55,21 @@ typedef enum { /* State transitions between above modes - - (most modes can go to the BAD or MEM mode -- not shown for clarity) + (most modes can go to BAD or MEM on error -- not shown for clarity) Process header: - HEAD -> (gzip) or (zlib) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME - NAME -> COMMENT -> HCRC -> TYPE + HEAD -> (gzip) or (zlib) or (raw) + (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> + HCRC -> TYPE (zlib) -> DICTID or TYPE DICTID -> DICT -> TYPE + (raw) -> TYPEDO Read deflate blocks: - TYPE -> STORED or TABLE or LEN or CHECK - STORED -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN - Read deflate codes: + TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK + STORED -> COPY_ -> COPY -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN_ + LEN_ -> LEN + Read deflate codes in fixed or dynamic block: LEN -> LENEXT or LIT or TYPE LENEXT -> DIST -> DISTEXT -> MATCH -> LEN LIT -> LEN @@ -73,7 +77,7 @@ typedef enum { CHECK -> LENGTH -> DONE */ -/* state maintained between inflate() calls. Approximately 7K bytes. */ +/* state maintained between inflate() calls. Approximately 10K bytes. */ struct inflate_state { inflate_mode mode; /* current inflate mode */ int last; /* true if processing last block */ @@ -88,7 +92,7 @@ struct inflate_state { unsigned wbits; /* log base 2 of requested window size */ unsigned wsize; /* window size or zero if not using window */ unsigned whave; /* valid bytes in the window */ - unsigned write; /* window write index */ + unsigned wnext; /* window write index */ unsigned char FAR *window; /* allocated sliding window, if needed */ /* bit accumulator */ unsigned long hold; /* input bit accumulator */ @@ -112,4 +116,7 @@ struct inflate_state { unsigned short lens[320]; /* temporary storage for code lengths */ unsigned short work[288]; /* work area for code table building */ code codes[ENOUGH]; /* space for code tables */ + int sane; /* if false, allow invalid distance too far */ + int back; /* bits back of last unprocessed length/lit */ + unsigned was; /* initial length of match */ }; diff --git a/source/Irrlicht/zlib/inftrees.c b/source/Irrlicht/zlib/inftrees.c index 38ded81c..9dbaec33 100644 --- a/source/Irrlicht/zlib/inftrees.c +++ b/source/Irrlicht/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.3 Copyright 1995-2005 Mark Adler "; + " inflate 1.2.5 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -29,7 +29,7 @@ const char inflate_copyright[] = table index bits. It will differ if the request is greater than the longest code or if it is less than the shortest code. */ -int inflate_table(type, lens, codes, table, bits, work) +int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) codetype type; unsigned short FAR *lens; unsigned codes; @@ -50,7 +50,7 @@ unsigned short FAR *work; unsigned fill; /* index for replicating entries */ unsigned low; /* low bits for current root entry */ unsigned mask; /* mask for low root bits */ - code this; /* table entry for duplication */ + code here; /* table entry for duplication */ code FAR *next; /* next available space in table */ const unsigned short FAR *base; /* base value table to use */ const unsigned short FAR *extra; /* extra bits table to use */ @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, @@ -115,15 +115,15 @@ unsigned short FAR *work; if (count[max] != 0) break; if (root > max) root = max; if (max == 0) { /* no symbols to code at all */ - this.op = (unsigned char)64; /* invalid code marker */ - this.bits = (unsigned char)1; - this.val = (unsigned short)0; - *(*table)++ = this; /* make a table to force an error */ - *(*table)++ = this; + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)1; + here.val = (unsigned short)0; + *(*table)++ = here; /* make a table to force an error */ + *(*table)++ = here; *bits = 1; return 0; /* no symbols, but wait for decoding to report error */ } - for (min = 1; min <= MAXBITS; min++) + for (min = 1; min < max; min++) if (count[min] != 0) break; if (root < min) root = min; @@ -166,11 +166,10 @@ unsigned short FAR *work; entered in the tables. used keeps track of how many table entries have been allocated from the - provided *table space. It is checked when a LENS table is being made - against the space in *table, ENOUGH, minus the maximum space needed by - the worst case distance code, MAXD. This should never happen, but the - sufficiency of ENOUGH has not been proven exhaustively, hence the check. - This assumes that when type == LENS, bits == 9. + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. sym increments through all symbols, and the loop terminates when all codes of length max, i.e. all codes, have been processed. This @@ -209,24 +208,25 @@ unsigned short FAR *work; mask = used - 1; /* mask for comparing low */ /* check available table space */ - if (type == LENS && used >= ENOUGH - MAXD) + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* process all codes and make table entries */ for (;;) { /* create table entry */ - this.bits = (unsigned char)(len - drop); + here.bits = (unsigned char)(len - drop); if ((int)(work[sym]) < end) { - this.op = (unsigned char)0; - this.val = work[sym]; + here.op = (unsigned char)0; + here.val = work[sym]; } else if ((int)(work[sym]) > end) { - this.op = (unsigned char)(extra[work[sym]]); - this.val = base[work[sym]]; + here.op = (unsigned char)(extra[work[sym]]); + here.val = base[work[sym]]; } else { - this.op = (unsigned char)(32 + 64); /* end of block */ - this.val = 0; + here.op = (unsigned char)(32 + 64); /* end of block */ + here.val = 0; } /* replicate for those indices with low len bits equal to huff */ @@ -235,7 +235,7 @@ unsigned short FAR *work; min = fill; /* save offset to next table */ do { fill -= incr; - next[(huff >> drop) + fill] = this; + next[(huff >> drop) + fill] = here; } while (fill != 0); /* backwards increment the len-bit code huff */ @@ -277,7 +277,8 @@ unsigned short FAR *work; /* check for enough space */ used += 1U << curr; - if (type == LENS && used >= ENOUGH - MAXD) + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* point entry in root table to sub-table */ @@ -295,20 +296,20 @@ unsigned short FAR *work; through high index bits. When the current sub-table is filled, the loop drops back to the root table to fill in any remaining entries there. */ - this.op = (unsigned char)64; /* invalid code marker */ - this.bits = (unsigned char)(len - drop); - this.val = (unsigned short)0; + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)(len - drop); + here.val = (unsigned short)0; while (huff != 0) { /* when done with sub-table, drop back to root table */ if (drop != 0 && (huff & mask) != low) { drop = 0; len = root; next = *table; - this.bits = (unsigned char)len; + here.bits = (unsigned char)len; } /* put invalid code marker in table */ - next[huff >> drop] = this; + next[huff >> drop] = here; /* backwards increment the len-bit code huff */ incr = 1U << (len - 1); diff --git a/source/Irrlicht/zlib/inftrees.h b/source/Irrlicht/zlib/inftrees.h index dc0fd567..a685d8c6 100644 --- a/source/Irrlicht/zlib/inftrees.h +++ b/source/Irrlicht/zlib/inftrees.h @@ -1,5 +1,5 @@ /* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2005, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -35,21 +35,28 @@ typedef struct { 01000000 - invalid code */ -/* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1444 code structures (852 for length/literals - and 592 for distances, the latter actually the result of an - exhaustive search). The true maximum is not known, but the value - below is more than safe. */ -#define ENOUGH 2048 -#define MAXD 592 +/* Maximum size of the dynamic table. The maximum number of code structures is + 1444, which is the sum of 852 for literal/length codes and 592 for distance + codes. These values were found by exhaustive searches using the program + examples/enough.c found in the zlib distribtution. The arguments to that + program are the number of symbols, the initial root table size, and the + maximum bit length of a code. "enough 286 9 15" for literal/length codes + returns returns 852, and "enough 30 6 15" for distance codes returns 592. + The initial root table size (9 or 6) is found in the fifth argument of the + inflate_table() calls in inflate.c and infback.c. If the root table size is + changed, then these maximum sizes would be need to be recalculated and + updated. */ +#define ENOUGH_LENS 852 +#define ENOUGH_DISTS 592 +#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) -/* Type of code to build for inftable() */ +/* Type of code to build for inflate_table() */ typedef enum { CODES, LENS, DISTS } codetype; -extern int inflate_table OF((codetype type, unsigned short FAR *lens, +int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, unsigned codes, code FAR * FAR *table, unsigned FAR *bits, unsigned short FAR *work)); diff --git a/source/Irrlicht/zlib/trees.c b/source/Irrlicht/zlib/trees.c index 7a048028..b4a317ac 100644 --- a/source/Irrlicht/zlib/trees.c +++ b/source/Irrlicht/zlib/trees.c @@ -1,5 +1,6 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2005 Jean-loup Gailly + * Copyright (C) 1995-2010 Jean-loup Gailly + * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -152,7 +153,7 @@ local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, int blcodes)); local void compress_block OF((deflate_state *s, ct_data *ltree, ct_data *dtree)); -local void set_data_type OF((deflate_state *s)); +local int detect_data_type OF((deflate_state *s)); local unsigned bi_reverse OF((unsigned value, int length)); local void bi_windup OF((deflate_state *s)); local void bi_flush OF((deflate_state *s)); @@ -203,12 +204,12 @@ local void send_bits(s, value, length) * unused bits in value. */ if (s->bi_valid > (int)Buf_size - length) { - s->bi_buf |= (value << s->bi_valid); + s->bi_buf |= (ush)value << s->bi_valid; put_short(s, s->bi_buf); s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); s->bi_valid += length - Buf_size; } else { - s->bi_buf |= value << s->bi_valid; + s->bi_buf |= (ush)value << s->bi_valid; s->bi_valid += length; } } @@ -218,12 +219,12 @@ local void send_bits(s, value, length) { int len = length;\ if (s->bi_valid > (int)Buf_size - len) {\ int val = value;\ - s->bi_buf |= (val << s->bi_valid);\ + s->bi_buf |= (ush)val << s->bi_valid;\ put_short(s, s->bi_buf);\ s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ s->bi_valid += len - Buf_size;\ } else {\ - s->bi_buf |= (value) << s->bi_valid;\ + s->bi_buf |= (ush)(value) << s->bi_valid;\ s->bi_valid += len;\ }\ } @@ -250,11 +251,13 @@ local void tr_static_init() if (static_init_done) return; /* For some embedded targets, global variables are not initialized: */ +#ifdef NO_INIT_GLOBAL_POINTERS static_l_desc.static_tree = static_ltree; static_l_desc.extra_bits = extra_lbits; static_d_desc.static_tree = static_dtree; static_d_desc.extra_bits = extra_dbits; static_bl_desc.extra_bits = extra_blbits; +#endif /* Initialize the mapping length (0..255) -> length code (0..28) */ length = 0; @@ -348,13 +351,14 @@ void gen_trees_header() static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); } - fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n"); + fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); for (i = 0; i < DIST_CODE_LEN; i++) { fprintf(header, "%2u%s", _dist_code[i], SEPARATOR(i, DIST_CODE_LEN-1, 20)); } - fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + fprintf(header, + "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { fprintf(header, "%2u%s", _length_code[i], SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); @@ -379,7 +383,7 @@ void gen_trees_header() /* =========================================================================== * Initialize the tree data structures for a new zlib stream. */ -void _tr_init(s) +void ZLIB_INTERNAL _tr_init(s) deflate_state *s; { tr_static_init(); @@ -864,13 +868,13 @@ local void send_all_trees(s, lcodes, dcodes, blcodes) /* =========================================================================== * Send a stored block */ -void _tr_stored_block(s, buf, stored_len, eof) +void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block */ ulg stored_len; /* length of input block */ - int eof; /* true if this is the last block for a file */ + int last; /* one if this is the last block for a file */ { - send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ + send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ #ifdef DEBUG s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; s->compressed_len += (stored_len + 4) << 3; @@ -889,7 +893,7 @@ void _tr_stored_block(s, buf, stored_len, eof) * To simplify the code, we assume the worst case of last real code encoded * on one bit only. */ -void _tr_align(s) +void ZLIB_INTERNAL _tr_align(s) deflate_state *s; { send_bits(s, STATIC_TREES<<1, 3); @@ -918,11 +922,11 @@ void _tr_align(s) * Determine the best encoding for the current block: dynamic trees, static * trees or store, and output the encoded block to the zip file. */ -void _tr_flush_block(s, buf, stored_len, eof) +void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block, or NULL if too old */ ulg stored_len; /* length of input block */ - int eof; /* true if this is the last block for a file */ + int last; /* one if this is the last block for a file */ { ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ int max_blindex = 0; /* index of last bit length code of non zero freq */ @@ -931,8 +935,8 @@ void _tr_flush_block(s, buf, stored_len, eof) if (s->level > 0) { /* Check if the file is binary or text */ - if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN) - set_data_type(s); + if (s->strm->data_type == Z_UNKNOWN) + s->strm->data_type = detect_data_type(s); /* Construct the literal and distance trees */ build_tree(s, (tree_desc *)(&(s->l_desc))); @@ -978,20 +982,20 @@ void _tr_flush_block(s, buf, stored_len, eof) * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to * transform a block into a stored block. */ - _tr_stored_block(s, buf, stored_len, eof); + _tr_stored_block(s, buf, stored_len, last); #ifdef FORCE_STATIC } else if (static_lenb >= 0) { /* force static trees */ #else } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { #endif - send_bits(s, (STATIC_TREES<<1)+eof, 3); + send_bits(s, (STATIC_TREES<<1)+last, 3); compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); #ifdef DEBUG s->compressed_len += 3 + s->static_len; #endif } else { - send_bits(s, (DYN_TREES<<1)+eof, 3); + send_bits(s, (DYN_TREES<<1)+last, 3); send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, max_blindex+1); compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); @@ -1005,21 +1009,21 @@ void _tr_flush_block(s, buf, stored_len, eof) */ init_block(s); - if (eof) { + if (last) { bi_windup(s); #ifdef DEBUG s->compressed_len += 7; /* align on byte boundary */ #endif } Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - s->compressed_len-7*eof)); + s->compressed_len-7*last)); } /* =========================================================================== * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ -int _tr_tally (s, dist, lc) +int ZLIB_INTERNAL _tr_tally (s, dist, lc) deflate_state *s; unsigned dist; /* distance of matched string */ unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ @@ -1118,24 +1122,45 @@ local void compress_block(s, ltree, dtree) } /* =========================================================================== - * Set the data type to BINARY or TEXT, using a crude approximation: - * set it to Z_TEXT if all symbols are either printable characters (33 to 255) - * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise. + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). * IN assertion: the fields Freq of dyn_ltree are set. */ -local void set_data_type(s) +local int detect_data_type(s) deflate_state *s; { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + unsigned long black_mask = 0xf3ffc07fUL; int n; - for (n = 0; n < 9; n++) + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>= 1) + if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0)) + return Z_BINARY; + + /* Check for textual ("white-listed") bytes. */ + if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 + || s->dyn_ltree[13].Freq != 0) + return Z_TEXT; + for (n = 32; n < LITERALS; n++) if (s->dyn_ltree[n].Freq != 0) - break; - if (n == 9) - for (n = 14; n < 32; n++) - if (s->dyn_ltree[n].Freq != 0) - break; - s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY; + return Z_TEXT; + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; } /* =========================================================================== diff --git a/source/Irrlicht/zlib/trees.h b/source/Irrlicht/zlib/trees.h index 1ca868b8..ce8f6204 100644 --- a/source/Irrlicht/zlib/trees.h +++ b/source/Irrlicht/zlib/trees.h @@ -70,7 +70,7 @@ local const ct_data static_dtree[D_CODES] = { {{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} }; -const uch _dist_code[DIST_CODE_LEN] = { +const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, @@ -99,7 +99,7 @@ const uch _dist_code[DIST_CODE_LEN] = { 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 }; -const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { +const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, diff --git a/source/Irrlicht/zlib/uncompr.c b/source/Irrlicht/zlib/uncompr.c index ad6db0a6..f07773c9 100644 --- a/source/Irrlicht/zlib/uncompr.c +++ b/source/Irrlicht/zlib/uncompr.c @@ -1,5 +1,5 @@ /* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -16,8 +16,6 @@ been saved previously by the compressor and transmitted to the decompressor by some mechanism outside the scope of this compression library.) Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output diff --git a/source/Irrlicht/zlib/zconf.h b/source/Irrlicht/zlib/zconf.h index e3b0c962..88f90f90 100644 --- a/source/Irrlicht/zlib/zconf.h +++ b/source/Irrlicht/zlib/zconf.h @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -11,52 +11,124 @@ /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams -# define deflateBound z_deflateBound -# define deflatePrime z_deflatePrime -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ + +/* all linked symbols */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 # define compress z_compress # define compress2 z_compress2 # define compressBound z_compressBound -# define uncompress z_uncompress -# define adler32 z_adler32 # define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright # define get_crc_table z_get_crc_table +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzgetc z_gzgetc +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzwrite z_gzwrite +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetHeader z_inflateGetHeader +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# define uncompress z_uncompress # define zError z_zError +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion -# define alloc_func z_alloc_func -# define free_func z_free_func -# define in_func z_in_func -# define out_func z_out_func +/* all zlib typedefs in zlib.h and zconf.h */ # define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong # define Bytef z_Bytef +# define alloc_func z_alloc_func # define charf z_charf +# define free_func z_free_func +# define gzFile z_gzFile +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func # define intf z_intf +# define out_func z_out_func +# define uInt z_uInt # define uIntf z_uIntf +# define uLong z_uLong # define uLongf z_uLongf -# define voidpf z_voidpf # define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + #endif #if defined(__MSDOS__) && !defined(MSDOS) @@ -284,49 +356,73 @@ typedef uLong FAR uLongf; typedef Byte *voidp; #endif -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ -# include /* for off_t */ -# include /* for SEEK_* and off_t */ -# ifdef VMS -# include /* for off_t */ -# endif -# define z_off_t off_t +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H #endif + +#ifdef STDC +# include /* for off_t */ +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +#endif + #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t # define z_off_t long #endif +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + #if defined(__OS400__) # define NO_vsnprintf #endif #if defined(__MVS__) # define NO_vsnprintf -# ifdef FAR -# undef FAR -# endif #endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(deflateBound,"DEBND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(compressBound,"CMBND") -# pragma map(inflate_table,"INTABL") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_copyright,"INCOPY") + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") #endif #endif /* ZCONF_H */ diff --git a/source/Irrlicht/zlib/zlib.3 b/source/Irrlicht/zlib/zlib.3 index f6b0da11..27adc4cd 100644 --- a/source/Irrlicht/zlib/zlib.3 +++ b/source/Irrlicht/zlib/zlib.3 @@ -1,159 +1,151 @@ -.TH ZLIB 3 "18 July 2005" -.SH NAME -zlib \- compression/decompression library -.SH SYNOPSIS -[see -.I zlib.h -for full description] -.SH DESCRIPTION -The -.I zlib -library is a general purpose data compression library. -The code is thread safe. -It provides in-memory compression and decompression functions, -including integrity checks of the uncompressed data. -This version of the library supports only one compression method (deflation) -but other algorithms will be added later -and will have the same stream interface. -.LP -Compression can be done in a single step if the buffers are large enough -(for example if an input file is mmap'ed), -or can be done by repeated calls of the compression function. -In the latter case, -the application must provide more input and/or consume the output -(providing more output space) before each call. -.LP -The library also supports reading and writing files in -.IR gzip (1) -(.gz) format -with an interface similar to that of stdio. -.LP -The library does not install any signal handler. -The decoder checks the consistency of the compressed data, -so the library should never crash even in case of corrupted input. -.LP -All functions of the compression library are documented in the file -.IR zlib.h . -The distribution source includes examples of use of the library -in the files -.I example.c -and -.IR minigzip.c . -.LP -Changes to this version are documented in the file -.I ChangeLog -that accompanies the source, -and are concerned primarily with bug fixes and portability enhancements. -.LP -A Java implementation of -.I zlib -is available in the Java Development Kit 1.1: -.IP -http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html -.LP -A Perl interface to -.IR zlib , -written by Paul Marquess (pmqs@cpan.org), -is available at CPAN (Comprehensive Perl Archive Network) sites, -including: -.IP -http://www.cpan.org/modules/by-module/Compress/ -.LP -A Python interface to -.IR zlib , -written by A.M. Kuchling (amk@magnet.com), -is available in Python 1.5 and later versions: -.IP -http://www.python.org/doc/lib/module-zlib.html -.LP -A -.I zlib -binding for -.IR tcl (1), -written by Andreas Kupries (a.kupries@westend.com), -is availlable at: -.IP -http://www.westend.com/~kupries/doc/trf/man/man.html -.LP -An experimental package to read and write files in .zip format, -written on top of -.I zlib -by Gilles Vollant (info@winimage.com), -is available at: -.IP -http://www.winimage.com/zLibDll/unzip.html -and also in the -.I contrib/minizip -directory of the main -.I zlib -web site. -.SH "SEE ALSO" -The -.I zlib -web site can be found at either of these locations: -.IP -http://www.zlib.org -.br -http://www.gzip.org/zlib/ -.LP -The data format used by the zlib library is described by RFC -(Request for Comments) 1950 to 1952 in the files: -.IP -http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format) -.br -http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format) -.br -http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format) -.LP -These documents are also available in other formats from: -.IP -ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html -.LP -Mark Nelson (markn@ieee.org) wrote an article about -.I zlib -for the Jan. 1997 issue of Dr. Dobb's Journal; -a copy of the article is available at: -.IP -http://dogma.net/markn/articles/zlibtool/zlibtool.htm -.SH "REPORTING PROBLEMS" -Before reporting a problem, -please check the -.I zlib -web site to verify that you have the latest version of -.IR zlib ; -otherwise, -obtain the latest version and see if the problem still exists. -Please read the -.I zlib -FAQ at: -.IP -http://www.gzip.org/zlib/zlib_faq.html -.LP -before asking for help. -Send questions and/or comments to zlib@gzip.org, -or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). -.SH AUTHORS -Version 1.2.3 -Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org) -and Mark Adler (madler@alumni.caltech.edu). -.LP -This software is provided "as-is," -without any express or implied warranty. -In no event will the authors be held liable for any damages -arising from the use of this software. -See the distribution directory with respect to requirements -governing redistribution. -The deflate format used by -.I zlib -was defined by Phil Katz. -The deflate and -.I zlib -specifications were written by L. Peter Deutsch. -Thanks to all the people who reported problems and suggested various -improvements in -.IR zlib ; -who are too numerous to cite here. -.LP -UNIX manual page by R. P. C. Rodgers, -U.S. National Library of Medicine (rodgers@nlm.nih.gov). -.\" end of man page +.TH ZLIB 3 "19 Apr 2010" +.SH NAME +zlib \- compression/decompression library +.SH SYNOPSIS +[see +.I zlib.h +for full description] +.SH DESCRIPTION +The +.I zlib +library is a general purpose data compression library. +The code is thread safe, assuming that the standard library functions +used are thread safe, such as memory allocation routines. +It provides in-memory compression and decompression functions, +including integrity checks of the uncompressed data. +This version of the library supports only one compression method (deflation) +but other algorithms may be added later +with the same stream interface. +.LP +Compression can be done in a single step if the buffers are large enough +or can be done by repeated calls of the compression function. +In the latter case, +the application must provide more input and/or consume the output +(providing more output space) before each call. +.LP +The library also supports reading and writing files in +.IR gzip (1) +(.gz) format +with an interface similar to that of stdio. +.LP +The library does not install any signal handler. +The decoder checks the consistency of the compressed data, +so the library should never crash even in the case of corrupted input. +.LP +All functions of the compression library are documented in the file +.IR zlib.h . +The distribution source includes examples of use of the library +in the files +.I example.c +and +.IR minigzip.c, +as well as other examples in the +.IR examples/ +directory. +.LP +Changes to this version are documented in the file +.I ChangeLog +that accompanies the source. +.LP +.I zlib +is available in Java using the java.util.zip package: +.IP +http://java.sun.com/developer/technicalArticles/Programming/compression/ +.LP +A Perl interface to +.IR zlib , +written by Paul Marquess (pmqs@cpan.org), +is available at CPAN (Comprehensive Perl Archive Network) sites, +including: +.IP +http://search.cpan.org/~pmqs/IO-Compress-Zlib/ +.LP +A Python interface to +.IR zlib , +written by A.M. Kuchling (amk@magnet.com), +is available in Python 1.5 and later versions: +.IP +http://www.python.org/doc/lib/module-zlib.html +.LP +.I zlib +is built into +.IR tcl: +.IP +http://wiki.tcl.tk/4610 +.LP +An experimental package to read and write files in .zip format, +written on top of +.I zlib +by Gilles Vollant (info@winimage.com), +is available at: +.IP +http://www.winimage.com/zLibDll/minizip.html +and also in the +.I contrib/minizip +directory of the main +.I zlib +source distribution. +.SH "SEE ALSO" +The +.I zlib +web site can be found at: +.IP +http://zlib.net/ +.LP +The data format used by the zlib library is described by RFC +(Request for Comments) 1950 to 1952 in the files: +.IP +http://www.ietf.org/rfc/rfc1950.txt (for the zlib header and trailer format) +.br +http://www.ietf.org/rfc/rfc1951.txt (for the deflate compressed data format) +.br +http://www.ietf.org/rfc/rfc1952.txt (for the gzip header and trailer format) +.LP +Mark Nelson wrote an article about +.I zlib +for the Jan. 1997 issue of Dr. Dobb's Journal; +a copy of the article is available at: +.IP +http://marknelson.us/1997/01/01/zlib-engine/ +.SH "REPORTING PROBLEMS" +Before reporting a problem, +please check the +.I zlib +web site to verify that you have the latest version of +.IR zlib ; +otherwise, +obtain the latest version and see if the problem still exists. +Please read the +.I zlib +FAQ at: +.IP +http://zlib.net/zlib_faq.html +.LP +before asking for help. +Send questions and/or comments to zlib@gzip.org, +or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). +.SH AUTHORS +Version 1.2.5 +Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) +and Mark Adler (madler@alumni.caltech.edu). +.LP +This software is provided "as-is," +without any express or implied warranty. +In no event will the authors be held liable for any damages +arising from the use of this software. +See the distribution directory with respect to requirements +governing redistribution. +The deflate format used by +.I zlib +was defined by Phil Katz. +The deflate and +.I zlib +specifications were written by L. Peter Deutsch. +Thanks to all the people who reported problems and suggested various +improvements in +.IR zlib ; +who are too numerous to cite here. +.LP +UNIX manual page by R. P. C. Rodgers, +U.S. National Library of Medicine (rodgers@nlm.nih.gov). +.\" end of man page diff --git a/source/Irrlicht/zlib/zlib.h b/source/Irrlicht/zlib/zlib.h index 62d0e467..cba7ab2f 100644 --- a/source/Irrlicht/zlib/zlib.h +++ b/source/Irrlicht/zlib/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3, July 18th, 2005 + version 1.2.5, April 19th, 2010 - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,41 +37,44 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.3" -#define ZLIB_VERNUM 0x1230 +#define ZLIB_VERSION "1.2.5" +#define ZLIB_VERNUM 0x1250 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 2 +#define ZLIB_VER_REVISION 5 +#define ZLIB_VER_SUBREVISION 0 /* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output (providing more output space) before each call. - The compressed data format used by default by the in-memory functions is + The compressed data format used by default by the in-memory functions is the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped around a deflate stream, which is itself documented in RFC 1951. - The library also supports reading and writing files in gzip (.gz) format + The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - This library can optionally read and write gzip streams in memory as well. + This library can optionally read and write gzip streams in memory as well. - The zlib format was designed to be compact and fast for use in memory + The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib. - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in case of corrupted input. */ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); @@ -126,45 +129,45 @@ typedef struct gz_header_s { typedef gz_header FAR *gz_headerp; /* - The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application. + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the opaque value. - zalloc must return Z_NULL if there is not enough memory for the object. + zalloc must return Z_NULL if there is not enough memory for the object. If zlib is used in a multi-threaded application, zalloc and zfree must be thread safe. - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step). + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use in the decompressor (particularly + if the decompressor wants to decompress everything in a single step). */ /* constants */ #define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_PARTIAL_FLUSH 1 #define Z_SYNC_FLUSH 2 #define Z_FULL_FLUSH 3 #define Z_FINISH 4 #define Z_BLOCK 5 +#define Z_TREES 6 /* Allowed flush values; see deflate() and inflate() below for details */ #define Z_OK 0 @@ -176,8 +179,8 @@ typedef gz_header FAR *gz_headerp; #define Z_MEM_ERROR (-4) #define Z_BUF_ERROR (-5) #define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative - * values are errors, positive values are used for special but normal events. +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. */ #define Z_NO_COMPRESSION 0 @@ -207,119 +210,140 @@ typedef gz_header FAR *gz_headerp; #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ + /* basic functions */ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. */ /* ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). */ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); /* deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when forced to flush. - The detailed semantics are as follows. deflate performs one or both of the + The detailed semantics are as follows. deflate performs one or both of the following actions: - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not + accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in and avail_in are updated and processing will resume at this point for the next call of deflate(). - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. + accordingly. This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. + should be set only when necessary (in interactive applications). Some + output may be provided even if flush is not set. - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumualte before producing output, in order to + decide how much data to accumulate before producing output, in order to maximize compression. If the parameter flush is set to Z_SYNC_FLUSH, all pending output is flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed code + block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. If flush is set to Z_FULL_FLUSH, all output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade compression. If deflate returns with avail_out == 0, this function must be called again with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that avail_out is greater than six to avoid repeated flush markers due to avail_out == 0 on return. If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space; if deflate returns with Z_OK, this function must be + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space; if deflate returns with Z_OK, this function must be called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the stream + are deflateReset or deflateEnd. Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - the value returned by deflateBound (see below). If deflate does not return + is to be done in a single step. In this case, avail_out must be at least the + value returned by deflateBound (see below). If deflate does not return Z_STREAM_END, then it must be called again as described above. deflate() sets strm->adler to the adler32 checksum of all input read so far (that is, total_in bytes). deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. + the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered + binary. This field is only for information purposes and does not affect the + compression algorithm in any manner. deflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if all input has been consumed and all output has been produced (only when flush is set to Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not + if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and deflate() can be called again with more input and more output space to continue compressing. */ @@ -328,13 +352,13 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be deallocated). */ @@ -342,10 +366,10 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - Initializes the internal stream state for decompression. The fields + Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the + the caller. If next_in is not Z_NULL and avail_in is large enough (the + exact value depends on the compression method), inflateInit determines the compression method from the zlib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first call of inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to @@ -353,95 +377,108 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit() does not process any header information -- that is deferred + until inflate() is called. */ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); /* inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce + buffer becomes empty or the output buffer becomes full. It may introduce some output latency (reading input without producing any output) except when forced to flush. - The detailed semantics are as follows. inflate performs one or both of the + The detailed semantics are as follows. inflate performs one or both of the following actions: - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing will + resume at this point for the next call of inflate(). - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there - is no more input data or no more space in the output buffer (see below - about the flush parameter). + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, - Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() stop - if and when it gets to the next deflate block boundary. When decoding the - zlib or gzip format, this will cause inflate() to return immediately after - the header and before the first block. When doing a raw inflate, inflate() - will go ahead and process the first block, and will return when it gets to - the end of that block, or when it runs out of data. + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. The Z_BLOCK option assists in appending to or combining deflate streams. Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 - if inflate() is currently decoding the last block in the deflate stream, - plus 128 if inflate() returned immediately after decoding an end-of-block - code or decoding the complete header up to just before the first byte of the - deflate stream. The end-of-block will not be indicated until all of the - uncompressed data from that block has been written to strm->next_out. The - number of unused bits may in general be greater than seven, except when - bit 7 of data_type is set, in which case the number of unused bits will be - less than eight. + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster approach - may be used for the single inflate() call. + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all the uncompressed data. (The size + of the uncompressed data may have been saved by the compressor for this + purpose.) The next operation on this stream must be inflateEnd to deallocate + the decompression state. The use of Z_FINISH is never required, but can be + used to inform inflate that a faster approach may be used for the single + inflate() call. In this implementation, inflate() always flushes as much output as possible to the output buffer, and always uses the faster approach on the - first call. So the only effect of the flush parameter in this implementation + first call. So the only effect of the flush parameter in this implementation is on the return value of inflate(), as noted below, or when it returns early - because Z_BLOCK is used. + because Z_BLOCK or Z_TREES is used. If a preset dictionary is needed after this call (see inflateSetDictionary below), inflate sets strm->adler to the adler32 checksum of the dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise it sets strm->adler to the adler32 checksum of all output produced so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 + below. At the end of the stream, inflate() checks that its computed adler32 checksum is equal to that saved by the compressor and returns Z_STREAM_END only if the checksum is correct. - inflate() will decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically. Any information - contained in the gzip header is not retained, so applications that need that - information should instead use raw inflate, see inflateInit2() below, or - inflateBack() and perform their own processing of the gzip header and - trailer. + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained, so applications that need that information should + instead use raw inflate, see inflateInit2() below, or inflateBack() and + perform their own processing of the gzip header and trailer. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has @@ -449,27 +486,28 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); preset dictionary is needed at this point, Z_DATA_ERROR if the input data was corrupted (input stream not conforming to the zlib format or incorrect check value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, + next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may then - call inflateSync() to look for a good compression block if a partial recovery - of the data is desired. + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is desired. */ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a + was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). */ + /* Advanced functions */ /* @@ -484,55 +522,57 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, int memLevel, int strategy)); - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by the + caller. - The method parameter is the compression method. It must be Z_DEFLATED in + The method parameter is the compression method. It must be Z_DEFLATED in this version of the library. The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if deflateInit is used instead. - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data with no zlib header or trailer, and will not compute an adler32 check value. - windowBits can also be greater than 15 for optional gzip encoding. Add + windowBits can also be greater than 15 for optional gzip encoding. Add 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), - no header crc, and the operating system will be set to 255 (unknown). If a + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to 255 (unknown). If a gzip stream is being written, strm->adler is a crc32 instead of an adler32. The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. - The strategy parameter is used to tune the compression algorithm. Use the + The strategy parameter is used to tune the compression algorithm. Use the value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between - Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as - Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy - parameter only affects the compression ratio but not the correctness of the - compressed output even if it is not set appropriately. Z_FIXED prevents the - use of dynamic Huffman codes, allowing for a simpler decoder for special - applications. + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate(). + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). */ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, @@ -540,37 +580,37 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, uInt dictLength)); /* Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit, deflateInit2 or deflateReset, before any - call of deflate. The compressor and decompressor must use exactly the same + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any call + of deflate. The compressor and decompressor must use exactly the same dictionary (see inflateSetDictionary). The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a + used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. Depending on the size of the compression data structures selected by deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front. In addition, the - current implementation of deflate will use at most the window size minus - 262 bytes of the provided dictionary. + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. Upon return of this function, strm->adler is set to the adler32 value of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value + which dictionary has been used by the compressor. (The adler32 value applies to the whole dictionary even if only a subset of the dictionary is actually used by the compressor.) If a raw deflate was requested, then the adler32 value is not computed and strm->adler is not set. deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not + or if the compression method is bsort). deflateSetDictionary does not perform any compression: this will be done by deflate(). */ @@ -581,26 +621,26 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, This function can be useful when several compression strategies will be tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed + data with a filter. The streams that will be discarded should then be freed by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory. + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and + (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); /* This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2. + but does not free and reallocate all the internal compression state. The + stream will keep the same compression level and any other attributes that + may have been set by deflateInit2. - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). */ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, @@ -610,18 +650,18 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2. This can be used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate(). + to switch to a different kind of input data requiring a different strategy. + If the compression level is changed, the input available so far is + compressed with the old level (and may be flushed); the new level will take + effect only at the next call of deflate(). Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm->avail_out must be non-zero. + a call of deflate(), since the currently available input may have to be + compressed and flushed. In particular, strm->avail_out must be non-zero. deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero. + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if + strm->avail_out was zero. */ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, @@ -645,9 +685,10 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, uLong sourceLen)); /* deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() - or deflateInit2(). This would be used to allocate an output buffer - for deflation in a single pass, and so would be called before deflate(). + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). */ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, @@ -655,21 +696,21 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, int value)); /* deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the - bits leftover from a previous deflate stream when appending to it. As such, - this function can only be used for raw deflate, and must be used before the - first deflate() call after a deflateInit2() or deflateReset(). bits must be - less than or equal to 16, and that many of the least significant bits of - value will be inserted in the output. + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. - deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gz_headerp head)); /* - deflateSetHeader() provides gzip header information for when a gzip + deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called after deflateInit2() or deflateReset() and before the first call of deflate(). The text, time, os, extra field, name, and comment information @@ -682,11 +723,11 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, 1.3.x) do not support header crc's, and will report that it is a "multi-part gzip file" and give up. - If deflateSetHeader is not used, the default gzip header has text false, + If deflateSetHeader is not used, the default gzip header has text false, the time set to zero, and os set to 255, with no extra, name, or comment fields. The gzip header is returned to the default state by deflateReset(). - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ @@ -694,43 +735,50 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, int windowBits)); - This is another version of inflateInit with an extra parameter. The + This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by the caller. The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window + deflateInit2() was not used. If a compressed stream with a larger window size is given as input, inflate() will return with the error code Z_DATA_ERROR instead of trying to allocate a larger window. - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This + looking for any check values for comparison at the end of the stream. This is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom + such as zip. Those formats provide their own check values. If a custom format is developed using the raw deflate format for compressed data, it is recommended that a check value such as an adler32 or a crc32 be applied to the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments + most applications, the zlib format should be used as is. Note that comments above on the use in deflateInit2() applies to the magnitude of windowBits. - windowBits can also be greater than 15 for optional gzip decoding. Add + windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is - a crc32 instead of an adler32. + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + crc32 instead of an adler32. inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg - is set to null if there is no error message. inflateInit2 does not perform - any decompression apart from reading the zlib header if present: this will - be done by inflate(). (So next_in and avail_in may be modified, but next_out - and avail_out are unchanged.) + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. */ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, @@ -738,8 +786,8 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, uInt dictLength)); /* Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor can be determined from the adler32 value returned by that call of inflate. The compressor and decompressor must use exactly the same dictionary (see deflateSetDictionary). For raw inflate, this function can be called @@ -748,26 +796,26 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, dictionary that was used for compression is provided. inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not + expected one (incorrect adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of inflate(). */ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); /* - Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. - inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data. + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been + found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the + success case, the application may save the current current value of total_in + which indicates where valid compressed data was found. In the error case, + the application may repeatedly call inflateSync, providing more input each + time, until success or end of the input data. */ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, @@ -782,18 +830,30 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and + (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. + but does not free and reallocate all the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, + int windowBits)); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. */ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, @@ -801,54 +861,87 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, int value)); /* This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ +ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above or -1 << 16 if the provided + source stream state was inconsistent. +*/ + ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, gz_headerp head)); /* - inflateGetHeader() requests that gzip header information be stored in the + inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after inflateInit2() or inflateReset(), and before the first call of inflate(). As inflate() processes the gzip stream, head->done is zero until the header is completed, at which time head->done is set to one. If a zlib stream is being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK can be used to - force inflate() to return immediately after header processing is complete - and before any actual data is decompressed. + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. - The text, time, xflags, and os fields are filled in with the gzip header + The text, time, xflags, and os fields are filled in with the gzip header contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max + was valid if done is set to one.) If extra is not Z_NULL, then extra_max contains the maximum number of bytes to write to extra. Once done is true, extra_len contains the actual extra field length, and extra contains the extra field, or that field truncated if extra_max is less than extra_len. If name is not Z_NULL, then up to name_max characters are written there, terminated with a zero unless the length is greater than name_max. If comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When - any of extra, name, or comment are not Z_NULL and the respective field is - not present in the header, then that field is set to Z_NULL to signal its + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its absence. This allows the use of deflateSetHeader() with the returned structure to duplicate the header. However if those fields are set to allocated memory, then the application will need to save those pointers elsewhere so that they can be eventually freed. - If inflateGetHeader is not used, then the header information is simply + If inflateGetHeader is not used, then the header information is simply discarded. The header is always checked for validity, including the header CRC if present. inflateReset() will reset the process to discard the header information. The application would need to call inflateGetHeader() again to retrieve the header from the next gzip stream. - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ @@ -869,9 +962,9 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, See inflateBack() for the usage of these routines. inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the paramaters are invalid, Z_MEM_ERROR if the internal state could not - be allocated, or Z_VERSION_ERROR if the version of the library does not - match the version of the header file. + the paramaters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. */ typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); @@ -891,15 +984,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, inflateBackInit() must be called first to allocate the internal state and to initialize the state with the user-provided window buffer. inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free - the allocated state. + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. A raw deflate stream is one with no zlib or gzip header or trailer. This routine would normally be used in a utility that reads zip or gzip files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects - only the raw deflate stream to decompress. This is different from the - normal behavior of inflate(), which expects either a zlib or gzip header and + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the normal + behavior of inflate(), which expects either a zlib or gzip header and trailer around the deflate stream. inflateBack() uses two subroutines supplied by the caller that are then @@ -925,7 +1018,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. The in_desc and out_desc parameters of inflateBack() is passed as the first parameter of in() and out() respectively when they are called. These @@ -935,15 +1028,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, On return, inflateBack() will set strm->next_in and strm->avail_in to pass back any unused input that was provided by the last in() call. The return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format - error in the deflate stream (in which case strm->msg is set to indicate the - nature of the error), or Z_STREAM_ERROR if the stream was not properly - initialized. In the case of Z_BUF_ERROR, an input or output error can be - distinguished using strm->next_in which will be Z_NULL only if in() returned - an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to - out() returning non-zero. (in() will always be called before out(), so - strm->next_in is assured to be defined if out() returns non-zero.) Note - that inflateBack() cannot return Z_OK. + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. */ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); @@ -999,23 +1092,22 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); /* utility functions */ /* - The following utility functions are implemented on top of the - basic stream-oriented functions. To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. */ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least the value returned - by compressBound(sourceLen). Upon exit, destLen is the actual size of the + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to compress a whole file at once if the - input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer. @@ -1025,11 +1117,11 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level)); /* - Compresses the source buffer into the destination buffer. The level + Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the + length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed buffer. compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough @@ -1040,22 +1132,20 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); /* compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before - a compress() or compress2() call to allocate the destination buffer. + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. */ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed buffer. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output @@ -1063,136 +1153,199 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, */ -typedef voidp gzFile; + /* gzip file access functions */ -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); /* - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h", or 'R' for run-length encoding - as in "wb1R". (See the description of deflateInit2 for more information - about the strategy parameter.) + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef voidp gzFile; /* opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + + Opens a gzip (.gz) file for reading or writing. The mode parameter is as + in fopen ("rb" or "wb") but can also include a compression level ("wb9") or + a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only + compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' + for fixed code compression as in "wb9F". (See the description of + deflateInit2 for more information about the strategy parameter.) Also "a" + can be used instead of "w" to request that the gzip stream that will be + written be appended to the file. "+" will result in an error, since reading + and writing to the same gzip file is not supported. gzopen can be used to read a file which is not in gzip format; in this case gzread will directly read from the file without decompression. - gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). */ + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); /* - gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. - The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). - gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. + gzdopen associates a gzFile with the file descriptor fd. File descriptors + are obtained from calls like open, dup, creat, pipe or fileno (if the file + has been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ + +ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +/* + Set the internal buffer size used by this library's functions. The + default buffer size is 8192 bytes. This function must be called after + gzopen() or gzdopen(), and before any other calls that read or write the + file. The buffer memory allocation is always deferred to the first read or + write. Two buffers are allocated, either both of the specified size when + writing, or one of the specified size and the other twice that size when + reading. A larger buffer size of, for example, 64K or 128K bytes will + noticeably increase the speed of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. */ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); /* - Dynamically update the compression level or strategy. See the description + Dynamically update the compression level or strategy. See the description of deflateInit2 for the meaning of these parameters. + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not opened for writing. */ -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); /* - Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. - gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). */ + Reads the given number of uncompressed bytes from the compressed file. If + the input file was not in gzip format, gzread copies the given number of + bytes into the buffer. -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream, or failing that, reading the rest + of the input file directly without decompression. The entire input file + will be read if gzread is called until it returns less than the requested + len. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. */ -ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + voidpc buf, unsigned len)); /* - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). The number of - uncompressed bytes written is limited to 4095. The caller should assure that - this limit is not exceeded. If it is exceeded, then gzprintf() will return - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf() - because the secure snprintf() or vsnprintf() functions were not available. + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes written or 0 in case of + error. +*/ + +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the arguments to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or 0 in case of error. The number of + uncompressed bytes written is limited to 8191, or one less than the buffer + size given to gzbuffer(). The caller should assure that this limit is not + exceeded. If it is exceeded, then gzprintf() will return an error (0) with + nothing written. In this case, there may also be a buffer overflow with + unpredictable consequences, which is possible only if zlib was compiled with + the insecure functions sprintf() or vsprintf() because the secure snprintf() + or vsnprintf() functions were not available. This can be determined using + zlibCompileFlags(). */ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); /* - Writes the given null-terminated string to the compressed file, excluding + Writes the given null-terminated string to the compressed file, excluding the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. + + gzputs returns the number of characters written, or -1 in case of error. */ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); /* - Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. - gzgets returns buf, or Z_NULL in case of error. + Reads bytes from the compressed file until len-1 characters are read, or a + newline character is read and transferred to buf, or an end-of-file + condition is encountered. If any characters are read or if len == 1, the + string is terminated with a null character. If no characters are read due + to an end-of-file or len < 1, then the buffer is left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. */ -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); /* - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. + Writes c, converted to an unsigned char, into the compressed file. gzputc + returns the value that was written, or -1 in case of error. */ -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); /* - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. + Reads one byte from the compressed file. gzgetc returns this byte or -1 + in case of end of file or error. */ -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); /* - Push one character back onto the stream to be read again later. - Only one character of push-back is allowed. gzungetc() returns the - character pushed, or -1 on failure. gzungetc() will fail if a - character has been pushed but not read yet, or if c is -1. The pushed - character will be discarded if the stream is repositioned with gzseek() - or gzrewind(). + Push one character back onto the stream to be read as the first character + on the next read. At least one character of push-back is allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). */ -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); /* - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. - gzflush should be called only when strictly necessary because it can - degrade compression. + Flushes all pending output into the compressed file. The parameter flush + is as in the deflate() function. The return value is the zlib error number + (see function gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatented gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. */ -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); /* - Sets the starting position for the next gzread or gzwrite on the - given compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are + extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position. - gzseek returns the resulting offset location as measured in bytes from + gzseek returns the resulting offset location as measured in bytes from the beginning of the uncompressed stream, or -1 in case of error, in particular if the file is opened for writing and the new starting position would be before the current position. @@ -1202,68 +1355,127 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); /* Rewinds the given file. This function is supported only for reading. - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) */ -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); /* - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) + Returns the starting position for the next gzread or gzwrite on the given + compressed file. This position represents a number of bytes in the + uncompressed data stream, and is zero when starting, even if appending or + reading a gzip stream from the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); + + Returns the current offset in the file being read or written. This offset + includes the count of bytes that precede the gzip stream, for example when + appending or when using gzdopen() for reading. When reading, the offset + does not include as yet unused buffered input. This information can be used + for a progress indicator. On error, gzoffset() returns -1. */ ZEXTERN int ZEXPORT gzeof OF((gzFile file)); /* - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. + Returns true (1) if the end-of-file indicator has been set while reading, + false (0) otherwise. Note that the end-of-file indicator is set only if the + read tried to go past the end of the input, but came up short. Therefore, + just like feof(), gzeof() may return false even if there is no more data to + read, in the event that the last read request was for the exact number of + bytes remaining in the input file. This will happen if the input file size + is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. */ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); /* - Returns 1 if file is being read directly without decompression, otherwise - zero. + Returns true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. This state can change from + false to true while reading the input file if the end of a gzip stream is + reached, but is followed by data that is not another gzip stream. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). */ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); /* - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). + Flushes all pending output if necessary, closes the compressed file and + deallocates the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. */ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); /* - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. + Returns the error message for the last error which occurred on the given + compressed file. errnum is set to zlib error number. If an error occurred + in the file system and not in the compression library, errnum is set to + Z_ERRNO and the application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. */ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); /* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip + Clears the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip file that is being written concurrently. */ + /* checksum functions */ /* These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. + anyway because they might be useful in applications using the compression + library. */ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: + return the updated checksum. If buf is Z_NULL, this function returns the + required initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. + + Usage example: uLong adler = adler32(0L, Z_NULL, 0); @@ -1273,9 +1485,10 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ +/* ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, z_off_t len2)); -/* + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of @@ -1285,9 +1498,11 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); /* Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is NULL, this function returns the required initial - value for the for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. + updated CRC-32. If buf is Z_NULL, this function returns the required + initial value for the for the crc. Pre- and post-conditioning (one's + complement) is performed within this function so it shouldn't be done by the + application. + Usage example: uLong crc = crc32(0L, Z_NULL, 0); @@ -1298,9 +1513,9 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ +/* ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); -/* Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 @@ -1339,16 +1554,57 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) #define inflateBackInit(strm, windowBits, window) \ inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, sizeof(z_stream)) + ZLIB_VERSION, sizeof(z_stream)) - -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; /* hack for buggy compilers */ +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); #endif +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# ifdef _LARGEFILE64_SOURCE + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +#endif + +/* hack for buggy compilers */ +#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; +#endif + +/* undocumented functions */ ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); #ifdef __cplusplus } diff --git a/source/Irrlicht/zlib/zutil.c b/source/Irrlicht/zlib/zutil.c index 0f4bd787..e33ae8bb 100644 --- a/source/Irrlicht/zlib/zutil.c +++ b/source/Irrlicht/zlib/zutil.c @@ -1,5 +1,5 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2005, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -34,25 +34,25 @@ uLong ZEXPORT zlibCompileFlags() uLong flags; flags = 0; - switch (sizeof(uInt)) { + switch ((int)(sizeof(uInt))) { case 2: break; case 4: flags += 1; break; case 8: flags += 2; break; default: flags += 3; } - switch (sizeof(uLong)) { + switch ((int)(sizeof(uLong))) { case 2: break; case 4: flags += 1 << 2; break; case 8: flags += 2 << 2; break; default: flags += 3 << 2; } - switch (sizeof(voidpf)) { + switch ((int)(sizeof(voidpf))) { case 2: break; case 4: flags += 1 << 4; break; case 8: flags += 2 << 4; break; default: flags += 3 << 4; } - switch (sizeof(z_off_t)) { + switch ((int)(sizeof(z_off_t))) { case 2: break; case 4: flags += 1 << 6; break; case 8: flags += 2 << 6; break; @@ -117,9 +117,9 @@ uLong ZEXPORT zlibCompileFlags() # ifndef verbose # define verbose 0 # endif -int z_verbose = verbose; +int ZLIB_INTERNAL z_verbose = verbose; -void z_error (m) +void ZLIB_INTERNAL z_error (m) char *m; { fprintf(stderr, "%s\n", m); @@ -146,7 +146,7 @@ const char * ZEXPORT zError(err) #ifndef HAVE_MEMCPY -void zmemcpy(dest, source, len) +void ZLIB_INTERNAL zmemcpy(dest, source, len) Bytef* dest; const Bytef* source; uInt len; @@ -157,7 +157,7 @@ void zmemcpy(dest, source, len) } while (--len != 0); } -int zmemcmp(s1, s2, len) +int ZLIB_INTERNAL zmemcmp(s1, s2, len) const Bytef* s1; const Bytef* s2; uInt len; @@ -170,7 +170,7 @@ int zmemcmp(s1, s2, len) return 0; } -void zmemzero(dest, len) +void ZLIB_INTERNAL zmemzero(dest, len) Bytef* dest; uInt len; { @@ -213,7 +213,7 @@ local ptr_table table[MAX_PTR]; * a protected system like OS/2. Use Microsoft C instead. */ -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) { voidpf buf = opaque; /* just to make some compilers happy */ ulg bsize = (ulg)items*size; @@ -237,7 +237,7 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) return buf; } -void zcfree (voidpf opaque, voidpf ptr) +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { int n; if (*(ush*)&ptr != 0) { /* object < 64K */ @@ -272,13 +272,13 @@ void zcfree (voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) { if (opaque) opaque = 0; /* to make compiler happy */ return _halloc((long)items, size); } -void zcfree (voidpf opaque, voidpf ptr) +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { if (opaque) opaque = 0; /* to make compiler happy */ _hfree(ptr); @@ -297,7 +297,7 @@ extern voidp calloc OF((uInt items, uInt size)); extern void free OF((voidpf ptr)); #endif -voidpf zcalloc (opaque, items, size) +voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) voidpf opaque; unsigned items; unsigned size; @@ -307,7 +307,7 @@ voidpf zcalloc (opaque, items, size) (voidpf)calloc(items, size); } -void zcfree (opaque, ptr) +void ZLIB_INTERNAL zcfree (opaque, ptr) voidpf opaque; voidpf ptr; { diff --git a/source/Irrlicht/zlib/zutil.h b/source/Irrlicht/zlib/zutil.h index 0ba6e020..a36a406e 100644 --- a/source/Irrlicht/zlib/zutil.h +++ b/source/Irrlicht/zlib/zutil.h @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -13,31 +13,21 @@ #ifndef ZUTIL_H #define ZUTIL_H -#define ZLIB_INTERNAL +#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + #include "zlib.h" #ifdef STDC -# ifndef _WIN32_WCE +# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) # include # endif # include # include #endif -#ifdef NO_ERRNO_H -# ifdef _WIN32_WCE - /* The Microsoft C Run-Time Library for Windows CE doesn't have - * errno. We define it as a global variable to simplify porting. - * Its value is always 0 and should not be used. We rename it to - * avoid conflict with other libraries that use the same workaround. - */ -# define errno z_errno -# endif - extern int errno; -#else -# ifndef _WIN32_WCE -# include -# endif -#endif #ifndef local # define local static @@ -89,7 +79,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) # define OS_CODE 0x00 # if defined(__TURBOC__) || defined(__BORLANDC__) -# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) +# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) /* Allow compilation with ANSI keywords only enabled */ void _Cdecl farfree( void *block ); void *_Cdecl farmalloc( unsigned long nbytes ); @@ -118,7 +108,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #ifdef OS2 # define OS_CODE 0x06 # ifdef M_I86 - #include +# include # endif #endif @@ -151,7 +141,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define fdopen(fd,mode) NULL /* No fdopen() */ #endif -#if (defined(_MSC_VER) && (_MSC_VER > 600)) +#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX # if defined(_WIN32_WCE) # define fdopen(fd,mode) NULL /* No fdopen() */ # ifndef _PTRDIFF_T_DEFINED @@ -163,6 +153,18 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # endif #endif +#if defined(__BORLANDC__) + #pragma warn -8004 + #pragma warn -8008 + #pragma warn -8066 +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +#endif + /* common defaults */ #ifndef OS_CODE @@ -197,7 +199,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # ifdef WIN32 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ # if !defined(vsnprintf) && !defined(NO_vsnprintf) -# define vsnprintf _vsnprintf +# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) +# define vsnprintf _vsnprintf +# endif # endif # endif # ifdef __SASC @@ -232,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define zmemzero(dest, len) memset(dest, 0, len) # endif #else - extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - extern void zmemzero OF((Bytef* dest, uInt len)); + void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); #endif /* Diagnostic functions */ #ifdef DEBUG # include - extern int z_verbose; - extern void z_error OF((char *m)); + extern int ZLIB_INTERNAL z_verbose; + extern void ZLIB_INTERNAL z_error OF((char *m)); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} @@ -258,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif -voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); -void zcfree OF((voidpf opaque, voidpf ptr)); +voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, + unsigned size)); +void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); #define ZALLOC(strm, items, size) \ (*((strm)->zalloc))((strm)->opaque, (items), (size)) diff --git a/tests/Makefile b/tests/Makefile index 97411847..61051b5b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -14,7 +14,7 @@ all: all_linux # target specific settings all_linux: SYSTEM=Linux -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor all_win32 clean_win32: SYSTEM=Win32-gcc all_win32: LDFLAGS = -L../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm @@ -28,6 +28,7 @@ OBJ = $(Sources:.cpp=.o) all_linux all_win32: $(OBJ) $(warning Building...) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) + @$(RM) tests # otherwise it's easy to forget to copy it and run the old binary clean: clean_linux clean_win32 $(warning Cleaning...) diff --git a/tests/archiveReader.cpp b/tests/archiveReader.cpp index 3d2c4e28..3dc4d0bd 100644 --- a/tests/archiveReader.cpp +++ b/tests/archiveReader.cpp @@ -87,6 +87,8 @@ bool testArchive(IFileSystem* fs, const io::path& archiveName) if ( fs->getFileArchiveCount() ) return false; + readFile->drop(); + return true; } @@ -178,6 +180,8 @@ bool testEncryptedZip(IFileSystem* fs) if ( fs->getFileArchiveCount() ) return false; + readFile->drop(); + return true; } @@ -201,6 +205,9 @@ bool archiveReader() ret &= testArchive(fs, "media/file_with_path.npk"); logTestString("Testing encrypted zip files.\n"); ret &= testEncryptedZip(fs); + + device->drop(); + return ret; } diff --git a/tests/color.cpp b/tests/color.cpp index 2811b24f..c31e4273 100644 --- a/tests/color.cpp +++ b/tests/color.cpp @@ -5,7 +5,7 @@ using namespace video; bool rounding() { - SColorf colf(0.003922, 0.007843, 0.011765); // test-values by virion which once failed + SColorf colf(0.003922f, 0.007843f, 0.011765f); // test-values by virion which once failed SColor col = colf.toSColor(); return col.getRed() == 1 && col.getGreen() == 2 && col.getBlue() == 3; } diff --git a/tests/filesystem.cpp b/tests/filesystem.cpp index 697da08c..8a5487cb 100644 --- a/tests/filesystem.cpp +++ b/tests/filesystem.cpp @@ -151,6 +151,10 @@ bool filesystem(void) result &= testFlattenFilename(fs); result &= testgetAbsoluteFilename(fs); + + + device->drop(); + return result; } diff --git a/tests/flyCircleAnimator.cpp b/tests/flyCircleAnimator.cpp index 9a379950..41275a87 100644 --- a/tests/flyCircleAnimator.cpp +++ b/tests/flyCircleAnimator.cpp @@ -11,13 +11,13 @@ using namespace video; /** Tests the offset capability of the fly circle animator */ bool flyCircleAnimator(void) { - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, + IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, core::dimension2du(160,120), 32); - if (!device) - return false; + if (!device) + return false; - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager* smgr = device->getSceneManager(); + IVideoDriver* driver = device->getVideoDriver(); + ISceneManager* smgr = device->getSceneManager(); const f32 offsetDegrees[] = { 0.f, 45.f, 135.f, 270.f }; @@ -25,10 +25,9 @@ bool flyCircleAnimator(void) { IBillboardSceneNode * node = smgr->addBillboardSceneNode(); // Have the animator rotate around the Z axis plane, rather than the default Y axis - ISceneNodeAnimator * animator = - smgr->createFlyCircleAnimator(vector3df(0, 0, 0), 30.f, - 0.001f, vector3df(0, 0, 1), - (offsetDegrees[i] / 360.f)); + ISceneNodeAnimator * animator = smgr->createFlyCircleAnimator( + vector3df(0, 0, 0), 30.f, 0.001f, + vector3df(0, 0, 1), (offsetDegrees[i] / 360.f)); if(!node || !animator) return false; @@ -44,7 +43,7 @@ bool flyCircleAnimator(void) bool result = false; - // Don't do device->run() since I need the time to remain at 0. + // Don't do device->run() since I need the time to remain at 0. if (driver->beginScene(true, true, video::SColor(0, 80, 80, 80))) { smgr->drawAll(); @@ -52,7 +51,8 @@ bool flyCircleAnimator(void) result = takeScreenshotAndCompareAgainstReference(driver, "-flyCircleAnimator.png", 100); } - device->drop(); + device->drop(); - return result; + return result; } + diff --git a/tests/main.cpp b/tests/main.cpp index 5744522c..89f6ff6b 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -72,7 +72,7 @@ int main(int argumentCount, char * arguments[]) TEST(vectorPositionDimension2d); // file system checks (with null driver) TEST(filesystem); - TEST(archiveReader); + TEST(archiveReader); TEST(testXML); TEST(serializeAttributes); // null driver @@ -93,7 +93,7 @@ int main(int argumentCount, char * arguments[]) TEST(drawRectOutline); TEST(flyCircleAnimator); TEST(md2Animation); - TEST(testGeometryCreator); + TEST(testGeometryCreator); TEST(writeImageToFile); TEST(meshTransform); // all driver checks @@ -116,7 +116,7 @@ int main(int argumentCount, char * arguments[]) // q3 maps are slow TEST(planeMatrix); TEST(terrainSceneNode); - TEST(lightMaps); + TEST(lightMaps); unsigned int numberOfTests = tests.size(); unsigned int testToRun = 0; diff --git a/tests/matrixOps.cpp b/tests/matrixOps.cpp index 94e4556d..8fc909f4 100644 --- a/tests/matrixOps.cpp +++ b/tests/matrixOps.cpp @@ -66,22 +66,22 @@ bool transformations(void) result &= (core::vector3df(30,40,50).equals(newRotation, 0.000004f)); assert(result); m.setRotationDegrees(vector3df(90.0001f, 270.85f, 180.0f)); - s.setRotationDegrees(vector3df(0,0, 0.860866)); + s.setRotationDegrees(vector3df(0,0, 0.860866f)); m *= s; newRotation = m.getRotationDegrees(); result &= (core::vector3df(0,270,270).equals(newRotation, 0.0001f)); assert(result); m.setRotationDegrees(vector3df(270.0f, 89.8264f, 0.000100879f)); - s.setRotationDegrees(vector3df(0,0, 0.189398)); + s.setRotationDegrees(vector3df(0,0, 0.189398f)); m *= s; newRotation = m.getRotationDegrees(); result &= (core::vector3df(0,90,90).equals(newRotation, 0.0001f)); assert(result); m.setRotationDegrees(vector3df(270.0f, 89.0602f, 359.999f)); - s.setRotationDegrees(vector3df(0,0, 0.949104)); + s.setRotationDegrees(vector3df(0,0, 0.949104f)); m *= s; newRotation = m.getRotationDegrees(); - result &= (core::vector3df(0,90,89.999).equals(newRotation)); + result &= (core::vector3df(0,90,89.999f).equals(newRotation)); assert(result); return result; diff --git a/tests/media/Burning's Video-drawPixel.png b/tests/media/Burning's Video-drawPixel.png index 1875c662aa73ce627253ca042335aea65390d9cc..b7539cf8f678eca2124d1071ca1e1c64d264165f 100644 GIT binary patch literal 27977 zcmXtfdpMK-|Nn>@DdVl0LotUk3UgLYtyN5pDKZk9!kkYf zQ;y}ZIpnxlT2471#&4hBb$$Q1@B6>|y6*da-OtDI6>DyG^8~*bKL7wYVQhpzajtJT zM*xtUbKY(9)CK^g0LF-`76Cbbn_SDuHkRjVXk%+vLfS=_%uy(#h@mfWP5 zJZ9P%G%?OD*X{kw1*N^N693p{Z19)qI^urV(HeN*;Z+yPoI57hzsH`__T))Zu{)c# zD;d%^UZJdn>@8kKq;)#S6yAJSHazbW{(IN+=@9fkom_I?rZqxyBS35Xza!lnuqEZC zWD&-b(ExlBgKi{X-lrHNYI zHShyKK);~DmdDfv6tllsyCBzoCVWTIz}8^@cg&%Ovk`35EDcqnV-)E;s_5Y#^8&Zz zjzbIKvL@Hl`i-G2GYM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H=~e?!aE+f@f~dcW9ZHq%9$6E+5K0QW^6{Vj!2{ zg|y&_Rd9f^>TU)9#<;fR`s3!f;a+X%uOC=uv%z%GLtqJfiEvoD2NQ2J4M=mF)Ta-6 zhezHH4dG9e1Wam*{24Y4eQyuuOYdee<+ahnkz4<4eO`}EcR>Y)WF6`9i@);p0(``u z6?q)OMmR<^)Qo@CnwZD%48x_?i2@8zHoMnT3TE}~!L!8SC!q~^1b@Zi-Y+Akgs_aO z*|w;)7FR9-#;c}bATmlY>sov1(dXo@W7Q5EtQ}w5F}#X}2dxs+jAWYHuog$>^u;w} zCUl9I2GG`AUYpaeifQHd=?@tQwb?rIgK=Y;Ri}QdvZ$ByxPiayel^HXnFwuXPWAP7 zZuunri5ZH}{H@GnOvBkw+)hZc$=N3lPWqCZY~ZW6h4&jz?fGNecq~p>rxOi!)-6~z zj(jRpYh4F}Cjozas?(9Ba@(DN{hi@f*FITkj#!PIty=!oD$R5Iwbtde&S9W-kq#-b m@yRw(m=TpQ|IbZ40laZgofoK^z??pQ0AqbKSovM&i2ngVr~fVh diff --git a/tests/media/Burning's Video-lightType.png b/tests/media/Burning's Video-lightType.png index 35b06a623856c6ee4605e1df1c491a82fbf2d657..161513a18db4d0a95a63d1fbad15782ea36c55b1 100644 GIT binary patch literal 921 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1SEZ8zRh7^U{3IKaSW-L^LB2amvo>=o4xb4 z1l5pTY^@E`emoM&;f{3*jPc7Tljqx?d<{VRja%$3Y%j#}lcGB#=9W$ZIlOJKKKZM@{@ zqz2s|Osii>WNuVBpsMKL!y%9yMRQ9VS|gjQOWRs*>}H-L z$aJKI!4Rxem{?|yC!_iY=edfa-&p1xGzS?Z{GdlbL5-yY=nw|+S3E%L6BufDgdF$i zR%J9VSbT1Rj5m{;K~TC!pCse+3;os(t=GR9Djq2O{Y3wPoZjDU{{NWnOy1oP?9M%3 zf6~?l;UBBcT`>8{rLnMflW2g)?OvEr%%R;&l-JvCu3*WR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A6iop&qu?*b&!(NZ> z-^&At3P1wG>aG~LKMP2v1`LyPxcuU`vx3zEpt3*3>VM}c$Zjr!<^h=Qk6yn8>JOr7 z0H)nh-_1hmw*nIkNRbVb&%PLJvhW%!2jHgqZb`7}+X1&m7zC;SD8~<^FFG5VsGk>u z-3x*P)IVe>*a$c!0Q(~_s$t#h0l1@n-u!G*{X=3nB!CS7Soe1!aiQM7_JshTm)WQC z2xuk?xqld#1Qr7}>^u33`)&S_a}`wpG&xoqd7`8As^3@Yf52WPBCG+Jd^V|myfjt? zz%=V_H)}vMx#*A>>`%JyGQ$k%{+OWD@&HZ~ZIu8t7^vPOstxLbV2>lPliq29l4<}rTGu!Lq3IQNb<;#QQsUL;HAsJWzJnrzqXcn&&09WPwWK}2J$Vldk zxPKAi6f}*KzJ0A1a8&?AW-D-#seW1^HW>js#6cvw`73Sauk#F3x#+Tf+$Y;mIiCy5u zt67pY!2PX2zBxrr!>!M%0$@Nll7~OO#D8WIrIeMPTYLUE1Q7jta{TT5RRByIQ1n!= z+nhk2D6Zr4+Sa~i8VF`I@k&_zh_(F{Uv;-uod_VQJ|BrP{xA%zI(B7I&9a@)?F=~c zbN!^dV&EmELI5I5oZY5op0~ku6}!GTaCg=ztq zmegC9L4*D2-Oh&R?=t_Wb5z^f<9|x9NK^qZeY~w8$mPZkvPl44O0PcRH1qowQa23J zQd|YVG)^`4s@TP#B0$~0uTuYE%5O6%XqZHV>ByGiUJSrA7TV1r3IjVnE%nt~k@Rl0 zs!l$6a7|wrRgTsR}o;F+8&UoUxY6i5M&w4r&3IHsqe=QzS^{BKvY);~i3Z zm4BN2#50ZqBym=)0c;3>WHi{Ya9@rQ;HqyYUr7c*j^QLa=^s&|tP*ugU={!X002ov JPDHLkV1hHO$&dg5 diff --git a/tests/media/Burning's Video-orthoCam.png b/tests/media/Burning's Video-orthoCam.png index aeb97f820b2f055ba893ac07b3470545cce04fa2..15fa5b04386e18fee701846cfbc6b51d176c48bf 100644 GIT binary patch delta 2840 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Zm;uqmBA9c3N=M1TE^g73a)R!NHvT)>{z=8d@EK*t>VwScL(#cIuyFowDaw^ zBaTQ}-94rL&1)?~>^Nj&xz%_Fb>>VB=QFgCb>i)}506mO>%UrRRk0D>I_rS5XH(h_ z*`{>Uo;^UVQ>`c)^?h(!n=0nqx%!V@woTW;?%l&9-#F7|-eSkvcitJ@xwy7<-M4F( zaTXO$V{6|B%j=#$U;SJXY&`TaKc5%IU#}9=TrXVM((?eu1+ZyzbEVDkM{Y^{;>9gG z58B4K`*!ZMJ>vu0&D)nQZN+(nZEU)Xx7%*BJ>zhjbougTpF_OeAb?HVu_Gc_avelX gqZSq-g2%xAAC+=u9UnN46aWAK07*qoM6N<$f_L9$jQ{`u diff --git a/tests/media/Burning's Video-planeMatrix-scaledClip.png b/tests/media/Burning's Video-planeMatrix-scaledClip.png index 3f964697d2cac66ac1b0851230d405cc176a3978..14f6dc35b20a86a31cceeba91e7653551a6ea678 100644 GIT binary patch literal 37744 zcmV)=K!m@EP)004Lh0ssI2`oL~D001BWNklNwRKhR(>)tGLvl7#GG)-DY0`is8iEFfZJCB75~ctFw)w+= z=|6@*7&Z)nGGN*UEki#+k$K~z)# z`7+fu;hPWIWv8EgsXRXRzyE&q#n0}*GXhvQQR4F)up3V{Q6P%FRB6& zhXqXv0}2E#8tcM1V8OaPD&PpYu#QW7U$c+E+&5O@JGkyJ}Dw(d$TSywEXbQfAX2~!+9JM9PB$z_)osQ`os^6p%IvS z6xej>-3xzrnMMU)Y~t_Da|IC9+0YW;qL#+Xri)DY{MEsH(*Z#4cxPY~V3^UZ9cKyW zRRDl%(|pr}gPkE0eQ>{ef4(tF*3su*-qn;oc(nebHy8iupSyMI_VCMJJ9_iMst)N} z_tv-e^Dlqn^u5#Slh03X&dMD5cfNJDXyS+K_U>tYw)J_&7j?QnZ+(DGlO8YpSKq5I zDj5&6y3wb06%YXJP1l>xga%WjBqZsn$vH13qhVg;d664u5wZUr{>YW#s!0RK)6!&y z2=StdOkkOuAts6fK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tests/media/Direct3D 9.0-stencilShadow.png index 7b222b4b8dfc191d46bf712d9cab509423109b27..45a75531c9ccbda53f4ed59fe031853c0cddd459 100644 GIT binary patch literal 5671 zcmcIo_d6So*Ns)tnpLxAX;r00YwuaLTdfgA)K-+L6(d$r+7i^3Qi__fSIinQg4#1S zu^OZ$X7c^Kf5dyA=iKwlea^kl`RP6>(AdNY-4bcZH=?=+4m;qK`rVv%lj0fccKyb%sTf? zb!dRv#z*DUufmg_B&&R>mX3MWuScO*T5h56%vgi(S-e@C)`JJHUo-op((8SAM$PEc zH~zT=H-;s?8?l9uW^qgS9sJIJHB*O27X4^1CN{e)UmVZ7{HdR@jqROWpr91^D8mBS zCIzcj`PZ_buBQml!IL97VgYs{e9#c3a~b=Ts(&5AwJYxZAUOPEQlAA2sCa2?_VAFo zE8391E6qjI*1DJa)Ic201A?%lRG=%HkF%2ptzgVU<9{;{84{_()bR`9vWak znbLE}pT(jiWBNWrpaioz5I?;C9dbTt>>t)sD9J3~N~N`xFY!>rn`NbwE=Bm6(QOXF zFK-7>Tm}S|JT457Ugq9J2E*xLr3c4Ip|y zIiQ+!>mDdmW)(23@mO=HxL-J5WWWh5X4w$R%U`V;!>;_>@+s?&4U23VAoFXkx($-S z?-jgvaVCHge}p5Qbu5uaCG8mu2NJnIh(+8LbQ^z7`S~ld3Zh5l_vKpNuJ|pT>MscX zcW$$af$IW4Skj+}NA#8JH7RA!sI&IvqcwV{gy{sQv2eC_#I%_4 z#Dx-{&m|0ssir3siu`=nA5u-n5V_*)P5ZqC?{YRrnyOvO7;nMAMtf|KTsBJ&34f%X^C1=^)gm1Ln%U0OZPB?$%aRw?)kj3K+B4v zw=HTnd?FlKM?RbRig0N%bJpa`G)M$FvENTLL)YZ|K)Fkj5-D>QwEBrQv_L+IG4H&$ zgL}-5&NqSm4&QM2N8_5AsSkUv+hJb;qBg+5sb4t(#!xSD_xin&aw117UYYnScM-NA z=W#3&^2q^6qZI*{DB8CMb!Zt`g$vtzdqo@Y**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BN2)2+1WwYuX4j3M$J$*L~<3h5fhJZH9&+CHMb zgF~l8?-r-bL4f<*Ru&PV63ZbAZ;f&@x(GK|IDF{#;KY{fQo-6hG@35u)p)ov$mN%jLU zhk9Dm8oQHPk?Zn)nptGcGV|<87cmpm*KRjUKTnP}{A?AOC@i+_pIg0!Hjn|674QCv zE{c=?`gh42mD-z9I?l_IR95K-v$kur&`Bm+jDzDSrK6^^LzwwFKjuCAWlh88S-S8N zium==_9Bzb_VD^72kz>~rm9J)qh&U_R`SV_E2gA>i^r|w-F>*Q&HCW1fzksKYLLER@H>7ZNGXW-m~9oaYRj~`Y&f&W&tD$(uc zOy{4k&bIScW>xpMCgY(xF8(TrO*B1o4G0h=CPB=}A=_vla_43iN~u%bmS3ie%Iki= z;Mc2kymfO>mT|Q8@rW=nie(a}a*xqC35TwybtD7yja|&!bhJ{)Ed8suDsl)|q6ojs zal2glad&B6##AEGCqO_tJ9w^=aL>L00lr7T;dUCiQ?&2B-7{hh9fZ~a25WkTlBWlfu7`%G98ALN2n2*(B&(wC0qSyY5|H$Axgeor|b$I#Z1d1vM7 zF5sQB74pORQutkG=v8g&c2zq2ww3d-u^+8yR{o9C55XZ`f)BI?&HBm`AJTOLXCC4& z@|<)?uWMDqDGT4R%fa4?#6^beuw`n0W63&jXv7nSjV^_-Ga66JLt3xOAB!?Xvt!%tw`6p0 zQyA9$O+ou1-t*WMZC1^y0J{zxY>Bjy#NT>GJCBpz3#A35OR*D5WsEY?W)(*T2yA1{ zQuoDE{M1mKub$E1S+UoD&l#nc2&(NU$U-I{i{P*eYmV9JO>n!yKQ$1u(uLghb?|}3 zPLlbCKUleEh#=(RfFWL#Xrr0~>b)iI7^`9-D~vf1h4}mYN>CR>dyj Ef7!;%)Bpeg diff --git a/tests/media/attributes.xml b/tests/media/attributes.xml new file mode 100644 index 00000000..b2c73f25 --- /dev/null +++ b/tests/media/attributes.xml @@ -0,0 +1,4 @@ + + + + diff --git a/tests/media/cdata.xml b/tests/media/cdata.xml new file mode 100644 index 00000000..dfcfa0c7 --- /dev/null +++ b/tests/media/cdata.xml @@ -0,0 +1,14 @@ + + + + + ]]> + ]]> + + + + diff --git a/tests/meshTransform.cpp b/tests/meshTransform.cpp index 57bffd8a..ed21cff8 100644 --- a/tests/meshTransform.cpp +++ b/tests/meshTransform.cpp @@ -80,5 +80,7 @@ bool meshTransform(void) result = takeScreenshotAndCompareAgainstReference(driver, "-meshTransform.png"); + device->drop(); + return result; } diff --git a/tests/serializeAttributes.cpp b/tests/serializeAttributes.cpp index 90dea7a4..0d492d56 100644 --- a/tests/serializeAttributes.cpp +++ b/tests/serializeAttributes.cpp @@ -145,7 +145,7 @@ public: void set() { - ValInt = 1; + ValInt = 152722522; ValFloat = 1.f; ValString = "one"; ValStringW = L"ONE"; @@ -315,5 +315,7 @@ bool serializeAttributes() logTestString("XmlSerialization failed in %s:%d\n", __FILE__, __LINE__ ); } + device->drop(); + return result; } diff --git a/tests/softwareDevice.cpp b/tests/softwareDevice.cpp index 1371dace..40a8f573 100644 --- a/tests/softwareDevice.cpp +++ b/tests/softwareDevice.cpp @@ -7,8 +7,6 @@ using namespace irr; using namespace core; using namespace scene; - - //! Tests the basic functionality of the software device. bool softwareDevice(void) { @@ -54,5 +52,3 @@ bool softwareDevice(void) return result; } - - diff --git a/tests/testGeometryCreator.cpp b/tests/testGeometryCreator.cpp index ad7609dc..d3f8d73c 100644 --- a/tests/testGeometryCreator.cpp +++ b/tests/testGeometryCreator.cpp @@ -28,36 +28,48 @@ bool testGeometryCreator(void) material.Lighting = false; material.TextureLayer[0].Texture = wall; - IMeshSceneNode * node = smgr->addMeshSceneNode( - geom->createHillPlaneMesh(dimension2df(10, 5), dimension2du(5, 5), - &material, 10, dimension2df(2, 2), dimension2df(3, 3)), 0, -1, + irr::scene::IMesh * meshHill = geom->createHillPlaneMesh(dimension2df(10, 5), dimension2du(5, 5), + &material, 10, dimension2df(2, 2), dimension2df(3, 3) ); + IMeshSceneNode * node = smgr->addMeshSceneNode(meshHill, 0, -1, vector3df(0, 10, 0), vector3df(-60, 0, 0)); + meshHill->drop(); - node = smgr->addMeshSceneNode(geom->createArrowMesh(4, 8, 10, 6, 3, 6, - SColor(255, 255, 0, 0), SColor(255, 0, 255, 0)), - 0, -1, vector3df(-10, -20, 0)); + irr::scene::IMesh * meshArrow = geom->createArrowMesh(4, 8, 10, 6, 3, 6, + SColor(255, 255, 0, 0), SColor(255, 0, 255, 0)); + node = smgr->addMeshSceneNode(meshArrow, 0, -1, vector3df(-10, -20, 0)); node->setMaterialFlag(video::EMF_LIGHTING, false); + meshArrow->drop(); - node = smgr->addMeshSceneNode(geom->createConeMesh(5.f, 10.f, 16), 0, -1, vector3df(-35, -20, 0)); + irr::scene::IMesh * meshCone = geom->createConeMesh(5.f, 10.f, 16); + node = smgr->addMeshSceneNode(meshCone, 0, -1, vector3df(-35, -20, 0)); node->setMaterialFlag(video::EMF_LIGHTING, false); node->setMaterialTexture(0, wall); + meshCone->drop(); - node = smgr->addMeshSceneNode(geom->createCubeMesh(), 0, -1, vector3df(-20, -20, 0)); + irr::scene::IMesh * meshCube = geom->createCubeMesh(); + node = smgr->addMeshSceneNode(meshCube, 0, -1, vector3df(-20, -20, 0)); node->setMaterialFlag(video::EMF_LIGHTING, false); node->setMaterialTexture(0, wall); + meshCube->drop(); - node = smgr->addMeshSceneNode(geom->createCylinderMesh(3, 10, 16), 0, -1, vector3df(0, -20, 10), core::vector3df(45,0,0)); + irr::scene::IMesh * meshCylinder = geom->createCylinderMesh(3, 10, 16); + node = smgr->addMeshSceneNode(meshCylinder, 0, -1, vector3df(0, -20, 10), core::vector3df(45,0,0)); node->setMaterialFlag(video::EMF_LIGHTING, false); node->setMaterialTexture(0, wall); + meshCylinder->drop(); - node = smgr->addMeshSceneNode(geom->createSphereMesh(), 0, -1, vector3df(10, -15, 0)); + irr::scene::IMesh * meshSphere = geom->createSphereMesh(); + node = smgr->addMeshSceneNode(meshSphere, 0, -1, vector3df(10, -15, 0)); node->setMaterialFlag(video::EMF_LIGHTING, false); node->setMaterialTexture(0, wall); + meshSphere->drop(); - node = smgr->addMeshSceneNode(geom->createVolumeLightMesh(), 0, -1, vector3df(20, -20, -10)); + irr::scene::IMesh * meshVolumeLight = geom->createVolumeLightMesh(); + node = smgr->addMeshSceneNode(meshVolumeLight, 0, -1, vector3df(20, -20, -10)); node->setMaterialFlag(video::EMF_LIGHTING, false); node->setMaterialTexture(0, wall); node->setScale(core::vector3df(4.f,4.f,4.f)); + meshVolumeLight->drop(); bool result = false; device->run(); diff --git a/tests/testXML.cpp b/tests/testXML.cpp index 19a15c4d..969bcd63 100644 --- a/tests/testXML.cpp +++ b/tests/testXML.cpp @@ -6,12 +6,9 @@ using namespace irr; using namespace core; -/** Tests for XML handling */ -bool testXML(void) +bool simple_xml( irr::io::IFileSystem * fs ) { - IrrlichtDevice *device = createDevice(video::EDT_NULL, dimension2du(400, 200)); - - io::IXMLReaderUTF8* reader = device->getFileSystem()->createXMLReaderUTF8("media/test.xml"); + io::IXMLReaderUTF8* reader = fs->createXMLReaderUTF8("media/test.xml"); if (!reader) { logTestString("Could not create XML reader.\n"); @@ -41,3 +38,130 @@ bool testXML(void) return retVal; } +// CDATA should return everything between "![CDATA[" and "]]>" as it's in the file +bool cdata( irr::io::IFileSystem * fs ) +{ + io::IXMLReaderUTF8* reader = fs->createXMLReaderUTF8("media/cdata.xml"); + if (!reader) + { + logTestString("Could not create XML reader.\n"); + return false; + } + + const core::stringc textNode("text"); + core::array< core::stringc > compareStrings; + compareStrings.push_back("simple"); + compareStrings.push_back(""); + compareStrings.push_back("] ]> "); + compareStrings.push_back("]\n]> "); + compareStrings.push_back("\nNewlines\n\tand tabs\n\t\tgogogo"); + compareStrings.push_back("&&#@#$%*()@#$%*()#$%*("); + compareStrings.push_back("& & && &&& &a &ü &ä &ö &&#"); + + bool result = true; + size_t count = 0; + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if ( core::stringc(reader->getNodeName()) == textNode ) + { + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_CDATA) + { + core::stringc data = reader->getNodeData(); + core::stringc name = reader->getNodeName(); + if ( count == compareStrings.size() ) + { + logTestString("too many cdata elements for reading in %s:%d\n", __FILE__, __LINE__); + } + else if ( count < compareStrings.size() ) + { + core::stringc cmpString(compareStrings[count]); + + // some (unused) variables to ease debugging + // const c8* dataRaw = data.c_str(); + // const c8* cmpRaw = cmpString.c_str(); + if ( cmpString != data ) + { + result = false; + logTestString("cdata read failed for string %d in %s:%d\n", count, __FILE__, __LINE__); + } + } + ++count; + } + if ( reader->getNodeType() == io::EXN_ELEMENT_END ) + { + break; + } + } + } + } + } + + reader->drop(); + return result; +} + +bool attributeValues(irr::io::IFileSystem * fs) +{ + io::IXMLReaderUTF8* reader = fs->createXMLReaderUTF8("media/attributes.xml"); + if (!reader) + { + logTestString("Could not create XML reader.\n"); + return false; + } + + bool result = true; + bool hasNode = false; + while (reader->read()) + { + if (io::EXN_ELEMENT == reader->getNodeType() ) + { + if ( core::stringc(reader->getNodeName()) == core::stringc("element_position") ) + { + hasNode = true; + int id1 = reader->getAttributeValueAsInt("id1"); + if ( id1 != 152722522 ) + { + logTestString("id1 is %d in %s:%d\n", id1, __FILE__, __LINE__); + result = false; + } + int id2 = reader->getAttributeValueAsInt("id2"); + result &= id2 == 3; + int x = reader->getAttributeValueAsInt("x"); + result &= x == 301; + int y = reader->getAttributeValueAsInt("y"); + result &= y == 118; + } + } + } + + if ( !hasNode ) + { + logTestString("missing node in xml in %s:%d\n", __FILE__, __LINE__); + return false; + } + + reader->drop(); + return result; +} + +/** Tests for XML handling */ +bool testXML(void) +{ + IrrlichtDevice *device = createDevice(video::EDT_NULL, dimension2du(400, 200)); + + bool result = true; + + logTestString("Test simple XML reader features.\n"); + result &= simple_xml(device->getFileSystem()); + logTestString("Test XML reader CDATA support.\n"); + result &= cdata(device->getFileSystem()); + logTestString("Test XML reader attribute support.\n"); + result &= attributeValues(device->getFileSystem()); + + device->drop(); + return result; +} diff --git a/tests/tests-last-passed-at.txt b/tests/tests-last-passed-at.txt index 56b65beb..9579179e 100644 --- a/tests/tests-last-passed-at.txt +++ b/tests/tests-last-passed-at.txt @@ -1,4 +1,4 @@ -Tests finished. 54 tests of 54 passed. +Tests finished. 55 tests of 55 passed. Compiled as DEBUG -Test suite pass at GMT Thu Mar 11 23:23:09 2010 +Test suite pass at GMT Sun Jul 18 15:41:35 2010 diff --git a/tests/timer.cpp b/tests/timer.cpp index 17f7a5b9..45d7fde7 100644 --- a/tests/timer.cpp +++ b/tests/timer.cpp @@ -43,5 +43,7 @@ bool testTimer(void) timer->start(); success &= !timer->isStopped(); + device->drop(); + return success; } diff --git a/tests/writeImageToFile.cpp b/tests/writeImageToFile.cpp index 6eae7bf8..37b47d21 100644 --- a/tests/writeImageToFile.cpp +++ b/tests/writeImageToFile.cpp @@ -67,6 +67,7 @@ bool writeImageToFile(void) irr::video::IImage * fixedScreenshot = driver->createImage(video::ECF_R8G8B8, screenshot->getDimension()); screenshot->copyTo(fixedScreenshot); screenshot->drop(); + screenshot = 0; if(!fixedScreenshot) { @@ -109,14 +110,17 @@ bool writeImageToFile(void) referenceFilename = "media/Burning's Video-drawPixel.png"; if(!binaryCompareFiles(writtenFilename, referenceFilename)) { - logTestString("File written from memory is not the same as the reference file.\n"); - assert(false); + logTestString("File written from memory is not the same as the reference file. %s:%d\n" , __FILE__, __LINE__); +// assert(false); goto cleanup; } result = true; cleanup: + if ( screenshot ) + screenshot->drop(); + if(writtenFile) writtenFile->drop();