Imported from libpng-1.2.2beta1.tar

This commit is contained in:
Glenn Randers-Pehrson 2002-02-21 23:14:23 -06:00
parent f50c91b7bd
commit 9c0f094b21
58 changed files with 634 additions and 425 deletions

View File

@ -1,29 +1,21 @@
Libpng 1.2.1 - December 12, 2001
Libpng 1.2.2beta1 - February 22, 2002
This is a public release of libpng, intended for use in production codes.
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
Changes since the last public release (1.2.0):
Changes since the last public release (1.2.1):
Revised makefile.std in contrib/pngminus
Include background_1 in png_struct regardless of gamma support.
Revised makefile.netbsd and makefile.macosx, added makefile.darwin.
Revised example.c to provide more details about using row_callback().
Added makefile.so9.
Removed type casts from all NULLs, except for those appearing in function
calls when PNG_NO_TYPECAST_NULL is defined.
Simplified png_create_info_struct() and png_creat_struct_2().
Added error message if png_write_info() was omitted.
Changed typecast of "size" argument to png_size_t in pngmem.c calls to
the user malloc_fn, to agree with the prototype in png.h
Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev)
Updated makefile.sgi to recognize LIBPATH and INCPATH.
Updated various makefiles so "make clean" does not remove previous major
version of the shared library.
Added a pop/push operation to pngvcrd.c, to preserve Eflag.
Always allocate 256-entry internal palette, hist, and trans arrays, to
avoid out-of-bounds memory reference caused by invalid PNG datastreams.
Added a check for prefix_length > data_length in iCCP chunk handler.
version 1.2.2beta1 [February 22, 2002]
Fixed a bug with reading the length of iCCP profiles (Larry Reeves).
Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate
libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h (not png.h)
Revised makefile.darwin to remove "-undefined suppress" option.
Added checks for gamma and chromaticity values over 21474.83, which exceed
the limit for PNG unsigned 32-bit integers when encoded.
Revised calls to png_create_read_struct() and png_create_write_struct()
for simpler debugging.
Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK)
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu

12
CHANGES
View File

@ -1012,8 +1012,18 @@ version 1.2.1rc2 [December 4, 2001]
Always allocate 256-entry internal palette, hist, and trans arrays, to
avoid out-of-bounds memory reference caused by invalid PNG datastreams.
Added a check for prefix_length > data_length in iCCP chunk handler.
version 1.2.1 [December 12, 2001]
version 1.2.1 [December 7, 2001]
None.
version 1.2.2beta1 [February 22, 2002]
Fixed a bug with reading the length of iCCP profiles (Larry Reeves).
Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate
libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h (not png.h)
Revised makefile.darwin to remove "-undefined suppress" option.
Added checks for gamma and chromaticity values over 21474.83, which exceed
the limit for PNG unsigned 32-bit integers when encoded.
Revised calls to png_create_read_struct() and png_create_write_struct()
for simpler debugging.
Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK)
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu

14
INSTALL
View File

@ -1,5 +1,5 @@
Installing libpng version 1.2.1 - December 12, 2001
Installing libpng version 1.2.2beta1 - February 22, 2002
Before installing libpng, you must first install zlib. zlib
can usually be found wherever you got libpng. zlib can be
@ -10,7 +10,7 @@ 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.1" or "lpng109" and "zlib-1.1.3"
might be called "libpng-1.2.2beta1" or "lpng109" and "zlib-1.1.3"
or "zlib113") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@ -64,8 +64,8 @@ The files that are presently available in the scripts directory
include
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.3.1.2.1)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.3.1.2.1,
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.0.1.2.2beta1)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.0.1.2.2beta1,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@ -83,10 +83,10 @@ include
makefile.macosx => MACOS X Makefile
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.3.1.2.1)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.0.1.2.2beta1)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.3.1.2.1)
makefile.so9 => Solaris 9 makefile (gcc, creates libpng.so.3.1.2.1)
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.0.1.2.2beta1)
makefile.so9 => Solaris 9 makefile (gcc, creates libpng.so.0.1.2.2beta1)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile

View File

@ -1,5 +1,5 @@
Known bugs in libpng version 1.2.1
Known bugs in libpng version 1.2.2beta1
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
reading interlaced PNG files, when assembler code is enabled.

View File

@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.0.7, July 1, 2000, through 1.2.1, December 12, 2001, are
libpng versions 1.0.7, July 1, 2000, through 1.2.2beta1, February 22, 2002, are
Copyright (c) 2000 Glenn Randers-Pehrson
and are distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
@ -99,4 +99,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
December 12, 2001
February 22, 2002

12
README
View File

@ -1,4 +1,4 @@
README for libpng 1.2.1 - December 12, 2001 (shared library 2.1)
README for libpng 1.2.2beta1 - February 22, 2002 (shared library 2.1)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@ -187,9 +187,9 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng.so.3.1.2.1)
(gcc, creates libpng.so.0.1.2.2beta1)
makefile.gcmmx => Linux/ELF makefile (gcc, creates
libpng.so.3.1.2.1, uses assembler code
libpng.so.0.1.2.2beta1, uses assembler code
tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@ -207,12 +207,12 @@ Files in this distribution:
makefile.macosx => MACOS X Makefile
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.3.1.2.1)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.0.1.2.2beta1)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng.so.3.1.2.1)
(gcc, creates libpng.so.0.1.2.2beta1)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng.so.3.1.2.1)
(gcc, creates libpng.so.0.1.2.2beta1)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile

View File

@ -1,13 +1,13 @@
Y2K compliance in libpng:
=========================
December 12, 2001
February 22, 2002
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.1 are Y2K compliant. It is my belief that earlier
upward through 1.2.2beta1 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

2
configure vendored
View File

@ -1,5 +1,5 @@
echo "
There is no \"configure\" script for Libpng-1.2.1. Instead, please
There is no \"configure\" script for Libpng-1.2.2beta1. Instead, please
copy the appropriate makefile for your system from the \"scripts\"
directory. Read the INSTALL file for more details.
"

View File

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng3.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng12.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\dll
SOURCE="$(InputPath)"
@ -84,7 +84,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng3d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng12d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\dll_dbg
SOURCE="$(InputPath)"
@ -114,7 +114,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng3a.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng12a.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\dll_asm
SOURCE="$(InputPath)"
@ -144,7 +144,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng3b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng12b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\dll_dbga
SOURCE="$(InputPath)"

View File

@ -59,8 +59,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng3.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 libpng3.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 BASE LINK32 libpng12.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 libpng12.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)"
@ -92,9 +92,9 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng3.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"
# ADD BASE LINK32 libpng12.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 libpng3d.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"
# ADD LINK32 libpng12d.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
@ -128,7 +128,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng3.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 BASE LINK32 libpng12.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
@ -161,7 +161,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng3d.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"
# ADD BASE LINK32 libpng12d.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

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "December 12, 2001"
.TH LIBPNG 3 "February 22, 2002"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.1
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.2beta1
.SH SYNOPSIS
\fI\fB
@ -787,7 +787,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.1 - December 12, 2001
libpng version 1.2.2beta1 - February 22, 2002
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998-2001 Glenn Randers-Pehrson
@ -3635,13 +3635,13 @@ application:
.SH IX. Y2K Compliance in libpng
December 12, 2001
February 22, 2002
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.1 are Y2K compliant. It is my belief that earlier
upward through 1.2.2beta1 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
@ -3764,6 +3764,7 @@ the first widely used release:
1.2.1beta-4 3 10201 3.1.2.1beta1-4
1.2.1rc1-2 3 10201 3.1.2.1rc1-2
1.2.1 3 10201 3.1.2.1
1.2.2beta1 12 10202 12.so.0.1.2.2beta1
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@ -3821,7 +3822,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.2.1 - December 12, 2001:
Libpng version 1.2.2beta1 - February 22, 2002:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
@ -3838,7 +3839,7 @@ included in the libpng distribution, the latter shall prevail.)
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.0.7, July 1, 2000, through 1.2.1, December 12, 2001, are
libpng versions 1.0.7, July 1, 2000, through 1.2.2beta1, February 22, 2002, are
Copyright (c) 2000-2001 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
@ -3930,7 +3931,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
December 12, 2001
February 22, 2002
.\" end of man page

View File

@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.2.1 - December 12, 2001
libpng version 1.2.2beta1 - February 22, 2002
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998-2001 Glenn Randers-Pehrson
@ -2848,13 +2848,13 @@ application:
IX. Y2K Compliance in libpng
December 12, 2001
February 22, 2002
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.1 are Y2K compliant. It is my belief that earlier
upward through 1.2.2beta1 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

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "December 12, 2001"
.TH LIBPNGPF 3 "February 22, 2002"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.1
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.2beta1
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "December 12, 2001"
.TH PNG 5 "February 22, 2002"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

22
png.c
View File

@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* libpng version 1.2.1 - December 12, 2001
* libpng version 1.2.2beta1 - February 22, 2002
* Copyright (c) 1998-2001 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.)
@ -13,14 +13,14 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_2_1 Your_png_h_is_not_version_1_2_1;
typedef version_1_2_2beta1 Your_png_h_is_not_version_1_2_2beta1;
/* 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 */
const char png_libpng_ver[18] = "1.2.1";
const char png_libpng_ver[18] = "1.2.2beta1";
/* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */
@ -139,7 +139,13 @@ voidpf /* PRIVATE */
png_zalloc(voidpf png_ptr, uInt items, uInt size)
{
png_uint_32 num_bytes = (png_uint_32)items * size;
png_voidp ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
png_voidp ptr;
png_structp p=png_ptr;
png_uint_32 save_flags=p->flags;
p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
p->flags=save_flags;
#ifndef PNG_NO_ZALLOC_ZERO
if (num_bytes > (png_uint_32)0x8000L)
@ -645,7 +651,7 @@ png_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
return ((png_charp) "\n libpng version 1.2.1 - December 12, 2001\n\
return ((png_charp) "\n libpng version 1.2.2beta1 - February 22, 2002\n\
Copyright (c) 1998-2001 Glenn Randers-Pehrson\n\
Copyright (c) 1996, 1997 Andreas Dilger\n\
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
@ -663,8 +669,8 @@ png_get_libpng_ver(png_structp png_ptr)
{
/* Version of *.c files used when building libpng */
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
return((png_charp) "1.2.1");
return((png_charp) "1.2.1");
return((png_charp) "1.2.2beta1");
return((png_charp) "1.2.2beta1");
}
png_charp PNGAPI
@ -714,7 +720,7 @@ png_uint_32 PNGAPI
png_access_version_number(void)
{
/* Version of *.c files used when building libpng */
return((png_uint_32) 10201L);
return((png_uint_32) 10202L);
}

30
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.2.1 - December 12, 2001
* libpng version 1.2.2beta1 - February 22, 2002
* Copyright (c) 1998-2001 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.)
@ -9,7 +9,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.1 - December 12, 2001: Glenn
* libpng versions 0.97, January 1998, through 1.2.2beta1 - February 22, 2002: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -81,6 +81,7 @@
* 1.2.1beta1-4 3 10201 3.1.2.1beta1-4
* 1.2.1rc1-2 3 10201 3.1.2.1rc1-2
* 1.2.1 3 10201 3.1.2.1
* 1.2.2beta1 12 10202 12.so.0.1.2.2beta1
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@ -110,7 +111,7 @@
* If you modify libpng you may insert additional notices immediately following
* this sentence.
*
* libpng versions 1.0.7, July 1, 2000, through 1.2.1, December 12, 2001, are
* libpng versions 1.0.7, July 1, 2000, through 1.2.2beta1, February 22, 2002, are
* Copyright (c) 2000, 2001 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.0.6
* with the following individuals added to the list of Contributing Authors
@ -215,13 +216,13 @@
* Y2K compliance in libpng:
* =========================
*
* December 12, 2001
* February 22, 2002
*
* 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.1 are Y2K compliant. It is my belief that earlier
* upward through 1.2.2beta1 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
@ -277,19 +278,19 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.2.1"
#define PNG_LIBPNG_VER_STRING "1.2.2beta1"
#define PNG_LIBPNG_VER_SONUM 3
#define PNG_LIBPNG_VER_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM %DLLNUM%
/* 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 1
#define PNG_LIBPNG_VER_RELEASE 2
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
#define PNG_LIBPNG_VER_BUILD 0
#define PNG_LIBPNG_VER_BUILD 1
#define PNG_LIBPNG_BUILD_ALPHA 1
#define PNG_LIBPNG_BUILD_BETA 2
@ -297,14 +298,14 @@
#define PNG_LIBPNG_BUILD_STABLE 4
#define PNG_LIBPNG_BUILD_TYPEMASK 7
#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with STABLE only */
#define PNG_LIBPNG_BUILD_TYPE 4
#define PNG_LIBPNG_BUILD_TYPE 2
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
* 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 10201 /* 1.2.1 */
#define PNG_LIBPNG_VER 10202 /* 1.2.2 */
#ifndef PNG_VERSION_INFO_ONLY
@ -1253,9 +1254,9 @@ struct png_struct_def
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
and png.h are both at version 1.2.1
and png.h are both at version 1.2.2beta1
*/
typedef png_structp version_1_2_1;
typedef png_structp version_1_2_2beta1;
typedef png_struct FAR * FAR * png_structpp;
@ -2372,7 +2373,7 @@ extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.2.1 - December 12, 2001 (header)\n"
" libpng version 1.2.2beta1 - February 22, 2002 (header)\n"
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
/* With these routines we avoid an integer divide, which will be slower on
@ -2497,6 +2498,7 @@ extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
#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
/* For use in png_set_keep_unknown, png_handle_as_unknown */
#define HANDLE_CHUNK_AS_DEFAULT 0

View File

@ -1,6 +1,6 @@
/* pngasmrd.h - assembler version of utilities to read a PNG file
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 2001 Glenn Randers-Pehrson
*

View File

@ -1,6 +1,6 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -6,7 +6,7 @@
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
* for Intel's performance analysis of the MMX vs. non-MMX code.
*
* libpng version 1.2.1 - December 12, 2001
* libpng version 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* Copyright (c) 1998, Intel Corporation

View File

@ -1,7 +1,7 @@
/* pngget.c - retrieval of values from info struct
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
/* pngmem.c - stub functions for memory allocation
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -123,7 +123,7 @@ png_malloc(png_structp png_ptr, png_uint_32 size)
if(png_ptr->malloc_fn != NULL)
{
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
if (ret == NULL)
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory!");
return (ret);
}
@ -177,12 +177,22 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
if (table == NULL)
{
png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
else
png_warning(png_ptr, "Out Of Memory.");
return (NULL);
}
if ((png_size_t)table & 0xfff0)
{
png_error(png_ptr, "Farmalloc didn't return normalized pointer");
if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr,
"Farmalloc didn't return normalized pointer");
else
png_warning(png_ptr,
"Farmalloc didn't return normalized pointer");
return (NULL);
}
png_ptr->offset_table = table;
@ -191,7 +201,11 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
if (png_ptr->offset_table_ptr == NULL)
{
png_error(png_ptr, "Out Of memory.");
if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
else
png_warning(png_ptr, "Out Of memory.");
return (NULL);
}
hptr = (png_byte huge *)table;
@ -213,7 +227,13 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
}
if (png_ptr->offset_table_count >= png_ptr->offset_table_number)
png_error(png_ptr, "Out of Memory.");
{
if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */
else
png_warning(png_ptr, "Out of Memory.");
return (NULL);
}
ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++];
}
@ -222,7 +242,10 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
if (ret == NULL)
{
png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
else
png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */
}
return (ret);
@ -394,7 +417,7 @@ png_malloc(png_structp png_ptr, png_uint_32 size)
if(png_ptr->malloc_fn != NULL)
{
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, size));
if (ret == NULL)
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory!");
return (ret);
}
@ -409,7 +432,12 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
#ifdef PNG_MAX_MALLOC_64K
if (size > (png_uint_32)65536L)
png_error(png_ptr, "Cannot Allocate > 64K");
{
if(png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Cannot Allocate > 64K");
else
return NULL;
}
#endif
#if defined(__TURBOC__) && !defined(__FLAT__)
@ -422,7 +450,7 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
# endif
#endif
if (ret == NULL)
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory");
return (ret);

View File

@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -45,11 +45,12 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_debug(1, "in png_create_read_struct\n");
#ifdef PNG_USER_MEM_SUPPORTED
if ((png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
(png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr)) == NULL)
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
(png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
#else
if ((png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG)) == NULL)
png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
#endif
if (png_ptr == NULL)
return (NULL);
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
@ -767,7 +768,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
* not called png_set_interlace_handling(), the display_row buffer will
* be ignored, so pass NULL to it.
*
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.1
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.2beta1
*/
void PNGAPI
@ -816,7 +817,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
* only call this function once. If you desire to have an image for
* each pass of a interlaced image, use png_read_rows() instead.
*
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.1
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.2beta1
*/
void PNGAPI
png_read_image(png_structp png_ptr, png_bytepp image)

View File

@ -1,7 +1,7 @@
/* pngrio.c - functions for data input
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -691,6 +691,8 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,
int_y_green, int_x_blue, int_y_blue;
png_uint_32 uint_x, uint_y;
png_debug(1, "in png_handle_cHRM\n");
if (!(png_ptr->mode & PNG_HAVE_IHDR))
@ -724,60 +726,69 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, 4);
int_x_white = (png_fixed_point)png_get_uint_32(buf);
uint_x = png_get_uint_32(buf);
png_crc_read(png_ptr, buf, 4);
int_y_white = (png_fixed_point)png_get_uint_32(buf);
uint_y = png_get_uint_32(buf);
if (int_x_white > 80000L || int_y_white > 80000L ||
int_x_white + int_y_white > 100000L)
if (uint_x > 80000L || uint_y > 80000L ||
uint_x + uint_y > 100000L)
{
png_warning(png_ptr, "Invalid cHRM white point");
png_crc_finish(png_ptr, 24);
return;
}
int_x_white = (png_fixed_point)uint_x;
int_y_white = (png_fixed_point)uint_y;
png_crc_read(png_ptr, buf, 4);
int_x_red = (png_fixed_point)png_get_uint_32(buf);
uint_x = png_get_uint_32(buf);
png_crc_read(png_ptr, buf, 4);
int_y_red = (png_fixed_point)png_get_uint_32(buf);
uint_y = png_get_uint_32(buf);
if (int_x_red > 80000L || int_y_red > 80000L ||
int_x_red + int_y_red > 100000L)
if (uint_x > 80000L || uint_y > 80000L ||
uint_x + uint_y > 100000L)
{
png_warning(png_ptr, "Invalid cHRM red point");
png_crc_finish(png_ptr, 16);
return;
}
int_x_red = (png_fixed_point)uint_x;
int_y_red = (png_fixed_point)uint_y;
png_crc_read(png_ptr, buf, 4);
int_x_green = (png_fixed_point)png_get_uint_32(buf);
uint_x = png_get_uint_32(buf);
png_crc_read(png_ptr, buf, 4);
int_y_green = (png_fixed_point)png_get_uint_32(buf);
uint_y = png_get_uint_32(buf);
if (int_x_green > 80000L || int_y_green > 80000L ||
int_x_green + int_y_green > 100000L)
if (uint_x > 80000L || uint_y > 80000L ||
uint_x + uint_y > 100000L)
{
png_warning(png_ptr, "Invalid cHRM green point");
png_crc_finish(png_ptr, 8);
return;
}
int_x_green = (png_fixed_point)uint_x;
int_y_green = (png_fixed_point)uint_y;
png_crc_read(png_ptr, buf, 4);
int_x_blue = (png_fixed_point)png_get_uint_32(buf);
uint_x = png_get_uint_32(buf);
png_crc_read(png_ptr, buf, 4);
int_y_blue = (png_fixed_point)png_get_uint_32(buf);
uint_y = png_get_uint_32(buf);
if (int_x_blue > 80000L || int_y_blue > 80000L ||
int_x_blue + int_y_blue > 100000L)
if (uint_x > 80000L || uint_y > 80000L ||
uint_x + uint_y > 100000L)
{
png_warning(png_ptr, "Invalid cHRM blue point");
png_crc_finish(png_ptr, 0);
return;
}
int_x_blue = (png_fixed_point)uint_x;
int_y_blue = (png_fixed_point)uint_y;
#ifdef PNG_FLOATING_POINT_SUPPORTED
white_x = (float)int_x_white / (float)100000.0;
white_y = (float)int_y_white / (float)100000.0;
@ -894,17 +905,6 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
# ifdef PNG_FLOATING_POINT_SUPPORTED
igamma=(int)(info_ptr->gamma * 100000.);
# endif
#endif
#if 0 && defined(PNG_cHRM_SUPPORTED) && !defined(PNG_FIXED_POINT_SUPPORTED)
/* We need to define these here because they aren't in png.h */
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;
#endif
if(igamma < 45000L || igamma > 46000L)
{
@ -952,6 +952,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_charp chunkdata;
png_byte compression_type;
png_bytep pC;
png_charp profile;
png_uint_32 skip = 0;
png_uint_32 profile_size = 0;
@ -1037,10 +1038,11 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
/* Check the profile_size recorded in the first 32 bits of the ICC profile */
profile_size = ((*(chunkdata+prefix_length))<<24) |
((*(chunkdata+prefix_length+1))<<16) |
((*(chunkdata+prefix_length+2))<< 8) |
((*(chunkdata+prefix_length+3)) );
pC = (png_bytep)(chunkdata+prefix_length);
profile_size = ((*(pC ))<<24) |
((*(pC+1))<<16) |
((*(pC+2))<< 8) |
((*(pC+3)) );
if(profile_size < profile_length)
profile_length = profile_size;

View File

@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -40,6 +40,25 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
if (png_ptr == NULL || info_ptr == NULL)
return;
if (white_x < 0.0 || white_y < 0.0 ||
red_x < 0.0 || red_y < 0.0 ||
green_x < 0.0 || green_y < 0.0 ||
blue_x < 0.0 || blue_y < 0.0)
{
png_warning(png_ptr,
"Ignoring attempt to set negative chromaticity value");
return;
}
if (white_x > 21474.83 || white_y > 21474.83 ||
red_x > 21474.83 || red_y > 21474.83 ||
green_x > 21474.83 || green_y > 21474.83 ||
blue_x > 21474.83 || blue_y > 21474.83)
{
png_warning(png_ptr,
"Ignoring attempt to set chromaticity value exceeding 21474.83");
return;
}
info_ptr->x_white = (float)white_x;
info_ptr->y_white = (float)white_y;
info_ptr->x_red = (float)red_x;
@ -51,12 +70,12 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_FIXED_POINT_SUPPORTED
info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5);
info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5);
info_ptr->int_x_red = (png_fixed_point)(red_x*100000.+0.5);
info_ptr->int_y_red = (png_fixed_point)(red_y*100000.+0.5);
info_ptr->int_x_red = (png_fixed_point)( red_x*100000.+0.5);
info_ptr->int_y_red = (png_fixed_point)( red_y*100000.+0.5);
info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5);
info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5);
info_ptr->int_x_blue = (png_fixed_point)(blue_x*100000.+0.5);
info_ptr->int_y_blue = (png_fixed_point)(blue_y*100000.+0.5);
info_ptr->int_x_blue = (png_fixed_point)( blue_x*100000.+0.5);
info_ptr->int_y_blue = (png_fixed_point)( blue_y*100000.+0.5);
#endif
info_ptr->valid |= PNG_INFO_cHRM;
}
@ -72,6 +91,24 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
if (png_ptr == NULL || info_ptr == NULL)
return;
if (white_x < 0 || white_y < 0 ||
red_x < 0 || red_y < 0 ||
green_x < 0 || green_y < 0 ||
blue_x < 0 || blue_y < 0)
{
png_warning(png_ptr,
"Ignoring attempt to set negative chromaticity value");
return;
}
if (white_x > PNG_MAX_UINT || white_y > PNG_MAX_UINT ||
red_x > PNG_MAX_UINT || red_y > PNG_MAX_UINT ||
green_x > PNG_MAX_UINT || green_y > PNG_MAX_UINT ||
blue_x > PNG_MAX_UINT || blue_y > PNG_MAX_UINT)
{
png_warning(png_ptr,
"Ignoring attempt to set chromaticity value exceeding 21474.83");
return;
}
info_ptr->int_x_white = white_x;
info_ptr->int_y_white = white_y;
info_ptr->int_x_red = red_x;
@ -83,12 +120,12 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_FLOATING_POINT_SUPPORTED
info_ptr->x_white = (float)(white_x/100000.);
info_ptr->y_white = (float)(white_y/100000.);
info_ptr->x_red = (float)(red_x/100000.);
info_ptr->y_red = (float)(red_y/100000.);
info_ptr->x_red = (float)( red_x/100000.);
info_ptr->y_red = (float)( red_y/100000.);
info_ptr->x_green = (float)(green_x/100000.);
info_ptr->y_green = (float)(green_y/100000.);
info_ptr->x_blue = (float)(blue_x/100000.);
info_ptr->y_blue = (float)(blue_y/100000.);
info_ptr->x_blue = (float)( blue_x/100000.);
info_ptr->y_blue = (float)( blue_y/100000.);
#endif
info_ptr->valid |= PNG_INFO_cHRM;
}
@ -100,16 +137,25 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
void PNGAPI
png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
{
double gamma;
png_debug1(1, "in %s storage function\n", "gAMA");
if (png_ptr == NULL || info_ptr == NULL)
return;
info_ptr->gamma = (float)file_gamma;
/* Check for overflow */
if (file_gamma > 21474.83)
{
png_warning(png_ptr, "Limiting gamma to 21474.83");
gamma=21474.83;
}
else
gamma=file_gamma;
info_ptr->gamma = (float)gamma;
#ifdef PNG_FIXED_POINT_SUPPORTED
info_ptr->int_gamma = (int)(file_gamma*100000.+.5);
info_ptr->int_gamma = (int)(gamma*100000.+.5);
#endif
info_ptr->valid |= PNG_INFO_gAMA;
if(file_gamma == 0.0)
if(gamma == 0.0)
png_warning(png_ptr, "Setting gamma=0");
}
#endif
@ -117,18 +163,35 @@ void PNGAPI
png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
int_gamma)
{
png_fixed_point gamma;
png_debug1(1, "in %s storage function\n", "gAMA");
if (png_ptr == NULL || info_ptr == NULL)
return;
if (int_gamma > PNG_MAX_UINT)
{
png_warning(png_ptr, "Limiting gamma to 21474.83");
gamma=PNG_MAX_UINT;
}
else
{
if (int_gamma < 0)
{
png_warning(png_ptr, "Setting negative gamma to zero");
gamma=0;
}
else
gamma=int_gamma;
}
#ifdef PNG_FLOATING_POINT_SUPPORTED
info_ptr->gamma = (float)(int_gamma/100000.);
info_ptr->gamma = (float)(gamma/100000.);
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
info_ptr->int_gamma = int_gamma;
info_ptr->int_gamma = gamma;
#endif
info_ptr->valid |= PNG_INFO_gAMA;
if(int_gamma == 0)
if(gamma == 0)
png_warning(png_ptr, "Setting gamma=0");
}
#endif
@ -415,6 +478,8 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
in case of an invalid PNG file that has too-large sample values. */
png_ptr->palette = (png_colorp)png_zalloc(png_ptr, (uInt)256,
sizeof (png_color));
if (png_ptr->palette == NULL)
png_error(png_ptr, "Unable to malloc palette");
png_memcpy(png_ptr->palette, palette, num_palette * sizeof (png_color));
info_ptr->palette = png_ptr->palette;
info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;

View File

@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -1512,4 +1512,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_2_1 your_png_h_is_not_version_1_2_1;
typedef version_1_2_2beta1 your_png_h_is_not_version_1_2_2beta1;

View File

@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -2,7 +2,7 @@
*
* For Intel x86 CPU and Microsoft Visual C++ compiler
*
* libpng version 1.2.1 - December 12, 2001
* libpng version 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* Copyright (c) 1998, Intel Corporation

View File

@ -1,7 +1,7 @@
/* pngwio.c - functions for data output
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -443,11 +443,12 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
int i;
png_debug(1, "in png_create_write_struct\n");
#ifdef PNG_USER_MEM_SUPPORTED
if ((png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
(png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr)) == NULL)
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
(png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
#else
if ((png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG)) == NULL)
png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
#endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL)
return (NULL);
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED

View File

@ -1,7 +1,7 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
* libpng 1.2.1 - December 12, 2001
* libpng 1.2.2beta1 - February 22, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,5 +1,5 @@
Microsoft Developer Studio Build File, Format Version 6.00 for
libpng 1.2.1 (December 12, 2001) and zlib
libpng 1.2.2beta1 (February 22, 2002) and zlib
Copyright (C) 2000 Simon-Pierre Cadieux
For conditions of distribution and use, see copyright notice in png.h
@ -24,12 +24,12 @@ To build:
This project will build the PNG Development Group's "official" versions of
libpng and zlib libraries:
libpng3.dll (default version, currently C code only)
libpng3.dll (C + Assembler version)
libpng3.dll (C + Assembler debug version)
libpng3.dll (C code debug version)
libpng3[c,e-m].dll (reserved for official versions)
libpng3[n-z].dll (available for private versions)
libpng12.dll (default version, currently C code only)
libpng12.dll (C + Assembler version)
libpng12.dll (C + Assembler debug version)
libpng12.dll (C code debug version)
libpng12[c,e-m].dll (reserved for official versions)
libpng12[n-z].dll (available for private versions)
zlib.dll (default version, currently C code only)
zlibd.dll (debug version)

View File

@ -56,7 +56,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng3.dll"
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng12.dll"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
@ -84,7 +84,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng3d.dll"
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng12d.dll"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM"
@ -111,7 +111,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng3a.dll"
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng12a.dll"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM"
@ -139,7 +139,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng3b.dll"
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng12b.dll"
!ELSEIF "$(CFG)" == "libpng - Win32 LIB"

View File

@ -6,7 +6,7 @@ LIBRARY
DESCRIPTION "PNG image compression library for Windows"
EXPORTS
;Version 1.2.1
;Version 1.2.2beta1
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3

View File

@ -1,6 +1,6 @@
A set of project files is available for Netware. Get
libpng-1.2.1-project-netware.zip from a libpng distribution
libpng-1.2.2beta1-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.1-project-netware.zip"
"unzip -a libpng-1.2.2beta1-project-netware.zip"

View File

@ -1,6 +1,6 @@
A set of project files is available for WinCE. Get
libpng-1.2.1-project-wince.zip from a libpng distribution
libpng-1.2.2beta1-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.1-project-wince.zip"
"unzip -a libpng-1.2.2beta1-project-wince.zip"

View File

@ -15,10 +15,10 @@ AR = ar rcs
RANLIB = ranlib
RM = rm -f
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local

View File

@ -10,10 +10,10 @@ CC=gcc
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
ALIGN=
@ -29,15 +29,16 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-I$(ZLIBINC) -Wall -O1 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
LDFLAGS=-L. -Wl,-soname=libpng.so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
LDFLAGS=-L. -Wl,-soname=$(LIBNAME).so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
RANLIB=ranlib
#RANLIB=echo
# where make install puts libpng.a, libpng.so*, and png.h
# where make install puts libpng.a, libpng12.so*, and png.h
prefix=/usr/local
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
LIBNAME=libpng12
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
@ -47,42 +48,45 @@ OBJSDLL = $(OBJS)
.SUFFIXES: .c .o
all: libpng.a libpng.so pngtest
all: libpng.a $(LIBNAME).so pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -sf libpng.so.$(PNGMAJ) libpng.so
cp libpng.so* /boot/home/config/lib
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
cp $(LIBNAME).so* /boot/home/config/lib
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJSDLL)
$(CC) -L$(ZLIBLIB) -lz -nostart -Wl,-soname,libpng.so.$(PNGMAJ) -o
libpng.so.$(PNGVER) \
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(CC) -L$(ZLIBLIB) -lz -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o
$(LIBNAME).so.$(PNGVER) \
$(OBJSDLL)
pngtest: pngtest.o libpng.so
pngtest: pngtest.o $(LIBNAME).so
$(CC) -L$(ZLIBLIB) -lz -lpng -o pngtest pngtest.o
test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@mkdir $(INCPATH) $(LIBPATH)
cp png.h pngconf.h $(INCPATH)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -sf libpng.so.$(PNGMAJ) libpng.so)
-@mkdir $(INCPATH) $(LIBPATH)/$(LIBNAME)
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ) $(LIBPATH)/$(LIBNAME).so
(cd $(LIBPATH); ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -35,12 +35,12 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
-fomit-frame-pointer
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
#PNGDLL = $3
PNGMIN = 1.2.1
PNGMIN_BASE = 1.2.1
PNGMAJ = 0
#PNGDLL = $12
PNGMIN = 1.2.2beta1
PNGMIN_BASE = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(PNGDLL).dll

View File

@ -1,11 +1,12 @@
# makefile for libpng on Darwin / Mac OS X
# Copyright (C) 2002 Glenn Randers-Pehrson
# Copyright (C) 2001 Christoph Pfisterer
# derived from makefile.linux:
# Copyright (C) 1998, 1999 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
# For conditions of distribution and use, see copyright notice in png.h
# where "make install" puts libpng.a, libpng.dylib, png.h and pngconf.h
# where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h
prefix=/usr/local
# Where the zlib library and include files are located
@ -21,11 +22,12 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
#RANLIB=echo
RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@ -41,45 +43,50 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
all: libpng.a libpng.dylib pngtest
all: libpng.a $(LIBNAME).dylib pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.dylib: libpng.$(PNGMAJ).dylib
ln -sf libpng.$(PNGMAJ).dylib libpng.dylib
$(LIBNAME).dylib: $(LIBNAME).$(PNGMAJ).dylib
ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib
libpng.$(PNGMAJ).dylib: libpng.$(PNGVER).dylib
ln -sf libpng.$(PNGVER).dylib libpng.$(PNGMAJ).dylib
$(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib
ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib
libpng.$(PNGVER).dylib: $(OBJSDLL)
$(CC) -dynamiclib -undefined suppress \
-install_name $(LIBPATH)/libpng.$(PNGMAJ).dylib \
$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
$(CC) -dynamiclib \
-install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
-current_version $(PNGMIN) -compatibility_version $(PNGMIN) \
-o libpng.$(PNGVER).dylib \
-o $(LIBNAME).$(PNGVER).dylib \
$(OBJSDLL) -L$(ZLIBLIB) -lz
pngtest: pngtest.o libpng.dylib
pngtest: pngtest.o $(LIBNAME).dylib
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a libpng.dylib
install: libpng.a $(LIBNAME).dylib
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
cp png.h pngconf.h $(INCPATH)
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.$(PNGVER).dylib $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.$(PNGVER).dylib
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBNAME).$(PNGVER).dylib $(LIBPATH)
chmod 755 $(LIBPATH)/$(LIBNAME).$(PNGVER).dylib
ranlib $(LIBPATH)/libpng.a
-@/bin/rm -f $(LIBPATH)/libpng.$(PNGMAJ).dylib $(LIBPATH)/libpng.dylib
(cd $(LIBPATH); ln -sf libpng.$(PNGVER).dylib libpng.$(PNGMAJ).dylib; \
ln -sf libpng.$(PNGMAJ).dylib libpng.dylib)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).dylib
(cd $(LIBPATH); \
ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \
ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib)
clean:
rm -f *.o libpng.a libpng.*dylib pngtest pngout.png
rm -f *.o libpng.a $(LIBNAME).*dylib pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -14,11 +14,12 @@ LIBPATH=$(prefix)/lib
ZLIBLIB=../zlib
ZLIBINC=../zlib
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
CC=cc
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
@ -31,19 +32,19 @@ 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
all: libpng.so libpng.a pngtest
all: $(LIBNAME).so libpng.a pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -f -s libpng.so.$(PNGMAJ) libpng.so
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJS)
$(LIBNAME).so.$(PNGVER): $(OBJS)
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -lz -lm
pngtest: pngtest.o libpng.a
@ -52,23 +53,28 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@mkdir $(INCPATH)
-@mkdir $(LIBPATH)
-@mkdir $(INCPATH)/$(LIBNAME)
cp png.h $(INCPATH)
cp pngconf.h $(INCPATH)
chmod 644 $(INCPATH)/png.h
chmod 644 $(INCPATH)/pngconf.h
cp png.h $(INCPATH)/$(LIBNAME)
cp pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h
chmod 644 $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBPATH)
cp libpng.so.$(PNGVER) $(LIBPATH)
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 644 $(LIBPATH)/libpng.a
chmod 644 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -f -s libpng.so.$(PNGMAJ) libpng.so)
chmod 644 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ) $(LIBPATH)/$(LIBNAME).so
(cd $(LIBPATH); ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -1,6 +1,8 @@
# makefile for libpng on Linux ELF with gcc using MMX assembler code
# Copyright 1996-1997 Andreas Dilger
# makefile for libpng.a and libpng12.so on Linux ELF with gcc using MMX
# assembler code
# Copyright 2002 Greg Roelofs and Glenn Randers-Pehrson
# Copyright 1998-2001 Greg Roelofs
# Copyright 1996-1997 Andreas Dilger
# For conditions of distribution and use, see copyright notice in png.h
# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
@ -11,9 +13,15 @@
# there are no floating-point programs (e.g., SETI@Home) running in
# the background! Context switches between MMX and FPU are expensive.
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
# where "make install" puts libpng.a, libpng.so*, png.h, and pngconf.h
# where "make install" puts libpng.a, libpng12/libpng12.so*,
# $(LIBNAME)/png.h and $(LIBNAME)/pngconf.h
prefix=/usr/local
# Where the zlib library and include files are located
@ -46,18 +54,12 @@ CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
# -m486 -malign-double -ffast-math \
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
RANLIB=ranlib
#RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@ -72,7 +74,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a libpng.so pngtest pngtest-static
all: libpng.a $(LIBNAME).so pngtest pngtest-static
pnggccrd.o: pnggccrd.c png.h pngconf.h
$(CC) -c $(CFLAGS) -o $@ $*.c
@ -80,49 +82,54 @@ pnggccrd.o: pnggccrd.c png.h pngconf.h
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
libpng.a: $(OBJS)
$(LIBNAME).a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -sf libpng.so.$(PNGMAJ) libpng.so
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJSDLL)
$(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
$(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
pngtest: pngtest.o libpng.so
pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
pngtest-static: pngtest.o libpng.a
pngtest-static: pngtest.o $(LIBNAME).a
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
test: pngtest pngtest-static
@echo ""
@echo " Testing dynamically linked version:"
@echo " Running pngtest dynamically linked with libpng12.so:"
@echo ""
./pngtest
@echo ""
@echo " Testing statically linked version:"
@echo " Running pngtest statically linked with libpng.a:"
@echo ""
./pngtest-static
install: libpng.a libpng.so.$(PNGVER)
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
cp png.h pngconf.h $(INCPATH)
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -sf libpng.so.$(PNGMAJ) libpng.so)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ) \
$(LIBPATH)/$(LIBNAME).so
(cd $(LIBPATH); ln -sf $(LIBNAME).so.$(PNGVER) \
$(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -1,4 +1,5 @@
# makefile for libpng on HP-UX using GCC
# Copyright (C) 2002, Glenn Randers-Pehrson
# Copyright (C) 2001, Laurent faillie
# Copyright (C) 1998, 1999 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
@ -31,11 +32,12 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
#RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB = libpng12
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@ -51,41 +53,47 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a libpng.sl pngtest
all: libpng.a $(SHAREDLIB).sl pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.sl: libpng.sl.$(PNGMAJ)
ln -f -s libpng.sl.$(PNGMAJ) libpng.sl
$(SHAREDLIB).sl: $(SHAREDLIB).sl.$(PNGMAJ)
ln -f -s $(SHAREDLIB).sl.$(PNGMAJ) $(SHAREDLIB).sl
libpng.sl.$(PNGMAJ): libpng.sl.$(PNGVER)
ln -f -s libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ)
$(SHAREDLIB).sl.$(PNGMAJ): $(SHAREDLIB).sl.$(PNGVER)
ln -f -s $(SHAREDLIB).sl.$(PNGVER) $(SHAREDLIB).sl.$(PNGMAJ)
libpng.sl.$(PNGVER): $(OBJSDLL)
$(SHAREDLIB).sl.$(PNGVER): $(OBJSDLL)
$(LD) -b -L$(ZLIBLIB) +s +b $(ZLIBLIB) \
+h libpng.sl.$(PNGMAJ) -o libpng.sl.$(PNGVER) $(OBJSDLL) -lz
pngtest: pngtest.o libpng.sl
pngtest: pngtest.o $(SHAREDLIB).sl
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a libpng.sl.$(PNGVER)
install: libpng.a $(SHAREDLIB).sl.$(PNGVER)
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
cp png.h pngconf.h $(INCPATH)
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.sl.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.sl.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.sl.$(PNGMAJ) $(LIBPATH)/libpng.sl
(cd $(LIBPATH); ln -sf libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ); \
ln -sf libpng.sl.$(PNGMAJ) libpng.sl)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(SHAREDLIB).sl.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/$(SHAREDLIB).sl.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(SHAREDLIB).sl.$(PNGMAJ) \
$(LIBPATH)/$(SHAREDLIB).sl
(cd $(LIBPATH); ln -sf $(SHAREDLIB).sl.$(PNGVER) \
$(SHAREDLIB).sl.$(PNGMAJ); \
ln -sf $(SHAREDLIB).sl.$(PNGMAJ) $(SHAREDLIB).sl)
clean:
/bin/rm -f *.o libpng.a libpng.sl libpng.sl.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(SHAREDLIB).sl $(SHAREDLIB).sl.$(PNGMAJ)* \
pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -1,5 +1,5 @@
# makefile for libpng, HPUX (10.20 and 11.00)
# Copyright (C) 1999, 2000 Glenn Randers-Pehrson
# Copyright (C) 1999-2002 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
# For conditions of distribution and use, see copyright notice in png.h
@ -16,13 +16,14 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
# where make install puts libpng.a and png.h
# where make install puts libpng.a, libpng12.sl, and png.h
prefix=/opt/libpng
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
@ -36,21 +37,22 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) +z -o $@ $*.c
all: libpng.a libpng.sl pngtest
all: libpng.a $(LIBNAME).sl pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.sl: libpng.sl.$(PNGMAJ)
ln -f -s libpng.sl.$(PNGMAJ) libpng.sl
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
ln -f -s $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
libpng.sl.$(PNGMAJ): libpng.sl.$(PNGVER)
ln -f -s libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ)
$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
ln -f -s $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
libpng.sl.$(PNGVER): $(OBJSDLL)
$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
$(LD) -b -L$(ZLIBLIB) +s +b $(ZLIBLIB) \
+h libpng.sl.$(PNGMAJ) -o libpng.sl.$(PNGVER) $(OBJSDLL) -lz
+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) \
$(OBJSDLL) -lz
pngtest: pngtest.o libpng.a
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
@ -60,19 +62,26 @@ test: pngtest
install: libpng.a
-@mkdir $(prefix)/include
-@mkdir $(prefix)/include/$(LIBNAME)
-@mkdir $(prefix)/lib
cp png.h $(prefix)/include
cp pngconf.h $(prefix)/include
cp png.h $(prefix)/include/$(LIBNAME)
cp pngconf.h $(prefix)/include/$(LIBNAME)
chmod 644 $(prefix)/include/png.h
chmod 644 $(prefix)/include/pngconf.h
cp libpng.a libpng.sl.$(PNGVER) $(prefix)/lib
chmod 644 $(prefix)/include/$(LIBNAME)/png.h
chmod 644 $(prefix)/include/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBNAME).sl.$(PNGVER) $(prefix)/lib
chmod 644 $(prefix)/lib/libpng.a
chmod 755 $(prefix)/lib/libpng.sl.$(PNGVER)
(cd $(prefix)/lib; ln -f -s libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ); \
ln -f -s libpng.sl.$(PNGMAJ) libpng.sl)
chmod 755 $(prefix)/lib/$(LIBNAME).sl.$(PNGVER)
(cd $(prefix)/lib; \
ln -f -s $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
ln -f -s $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
clean:
/bin/rm -f *.o libpng.a libpng.sl libpng.sl.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -1,11 +1,17 @@
# makefile for libpng on Linux ELF with gcc
# Copyright (C) 1998, 1999 Greg Roelofs
# makefile for libpng.a and libpng12.so on Linux ELF with gcc
# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
# Copyright (C) 1996, 1997 Andreas Dilger
# For conditions of distribution and use, see copyright notice in png.h
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
# where "make install" puts libpng.a, libpng.so*, png.h and pngconf.h
# where "make install" puts libpng.a, libpng12/libpng12.so*,
# libpng12/png.h and libpng12/pngconf.h
prefix=/usr/local
# Where the zlib library and include files are located
@ -26,17 +32,13 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
RANLIB=ranlib
#RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@ -51,41 +53,58 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a libpng.so pngtest
all: libpng.a $(LIBNAME).so pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -sf libpng.so.$(PNGMAJ) libpng.so
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJSDLL)
$(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
$(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) \
$(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
pngtest: pngtest.o libpng.so
pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
pngtest-static: pngtest.o $(LIBNAME).a
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
install: libpng.a libpng.so.$(PNGVER)
test: pngtest pngtest-static
@echo ""
@echo " Running pngtest dynamically linked with libpng12.so:"
@echo ""
./pngtest
@echo ""
@echo " Running pngtest statically linked with libpng.a:"
@echo ""
./pngtest-static
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
cp png.h pngconf.h $(INCPATH)
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -sf libpng.so.$(PNGMAJ) libpng.so)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ) \
$(LIBPATH)/$(LIBNAME).so
(cd $(LIBPATH); ln -sf $(LIBNAME).so.$(PNGVER) \
$(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNMAJ)* \
pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -1,4 +1,5 @@
# makefile for libpng, MACOS X
# Copyright (C) 2002 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# Modified by Karin Kosina <kyrah@sim.no> 20011010:
# build shared library (*.dylib)
@ -18,10 +19,10 @@ CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
LDSHARED=cc -lz -dynamiclib -compatibility_version $(VER) -current_version $(VER)
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
VER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=libpng
SHAREDLIB=libpng12
SHAREDLIB_POSTFIX=dylib
libdir=$(prefix)/lib
@ -52,20 +53,28 @@ test: pngtest
install: libpng.a
-@mkdir $(prefix)/include
-@mkdir $(prefix)/lib
-@mkdir $(prefix)/include/$(SHAREDLIB)
cp png.h $(prefix)/include
cp pngconf.h $(prefix)/include
cp png.h $(prefix)/include/$(SHAREDLIB)
cp pngconf.h $(prefix)/include/$(SHAREDLIB)
chmod 644 $(prefix)/include/png.h
chmod 644 $(prefix)/include/pngconf.h
chmod 644 $(prefix)/include/$(SHAREDLIB)/png.h
chmod 644 $(prefix)/include/$(SHAREDLIB)/pngconf.h
cp libpng.a $(prefix)/lib
chmod 644 $(prefix)/lib/libpng.a
install-shared: $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX)
cp $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) $(libdir)
(cd $(libdir); \
ln -s $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) $(SHAREDLIB).$(SHAREDLIB_POSTFIX))
ln -s $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) \
$(SHAREDLIB).$(SHAREDLIB_POSTFIX))
clean:
rm -f *.o libpng.a pngtest pngout.png $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) $(SHAREDLIB).$(SHAREDLIB_POSTFIX)
rm -f *.o libpng.a pngtest pngout.png \
$(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) \
$(SHAREDLIB).$(SHAREDLIB_POSTFIX)
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -8,10 +8,12 @@ LOCALBASE?=/usr/local
LIBDIR= ${LOCALBASE}/lib
MANDIR= ${LOCALBASE}/man
INCSDIR=${LOCALBASE}/include
# Should also copy png.h and pngconf.h to $(INCSDIR)/libpng12.
LIB=png
SHLIB_MAJOR= 3
SHLIB_MINOR= 1.2.1
# Shared lib name should be png12.
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.2beta1
SRCS= pnggccrd.c 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

View File

@ -22,11 +22,12 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
#RANLIB=ranlib
RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@ -42,40 +43,43 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
all: libpng.a libpng.so pngtest
all: libpng.a $(LIBNAME).so pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -f -s libpng.so.$(PNGMAJ) libpng.so
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJSDLL)
$(CC) -G -Wl,-h,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
$(OBJSDLL)
pngtest: pngtest.o libpng.so
pngtest: pngtest.o $(LIBNAME).so
LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
-@mkdir $(INCPATH) $(LIBPATH)
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@mkdir $(INCPATH) $(LIBPATH) $(INCPATH)/$(LIBNAME)
cp png.h pngconf.h $(INCPATH)
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -f -s libpng.so.$(PNGMAJ) libpng.so)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ) $(LIBPATH)/$(LIBNAME).so
(cd $(LIBPATH); \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -1,4 +1,5 @@
# makefile for libpng, SGI IRIX with gcc
# Copyright (C) 2002 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# For conditions of distribution and use, see copyright notice in png.h
@ -22,11 +23,11 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=CC $(ABI) -shared
VER=1.2.1
VER=1.2.2beta1
# See "man dso" for info about shared objects
SONUM=3
LIBS=libpng.so.$(SONUM).$(VER)
SHAREDLIB=libpng.so
SONUM=0
LIBS=libpng12.so.$(SONUM).$(VER)
SHAREDLIB=libpng12.so
libdir=$(prefix)/lib32
RANLIB=echo
@ -57,14 +58,17 @@ test: pngtest
install: libpng.a
-@mkdir $(prefix)/include
-@mkdir $(prefix)/lib
cp png.h $(prefix)/include
cp pngconf.h $(prefix)/include
cp png.h pngconf.h $(prefix)/include
chmod 644 $(prefix)/include/png.h
chmod 644 $(prefix)/include/pngconf.h
cp libpng.a $(prefix)/lib
chmod 644 $(prefix)/lib/libpng.a
install-shared: $(SHAREDLIB).$(VER)
-@mkdir $(prefix)/include/libpng12
cp png.h pngconf.h $(prefix)/include/libpng12
chmod 644 $(prefix)/include/libpng12/png.h
chmod 644 $(prefix)/include/libpng12/pngconf.h
cp $(SHAREDLIB).$(VER) $(libdir); chmod 755 $(SHAREDLIB).$(VER)
(cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
rm -f $(SHAREDLIB) $(SHAREDLIB).$(SONUM); \

View File

@ -1,9 +1,9 @@
# makefile for libpng (.a and .so), SGI IRIX with 'cc'
# Copyright (C) 2001 Glenn Randers-Pehrson
# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc'
# Copyright (C) 2001-2002 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# For conditions of distribution and use, see copyright notice in png.h
# where make install puts libpng.a and png.h
# where make install puts libpng.a, libpng12.so and libpng12/png.h
prefix=/usr/local
# Where the zlib library and include files are located
@ -24,13 +24,14 @@ WARNMORE=-fullwarn
# Note: -KPIC is the default anyhow
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared
VER=1.2.1
VER=1.2.2beta1
# See "man dso" for info about shared objects
SONUM=3
SHAREDLIB=libpng.so
SONUM=0
SHAREDLIB=libpng12.so
RANLIB=echo
#RANLIB=ranlib
@ -74,6 +75,13 @@ install: libpng.a
chmod 644 $(LIBPATH)/libpng.a
install-shared: $(SHAREDLIB).$(SONUM).$(VER)
-@mkdir $(LIBPATH)
-@mkdir $(INCPATH)
-@mkdir $(INCPATH)/libpng12
cp png.h $(INCPATH)/libpng12
cp pngconf.h $(INCPATH)/libpng12
chmod 644 $(INCPATH)/libpng12/png.h
chmod 644 $(INCPATH)/libpng12/pngconf.h
cp $(SHAREDLIB).$(SONUM).$(VER) $(LIBPATH)
chmod 755 $(SHAREDLIB).$(SONUM).$(VER)
(cd $(LIBPATH); if test -f $(SHAREDLIB).$(SONUM).$(VER); then \

View File

@ -32,11 +32,12 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm
#RANLIB=ranlib
RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@ -52,19 +53,19 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
all: libpng.a libpng.so pngtest
all: libpng.a $(LIBNAME).so pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -f -s libpng.so.$(PNGMAJ) libpng.so
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJSDLL)
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
@case "`type ld`" in *ucb*) \
echo; \
echo '## WARNING:'; \
@ -77,27 +78,32 @@ libpng.so.$(PNGVER): $(OBJSDLL)
echo; \
;; \
esac
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.$(PNGMAJ) \
-o libpng.so.$(PNGVER) $(OBJSDLL) -lz
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -lz
pngtest: pngtest.o libpng.so
pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@mkdir $(INCPATH) $(LIBPATH)
-@mkdir $(INCPATH)/$(LIBNAME)
cp png.h pngconf.h $(INCPATH)
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -f -s libpng.so.$(PNGMAJ) libpng.so)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ) $(LIBPATH)/$(LIBNAME).so
(cd $(LIBPATH); \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -1,4 +1,5 @@
# makefile for libpng on Solaris 2.x with gcc
# Copyright (C) 2002 Glenn Randers-Pehrson
# Contributed by William L. Sebok, based on makefile.linux
# Copyright (C) 1998 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
@ -6,7 +7,7 @@
CC=gcc
# Where make install puts libpng.a, libpng.so*, and png.h
# Where make install puts libpng.a, libpng12.so*, and png.h
prefix=/usr/local
# Where the zlib library and include files are located
@ -28,10 +29,10 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm
#RANLIB=ranlib
RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
@ -48,19 +49,19 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a libpng.so pngtest
all: libpng.a libpng12.so pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -f -s libpng.so.$(PNGMAJ) libpng.so
libpng12.so: libpng12.so.$(PNGMAJ)
ln -f -s libpng12.so.$(PNGMAJ) libpng12.so
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
libpng12.so.$(PNGMAJ): libpng12.so.$(PNGVER)
ln -f -s libpng12.so.$(PNGVER) libpng12.so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJSDLL)
libpng12.so.$(PNGVER): $(OBJSDLL)
@case "`type ld`" in *ucb*) \
echo; \
echo '## WARNING:'; \
@ -73,27 +74,34 @@ libpng.so.$(PNGVER): $(OBJSDLL)
echo; \
;; \
esac
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.$(PNGMAJ) \
-o libpng.so.$(PNGVER) $(OBJSDLL) -lz
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng12.so.$(PNGMAJ) \
-o libpng12.so.$(PNGVER) $(OBJSDLL) -lz
pngtest: pngtest.o libpng.so
pngtest: pngtest.o libpng12.so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
install: libpng.a libpng12.so.$(PNGVER)
-@mkdir $(INCPATH) $(LIBPATH)
cp png.h pngconf.h $(INCPATH)
-@mkdir $(INCPATH)/libpng12
cp png.h pngconf.h $(INCPATH)/libpng12
cp png.h pngconf.h $(INCPATH)/libpng12
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -f -s libpng.so.$(PNGMAJ) libpng.so)
chmod 644 $(INCPATH)/libpng12/png.h \
$(INCPATH)/libpng12/pngconf.h
cp libpng.a libpng12.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng12.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng12.so.$(PNGMAJ) \
$(LIBPATH)/libpng12.so
(cd $(LIBPATH); \
ln -f -s libpng12.so.$(PNGVER) libpng12.so.$(PNGMAJ); \
ln -f -s libpng12.so.$(PNGMAJ) libpng12.so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a libpng12.so libpng12.so.$(PNGMAJ)* \
pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:

View File

@ -7,8 +7,8 @@ unit pngdef;
interface
const
PNG_LIBPNG_VER_STRING = '1.2.1';
PNG_LIBPNG_VER = 10201;
PNG_LIBPNG_VER_STRING = '1.2.2beta1';
PNG_LIBPNG_VER = 10202;
type
png_uint_32 = Cardinal;

View File

@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
; Version 1.2.1
; Version 1.2.2beta1
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"