[master] Imported from libpng-1.4.0.tar

This commit is contained in:
Glenn Randers-Pehrson
2010-01-02 23:05:45 -06:00
parent 115817d118
commit 7e3a82cd9c
130 changed files with 4698 additions and 8343 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,7 +1,6 @@
cp ../../pngminus/png2pnm.c pngm2pnm.c
cp ../../../*.h .
cp ../../../*.c .
rm pnggccrd.c pngvcrd.c
rm example.c pngtest.c pngpread.c pngw*.c
# change the following 2 lines if zlib is somewhere else
cp ../../../../zlib/*.h .

View File

@@ -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

View File

@@ -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,8 +23,6 @@
#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_GAMMA
#define PNG_NO_READ_BACKGROUND
#define PNG_NO_READ_DITHER
@@ -59,7 +55,6 @@
#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

View File

@@ -1,7 +1,6 @@
cp ../../pngminus/pnm2png.c pnm2pngm.c
cp ../../../*.h .
cp ../../../*.c .
rm pnggccrd.c pngvcrd.c
rm example.c pngtest.c pngr*.c pngpread.c
# Change the next 2 lines if zlib is somewhere else.
cp ../../../../zlib/*.h .

View File

@@ -24,7 +24,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

View File

@@ -12,8 +12,6 @@
#ifndef MINWRPNGCONF_H
#define MINWRPNGCONF_H
#define PNG_NO_GLOBAL_ARRAYS
#define PNG_NO_READ_SUPPORTED
#define PNG_NO_WARNINGS

View File

@@ -2,7 +2,6 @@ cp ../../gregbook/rpng2-x.c ../../gregbook/readpng2.[ch] .
cp ../../gregbook/COPYING ../../gregbook/LICENSE .
cp ../../../*.h .
cp ../../../*.c .
rm pnggccrd.c pngvcrd.c
rm example.c pngtest.c pngw*.c
# change the following 2 lines if zlib is somewhere else
cp ../../../../zlib/*.h .

View File

@@ -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

View File

@@ -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,6 @@
#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_DITHER
#define PNG_NO_READ_INVERT
#define PNG_NO_READ_SHIFT
@@ -50,7 +46,6 @@
#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

View File

@@ -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_sig_cmp (buf, 0, 8);
if (!ret)
ret = png_sig_cmp (buf, 0, 8);
if (ret)
return FALSE;
/* create png and info structures */

View File

@@ -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
{
@@ -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)

View File

@@ -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);

View File

@@ -43,9 +43,9 @@ RSC=rc.exe
# 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
# ADD BASE CPP /nologo /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /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
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -77,9 +77,9 @@ PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
# 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
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /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
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32