mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.6beta3.tar
This commit is contained in:
@@ -1,223 +1,147 @@
|
||||
# Microsoft Developer Studio Project File - Name="VisualPng" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
|
||||
# Copyright 2000, Willem van Schaik. For conditions of distribution and
|
||||
# use, see the copyright/license/disclaimer notice in png.h
|
||||
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=VisualPng - Win32 Debug LIB
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "VisualPng.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "VisualPng.mak" CFG="VisualPng - Win32 Debug LIB"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "VisualPng - Win32 DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "VisualPng - Win32 Debug DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "VisualPng - Win32 LIB" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "VisualPng - Win32 Debug LIB" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "VisualPng - Win32 DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "VisualPng___Win32_DLL"
|
||||
# PROP BASE Intermediate_Dir "VisualPng___Win32_DLL"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "dll"
|
||||
# PROP Intermediate_Dir "dll"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /I "libpng" /I "zlib" /D "PNG_USE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng13.lib zlibd.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 /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
|
||||
# ADD LINK32 libpng13.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 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll;..\..\projects\msvc\win32\zlib\dll; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "VisualPng___Win32_Debug_DLL"
|
||||
# PROP BASE Intermediate_Dir "VisualPng___Win32_Debug_DLL"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "dll_dbg"
|
||||
# PROP Intermediate_Dir "dll_dbg"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "libpng" /I "zlib" /D "PNG_USE_DLL" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng13.lib zlibd.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 /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 libpng13d.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 /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_dbg
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_dbg;..\..\projects\msvc\win32\zlib\dll_dbg; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisualPng - Win32 LIB"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "VisualPng___Win32_LIB"
|
||||
# PROP BASE Intermediate_Dir "VisualPng___Win32_LIB"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "lib"
|
||||
# PROP Intermediate_Dir "lib"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng13.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 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
|
||||
# ADD LINK32 libpng.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 /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\lib"
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\lib
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug LIB"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "VisualPng___Win32_Debug_LIB"
|
||||
# PROP BASE Intermediate_Dir "VisualPng___Win32_Debug_LIB"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "lib_dbg"
|
||||
# PROP Intermediate_Dir "lib_dbg"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng13d.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 /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 libpng.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 /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\lib_dbg"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\lib_dbg
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "VisualPng - Win32 DLL"
|
||||
# Name "VisualPng - Win32 Debug DLL"
|
||||
# Name "VisualPng - Win32 LIB"
|
||||
# Name "VisualPng - Win32 Debug LIB"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PngFile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisualPng.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cexcept.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PngFile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisualPng.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisualPng.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
# Microsoft Developer Studio Project File - Name="VisualPng" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=VisualPng - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "VisualPng.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "VisualPng.mak" CFG="VisualPng - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "VisualPng - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "VisualPng - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "VisualPng - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 ..\..\projects\visualc6\Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.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 /nologo /subsystem:windows /machine:I386
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\Release
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\projects\visualc6\Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.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 /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\Debug
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "VisualPng - Win32 Release"
|
||||
# Name "VisualPng - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PngFile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisualPng.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cexcept.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PngFile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisualPng.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisualPng.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
/*===
|
||||
cexcept.h 1.0.0 (2000-Jun-21-Wed)
|
||||
cexcept.h 2.0.0 (2001-Jul-12-Thu)
|
||||
Adam M. Costello <amc@cs.berkeley.edu>
|
||||
|
||||
An interface for exception-handling in ANSI C, developed jointly with
|
||||
Cosmin Truta <cosmin@cs.toronto.edu>.
|
||||
An interface for exception-handling in ANSI C (C89 and subsequent ISO
|
||||
standards), developed jointly with Cosmin Truta <cosmin@cs.toronto.edu>.
|
||||
|
||||
Copyright (c) 2000 Adam M. Costello and Cosmin Truta. Everyone
|
||||
Copyright (c) 2001 Adam M. Costello and Cosmin Truta. Everyone
|
||||
is hereby granted permission to do whatever they like with this
|
||||
file, provided that if they modify it they take reasonable steps to
|
||||
avoid confusing or misleading people about the authors, version,
|
||||
and terms of use of the derived file. The copyright holders make
|
||||
no guarantees about the correctness of this file, and are not
|
||||
responsible for any damage resulting from its use.
|
||||
no guarantees regarding this file, and are not responsible for any
|
||||
damage resulting from its use.
|
||||
|
||||
Only user-defined exceptions are supported, not "real" exceptions like
|
||||
division by zero or memory segmentation violations.
|
||||
|
||||
If this interface is used by multiple .c files, they shouldn't include
|
||||
this header file directly. Instead, create a wrapper header file that
|
||||
@@ -37,6 +40,10 @@ define_exception_type(type_name);
|
||||
struct exception { int code; const char *msg; };
|
||||
define_exception_type(struct exception);
|
||||
|
||||
Because throwing an exception causes the object to be copied (not
|
||||
just once, but twice), programmers may wish to consider size when
|
||||
choosing the exception type.
|
||||
|
||||
|
||||
struct exception_context;
|
||||
|
||||
@@ -62,7 +69,7 @@ struct exception_context *the_exception_context;
|
||||
application may declare a variable of this name anywhere it likes
|
||||
(inside a function, in a parameter list, or externally), and may
|
||||
use whatever storage class specifiers (static, extern, etc) or type
|
||||
qualifiers (const, volatile) it likes. Examples:
|
||||
qualifiers (const, volatile, etc) it likes. Examples:
|
||||
|
||||
static struct exception_context
|
||||
* const the_exception_context = &foo;
|
||||
@@ -107,15 +114,15 @@ Catch (expression) statement
|
||||
confusion with the C++ keywords, which have subtly different
|
||||
semantics.
|
||||
|
||||
A Try/Catch statement has a syntax similar to an if/else
|
||||
statement, except that the parenthesized expression goes after
|
||||
the second keyword rather than the first. As with if/else,
|
||||
there are two clauses, each of which may be a simple statement
|
||||
ending with a semicolon or a brace-enclosed compound statement.
|
||||
But whereas the else clause is optional, the Catch clause is
|
||||
required. The expression must be a modifiable lvalue (something
|
||||
capable of being assigned to) of the exact same type passed to
|
||||
define_exception_type().
|
||||
A Try/Catch statement has a syntax similar to an if/else statement,
|
||||
except that the parenthesized expression goes after the second
|
||||
keyword rather than the first. As with if/else, there are two
|
||||
clauses, each of which may be a simple statement ending with a
|
||||
semicolon or a brace-enclosed compound statement. But whereas
|
||||
the else clause is optional, the Catch clause is required. The
|
||||
expression must be a modifiable lvalue (something capable of being
|
||||
assigned to) of the same type (disregarding type qualifiers) that
|
||||
was passed to define_exception_type().
|
||||
|
||||
If a Throw that uses the same exception context as the Try/Catch is
|
||||
executed within the Try clause (typically within a function called
|
||||
@@ -125,9 +132,8 @@ Catch (expression) statement
|
||||
such Throw is executed, then the assignment is not performed, and
|
||||
the Catch clause is not executed.
|
||||
|
||||
Regardless of whether an exception is caught, the expression is
|
||||
always evaluated exactly once, which is significant if it has side
|
||||
effects, for example:
|
||||
The expression is not evaluated unless and until the exception is
|
||||
caught, which is significant if it has side effects, for example:
|
||||
|
||||
Try foo();
|
||||
Catch (p[++i].e) { ... }
|
||||
@@ -183,62 +189,55 @@ is subject to change.
|
||||
#include <setjmp.h>
|
||||
|
||||
#define define_exception_type(etype) \
|
||||
struct exception__state { \
|
||||
etype *exception; \
|
||||
jmp_buf env; \
|
||||
struct exception_context { \
|
||||
jmp_buf *penv; \
|
||||
int caught; \
|
||||
volatile struct { etype etmp; } v; \
|
||||
}
|
||||
|
||||
struct exception_context { \
|
||||
struct exception__state *last; \
|
||||
int caught; \
|
||||
};
|
||||
/* etmp must be volatile because the application might use automatic */
|
||||
/* storage for the_exception_context, and etmp is modified between */
|
||||
/* the calls to setjmp() and longjmp(). A wrapper struct is used to */
|
||||
/* avoid warnings about a duplicate volatile qualifier in case etype */
|
||||
/* already includes it. */
|
||||
|
||||
#define init_exception_context(ec) ((void)((ec)->last = 0))
|
||||
|
||||
#define Catch(e) exception__catch(&(e))
|
||||
#define Catch_anonymous exception__catch(0)
|
||||
#define init_exception_context(ec) ((void)((ec)->penv = 0))
|
||||
|
||||
#define Try \
|
||||
{ \
|
||||
struct exception__state *exception__p, exception__s; \
|
||||
int exception__i; \
|
||||
exception__p = the_exception_context->last; \
|
||||
the_exception_context->last = &exception__s; \
|
||||
for (exception__i = 0; ; exception__i = 1) \
|
||||
if (exception__i) { \
|
||||
if (setjmp(exception__s.env) == 0) { \
|
||||
if (&exception__s)
|
||||
jmp_buf *exception__prev, exception__env; \
|
||||
exception__prev = the_exception_context->penv; \
|
||||
the_exception_context->penv = &exception__env; \
|
||||
if (setjmp(exception__env) == 0) { \
|
||||
if (&exception__prev)
|
||||
|
||||
#define exception__catch(e_addr) \
|
||||
else { } \
|
||||
the_exception_context->caught = 0; \
|
||||
} \
|
||||
else the_exception_context->caught = 1; \
|
||||
the_exception_context->last = exception__p; \
|
||||
break; \
|
||||
} \
|
||||
else exception__s.exception = e_addr; \
|
||||
#define exception__catch(action) \
|
||||
else { } \
|
||||
the_exception_context->caught = 0; \
|
||||
} \
|
||||
else { \
|
||||
the_exception_context->caught = 1; \
|
||||
} \
|
||||
the_exception_context->penv = exception__prev; \
|
||||
} \
|
||||
if (!the_exception_context->caught) { } \
|
||||
if (!the_exception_context->caught || action) { } \
|
||||
else
|
||||
|
||||
#define Catch(e) exception__catch(((e) = the_exception_context->v.etmp, 0))
|
||||
#define Catch_anonymous exception__catch(0)
|
||||
|
||||
/* Try ends with if(), and Catch begins and ends with else. This */
|
||||
/* ensures that the Try/Catch syntax is really the same as the */
|
||||
/* if/else syntax. */
|
||||
/* */
|
||||
/* We use &exception__s instead of 1 to appease compilers that */
|
||||
/* We use &exception__prev instead of 1 to appease compilers that */
|
||||
/* warn about constant expressions inside if(). Most compilers */
|
||||
/* should still recognize that &exception__s is never zero and avoid */
|
||||
/* generating test code. */
|
||||
/* */
|
||||
/* We use the variable exception__i to start the loop at the bottom, */
|
||||
/* rather than jump into the loop using a switch statement, to */
|
||||
/* appease compilers that warn about jumping into loops. */
|
||||
/* should still recognize that &exception__prev is never zero and */
|
||||
/* avoid generating test code. */
|
||||
|
||||
#define Throw \
|
||||
for (;; longjmp(the_exception_context->last->env, 1)) \
|
||||
if (the_exception_context->last->exception) \
|
||||
*the_exception_context->last->exception =
|
||||
for (;; longjmp(*the_exception_context->penv, 1)) \
|
||||
the_exception_context->v.etmp =
|
||||
|
||||
|
||||
#endif /* CEXCEPT_H */
|
||||
|
||||
Reference in New Issue
Block a user