[libpng10] Imported from libpng-1.0.19rc1.tar
89
ANNOUNCE
@ -1,31 +1,72 @@
|
|||||||
|
|
||||||
Libpng 1.0.18 - December 3, 2004
|
Libpng 1.0.19rc1 - June 13, 2006
|
||||||
|
|
||||||
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.0.17):
|
Files available for download:
|
||||||
|
|
||||||
Fixed bug in png_text_compress() that would fail to complete a large block.
|
Source files with LF line endings (for Unix/Linux) and with a
|
||||||
Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during
|
"configure" script
|
||||||
strip alpha operation in png_do_strip_filler().
|
|
||||||
#ifdef out png_info_init in png.c and png_read_init in pngread.c (as of 1.3.0)
|
|
||||||
Reduce color_type to a nonalpha type after strip alpha operation in
|
|
||||||
png_do_strip_filler().
|
|
||||||
Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM
|
|
||||||
Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin).
|
|
||||||
Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin).
|
|
||||||
Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection
|
|
||||||
of data type in deflate (Cosmin).
|
|
||||||
Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of
|
|
||||||
PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
|
|
||||||
Despammed mailing addresses by masking "@" with "at".
|
|
||||||
Added scripts/makefile.elf with supporting code in pngconf.h for symbol
|
|
||||||
versioning (John Bowler).
|
|
||||||
Added projects/visualc71 (Simon-pierre).
|
|
||||||
|
|
||||||
Send comments/corrections/commendations to
|
libpng-1.0.19rc1.tar.gz
|
||||||
png-implement at ccrc.wustl.edu (subscription required; write to
|
libpng-1.0.19rc1.tar.bz2
|
||||||
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message)
|
|
||||||
or to glennrp at users.sourceforge.net
|
Source files with LF line endings (for Unix/Linux) without the
|
||||||
|
"configure" script
|
||||||
|
|
||||||
|
libpng-1.0.19rc1-no-config.tar.gz
|
||||||
|
libpng-1.0.19rc1-no-config.tar.bz2
|
||||||
|
|
||||||
|
Source files with CRLF line endings (for Windows), without the
|
||||||
|
"configure" script
|
||||||
|
|
||||||
|
lp1019r01.zip
|
||||||
|
lp1019r01.tar.bz2
|
||||||
|
|
||||||
|
Project files
|
||||||
|
|
||||||
|
libpng-1.0.19rc1-project-netware.zip
|
||||||
|
libpng-1.0.19rc1-project-wince.zip
|
||||||
|
|
||||||
|
Other information:
|
||||||
|
|
||||||
|
libpng-1.0.19rc1-README.txt
|
||||||
|
libpng-1.0.19rc1-KNOWNBUGS.txt
|
||||||
|
libpng-1.0.19rc1-LICENSE.txt
|
||||||
|
libpng-1.0.19rc1-Y2K-compliance.txt
|
||||||
|
|
||||||
|
Changes since the last public release (1.0.18):
|
||||||
|
|
||||||
|
version 1.2.11beta1 [May 31, 2006]
|
||||||
|
scripts/libpng.pc.in contained "configure" style version info and would
|
||||||
|
not work with makefiles.
|
||||||
|
The shared-library makefiles were linking to libpng.so.0 instead of
|
||||||
|
libpng.so.3 compatibility as the library.
|
||||||
|
|
||||||
|
version 1.2.11beta2 [June 2, 2006]
|
||||||
|
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
|
||||||
|
buffer overflow.
|
||||||
|
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb)
|
||||||
|
|
||||||
|
version 1.2.11beta3 [June 5, 2006]
|
||||||
|
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
|
||||||
|
Removed the accidental leftover Makefile.in~ (Cosmin).
|
||||||
|
Avoided potential buffer overflow and optimized buffer in
|
||||||
|
png_write_sCAL(), png_write_sCAL_s() (Cosmin).
|
||||||
|
Removed the include directories and libraries from CFLAGS and LDFLAGS
|
||||||
|
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
|
||||||
|
|
||||||
|
version 1.2.11beta4 [June 6, 2006]
|
||||||
|
Allow zero-length IDAT chunks after the entire zlib datastream, but not
|
||||||
|
after another intervening chunk type.
|
||||||
|
|
||||||
|
version 1.2.11rc1 [June 13, 2006]
|
||||||
|
Deleted extraneous square brackets from [config.h] in configure.ac
|
||||||
|
|
||||||
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
|
(subscription required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
to subscribe) or to glennrp at users.sourceforge.net
|
||||||
|
|
||||||
Glenn R-P
|
Glenn R-P
|
||||||
|
|||||||
203
CHANGES
@ -10,7 +10,7 @@ version 0.3
|
|||||||
split up pngwrite.c to several files
|
split up pngwrite.c to several files
|
||||||
added pnglib.txt
|
added pnglib.txt
|
||||||
added example.c
|
added example.c
|
||||||
cleaned up writer, adding a few new tranformations
|
cleaned up writer, adding a few new transformations
|
||||||
fixed some bugs in writer
|
fixed some bugs in writer
|
||||||
interfaced with zlib 0.5
|
interfaced with zlib 0.5
|
||||||
added K&R support
|
added K&R support
|
||||||
@ -22,7 +22,7 @@ version 0.4
|
|||||||
created png_color_16 and png_color_8 to handle color needs
|
created png_color_16 and png_color_8 to handle color needs
|
||||||
cleaned up color type defines
|
cleaned up color type defines
|
||||||
fixed various bugs
|
fixed various bugs
|
||||||
made various names more consistant
|
made various names more consistent
|
||||||
interfaced with zlib 0.71
|
interfaced with zlib 0.71
|
||||||
cleaned up zTXt reader and writer (using zlib's Reset functions)
|
cleaned up zTXt reader and writer (using zlib's Reset functions)
|
||||||
split transformations into pngrtran.c and pngwtran.c
|
split transformations into pngrtran.c and pngwtran.c
|
||||||
@ -151,7 +151,7 @@ version 0.95 [March, 1997]
|
|||||||
added "packswap" transformation, which changes the endianness of
|
added "packswap" transformation, which changes the endianness of
|
||||||
packed-pixel bytes (Kevin Bracey)
|
packed-pixel bytes (Kevin Bracey)
|
||||||
added "strip_alpha" transformation, which removes the alpha channel of
|
added "strip_alpha" transformation, which removes the alpha channel of
|
||||||
input images without using it (not neccesarily a good idea)
|
input images without using it (not necessarily a good idea)
|
||||||
added "swap_alpha" transformation, which puts the alpha channel in front
|
added "swap_alpha" transformation, which puts the alpha channel in front
|
||||||
of the color bytes instead of after
|
of the color bytes instead of after
|
||||||
removed all implicit variable tests which assume NULL == 0 (I think)
|
removed all implicit variable tests which assume NULL == 0 (I think)
|
||||||
@ -172,7 +172,7 @@ version 0.95 [March, 1997]
|
|||||||
more chunk types tested in pngtest.c
|
more chunk types tested in pngtest.c
|
||||||
renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
|
renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
|
||||||
png_set_<chunk>. We now have corresponding png_get_<chunk>
|
png_set_<chunk>. We now have corresponding png_get_<chunk>
|
||||||
functions in pngget.c to get infomation in info_ptr. This isolates
|
functions in pngget.c to get information in info_ptr. This isolates
|
||||||
the application from the internal organization of png_info_struct
|
the application from the internal organization of png_info_struct
|
||||||
(good for shared library implementations).
|
(good for shared library implementations).
|
||||||
|
|
||||||
@ -522,9 +522,9 @@ version 1.0.5b [November 23, 1999]
|
|||||||
Updated scripts/makevms.com and added makevms.com to contrib/gregbook
|
Updated scripts/makevms.com and added makevms.com to contrib/gregbook
|
||||||
and contrib/pngminus (Martin Zinser)
|
and contrib/pngminus (Martin Zinser)
|
||||||
version 1.0.5c [November 26, 1999]
|
version 1.0.5c [November 26, 1999]
|
||||||
Moved png_get_header_version from png.h to png.c, to accomodate ansi2knr.
|
Moved png_get_header_version from png.h to png.c, to accommodate ansi2knr.
|
||||||
Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to
|
Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to
|
||||||
accomodate making DLL's: Moved usr_png_ver from global variable to function
|
accommodate making DLL's: Moved usr_png_ver from global variable to function
|
||||||
png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and
|
png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and
|
||||||
eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays
|
eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays
|
||||||
into pngtypes.h. Eliminated use of global png_pass arrays. Declared the
|
into pngtypes.h. Eliminated use of global png_pass arrays. Declared the
|
||||||
@ -1336,7 +1336,7 @@ version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004]
|
|||||||
Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED
|
Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED
|
||||||
section of png.h where they were inadvertently placed in version rc3.
|
section of png.h where they were inadvertently placed in version rc3.
|
||||||
|
|
||||||
version 1.0.16 and 1.2.6 [August 15, 2004]
|
version 1.2.6 and 1.0.16 [August 15, 2004]
|
||||||
Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1.
|
Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1.
|
||||||
version 1.2.7beta1 [August 26, 2004]
|
version 1.2.7beta1 [August 26, 2004]
|
||||||
Removed unused pngasmrd.h file.
|
Removed unused pngasmrd.h file.
|
||||||
@ -1351,7 +1351,8 @@ version 1.2.7beta2 [August 28, 2004]
|
|||||||
png_set_filler().
|
png_set_filler().
|
||||||
version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004]
|
version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004]
|
||||||
Revised png_set_strip_filler() to not remove alpha if color_type has alpha.
|
Revised png_set_strip_filler() to not remove alpha if color_type has alpha.
|
||||||
version 1.0.17 and 1.2.7 [September 12, 2004]
|
|
||||||
|
version 1.2.7 and 1.0.17 [September 12, 2004]
|
||||||
Added makefile.hp64
|
Added makefile.hp64
|
||||||
Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin
|
Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin
|
||||||
version 1.2.8beta1 [November 1, 2004]
|
version 1.2.8beta1 [November 1, 2004]
|
||||||
@ -1397,12 +1398,192 @@ version 1.2.8rc4 [November 29, 2004]
|
|||||||
Added projects/visualc7 (Simon-pierre).
|
Added projects/visualc7 (Simon-pierre).
|
||||||
version 1.2.8rc5 [November 29, 2004]
|
version 1.2.8rc5 [November 29, 2004]
|
||||||
Fixed new typo in scripts/pngw32.rc
|
Fixed new typo in scripts/pngw32.rc
|
||||||
|
|
||||||
version 1.2.8 [December 3, 2004]
|
version 1.2.8 [December 3, 2004]
|
||||||
Removed projects/visualc7, added projects/visualc71.
|
Removed projects/visualc7, added projects/visualc71.
|
||||||
|
|
||||||
Send comments/corrections/commendations to
|
version 1.2.9beta1 [February 21, 2006]
|
||||||
png-implement at ccrc.wustl.edu (subscription required; write to
|
|
||||||
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message)
|
Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints
|
||||||
|
Revised man page and libpng.txt to make it clear that one should not call
|
||||||
|
png_read_end or png_write_end after png_read_png or png_write_png.
|
||||||
|
Updated references to png-mng-implement mailing list.
|
||||||
|
Fixed an incorrect typecast in pngrutil.c
|
||||||
|
Added PNG_NO_READ_SUPPORTED conditional for making a write-only library.
|
||||||
|
Added PNG_NO_WRITE_INTERLACING_SUPPORTED conditional.
|
||||||
|
Optimized alpha-inversion loops in pngwtran.c
|
||||||
|
Moved test for nonzero gamma outside of png_build_gamma_table() in pngrtran.c
|
||||||
|
Make sure num_trans is <= 256 before copying data in png_set_tRNS().
|
||||||
|
Make sure num_palette is <= 256 before copying data in png_set_PLTE().
|
||||||
|
Interchanged order of write_swap_alpha and write_invert_alpha transforms.
|
||||||
|
Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin).
|
||||||
|
Optimized zlib window flag (CINFO) in contrib/pngsuite/*.png (Cosmin).
|
||||||
|
Updated scripts/makefile.bc32 for Borland C++ 5.6 (Cosmin).
|
||||||
|
Exported png_get_uint_32, png_save_uint_32, png_get_uint_16, png_save_uint_16,
|
||||||
|
png_get_int_32, png_save_int_32, png_get_uint_31 (Cosmin).
|
||||||
|
Added type cast (png_byte) in png_write_sCAL() (Cosmin).
|
||||||
|
Fixed scripts/makefile.cygwin (Christian Biesinger, Cosmin).
|
||||||
|
Default iTXt support was inadvertently enabled.
|
||||||
|
|
||||||
|
version 1.2.9beta2 [February 21, 2006]
|
||||||
|
|
||||||
|
Check for png_rgb_to_gray and png_gray_to_rgb read transformations before
|
||||||
|
checking for png_read_dither in pngrtran.c
|
||||||
|
Revised checking of chromaticity limits to accommodate extended RGB
|
||||||
|
colorspace (John Denker).
|
||||||
|
Changed line endings in some of the project files to CRLF, even in the
|
||||||
|
"Unix" tar distributions (Cosmin).
|
||||||
|
Made png_get_int_32 and png_save_int_32 always available (Cosmin).
|
||||||
|
Updated scripts/pngos2.def, scripts/pngw32.def and projects/wince/png32ce.def
|
||||||
|
with the newly exported functions.
|
||||||
|
Eliminated distributions without the "configure" script.
|
||||||
|
Updated INSTALL instructions.
|
||||||
|
|
||||||
|
version 1.2.9beta3 [February 24, 2006]
|
||||||
|
|
||||||
|
Fixed CRCRLF line endings in contrib/visupng/VisualPng.dsp
|
||||||
|
Made libpng.pc respect EXEC_PREFIX (D. P. Kreil, J. Bowler)
|
||||||
|
Removed reference to pngasmrd.h from Makefile.am
|
||||||
|
Renamed CHANGES to ChangeLog.
|
||||||
|
Renamed LICENSE to COPYING.
|
||||||
|
Renamed ANNOUNCE to NEWS.
|
||||||
|
Created AUTHORS file.
|
||||||
|
|
||||||
|
version 1.2.9beta4 [March 3, 2006]
|
||||||
|
|
||||||
|
Changed definition of PKGCONFIG from $prefix/lib to $libdir in configure.ac
|
||||||
|
Reverted to filenames LICENSE and ANNOUNCE; removed AUTHORS and COPYING.
|
||||||
|
Removed newline from the end of some error and warning messages.
|
||||||
|
Removed test for sqrt() from configure.ac and configure.
|
||||||
|
Made swap tables in pngtrans.c PNG_CONST (Carlo Bramix).
|
||||||
|
Disabled default iTXt support that was inadvertently enabled in
|
||||||
|
libpng-1.2.9beta1.
|
||||||
|
Added "OS2" to list of systems that don't need underscores, in pnggccrd.c
|
||||||
|
Removed libpng version and date from *.c files.
|
||||||
|
|
||||||
|
version 1.2.9beta5 [March 4, 2006]
|
||||||
|
Removed trailing blanks from source files.
|
||||||
|
Put version and date of latest change in each source file, and changed
|
||||||
|
copyright year accordingly.
|
||||||
|
More cleanup of configure.ac, Makefile.ac, and associated scripts.
|
||||||
|
Restored scripts/makefile.elf which was inadvertently deleted.
|
||||||
|
|
||||||
|
version 1.2.9beta6 [March 6, 2006]
|
||||||
|
Fixed typo (19) in configuration files.
|
||||||
|
|
||||||
|
version 1.2.9beta7 [March 7, 2006]
|
||||||
|
Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am
|
||||||
|
Fixed inconsistent #ifdef's around png_sig_bytes() and png_set_sCAL_s()
|
||||||
|
in png.h.
|
||||||
|
Updated makefile.elf as suggested by debian.
|
||||||
|
Made cosmetic changes to some makefiles, adding LN_SF and other macros.
|
||||||
|
Made some makefiles accept "exec_prefix".
|
||||||
|
|
||||||
|
version 1.2.9beta8 [March 9, 2006]
|
||||||
|
Fixed some "#if defined (..." which should be "#if defined(..."
|
||||||
|
Bug introduced in libpng-1.2.8.
|
||||||
|
Fixed inconsistency in definition of png_default_read_data()
|
||||||
|
Restored blank that was lost from makefile.sggcc "clean" target in beta7.
|
||||||
|
Revised calculation of "current" and "major" for irix in ltmain.sh
|
||||||
|
Changed "mkdir" to "MKDIR_P" in some makefiles.
|
||||||
|
Separated PNG_EXPAND and PNG_EXPAND_tRNS.
|
||||||
|
Added png_set_expand_gray_1_2_4_to_8() and deprecated
|
||||||
|
png_set_gray_1_2_4_to_8() which also expands tRNS to alpha.
|
||||||
|
|
||||||
|
version 1.2.9beta9 [March 10, 2006]
|
||||||
|
Include "config.h" in pngconf.h when available.
|
||||||
|
Added some checks for NULL png_ptr or NULL info_ptr (timeless)
|
||||||
|
|
||||||
|
version 1.2.9beta10 [March 20, 2006]
|
||||||
|
Removed extra CR from contrib/visualpng/VisualPng.dsw (Cosmin)
|
||||||
|
Made pnggccrd.c PIC-compliant (Christian Aichinger).
|
||||||
|
Added makefile.mingw (Wolfgang Glas).
|
||||||
|
Revised pngconf.h MMX checking.
|
||||||
|
|
||||||
|
version 1.2.9beta11 [March 22, 2006]
|
||||||
|
Fixed out-of-order declaration in pngwrite.c that was introduced in beta9
|
||||||
|
Simplified some makefiles by using LIBSO, LIBSOMAJ, and LIBSOVER macros.
|
||||||
|
|
||||||
|
version 1.2.9rc1 [March 31, 2006]
|
||||||
|
Defined PNG_USER_PRIVATEBUILD when including "pngusr.h" (Cosmin).
|
||||||
|
Removed nonsensical assertion check from pngtest.c (Cosmin).
|
||||||
|
|
||||||
|
version 1.2.9 [April 14, 2006]
|
||||||
|
Revised makefile.beos and added "none" selector in ltmain.sh
|
||||||
|
|
||||||
|
version 1.2.10beta1 [April 15, 2006]
|
||||||
|
Renamed "config.h" to "png_conf.h" and revised Makefile.am to add
|
||||||
|
-DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h
|
||||||
|
to include png_conf.h only when PNG_BUILDING_LIBPNG is defined.
|
||||||
|
|
||||||
|
version 1.2.10beta2 [April 15, 2006]
|
||||||
|
Manually updated Makefile.in and configure. Changed png_conf.h.in
|
||||||
|
back to config.h.
|
||||||
|
|
||||||
|
version 1.2.10beta3 [April 15, 2006]
|
||||||
|
Change png_conf.h back to config.h in pngconf.h.
|
||||||
|
|
||||||
|
version 1.2.10beta4 [April 16, 2006]
|
||||||
|
Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*.
|
||||||
|
|
||||||
|
version 1.2.10beta5 [April 16, 2006]
|
||||||
|
Added a configure check for compiling assembler code in pnggccrd.c
|
||||||
|
|
||||||
|
version 1.2.10beta6 [April 17, 2006]
|
||||||
|
Revised the configure check for pnggccrd.c
|
||||||
|
Moved -DPNG_CONFIGURE_LIBPNG into @LIBPNG_DEFINES@
|
||||||
|
Added @LIBPNG_DEFINES@ to arguments when building libpng.sym
|
||||||
|
|
||||||
|
version 1.2.10beta7 [April 18, 2006]
|
||||||
|
Change "exec_prefix=$prefix" to "exec_prefix=$(prefix)" in makefiles.
|
||||||
|
|
||||||
|
version 1.2.10rc1 [April 19, 2006]
|
||||||
|
Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD
|
||||||
|
Fixed "LN_FS" typo in makefile.sco and makefile.solaris.
|
||||||
|
|
||||||
|
version 1.2.10rc2 [April 20, 2006]
|
||||||
|
Added a backslash between -DPNG_CONFIGURE_LIBPNG and -DPNG_NO_ASSEMBLER_CODE
|
||||||
|
in configure.ac and configure
|
||||||
|
Made the configure warning about versioned symbols less arrogant.
|
||||||
|
|
||||||
|
version 1.2.10rc3 [April 21, 2006]
|
||||||
|
Added a note in libpng.txt that png_set_sig_bytes(8) can be used when
|
||||||
|
writing an embedded PNG without the 8-byte signature.
|
||||||
|
Revised makefiles and configure to avoid making links to libpng.so.*
|
||||||
|
|
||||||
|
version 1.2.10 [April 23, 2006]
|
||||||
|
Reverted configure to "rc2" state.
|
||||||
|
|
||||||
|
version 1.2.11beta1 [May 31, 2006]
|
||||||
|
scripts/libpng.pc.in contained "configure" style version info and would
|
||||||
|
not work with makefiles.
|
||||||
|
The shared-library makefiles were linking to libpng.so.0 instead of
|
||||||
|
libpng.so.3 compatibility as the library.
|
||||||
|
|
||||||
|
version 1.2.11beta2 [June 2, 2006]
|
||||||
|
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
|
||||||
|
buffer overflow.
|
||||||
|
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb)
|
||||||
|
|
||||||
|
version 1.2.11beta3 [June 5, 2006]
|
||||||
|
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
|
||||||
|
Removed the accidental leftover Makefile.in~ (Cosmin).
|
||||||
|
Avoided potential buffer overflow and optimized buffer in
|
||||||
|
png_write_sCAL(), png_write_sCAL_s() (Cosmin).
|
||||||
|
Removed the include directories and libraries from CFLAGS and LDFLAGS
|
||||||
|
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
|
||||||
|
|
||||||
|
version 1.2.11beta4 [June 6, 2006]
|
||||||
|
Allow zero-length IDAT chunks after the entire zlib datastream, but not
|
||||||
|
after another intervening chunk type.
|
||||||
|
|
||||||
|
version 1.2.11rc1 [June 13, 2006]
|
||||||
|
Deleted extraneous square brackets from [config.h] in configure.ac
|
||||||
|
|
||||||
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
|
(subscription required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
to subscribe)
|
||||||
or to glennrp at users.sourceforge.net
|
or to glennrp at users.sourceforge.net
|
||||||
|
|
||||||
Glenn R-P
|
Glenn R-P
|
||||||
|
|||||||
74
INSTALL
@ -1,16 +1,35 @@
|
|||||||
|
|
||||||
Installing libpng version 1.0.18 - December 3, 2004
|
Installing libpng version 1.0.19rc1 - June 13, 2006
|
||||||
|
|
||||||
Before installing libpng, you must first install zlib. zlib
|
On Unix/Linux and similar systems, you can simply type
|
||||||
can usually be found wherever you got libpng. zlib can be
|
|
||||||
placed in another directory, at the same level as libpng.
|
./autogen.sh
|
||||||
Note that your system might already have a preinstalled
|
./configure [--prefix=$HOME]
|
||||||
zlib, but you will still need to have access to the
|
make check
|
||||||
zlib.h and zconf.h include files that correspond to the
|
make install
|
||||||
version of zlib that's installed.
|
|
||||||
|
and ignore the rest of this document.
|
||||||
|
|
||||||
|
Or you can use one of the custom-built makefiles in the
|
||||||
|
"scripts" directory
|
||||||
|
|
||||||
|
cp scripts/makefile.system makefile
|
||||||
|
make test
|
||||||
|
make install
|
||||||
|
|
||||||
|
Or you can use one of the "projects" in the "projects" directory.
|
||||||
|
|
||||||
|
Before installing libpng, you must first install zlib, if it
|
||||||
|
is not already on your system. zlib can usually be found
|
||||||
|
wherever you got libpng. zlib can be placed in another directory,
|
||||||
|
at the same level as libpng.
|
||||||
|
|
||||||
|
If your system already has a preinstalled zlib you will still need
|
||||||
|
to have access to the zlib.h and zconf.h include files that
|
||||||
|
correspond to the version of zlib that's installed.
|
||||||
|
|
||||||
You can rename the directories that you downloaded (they
|
You can rename the directories that you downloaded (they
|
||||||
might be called "libpng-1.0.18" or "lpng109" and "zlib-1.2.1"
|
might be called "libpng-1.0.19rc1" or "lpng109" and "zlib-1.2.1"
|
||||||
or "zlib121") so that you have directories called "zlib" and "libpng".
|
or "zlib121") so that you have directories called "zlib" and "libpng".
|
||||||
|
|
||||||
Your directory structure should look like this:
|
Your directory structure should look like this:
|
||||||
@ -47,7 +66,6 @@ If the line endings in the files look funny, you may wish to get the other
|
|||||||
distribution of libpng. It is available in both tar.gz (UNIX style line
|
distribution of libpng. It is available in both tar.gz (UNIX style line
|
||||||
endings) and zip (DOS style line endings) formats.
|
endings) and zip (DOS style line endings) formats.
|
||||||
|
|
||||||
|
|
||||||
If you are building libpng with MSVC, you can enter the
|
If you are building libpng with MSVC, you can enter the
|
||||||
libpng projects\visualc6 directory and follow the instructions in
|
libpng projects\visualc6 directory and follow the instructions in
|
||||||
projects\visualc6\README.txt.
|
projects\visualc6\README.txt.
|
||||||
@ -59,19 +77,19 @@ build libpng for Netware or Beos as instructed in projects\netware.txt
|
|||||||
or projects\beos.
|
or projects\beos.
|
||||||
|
|
||||||
Else enter the zlib directory and follow the instructions in zlib/README,
|
Else enter the zlib directory and follow the instructions in zlib/README,
|
||||||
then come back here and choose the appropriate makefile.sys in the scripts
|
then come back here and run "configure" or choose the appropriate
|
||||||
directory.
|
makefile.sys in the scripts directory.
|
||||||
|
|
||||||
The files that are presently available in the scripts directory
|
The files that are presently available in the scripts directory
|
||||||
include
|
include
|
||||||
|
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||||
gcc, creates libpng10.so.0.1.0.18)
|
gcc, creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng10.so.0.1.0.18)
|
(gcc, creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.gcmmx => Linux/ELF makefile
|
makefile.gcmmx => Linux/ELF makefile
|
||||||
(gcc, creates libpng10.so.0.1.0.18,
|
(gcc, creates libpng10.so.0.1.0.19rc1,
|
||||||
uses assembler code tuned for Intel MMX platform)
|
uses assembler code tuned for Intel MMX platform)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
@ -94,12 +112,12 @@ include
|
|||||||
makefile.openbsd => OpenBSD makefile
|
makefile.openbsd => OpenBSD makefile
|
||||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||||
makefile.sggcc => Silicon Graphics (gcc,
|
makefile.sggcc => Silicon Graphics (gcc,
|
||||||
creates libpng10.so.0.1.0.18)
|
creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||||
creates libpng10.so.0.1.0.18)
|
creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.so9 => Solaris 9 makefile (gcc,
|
makefile.so9 => Solaris 9 makefile (gcc,
|
||||||
creates libpng10.so.0.1.0.18)
|
creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
@ -167,3 +185,23 @@ instead, as demonstrated in contrib/visupng of the libpng distribution.
|
|||||||
Further information can be found in the README and libpng.txt
|
Further information can be found in the README and libpng.txt
|
||||||
files, in the individual makefiles, in png.h, and the manual pages
|
files, in the individual makefiles, in png.h, and the manual pages
|
||||||
libpng.3 and png.5.
|
libpng.3 and png.5.
|
||||||
|
|
||||||
|
|
||||||
|
Using the ./configure script -- 16 December 2002.
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
|
||||||
|
The ./configure script should work compatibly with what scripts/makefile.*
|
||||||
|
did, however there are some options you need to add to configure explicitly,
|
||||||
|
which previously was done semi-automatically (if you didn't edit
|
||||||
|
scripts/makefile.* yourself, that is)
|
||||||
|
|
||||||
|
|
||||||
|
CFLAGS="-Wall -O3 -funroll-loops \
|
||||||
|
-malign-loops=2 -malign-functions=2" ./configure --prefix=/usr/include \
|
||||||
|
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
|
||||||
|
|
||||||
|
You can alternatively specify --includedir=/usr/include, /usr/local/include,
|
||||||
|
/usr/include/png12, or whatever.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
14
KNOWNBUG
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Known bugs in libpng version 1.0.18
|
Known bugs in libpng version 1.0.19rc1
|
||||||
|
|
||||||
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
|
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
|
||||||
reading interlaced PNG files, when assembler code is enabled but running
|
reading interlaced PNG files, when assembler code is enabled but running
|
||||||
@ -9,3 +9,15 @@ Known bugs in libpng version 1.0.18
|
|||||||
fixed a problem under FreeBSD but not the problem with NetBSD, which
|
fixed a problem under FreeBSD but not the problem with NetBSD, which
|
||||||
still fails as of libpng-1.2.2rc1.
|
still fails as of libpng-1.2.2rc1.
|
||||||
|
|
||||||
|
2. February 23, 2006: The custom makefiles don't build libpng with -lz.
|
||||||
|
|
||||||
|
STATUS: This is a subject of debate. The change will probably be made
|
||||||
|
as a part of a major overhaul of the makefiles in libpng version 1.3.0.
|
||||||
|
|
||||||
|
3. February 24, 2006: The Makefile generated by the "configure" script
|
||||||
|
fails to install symbolic links
|
||||||
|
libpng12.so => libpng12.so.0.1.2.9betaN
|
||||||
|
that are generated by the custom makefiles.
|
||||||
|
|
||||||
|
STATUS: For now, system library builders should use the custom makefiles.
|
||||||
|
|
||||||
|
|||||||
6
LICENSE
@ -8,8 +8,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
|||||||
If you modify libpng you may insert additional notices immediately following
|
If you modify libpng you may insert additional notices immediately following
|
||||||
this sentence.
|
this sentence.
|
||||||
|
|
||||||
libpng version 1.2.6, December 3, 2004, is
|
libpng versions 1.2.6, August 15, 2004, through 1.0.19rc1, June 13, 2006, are
|
||||||
Copyright (c) 2004 Glenn Randers-Pehrson, and is
|
Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
|
|
||||||
@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
December 3, 2004
|
June 13, 2006
|
||||||
|
|||||||
140
Makefile.am
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
# Makefile.am:
|
||||||
|
# Source file for Makefile.in (and hence Makefile)
|
||||||
|
#
|
||||||
|
# Makefile.am need only be changed on a major version number
|
||||||
|
# change (e.g. libpng12 --> libpng13). In that case seach
|
||||||
|
# this file for every instance of the old base name (libpng12)
|
||||||
|
# and change to the new one (libpng13), then change the
|
||||||
|
# -version-number settings below so that the new values have
|
||||||
|
# the correct major part (first field).
|
||||||
|
|
||||||
|
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@
|
||||||
|
|
||||||
|
# libpng does not follow GNU file name conventions
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
# test programs - run on make check, make distcheck
|
||||||
|
check_PROGRAMS= pngtest
|
||||||
|
pngtest_SOURCES = pngtest.c
|
||||||
|
pngtest_LDADD = libpng10.la
|
||||||
|
TESTS = test-pngtest.sh
|
||||||
|
TESTS_ENVIRONMENT= srcdir=$(srcdir)
|
||||||
|
|
||||||
|
# man pages
|
||||||
|
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
||||||
|
|
||||||
|
# generate the -config scripts if required
|
||||||
|
binconfigs= libpng10-config
|
||||||
|
EXTRA_SCRIPTS= libpng-config libpng10-config
|
||||||
|
bin_SCRIPTS= @binconfigs@
|
||||||
|
|
||||||
|
# rules to build libpng, only build the old library on request
|
||||||
|
lib_LTLIBRARIES=libpng10.la @compatlib@
|
||||||
|
EXTRA_LTLIBRARIES= libpng.la
|
||||||
|
libpng10_la_SOURCES = 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 pnggccrd.c \
|
||||||
|
png.h pngconf.h
|
||||||
|
libpng_la_SOURCES = $(libpng10_la_SOURCES)
|
||||||
|
|
||||||
|
libpng_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||||
|
libpng10_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||||
|
|
||||||
|
# MAJOR UPGRADE: the version-number settings below must be changed.
|
||||||
|
libpng10_la_LDFLAGS = -no-undefined -export-dynamic \
|
||||||
|
-version-number 0:@PNGLIB_MINOR@:0
|
||||||
|
# -rpath is needed as automake doesn't know the directory
|
||||||
|
libpng_la_LDFLAGS = -rpath '$(libdir)' -no-undefined -export-dynamic \
|
||||||
|
-version-number 3:@PNGLIB_MINOR@:0
|
||||||
|
|
||||||
|
if HAVE_LD_VERSION_SCRIPT
|
||||||
|
# Versioned symbols and restricted exports
|
||||||
|
libpng10_la_LDFLAGS += -Wl,--version-script=libpng.vers
|
||||||
|
libpng10_la_DEPENDENCIES = libpng.vers
|
||||||
|
else
|
||||||
|
# Only restricted exports when possible
|
||||||
|
libpng10_la_LDFLAGS += -export-symbols libpng.sym
|
||||||
|
libpng10_la_DEPENDENCIES = libpng.sym
|
||||||
|
endif
|
||||||
|
libpng_la_DEPENDENCIES = $(libpng10_la_DEPENDENCIES)
|
||||||
|
|
||||||
|
#distribute headers in /usr/include/libpng/*
|
||||||
|
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
||||||
|
pkginclude_HEADERS= png.h pngconf.h
|
||||||
|
|
||||||
|
# pkg-config stuff, note that libpng.pc is always required in order
|
||||||
|
# to get the correct library
|
||||||
|
pkgconfigdir = @pkgconfigdir@
|
||||||
|
pkgconfig_DATA = libpng10.pc
|
||||||
|
|
||||||
|
#extra source distribution files.
|
||||||
|
EXTRA_DIST= \
|
||||||
|
ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
|
||||||
|
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
|
||||||
|
${srcdir}/projects/cbuilder5/* \
|
||||||
|
${srcdir}/projects/beos/* \
|
||||||
|
${srcdir}/projects/visualc6/* \
|
||||||
|
${srcdir}/projects/visualc71/* \
|
||||||
|
${srcdir}/projects/wince.txt \
|
||||||
|
${srcdir}/projects/netware.txt \
|
||||||
|
${srcdir}/scripts/* \
|
||||||
|
${srcdir}/contrib/gregbook/* \
|
||||||
|
${srcdir}/contrib/pngminus/* \
|
||||||
|
${srcdir}/contrib/pngsuite/* \
|
||||||
|
${srcdir}/contrib/visupng/* \
|
||||||
|
$(TESTS) \
|
||||||
|
example.c libpng.txt pngvcrd.c
|
||||||
|
|
||||||
|
CLEANFILES= pngout.png libpng10.pc libpng10-config libpng.vers libpng.sym
|
||||||
|
|
||||||
|
$(PNGLIB_BASENAME).pc: libpng.pc
|
||||||
|
cp libpng.pc $@
|
||||||
|
|
||||||
|
$(PNGLIB_BASENAME)-config: libpng-config
|
||||||
|
cp libpng-config $@
|
||||||
|
|
||||||
|
libpng.sym: png.h pngconf.h
|
||||||
|
rm -f $@ $@.new
|
||||||
|
$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
|
||||||
|
$(SED) -n -e 's|^.*PNG_FUNCTION_EXPORT[ ]*\([a-zA-Z0-9_]*\).*$$|\1|p' \
|
||||||
|
-e 's|^.*PNG_DATA_EXPORT[ ]*\([a-zA-Z0-9_]*\).*$$|\1|p' \
|
||||||
|
>$@.new
|
||||||
|
mv $@.new $@
|
||||||
|
|
||||||
|
libpng.vers: libpng.sym
|
||||||
|
rm -f $@ $@.new
|
||||||
|
$(ECHO) PNG@PNGLIB_MAJOR@_0 '{global:' > $@.new
|
||||||
|
$(SED) s/$$/\;/ libpng.sym >> $@.new
|
||||||
|
$(ECHO) 'local: *; };' >> $@.new
|
||||||
|
mv $@.new $@
|
||||||
|
|
||||||
|
# install the .../include headers as links to the new ones
|
||||||
|
install-data-hook:
|
||||||
|
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||||
|
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
|
||||||
|
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h pngconf.h
|
||||||
|
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
|
||||||
|
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
||||||
|
|
||||||
|
# do evil things to libpng to cause libpng10 to be used
|
||||||
|
install-exec-hook:
|
||||||
|
cd $(DESTDIR)$(bindir); rm -f libpng-config
|
||||||
|
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
||||||
|
@set -x;\
|
||||||
|
cd $(DESTDIR)$(libdir);\
|
||||||
|
for ext in a la so; do\
|
||||||
|
rm -f libpng.$$ext;\
|
||||||
|
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-hook:
|
||||||
|
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||||
|
rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc
|
||||||
|
rm -f $(DESTDIR)$(bindir)/libpng-config
|
||||||
|
@if test -n "@compatlib@"; then\
|
||||||
|
set -x;\
|
||||||
|
cd $(DESTDIR)$(libdir);\
|
||||||
|
for ext in a la so; do\
|
||||||
|
rm -f libpng.$$ext;\
|
||||||
|
done;\
|
||||||
|
fi
|
||||||
1285
Makefile.in
Normal file
21
README
@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.0.18 - December 3, 2004 (shared library 10.0)
|
README for libpng version 1.0.19rc1 - June 13, 2006 (shared library 10.0)
|
||||||
See the note about version numbers near the top of png.h
|
See the note about version numbers near the top of png.h
|
||||||
|
|
||||||
See INSTALL for instructions on how to install libpng.
|
See INSTALL for instructions on how to install libpng.
|
||||||
@ -103,9 +103,10 @@ fix. Please mention "libpng" somewhere in the subject line. Thanks.
|
|||||||
This release was created and will be supported by myself (of course
|
This release was created and will be supported by myself (of course
|
||||||
based in a large way on Guy's and Andreas' earlier work), and the PNG group.
|
based in a large way on Guy's and Andreas' earlier work), and the PNG group.
|
||||||
|
|
||||||
glennrp at users.sourceforge.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
png-implement at ccrc.wustl.edu (subscription required; write to
|
(subscription required; visit
|
||||||
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message).
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
to subscribe) or to glennrp at users.sourceforge.net
|
||||||
|
|
||||||
You can't reach Guy, the original libpng author, at the addresses
|
You can't reach Guy, the original libpng author, at the addresses
|
||||||
given in previous versions of this document. He and Andreas will read mail
|
given in previous versions of this document. He and Andreas will read mail
|
||||||
@ -189,11 +190,11 @@ Files in this distribution:
|
|||||||
descrip.mms => VMS makefile for MMS or MMK
|
descrip.mms => VMS makefile for MMS or MMK
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||||
gcc, creates libpng10.so.0.1.0.18)
|
gcc, creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng10.so.0.1.0.18)
|
(gcc, creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.gcmmx => Linux/ELF makefile
|
makefile.gcmmx => Linux/ELF makefile
|
||||||
(gcc, creates libpng10.so.0.1.0.18,
|
(gcc, creates libpng10.so.0.1.0.19rc1,
|
||||||
uses assembler code tuned for Intel MMX platform)
|
uses assembler code tuned for Intel MMX platform)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
@ -215,12 +216,12 @@ Files in this distribution:
|
|||||||
makefile.openbsd => OpenBSD makefile
|
makefile.openbsd => OpenBSD makefile
|
||||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||||
makefile.sggcc => Silicon Graphics
|
makefile.sggcc => Silicon Graphics
|
||||||
(gcc, creates libpng10.so.0.1.0.18)
|
(gcc, creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.solaris => Solaris 2.X makefile
|
makefile.solaris => Solaris 2.X makefile
|
||||||
(gcc, creates libpng10.so.0.1.0.18)
|
(gcc, creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.so9 => Solaris 9 makefile
|
makefile.so9 => Solaris 9 makefile
|
||||||
(gcc, creates libpng10.so.0.1.0.18)
|
(gcc, creates libpng10.so.0.1.0.19rc1)
|
||||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
|
|||||||
4
Y2KINFO
@ -1,13 +1,13 @@
|
|||||||
Y2K compliance in libpng:
|
Y2K compliance in libpng:
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
December 3, 2004
|
June 13, 2006
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.0.18 are Y2K compliant. It is my belief that earlier
|
upward through 1.0.19rc1 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer
|
Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||||
|
|||||||
7268
aclocal.m4
vendored
Normal file
24
autogen.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# a quick hack script to generate necessary files from
|
||||||
|
# auto* tools.
|
||||||
|
#
|
||||||
|
# WARNING: if you run this you will change the versions
|
||||||
|
# of the tools which are used and, maybe, required!
|
||||||
|
{
|
||||||
|
echo "running libtoolize" >&2
|
||||||
|
libtoolize --copy --automake
|
||||||
|
} && {
|
||||||
|
echo "running aclocal" >&2
|
||||||
|
aclocal
|
||||||
|
} && {
|
||||||
|
echo "running autoheader [ignore the warnings]" >&2
|
||||||
|
autoheader
|
||||||
|
} && {
|
||||||
|
echo "running automake" >&2
|
||||||
|
automake --foreign -a -c
|
||||||
|
} && {
|
||||||
|
echo "running autoconf" >&2
|
||||||
|
autoconf
|
||||||
|
} &&
|
||||||
|
echo "autogen complete" >&2 ||
|
||||||
|
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2
|
||||||
1495
config.guess
vendored
Executable file
86
config.h.in
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `m' library (-lm). */
|
||||||
|
#undef HAVE_LIBM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `z' library (-lz). */
|
||||||
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
|
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||||
|
to 0 otherwise. */
|
||||||
|
#undef HAVE_MALLOC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
|
#undef HAVE_MALLOC_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memset' function. */
|
||||||
|
#undef HAVE_MEMSET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pow' function. */
|
||||||
|
#undef HAVE_POW
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||||
|
#undef TM_IN_SYS_TIME
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
|
/* Define to rpl_malloc if the replacement function should be used. */
|
||||||
|
#undef malloc
|
||||||
|
|
||||||
|
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t
|
||||||
1627
config.sub
vendored
Executable file
136
configure.ac
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
# configure.ac
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
dnl
|
||||||
|
dnl Minor upgrades (compatible ABI): increment the package version
|
||||||
|
dnl (third field in two places below) and set the PNGLIB_MINOR
|
||||||
|
dnl variable.
|
||||||
|
dnl
|
||||||
|
dnl Major upgrades (incompatible ABI): increment the package major
|
||||||
|
dnl version (second field, or first if desired), set the minor
|
||||||
|
dnl to 0, set PNGLIB_MAJOR below *and* follow the instructions in
|
||||||
|
dnl Makefile.am to upgrade the package name.
|
||||||
|
|
||||||
|
dnl This is here to prevent earlier autoconf from being used, it
|
||||||
|
dnl should not be necessary to regenerate configure if the time
|
||||||
|
dnl stamps are correct
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
|
dnl Version number stuff here:
|
||||||
|
|
||||||
|
AC_INIT([libpng], [1.0.19rc1], [png-mng-implement@lists.sourceforge.net])
|
||||||
|
AM_INIT_AUTOMAKE
|
||||||
|
dnl stop configure from automagically running automake
|
||||||
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
|
PNGLIB_VERSION=1.0.19rc1
|
||||||
|
PNGLIB_MAJOR=10
|
||||||
|
PNGLIB_MINOR=19
|
||||||
|
|
||||||
|
dnl End of version number stuff
|
||||||
|
|
||||||
|
AC_CONFIG_SRCDIR([pngget.c])
|
||||||
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_LD
|
||||||
|
AC_PROG_CPP
|
||||||
|
AC_CHECK_TOOL(SED, sed, :)
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LN_S
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_STRUCT_TM
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_FUNC_STRTOD
|
||||||
|
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
|
||||||
|
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
|
||||||
|
AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if assembler code in pnggccrd.c can be compiled])
|
||||||
|
AC_TRY_COMPILE(
|
||||||
|
[#include "pnggccrd.c"],
|
||||||
|
[return 0;],
|
||||||
|
LIBPNG_DEFINES=,
|
||||||
|
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG\ -DPNG_NO_ASSEMBLER_CODE)
|
||||||
|
if test "$LIBPNG_DEFINES"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBPNG_DEFINES)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if libraries can be versioned])
|
||||||
|
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
|
||||||
|
if test "$GLD"; then
|
||||||
|
have_ld_version_script=yes
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
have_ld_version_script=no
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_WARN(*** You have not enabled versioned symbols.)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||||
|
|
||||||
|
# Substitutions for .in files
|
||||||
|
AC_SUBST(PNGLIB_VERSION)
|
||||||
|
AC_SUBST(PNGLIB_MAJOR)
|
||||||
|
AC_SUBST(PNGLIB_MINOR)
|
||||||
|
|
||||||
|
# Additional arguments (and substitutions)
|
||||||
|
# Allow the pkg-config directory to be set
|
||||||
|
AC_ARG_WITH(pkgconfigdir,
|
||||||
|
AC_HELP_STRING([--with-pkgconfigdir],
|
||||||
|
[Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
|
||||||
|
[pkgconfigdir=${withval}],
|
||||||
|
[pkgconfigdir='${libdir}/pkgconfig'])
|
||||||
|
|
||||||
|
AC_SUBST([pkgconfigdir])
|
||||||
|
AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
|
||||||
|
|
||||||
|
# Make the *-config binary config scripts optional
|
||||||
|
AC_ARG_WITH(binconfigs,
|
||||||
|
AC_HELP_STRING([--with-binconfigs],
|
||||||
|
[Generate shell libpng-config scripts as well as pkg-config data]
|
||||||
|
[@<:@default=yes@:>@]),
|
||||||
|
[if test "${withval}" = no; then
|
||||||
|
binconfigs=
|
||||||
|
AC_MSG_NOTICE([libpng-config scripts will not be built])
|
||||||
|
else
|
||||||
|
binconfigs='${binconfigs}'
|
||||||
|
fi],
|
||||||
|
[binconfigs='${binconfigs}'])
|
||||||
|
AC_SUBST([binconfigs])
|
||||||
|
|
||||||
|
# Allow the old version number library, libpng.so, to be removed from
|
||||||
|
# the build
|
||||||
|
AC_ARG_WITH(libpng-compat,
|
||||||
|
AC_HELP_STRING([--with-libpng-compat],
|
||||||
|
[Generate the obsolete libpng.so library @<:@default=yes@:>@]),
|
||||||
|
[if test "${withval}" = no; then
|
||||||
|
compatlib=
|
||||||
|
AC_MSG_NOTICE([libpng.so will not be built])
|
||||||
|
else
|
||||||
|
compatlib=libpng.la
|
||||||
|
fi],
|
||||||
|
[compatlib=libpng.la])
|
||||||
|
AC_SUBST([compatlib])
|
||||||
|
|
||||||
|
# Config files, substituting as above
|
||||||
|
AC_CONFIG_FILES([Makefile libpng.pc:scripts/libpng.pc.in])
|
||||||
|
AC_CONFIG_FILES([libpng-config:scripts/libpng-config.in],
|
||||||
|
[chmod +x libpng-config])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
@ -20,7 +20,7 @@ Soon after the creation of PNG in 1995, the need was felt for a set of
|
|||||||
pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I
|
pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I
|
||||||
(Willem van Schaik) started such a project. Luckily we discovered this
|
(Willem van Schaik) started such a project. Luckily we discovered this
|
||||||
and merged the two together into pnmtopng.tar.gz, which is available
|
and merged the two together into pnmtopng.tar.gz, which is available
|
||||||
from a/o ftp://swrinde.nde.swri.edu/pub/png/.
|
from a/o ftp://ftp.simplesystems.org/pub/libpng/png/.
|
||||||
|
|
||||||
These two utilities have many, many options and make use of most of the
|
These two utilities have many, many options and make use of most of the
|
||||||
features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes
|
features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
# -- grayscale
|
# -- grayscale
|
||||||
./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm
|
./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm
|
||||||
./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm
|
./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
make -f makefile.std
|
make -f makefile.std
|
||||||
sh png2pnm.sh
|
sh png2pnm.sh
|
||||||
sh pnm2png.sh
|
sh pnm2png.sh
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
# -- grayscale
|
# -- grayscale
|
||||||
./pnm2png basn0g01.pgm basn0g01.png
|
./pnm2png basn0g01.pgm basn0g01.png
|
||||||
./pnm2png basn0g02.pgm basn0g02.png
|
./pnm2png basn0g02.pgm basn0g02.png
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
|
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
|
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 138 B |
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
|
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 302 B |
|
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 112 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@ -1,152 +1,152 @@
|
|||||||
//Microsoft Developer Studio generated resource script.
|
//Microsoft Developer Studio generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
#include "afxres.h"
|
#include "afxres.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// English (U.S.) resources
|
// English (U.S.) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// TEXTINCLUDE
|
// TEXTINCLUDE
|
||||||
//
|
//
|
||||||
|
|
||||||
1 TEXTINCLUDE DISCARDABLE
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"resource.h\0"
|
"resource.h\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
2 TEXTINCLUDE DISCARDABLE
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""afxres.h""\r\n"
|
"#include ""afxres.h""\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
3 TEXTINCLUDE DISCARDABLE
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"\r\n"
|
"\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Menu
|
// Menu
|
||||||
//
|
//
|
||||||
|
|
||||||
VISUALPNG MENU DISCARDABLE
|
VISUALPNG MENU DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&File"
|
POPUP "&File"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Open Image...\tCtrl+O", IDM_FILE_OPEN
|
MENUITEM "&Open Image...\tCtrl+O", IDM_FILE_OPEN
|
||||||
MENUITEM "Save &As...", IDM_FILE_SAVE
|
MENUITEM "Save &As...", IDM_FILE_SAVE
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Next Image\tCtrl+N", IDM_FILE_NEXT
|
MENUITEM "&Next Image\tCtrl+N", IDM_FILE_NEXT
|
||||||
MENUITEM "Pre&vious Image\tCtrl+V", IDM_FILE_PREVIOUS
|
MENUITEM "Pre&vious Image\tCtrl+V", IDM_FILE_PREVIOUS
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "E&xit\tAlt+X", IDM_FILE_EXIT
|
MENUITEM "E&xit\tAlt+X", IDM_FILE_EXIT
|
||||||
END
|
END
|
||||||
POPUP "&Options"
|
POPUP "&Options"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Stretch", IDM_OPTIONS_STRETCH, CHECKED
|
MENUITEM "&Stretch", IDM_OPTIONS_STRETCH, CHECKED
|
||||||
END
|
END
|
||||||
POPUP "&Help"
|
POPUP "&Help"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&About", IDM_HELP_ABOUT
|
MENUITEM "&About", IDM_HELP_ABOUT
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Accelerator
|
// Accelerator
|
||||||
//
|
//
|
||||||
|
|
||||||
VISUALPNG ACCELERATORS DISCARDABLE
|
VISUALPNG ACCELERATORS DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"N", IDM_FILE_NEXT, VIRTKEY, CONTROL, NOINVERT
|
"N", IDM_FILE_NEXT, VIRTKEY, CONTROL, NOINVERT
|
||||||
"O", IDM_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT
|
"O", IDM_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT
|
||||||
"P", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT
|
"P", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT
|
||||||
"V", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT
|
"V", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT
|
||||||
"X", IDM_FILE_EXIT, VIRTKEY, ALT, NOINVERT
|
"X", IDM_FILE_EXIT, VIRTKEY, ALT, NOINVERT
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Icon
|
// Icon
|
||||||
//
|
//
|
||||||
|
|
||||||
// Icon with lowest ID value placed first to ensure application icon
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
// remains consistent on all systems.
|
// remains consistent on all systems.
|
||||||
VISUALPNG ICON DISCARDABLE "VisualPng.ico"
|
VISUALPNG ICON DISCARDABLE "VisualPng.ico"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
ABOUTBOX DIALOG DISCARDABLE 0, 0, 186, 94
|
ABOUTBOX DIALOG DISCARDABLE 0, 0, 186, 94
|
||||||
STYLE DS_MODALFRAME | WS_POPUP
|
STYLE DS_MODALFRAME | WS_POPUP
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,68,67,50,14
|
DEFPUSHBUTTON "OK",IDOK,68,67,50,14
|
||||||
CTEXT "VisualPng 1.0 - June 2000",IDC_STATIC,49,14,88,8
|
CTEXT "VisualPng 1.0 - June 2000",IDC_STATIC,49,14,88,8
|
||||||
LTEXT "a PNG image viewer",IDC_STATIC,60,30,66,8
|
LTEXT "a PNG image viewer",IDC_STATIC,60,30,66,8
|
||||||
LTEXT "(c) Willem van Schaik, 2000",IDC_STATIC,48,52,90,8
|
LTEXT "(c) Willem van Schaik, 2000",IDC_STATIC,48,52,90,8
|
||||||
LTEXT "to demonstrate the use of libpng in Visual C",
|
LTEXT "to demonstrate the use of libpng in Visual C",
|
||||||
IDC_STATIC,25,38,136,8
|
IDC_STATIC,25,38,136,8
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// DESIGNINFO
|
// DESIGNINFO
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"ABOUTBOX", DIALOG
|
"ABOUTBOX", DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 179
|
RIGHTMARGIN, 179
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 87
|
BOTTOMMARGIN, 87
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
#ifndef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#endif // not APSTUDIO_INVOKED
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|||||||
411
depcomp
Executable file
@ -0,0 +1,411 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# `libtool' can also be set to `yes' or `no'.
|
||||||
|
|
||||||
|
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say).
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||||
|
## The second -e expression handles DOS-style file names with drive letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the `deleted header file' problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" |
|
||||||
|
## Some versions of gcc put a space before the `:'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||||
|
tr '
|
||||||
|
' ' ' >> $depfile
|
||||||
|
echo >> $depfile
|
||||||
|
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> $depfile
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. This file always lives in the current directory.
|
||||||
|
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||||
|
# $object doesn't have directory information.
|
||||||
|
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||||
|
tmpdepfile="$stripped.u"
|
||||||
|
outname="$stripped.o"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
|
||||||
|
tmpdepfile1="$object.d"
|
||||||
|
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile1"; then
|
||||||
|
tmpdepfile="$tmpdepfile1"
|
||||||
|
else
|
||||||
|
tmpdepfile="$tmpdepfile2"
|
||||||
|
fi
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a space and a tab in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the proprocessed file to stdout, regardless of -o,
|
||||||
|
# because we must use -o when running libtool.
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
( IFS=" "
|
||||||
|
case " $* " in
|
||||||
|
*" --mode=compile "*) # this is libtool, let us make it quiet
|
||||||
|
for arg
|
||||||
|
do # cycle over the arguments
|
||||||
|
case "$arg" in
|
||||||
|
"--mode=compile")
|
||||||
|
# insert --quiet before "--mode=compile"
|
||||||
|
set fnord "$@" --quiet
|
||||||
|
shift # fnord
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # "$arg"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
|
) &
|
||||||
|
proc=$!
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
wait "$proc"
|
||||||
|
if test "$stat" != 0; then exit $stat; fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
# X makedepend
|
||||||
|
(
|
||||||
|
shift
|
||||||
|
cleared=no
|
||||||
|
for arg in "$@"; do
|
||||||
|
case $cleared in no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes
|
||||||
|
esac
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift;;
|
||||||
|
-*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
) &
|
||||||
|
proc=$!
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
wait "$proc"
|
||||||
|
if test "$stat" != 0; then exit $stat; fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
tail +3 "$tmpdepfile" | tr ' ' '
|
||||||
|
' | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the proprocessed file to stdout, regardless of -o,
|
||||||
|
# because we must use -o when running libtool.
|
||||||
|
( IFS=" "
|
||||||
|
case " $* " in
|
||||||
|
*" --mode=compile "*)
|
||||||
|
for arg
|
||||||
|
do # cycle over the arguments
|
||||||
|
case $arg in
|
||||||
|
"--mode=compile")
|
||||||
|
# insert --quiet before "--mode=compile"
|
||||||
|
set fnord "$@" --quiet
|
||||||
|
shift # fnord
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # "$arg"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
"$@" -E |
|
||||||
|
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
) &
|
||||||
|
proc=$!
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
wait "$proc"
|
||||||
|
if test "$stat" != 0; then exit $stat; fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the proprocessed file to stdout, regardless of -o,
|
||||||
|
# because we must use -o when running libtool.
|
||||||
|
( IFS=" "
|
||||||
|
case " $* " in
|
||||||
|
*" --mode=compile "*)
|
||||||
|
for arg
|
||||||
|
do # cycle over the arguments
|
||||||
|
case $arg in
|
||||||
|
"--mode=compile")
|
||||||
|
# insert --quiet before "--mode=compile"
|
||||||
|
set fnord "$@" --quiet
|
||||||
|
shift # fnord
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # "$arg"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
"$@" -E |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||||
|
) &
|
||||||
|
proc=$!
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
wait "$proc"
|
||||||
|
if test "$stat" != 0; then exit $stat; fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
echo " " >> "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
14
example.c
@ -1,7 +1,13 @@
|
|||||||
|
|
||||||
#if 0 /* in case someone actually tries to compile this */
|
#if 0 /* in case someone actually tries to compile this */
|
||||||
|
|
||||||
/* example.c - an example of using libpng */
|
/* example.c - an example of using libpng
|
||||||
|
* Last changed in libpng 1.2.1 December 7, 2001.
|
||||||
|
* This file has been placed in the public domain by the authors.
|
||||||
|
* Maintained 1998-2001 Glenn Randers-Pehrson
|
||||||
|
* Maintained 1996, 1997 Andreas Dilger)
|
||||||
|
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
*/
|
||||||
|
|
||||||
/* This is an example of how to use libpng to read and write PNG files.
|
/* This is an example of how to use libpng to read and write PNG files.
|
||||||
* The file libpng.txt is much more verbose then this. If you have not
|
* The file libpng.txt is much more verbose then this. If you have not
|
||||||
@ -194,7 +200,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
|
|||||||
|
|
||||||
/* Expand paletted colors into true RGB triplets */
|
/* Expand paletted colors into true RGB triplets */
|
||||||
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
png_set_palette_rgb(png_ptr);
|
png_set_palette_to_rgb(png_ptr);
|
||||||
|
|
||||||
/* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
|
/* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
|
||||||
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
|
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
|
||||||
@ -490,10 +496,10 @@ row_callback(png_structp png_ptr, png_bytep new_row,
|
|||||||
* In this function you will receive a pointer to new row data from
|
* In this function you will receive a pointer to new row data from
|
||||||
* libpng called new_row that is to replace a corresponding row (of
|
* libpng called new_row that is to replace a corresponding row (of
|
||||||
* the same data format) in a buffer allocated by your application.
|
* the same data format) in a buffer allocated by your application.
|
||||||
*
|
*
|
||||||
* The new row data pointer new_row may be NULL, indicating there is
|
* The new row data pointer new_row may be NULL, indicating there is
|
||||||
* no new data to be replaced (in cases of interlace loading).
|
* no new data to be replaced (in cases of interlace loading).
|
||||||
*
|
*
|
||||||
* If new_row is not NULL then you need to call
|
* If new_row is not NULL then you need to call
|
||||||
* png_progressive_combine_row() to replace the corresponding row as
|
* png_progressive_combine_row() to replace the corresponding row as
|
||||||
* shown below:
|
* shown below:
|
||||||
|
|||||||
251
install-sh
Executable file
@ -0,0 +1,251 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||||
|
#
|
||||||
|
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
# documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
# the above copyright notice appear in all copies and that both that
|
||||||
|
# copyright notice and this permission notice appear in supporting
|
||||||
|
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||||
|
# publicity pertaining to distribution of the software without specific,
|
||||||
|
# written prior permission. M.I.T. makes no representations about the
|
||||||
|
# suitability of this software for any purpose. It is provided "as is"
|
||||||
|
# without express or implied warranty.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch. It can only install one file at a time, a restriction
|
||||||
|
# shared with many OS's install programs.
|
||||||
|
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit="${DOITPROG-}"
|
||||||
|
|
||||||
|
|
||||||
|
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||||
|
|
||||||
|
mvprog="${MVPROG-mv}"
|
||||||
|
cpprog="${CPPROG-cp}"
|
||||||
|
chmodprog="${CHMODPROG-chmod}"
|
||||||
|
chownprog="${CHOWNPROG-chown}"
|
||||||
|
chgrpprog="${CHGRPPROG-chgrp}"
|
||||||
|
stripprog="${STRIPPROG-strip}"
|
||||||
|
rmprog="${RMPROG-rm}"
|
||||||
|
mkdirprog="${MKDIRPROG-mkdir}"
|
||||||
|
|
||||||
|
transformbasename=""
|
||||||
|
transform_arg=""
|
||||||
|
instcmd="$mvprog"
|
||||||
|
chmodcmd="$chmodprog 0755"
|
||||||
|
chowncmd=""
|
||||||
|
chgrpcmd=""
|
||||||
|
stripcmd=""
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
mvcmd="$mvprog"
|
||||||
|
src=""
|
||||||
|
dst=""
|
||||||
|
dir_arg=""
|
||||||
|
|
||||||
|
while [ x"$1" != x ]; do
|
||||||
|
case $1 in
|
||||||
|
-c) instcmd="$cpprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-d) dir_arg=true
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-m) chmodcmd="$chmodprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-s) stripcmd="$stripprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
*) if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
src=$1
|
||||||
|
else
|
||||||
|
# this colon is to work around a 386BSD /bin/sh bug
|
||||||
|
:
|
||||||
|
dst=$1
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no input file specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]; then
|
||||||
|
dst=$src
|
||||||
|
src=""
|
||||||
|
|
||||||
|
if [ -d $dst ]; then
|
||||||
|
instcmd=:
|
||||||
|
chmodcmd=""
|
||||||
|
else
|
||||||
|
instcmd=mkdir
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
|
||||||
|
if [ -f $src -o -d $src ]
|
||||||
|
then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
echo "install: $src does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dst" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no destination specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; if your system
|
||||||
|
# does not like double slashes in filenames, you may need to add some logic
|
||||||
|
|
||||||
|
if [ -d $dst ]
|
||||||
|
then
|
||||||
|
dst="$dst"/`basename $src`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
## this sed command emulates the dirname command
|
||||||
|
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||||
|
|
||||||
|
# Make sure that the destination directory exists.
|
||||||
|
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||||
|
|
||||||
|
# Skip lots of stat calls in the usual case.
|
||||||
|
if [ ! -d "$dstdir" ]; then
|
||||||
|
defaultIFS='
|
||||||
|
'
|
||||||
|
IFS="${IFS-${defaultIFS}}"
|
||||||
|
|
||||||
|
oIFS="${IFS}"
|
||||||
|
# Some sh's can't handle IFS=/ for some reason.
|
||||||
|
IFS='%'
|
||||||
|
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||||
|
IFS="${oIFS}"
|
||||||
|
|
||||||
|
pathcomp=''
|
||||||
|
|
||||||
|
while [ $# -ne 0 ] ; do
|
||||||
|
pathcomp="${pathcomp}${1}"
|
||||||
|
shift
|
||||||
|
|
||||||
|
if [ ! -d "${pathcomp}" ] ;
|
||||||
|
then
|
||||||
|
$mkdirprog "${pathcomp}"
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
pathcomp="${pathcomp}/"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]
|
||||||
|
then
|
||||||
|
$doit $instcmd $dst &&
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# If we're going to rename the final executable, determine the name now.
|
||||||
|
|
||||||
|
if [ x"$transformarg" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
dstfile=`basename $dst $transformbasename |
|
||||||
|
sed $transformarg`$transformbasename
|
||||||
|
fi
|
||||||
|
|
||||||
|
# don't allow the sed command to completely eliminate the filename
|
||||||
|
|
||||||
|
if [ x"$dstfile" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make a temp file name in the proper directory.
|
||||||
|
|
||||||
|
dsttmp=$dstdir/#inst.$$#
|
||||||
|
|
||||||
|
# Move or copy the file name to the temp name
|
||||||
|
|
||||||
|
$doit $instcmd $src $dsttmp &&
|
||||||
|
|
||||||
|
trap "rm -f ${dsttmp}" 0 &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits
|
||||||
|
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
|
||||||
|
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||||
|
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||||
|
|
||||||
|
fi &&
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
99
libpng.3
@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "December 3, 2004"
|
.TH LIBPNG 3 "June 13, 2006"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.18
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.19rc1
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fI\fB
|
\fI\fB
|
||||||
|
|
||||||
@ -176,6 +176,14 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.18
|
|||||||
|
|
||||||
\fI\fB
|
\fI\fB
|
||||||
|
|
||||||
|
\fB#if \fI!defined(PNG_1_0_X)
|
||||||
|
|
||||||
|
\fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB#endif
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||||
|
|
||||||
\fI\fB
|
\fI\fB
|
||||||
@ -258,6 +266,22 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.18
|
|||||||
|
|
||||||
\fI\fB
|
\fI\fB
|
||||||
|
|
||||||
|
\fB#if \fI!defined(PNG_1_0_X)
|
||||||
|
|
||||||
|
\fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
|
\fBpng_uint_32 png_get_uint_31 (png_bytep \fIbuf\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
|
\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB#endif
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
\fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP
|
\fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP
|
||||||
|
|
||||||
\fI\fB
|
\fI\fB
|
||||||
@ -404,6 +428,18 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.18
|
|||||||
|
|
||||||
\fB#if \fI!defined(PNG_1_0_X)
|
\fB#if \fI!defined(PNG_1_0_X)
|
||||||
|
|
||||||
|
\fBpng_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
|
\fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
|
\fBvoid png_save_uint_32 (png_bytep \fP\fIbuf\fP\fB, png_uint_32 \fIi\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
\fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP
|
\fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP
|
||||||
|
|
||||||
\fI\fB#endif
|
\fI\fB#endif
|
||||||
@ -466,6 +502,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.18
|
|||||||
|
|
||||||
\fI\fB
|
\fI\fB
|
||||||
|
|
||||||
|
\fBvoid png_set_expand_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP
|
||||||
|
|
||||||
|
\fI\fB
|
||||||
|
|
||||||
\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP
|
\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP
|
||||||
|
|
||||||
\fI\fB
|
\fI\fB
|
||||||
@ -781,10 +821,10 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng.txt - A description on how to use and modify libpng
|
libpng.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.0.18 - December 3, 2004
|
libpng version 1.0.19rc1 - June 13, 2006
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||||
For conditions of distribution and use, see copyright
|
For conditions of distribution and use, see copyright
|
||||||
notice in png.h.
|
notice in png.h.
|
||||||
|
|
||||||
@ -1998,8 +2038,8 @@ the second parameter NULL.
|
|||||||
|
|
||||||
.SS Finishing a sequential read
|
.SS Finishing a sequential read
|
||||||
|
|
||||||
After you are finished reading the image through either the high- or
|
After you are finished reading the image through the
|
||||||
low-level interfaces, you can finish reading the file. If you are
|
low-level interface, you can finish reading the file. If you are
|
||||||
interested in comments or time, which may be stored either before or
|
interested in comments or time, which may be stored either before or
|
||||||
after the image data, you should pass the separate png_info struct if
|
after the image data, you should pass the separate png_info struct if
|
||||||
you want to keep the comments from before and after the image
|
you want to keep the comments from before and after the image
|
||||||
@ -2346,6 +2386,14 @@ Libpng section below.
|
|||||||
|
|
||||||
png_init_io(png_ptr, fp);
|
png_init_io(png_ptr, fp);
|
||||||
|
|
||||||
|
If you are embedding your PNG into a datastream such as MNG, and don't
|
||||||
|
want libpng to write the 8-byte signature, or if you have already
|
||||||
|
written the signature in your application, use
|
||||||
|
|
||||||
|
png_set_sig_bytes(png_ptr, 8);
|
||||||
|
|
||||||
|
to inform libpng that it should not write a signature.
|
||||||
|
|
||||||
.SS Write callbacks
|
.SS Write callbacks
|
||||||
|
|
||||||
At this point, you can set up a callback function that will be
|
At this point, you can set up a callback function that will be
|
||||||
@ -3209,7 +3257,7 @@ to use the "cexcept" facility (see http://cexcept.sourceforge.net).
|
|||||||
If you need to read or write custom chunks, you may need to get deeper
|
If you need to read or write custom chunks, you may need to get deeper
|
||||||
into the libpng code. The library now has mechanisms for storing
|
into the libpng code. The library now has mechanisms for storing
|
||||||
and writing chunks of unknown type; you can even declare callbacks
|
and writing chunks of unknown type; you can even declare callbacks
|
||||||
for custom chunks. Hoewver, this may not be good enough if the
|
for custom chunks. However, this may not be good enough if the
|
||||||
library code itself needs to know about interactions between your
|
library code itself needs to know about interactions between your
|
||||||
chunk and existing `intrinsic' chunks.
|
chunk and existing `intrinsic' chunks.
|
||||||
|
|
||||||
@ -3535,13 +3583,13 @@ application:
|
|||||||
|
|
||||||
.SH VIII. Y2K Compliance in libpng
|
.SH VIII. Y2K Compliance in libpng
|
||||||
|
|
||||||
December 3, 2004
|
June 13, 2006
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.0.18 are Y2K compliant. It is my belief that earlier
|
upward through 1.0.19rc1 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
@ -3685,15 +3733,25 @@ the first widely used release:
|
|||||||
1.0.16 10 10016 10.so.0.1.0.16
|
1.0.16 10 10016 10.so.0.1.0.16
|
||||||
1.2.6 13 10206 12.so.0.1.2.6
|
1.2.6 13 10206 12.so.0.1.2.6
|
||||||
1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
|
1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
|
||||||
1.0.17rc1 10 10017 12.so.0.1.0.17rc1
|
1.0.17rc1 10 10017 10.so.0.1.0.17rc1
|
||||||
1.2.7rc1 13 10207 12.so.0.1.2.7rc1
|
1.2.7rc1 13 10207 12.so.0.1.2.7rc1
|
||||||
1.0.17 10 10017 12.so.0.1.0.17
|
1.0.17 10 10017 10.so.0.1.0.17
|
||||||
1.2.7 13 10207 12.so.0.1.2.7
|
1.2.7 13 10207 12.so.0.1.2.7
|
||||||
1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
|
1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
|
||||||
1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
|
1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
|
||||||
1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
|
1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
|
||||||
1.0.18 10 10018 12.so.0.1.0.18
|
1.0.18 10 10018 10.so.0.1.0.18
|
||||||
1.2.8 13 10208 12.so.0.1.2.8
|
1.2.8 13 10208 12.so.0.1.2.8
|
||||||
|
1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
|
||||||
|
1.2.9beta4-11 13 10209 12.so.0.9[.0]
|
||||||
|
1.2.9rc1 13 10209 12.so.0.9[.0]
|
||||||
|
1.2.9 13 10209 12.so.0.9[.0]
|
||||||
|
1.2.10beta1-8 13 10210 12.so.0.10[.0]
|
||||||
|
1.2.10rc1-3 13 10210 12.so.0.10[.0]
|
||||||
|
1.2.10 13 10210 12.so.0.10[.0]
|
||||||
|
1.2.11beta1-4 13 10211 12.so.0.11[.0]
|
||||||
|
1.0.19rc1 10 10019 10.so.0.19[.0]
|
||||||
|
1.2.11rc1 13 10211 12.so.0.11[.0]
|
||||||
|
|
||||||
Henceforth the source version will match the shared-library minor
|
Henceforth the source version will match the shared-library minor
|
||||||
and patch numbers; the shared-library major version number will be
|
and patch numbers; the shared-library major version number will be
|
||||||
@ -3749,14 +3807,17 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.0.18 - December 3, 2004:
|
Libpng version 1.0.19rc1 - June 13, 2006:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
Supported by the PNG development group
|
Supported by the PNG development group
|
||||||
.br
|
.br
|
||||||
png-implement at ccrc.wustl.edu (subscription required; write to
|
png-mng-implement at lists.sf.net
|
||||||
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message).
|
(subscription required; visit
|
||||||
|
png-mng-implement at lists.sourceforge.net (subscription required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
to subscribe).
|
||||||
|
|
||||||
.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||||
|
|
||||||
@ -3767,8 +3828,8 @@ included in the libpng distribution, the latter shall prevail.)
|
|||||||
If you modify libpng you may insert additional notices immediately following
|
If you modify libpng you may insert additional notices immediately following
|
||||||
this sentence.
|
this sentence.
|
||||||
|
|
||||||
libpng version 1.2.6, December 3, 2004, is
|
libpng versions 1.2.6, August 15, 2004, through 1.0.19rc1, June 13, 2006, are
|
||||||
Copyright (c) 2004 Glenn Randers-Pehrson, and is
|
Copyright (c) 2004-2006 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
|
|
||||||
@ -3866,7 +3927,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
December 3, 2004
|
June 13, 2006
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
|||||||
22
libpng.txt
@ -1,9 +1,9 @@
|
|||||||
libpng.txt - A description on how to use and modify libpng
|
libpng.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.0.18 - December 3, 2004
|
libpng version 1.0.19rc1 - June 13, 2006
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||||
For conditions of distribution and use, see copyright
|
For conditions of distribution and use, see copyright
|
||||||
notice in png.h.
|
notice in png.h.
|
||||||
|
|
||||||
@ -1217,8 +1217,8 @@ the second parameter NULL.
|
|||||||
|
|
||||||
Finishing a sequential read
|
Finishing a sequential read
|
||||||
|
|
||||||
After you are finished reading the image through either the high- or
|
After you are finished reading the image through the
|
||||||
low-level interfaces, you can finish reading the file. If you are
|
low-level interface, you can finish reading the file. If you are
|
||||||
interested in comments or time, which may be stored either before or
|
interested in comments or time, which may be stored either before or
|
||||||
after the image data, you should pass the separate png_info struct if
|
after the image data, you should pass the separate png_info struct if
|
||||||
you want to keep the comments from before and after the image
|
you want to keep the comments from before and after the image
|
||||||
@ -1565,6 +1565,14 @@ Libpng section below.
|
|||||||
|
|
||||||
png_init_io(png_ptr, fp);
|
png_init_io(png_ptr, fp);
|
||||||
|
|
||||||
|
If you are embedding your PNG into a datastream such as MNG, and don't
|
||||||
|
want libpng to write the 8-byte signature, or if you have already
|
||||||
|
written the signature in your application, use
|
||||||
|
|
||||||
|
png_set_sig_bytes(png_ptr, 8);
|
||||||
|
|
||||||
|
to inform libpng that it should not write a signature.
|
||||||
|
|
||||||
Write callbacks
|
Write callbacks
|
||||||
|
|
||||||
At this point, you can set up a callback function that will be
|
At this point, you can set up a callback function that will be
|
||||||
@ -2428,7 +2436,7 @@ Custom chunks
|
|||||||
If you need to read or write custom chunks, you may need to get deeper
|
If you need to read or write custom chunks, you may need to get deeper
|
||||||
into the libpng code. The library now has mechanisms for storing
|
into the libpng code. The library now has mechanisms for storing
|
||||||
and writing chunks of unknown type; you can even declare callbacks
|
and writing chunks of unknown type; you can even declare callbacks
|
||||||
for custom chunks. Hoewver, this may not be good enough if the
|
for custom chunks. However, this may not be good enough if the
|
||||||
library code itself needs to know about interactions between your
|
library code itself needs to know about interactions between your
|
||||||
chunk and existing `intrinsic' chunks.
|
chunk and existing `intrinsic' chunks.
|
||||||
|
|
||||||
@ -2754,13 +2762,13 @@ application:
|
|||||||
|
|
||||||
VIII. Y2K Compliance in libpng
|
VIII. Y2K Compliance in libpng
|
||||||
|
|
||||||
December 3, 2004
|
June 13, 2006
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.0.18 are Y2K compliant. It is my belief that earlier
|
upward through 1.0.19rc1 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
|
|||||||
572
libpngpf.3
283
missing
Executable file
@ -0,0 +1,283 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Common stub for a few missing GNU programs while installing.
|
||||||
|
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
run=:
|
||||||
|
|
||||||
|
# In the cases where this matters, `missing' is being run in the
|
||||||
|
# srcdir already.
|
||||||
|
if test -f configure.ac; then
|
||||||
|
configure_ac=configure.ac
|
||||||
|
else
|
||||||
|
configure_ac=configure.in
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--run)
|
||||||
|
# Try to run requested program, and just exit if it succeeds.
|
||||||
|
run=
|
||||||
|
shift
|
||||||
|
"$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If it does not exist, or fails to run (possibly an outdated version),
|
||||||
|
# try to emulate it.
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||||
|
error status if there is no known handling for PROGRAM.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
--run try to run the given command, and emulate it if it fails
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal touch file \`aclocal.m4'
|
||||||
|
autoconf touch file \`configure'
|
||||||
|
autoheader touch file \`config.h.in'
|
||||||
|
automake touch all \`Makefile.in' files
|
||||||
|
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
flex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
help2man touch the output file
|
||||||
|
lex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
makeinfo touch the output file
|
||||||
|
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||||
|
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||||
|
;;
|
||||||
|
|
||||||
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
|
echo "missing 0.3 - GNU automake"
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
echo 1>&2 "$0: Unknown \`$1' option"
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
aclocal)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||||
|
any GNU archive site."
|
||||||
|
touch aclocal.m4
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoconf)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified \`${configure_ac}'. You might want to install the
|
||||||
|
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||||
|
archive site."
|
||||||
|
touch configure
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoheader)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||||
|
from any GNU archive site."
|
||||||
|
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||||
|
test -z "$files" && files="config.h"
|
||||||
|
touch_files=
|
||||||
|
for f in $files; do
|
||||||
|
case "$f" in
|
||||||
|
*:*) touch_files="$touch_files "`echo "$f" |
|
||||||
|
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||||
|
*) touch_files="$touch_files $f.in";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
touch $touch_files
|
||||||
|
;;
|
||||||
|
|
||||||
|
automake)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||||
|
You might want to install the \`Automake' and \`Perl' packages.
|
||||||
|
Grab them from any GNU archive site."
|
||||||
|
find . -type f -name Makefile.am -print |
|
||||||
|
sed 's/\.am$/.in/' |
|
||||||
|
while read f; do touch "$f"; done
|
||||||
|
;;
|
||||||
|
|
||||||
|
bison|yacc)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified a \`.y' file. You may need the \`Bison' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Bison' from any GNU archive site."
|
||||||
|
rm -f y.tab.c y.tab.h
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case "$LASTARG" in
|
||||||
|
*.y)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||||
|
if [ -f "$SRCFILE" ]; then
|
||||||
|
cp "$SRCFILE" y.tab.c
|
||||||
|
fi
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||||
|
if [ -f "$SRCFILE" ]; then
|
||||||
|
cp "$SRCFILE" y.tab.h
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if [ ! -f y.tab.h ]; then
|
||||||
|
echo >y.tab.h
|
||||||
|
fi
|
||||||
|
if [ ! -f y.tab.c ]; then
|
||||||
|
echo 'main() { return 0; }' >y.tab.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
lex|flex)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified a \`.l' file. You may need the \`Flex' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Flex' from any GNU archive site."
|
||||||
|
rm -f lex.yy.c
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case "$LASTARG" in
|
||||||
|
*.l)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||||
|
if [ -f "$SRCFILE" ]; then
|
||||||
|
cp "$SRCFILE" lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if [ ! -f lex.yy.c ]; then
|
||||||
|
echo 'main() { return 0; }' >lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
help2man)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified a dependency of a manual page. You may need the
|
||||||
|
\`Help2man' package in order for those modifications to take
|
||||||
|
effect. You can get \`Help2man' from any GNU archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||||
|
if test -z "$file"; then
|
||||||
|
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||||
|
fi
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo ".ab help2man is required to generate this page"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
makeinfo)
|
||||||
|
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||||
|
# We have makeinfo, but it failed.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is missing on your system. You should only need it if
|
||||||
|
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||||
|
indirectly affecting the aspect of the manual. The spurious
|
||||||
|
call might also be the consequence of using a buggy \`make' (AIX,
|
||||||
|
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||||
|
the \`GNU make' package. Grab either from any GNU archive site."
|
||||||
|
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||||
|
if test -z "$file"; then
|
||||||
|
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||||
|
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||||
|
fi
|
||||||
|
touch $file
|
||||||
|
;;
|
||||||
|
|
||||||
|
tar)
|
||||||
|
shift
|
||||||
|
if test -n "$run"; then
|
||||||
|
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We have already tried tar in the generic part.
|
||||||
|
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||||
|
# messages.
|
||||||
|
if (gnutar --version > /dev/null 2>&1); then
|
||||||
|
gnutar ${1+"$@"} && exit 0
|
||||||
|
fi
|
||||||
|
if (gtar --version > /dev/null 2>&1); then
|
||||||
|
gtar ${1+"$@"} && exit 0
|
||||||
|
fi
|
||||||
|
firstarg="$1"
|
||||||
|
if shift; then
|
||||||
|
case "$firstarg" in
|
||||||
|
*o*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/o//`
|
||||||
|
tar "$firstarg" ${1+"$@"} && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$firstarg" in
|
||||||
|
*h*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/h//`
|
||||||
|
tar "$firstarg" ${1+"$@"} && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||||
|
You may want to install GNU tar or Free paxutils, or check the
|
||||||
|
command line arguments."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||||
|
system. You might have modified some files without having the
|
||||||
|
proper tools for further handling them. Check the \`README' file,
|
||||||
|
it often tells you about the needed prerequirements for installing
|
||||||
|
this package. You may also peek at any GNU archive site, in case
|
||||||
|
some other package would contain this missing \`$1' program."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
40
mkinstalldirs
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# mkinstalldirs --- make directory hierarchy
|
||||||
|
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||||
|
# Created: 1993-05-16
|
||||||
|
# Public domain
|
||||||
|
|
||||||
|
# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
|
||||||
|
|
||||||
|
errstatus=0
|
||||||
|
|
||||||
|
for file
|
||||||
|
do
|
||||||
|
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||||
|
shift
|
||||||
|
|
||||||
|
pathcomp=
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
pathcomp="$pathcomp$d"
|
||||||
|
case "$pathcomp" in
|
||||||
|
-* ) pathcomp=./$pathcomp ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test ! -d "$pathcomp"; then
|
||||||
|
echo "mkdir $pathcomp"
|
||||||
|
|
||||||
|
mkdir "$pathcomp" || lasterr=$?
|
||||||
|
|
||||||
|
if test ! -d "$pathcomp"; then
|
||||||
|
errstatus=$lasterr
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
pathcomp="$pathcomp/"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $errstatus
|
||||||
|
|
||||||
|
# mkinstalldirs ends here
|
||||||
4
png.5
@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "December 3, 2004"
|
.TH PNG 5 "June 13, 2006"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
@ -58,7 +58,7 @@ Thomas Boutell and others (png-list).
|
|||||||
|
|
||||||
.SH COPYRIGHT NOTICE
|
.SH COPYRIGHT NOTICE
|
||||||
.LP
|
.LP
|
||||||
This man page is Copyright (c) 1998-2004 Glenn Randers-Pehrson. See png.h
|
This man page is Copyright (c) 1998-2006 Glenn Randers-Pehrson. See png.h
|
||||||
for conditions of use and distribution.
|
for conditions of use and distribution.
|
||||||
.LP
|
.LP
|
||||||
The PNG Specification (Second Edition) is
|
The PNG Specification (Second Edition) is
|
||||||
|
|||||||
35
png.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef version_1_0_18 Your_png_h_is_not_version_1_0_18;
|
typedef version_1_0_19rc1 Your_png_h_is_not_version_1_0_19rc1;
|
||||||
|
|
||||||
/* Version information for C files. This had better match the version
|
/* Version information for C files. This had better match the version
|
||||||
* string defined in png.h. */
|
* string defined in png.h. */
|
||||||
@ -22,9 +22,12 @@ typedef version_1_0_18 Your_png_h_is_not_version_1_0_18;
|
|||||||
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
||||||
const char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
|
const char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
|
||||||
/* png_sig was changed to a function in version 1.0.5c */
|
/* png_sig was changed to a function in version 1.0.5c */
|
||||||
/* Place to hold the signature string for a PNG file. */
|
/* Place to hold the signature string for a PNG file. */
|
||||||
const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|
||||||
/* Invoke global declarations for constant strings for known chunk types */
|
/* Invoke global declarations for constant strings for known chunk types */
|
||||||
PNG_IHDR;
|
PNG_IHDR;
|
||||||
@ -49,6 +52,7 @@ PNG_tIME;
|
|||||||
PNG_tRNS;
|
PNG_tRNS;
|
||||||
PNG_zTXt;
|
PNG_zTXt;
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
|
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
|
||||||
|
|
||||||
/* start of interlace block */
|
/* start of interlace block */
|
||||||
@ -80,6 +84,7 @@ const int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
|||||||
const int FARDATA png_pass_dsp_mask[]
|
const int FARDATA png_pass_dsp_mask[]
|
||||||
= {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
|
= {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
|
||||||
|
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
#endif /* PNG_USE_GLOBAL_ARRAYS */
|
#endif /* PNG_USE_GLOBAL_ARRAYS */
|
||||||
|
|
||||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||||
@ -88,6 +93,7 @@ const int FARDATA png_pass_dsp_mask[]
|
|||||||
* or write any of the magic bytes before it starts on the IHDR.
|
* or write any of the magic bytes before it starts on the IHDR.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
|
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
|
||||||
{
|
{
|
||||||
@ -113,10 +119,10 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
|
|||||||
if (num_to_check > 8)
|
if (num_to_check > 8)
|
||||||
num_to_check = 8;
|
num_to_check = 8;
|
||||||
else if (num_to_check < 1)
|
else if (num_to_check < 1)
|
||||||
return (0);
|
return (-1);
|
||||||
|
|
||||||
if (start > 7)
|
if (start > 7)
|
||||||
return (0);
|
return (-1);
|
||||||
|
|
||||||
if (start + num_to_check > 8)
|
if (start + num_to_check > 8)
|
||||||
num_to_check = 8 - start;
|
num_to_check = 8 - start;
|
||||||
@ -124,6 +130,7 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
|
|||||||
return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
|
return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
||||||
/* (Obsolete) function to check signature bytes. It does not allow one
|
/* (Obsolete) function to check signature bytes. It does not allow one
|
||||||
* to check a partial signature. This function might be removed in the
|
* to check a partial signature. This function might be removed in the
|
||||||
* future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG.
|
* future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG.
|
||||||
@ -133,7 +140,10 @@ png_check_sig(png_bytep sig, int num)
|
|||||||
{
|
{
|
||||||
return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
|
return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
/* Function to allocate memory for zlib and clear it to 0. */
|
/* Function to allocate memory for zlib and clear it to 0. */
|
||||||
#ifdef PNG_1_0_X
|
#ifdef PNG_1_0_X
|
||||||
voidpf PNGAPI
|
voidpf PNGAPI
|
||||||
@ -279,7 +289,7 @@ png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
|
|||||||
* and applications using it are urged to use png_create_info_struct()
|
* and applications using it are urged to use png_create_info_struct()
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
||||||
#undef png_info_init
|
#undef png_info_init
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_info_init(png_infop info_ptr)
|
png_info_init(png_infop info_ptr)
|
||||||
@ -592,6 +602,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
png_info_init_3(&info_ptr, png_sizeof(png_info));
|
png_info_init_3(&info_ptr, png_sizeof(png_info));
|
||||||
}
|
}
|
||||||
|
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||||
|
|
||||||
/* This function returns a pointer to the io_ptr associated with the user
|
/* This function returns a pointer to the io_ptr associated with the user
|
||||||
* functions. The application should free any memory associated with this
|
* functions. The application should free any memory associated with this
|
||||||
@ -603,6 +614,7 @@ png_get_io_ptr(png_structp png_ptr)
|
|||||||
return (png_ptr->io_ptr);
|
return (png_ptr->io_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#if !defined(PNG_NO_STDIO)
|
#if !defined(PNG_NO_STDIO)
|
||||||
/* Initialize the default input/output functions for the PNG file. If you
|
/* Initialize the default input/output functions for the PNG file. If you
|
||||||
* use your own read or write routines, you can call either png_set_read_fn()
|
* use your own read or write routines, you can call either png_set_read_fn()
|
||||||
@ -675,13 +687,14 @@ png_sig_bytes(void)
|
|||||||
return ((png_bytep)"\211\120\116\107\015\012\032\012");
|
return ((png_bytep)"\211\120\116\107\015\012\032\012");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||||
|
|
||||||
png_charp PNGAPI
|
png_charp PNGAPI
|
||||||
png_get_copyright(png_structp png_ptr)
|
png_get_copyright(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||||
return ((png_charp) "\n libpng version 1.0.18 - December 3, 2004\n\
|
return ((png_charp) "\n libpng version 1.0.19rc1 - June 13, 2006\n\
|
||||||
Copyright (c) 1998-2004 Glenn Randers-Pehrson\n\
|
Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\n\
|
Copyright (c) 1996-1997 Andreas Dilger\n\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||||
return ((png_charp) "");
|
return ((png_charp) "");
|
||||||
@ -722,6 +735,7 @@ png_get_header_version(png_structp png_ptr)
|
|||||||
return ((png_charp) "");
|
return ((png_charp) "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||||
int PNGAPI
|
int PNGAPI
|
||||||
png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
|
png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
|
||||||
@ -745,6 +759,7 @@ png_reset_zstream(png_structp png_ptr)
|
|||||||
{
|
{
|
||||||
return (inflateReset(&png_ptr->zstream));
|
return (inflateReset(&png_ptr->zstream));
|
||||||
}
|
}
|
||||||
|
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||||
|
|
||||||
/* This function was added to libpng-1.0.7 */
|
/* This function was added to libpng-1.0.7 */
|
||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
@ -755,6 +770,7 @@ png_access_version_number(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED)
|
||||||
#if !defined(PNG_1_0_X)
|
#if !defined(PNG_1_0_X)
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||||
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
|
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
|
||||||
@ -814,7 +830,9 @@ png_mmx_support(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* PNG_1_0_X */
|
#endif /* PNG_1_0_X */
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#ifdef PNG_SIZE_T
|
#ifdef PNG_SIZE_T
|
||||||
/* Added at libpng version 1.2.6 */
|
/* Added at libpng version 1.2.6 */
|
||||||
PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
|
PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
|
||||||
@ -826,3 +844,4 @@ png_convert_size(size_t size)
|
|||||||
return ((png_size_t)size);
|
return ((png_size_t)size);
|
||||||
}
|
}
|
||||||
#endif /* PNG_SIZE_T */
|
#endif /* PNG_SIZE_T */
|
||||||
|
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||||
|
|||||||
175
png.h
@ -1,14 +1,15 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* libpng version 1.0.19rc1 - June 13, 2006
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* 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.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.0.18 - December 3, 2004: Glenn
|
* libpng versions 0.97, January 1998, through 1.0.19rc1 - June 13, 2006: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@ -102,15 +103,25 @@
|
|||||||
* 1.0.16 10 10016 10.so.0.1.0.16
|
* 1.0.16 10 10016 10.so.0.1.0.16
|
||||||
* 1.2.6 13 10206 12.so.0.1.2.6
|
* 1.2.6 13 10206 12.so.0.1.2.6
|
||||||
* 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
|
* 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
|
||||||
* 1.0.17rc1 10 10017 12.so.0.1.0.17rc1
|
* 1.0.17rc1 10 10017 10.so.0.1.0.17rc1
|
||||||
* 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
|
* 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
|
||||||
* 1.0.17 10 10017 12.so.0.1.0.17
|
* 1.0.17 10 10017 10.so.0.1.0.17
|
||||||
* 1.2.7 13 10207 12.so.0.1.2.7
|
* 1.2.7 13 10207 12.so.0.1.2.7
|
||||||
* 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
|
* 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
|
||||||
* 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
|
* 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
|
||||||
* 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
|
* 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
|
||||||
* 1.0.18 10 10018 12.so.0.1.0.18
|
* 1.0.18 10 10018 10.so.0.1.0.18
|
||||||
* 1.2.8 13 10208 12.so.0.1.2.8
|
* 1.2.8 13 10208 12.so.0.1.2.8
|
||||||
|
* 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
|
||||||
|
* 1.2.9beta4-11 13 10209 12.so.0.9[.0]
|
||||||
|
* 1.2.9rc1 13 10209 12.so.0.9[.0]
|
||||||
|
* 1.2.9 13 10209 12.so.0.9[.0]
|
||||||
|
* 1.2.10beta1-8 13 10210 12.so.0.10[.0]
|
||||||
|
* 1.2.10rc1-3 13 10210 12.so.0.10[.0]
|
||||||
|
* 1.2.10 13 10210 12.so.0.10[.0]
|
||||||
|
* 1.2.11beta1-4 13 10211 12.so.0.11[.0]
|
||||||
|
* 1.0.19rc1 10 10019 10.so.0.19[.0]
|
||||||
|
* 1.2.11rc1 13 10211 12.so.0.11[.0]
|
||||||
*
|
*
|
||||||
* Henceforth the source version will match the shared-library major
|
* Henceforth the source version will match the shared-library major
|
||||||
* and minor numbers; the shared-library major version number will be
|
* and minor numbers; the shared-library major version number will be
|
||||||
@ -140,8 +151,8 @@
|
|||||||
* If you modify libpng you may insert additional notices immediately following
|
* If you modify libpng you may insert additional notices immediately following
|
||||||
* this sentence.
|
* this sentence.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.0.18, December 3, 2004, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.0.19rc1, June 13, 2006, are
|
||||||
* Copyright (c) 2004 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
*
|
*
|
||||||
@ -252,13 +263,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* December 3, 2004
|
* June 13, 2006
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.0.18 are Y2K compliant. It is my belief that earlier
|
* upward through 1.0.19rc1 are Y2K compliant. It is my belief that earlier
|
||||||
* versions were also Y2K compliant.
|
* versions were also Y2K compliant.
|
||||||
*
|
*
|
||||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||||
@ -314,9 +325,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.0.18"
|
#define PNG_LIBPNG_VER_STRING "1.0.19rc1"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.0.18 - December 3, 2004 (header)\n"
|
" libpng version 1.0.19rc1 - June 13, 2006 (header)\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 0
|
#define PNG_LIBPNG_VER_SONUM 0
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 10
|
#define PNG_LIBPNG_VER_DLLNUM 10
|
||||||
@ -324,11 +335,11 @@
|
|||||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||||
#define PNG_LIBPNG_VER_MAJOR 1
|
#define PNG_LIBPNG_VER_MAJOR 1
|
||||||
#define PNG_LIBPNG_VER_MINOR 0
|
#define PNG_LIBPNG_VER_MINOR 0
|
||||||
#define PNG_LIBPNG_VER_RELEASE 18
|
#define PNG_LIBPNG_VER_RELEASE 19
|
||||||
/* This should match the numeric part of the final component of
|
/* This should match the numeric part of the final component of
|
||||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_BUILD 0
|
#define PNG_LIBPNG_VER_BUILD 1
|
||||||
|
|
||||||
/* Release Status */
|
/* Release Status */
|
||||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||||
@ -345,14 +356,14 @@
|
|||||||
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
||||||
PNG_LIBPNG_BUILD_PRIVATE */
|
PNG_LIBPNG_BUILD_PRIVATE */
|
||||||
|
|
||||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
|
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC
|
||||||
|
|
||||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||||
* We must not include leading zeros.
|
* We must not include leading zeros.
|
||||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
* 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.0 was mis-numbered 100 instead of 10000). From
|
||||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
|
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
|
||||||
#define PNG_LIBPNG_VER 10018 /* 1.0.18 */
|
#define PNG_LIBPNG_VER 10019 /* 1.0.19 */
|
||||||
|
|
||||||
#ifndef PNG_VERSION_INFO_ONLY
|
#ifndef PNG_VERSION_INFO_ONLY
|
||||||
/* include the compression library's header */
|
/* include the compression library's header */
|
||||||
@ -376,14 +387,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(PNG_USER_PRIVATEBUILD)
|
#if defined(PNG_USER_PRIVATEBUILD)
|
||||||
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \
|
# define PNG_LIBPNG_BUILD_TYPE \
|
||||||
PNG_LIBPNG_BUILD_PRIVATE
|
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
|
||||||
#else
|
#else
|
||||||
# if defined(PNG_LIBPNG_SPECIALBUILD)
|
# if defined(PNG_LIBPNG_SPECIALBUILD)
|
||||||
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \
|
# define PNG_LIBPNG_BUILD_TYPE \
|
||||||
PNG_LIBPNG_BUILD_SPECIAL
|
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
|
||||||
# else
|
# else
|
||||||
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE
|
# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -455,7 +466,7 @@ PNG_EXPORT_VAR (const int FARDATA) png_pass_ystart[7];
|
|||||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7];
|
PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7];
|
||||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7];
|
PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7];
|
||||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7];
|
PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7];
|
||||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
#ifdef PNG_USE_PNGGCCRD
|
||||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7];
|
PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7];
|
||||||
#endif
|
#endif
|
||||||
/* This isn't currently used. If you need it, see png.c for more details.
|
/* This isn't currently used. If you need it, see png.c for more details.
|
||||||
@ -894,8 +905,10 @@ typedef png_info FAR * FAR * png_infopp;
|
|||||||
#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
|
#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
|
||||||
#define PNG_UINT_32_MAX ((png_uint_32)(-1))
|
#define PNG_UINT_32_MAX ((png_uint_32)(-1))
|
||||||
#define PNG_SIZE_MAX ((png_size_t)(-1))
|
#define PNG_SIZE_MAX ((png_size_t)(-1))
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
|
/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
|
||||||
#define PNG_MAX_UINT PNG_UINT_31_MAX
|
#define PNG_MAX_UINT PNG_UINT_31_MAX
|
||||||
|
#endif
|
||||||
|
|
||||||
/* These describe the color_type field in png_info. */
|
/* These describe the color_type field in png_info. */
|
||||||
/* color type masks */
|
/* color type masks */
|
||||||
@ -1356,7 +1369,7 @@ struct png_struct_def
|
|||||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||||
* do not agree upon the version number.
|
* do not agree upon the version number.
|
||||||
*/
|
*/
|
||||||
typedef png_structp version_1_0_18;
|
typedef png_structp version_1_0_19rc1;
|
||||||
|
|
||||||
typedef png_struct FAR * FAR * png_structpp;
|
typedef png_struct FAR * FAR * png_structpp;
|
||||||
|
|
||||||
@ -1442,11 +1455,14 @@ extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
|
|||||||
extern PNG_EXPORT(png_infop,png_create_info_struct)
|
extern PNG_EXPORT(png_infop,png_create_info_struct)
|
||||||
PNGARG((png_structp png_ptr));
|
PNGARG((png_structp png_ptr));
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
/* Initialize the info structure (old interface - DEPRECATED) */
|
/* Initialize the info structure (old interface - DEPRECATED) */
|
||||||
extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
|
extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
|
||||||
#undef png_info_init
|
#undef png_info_init
|
||||||
#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\
|
#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\
|
||||||
png_sizeof(png_info));
|
png_sizeof(png_info));
|
||||||
|
#endif
|
||||||
|
|
||||||
extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
|
extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
|
||||||
png_size_t png_info_struct_size));
|
png_size_t png_info_struct_size));
|
||||||
|
|
||||||
@ -1483,9 +1499,16 @@ extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
|
|||||||
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
||||||
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
|
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
|
||||||
extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
|
extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
|
||||||
extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr));
|
#if !defined(PNG_1_0_X)
|
||||||
|
extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp
|
||||||
|
png_ptr));
|
||||||
|
#endif
|
||||||
extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
|
extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
|
||||||
extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
|
extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
|
/* Deprecated */
|
||||||
|
extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr));
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
|
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
|
||||||
@ -1606,6 +1629,7 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
|
#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
|
||||||
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
|
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
|
||||||
/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */
|
/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */
|
||||||
@ -1613,6 +1637,7 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
|
|||||||
extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr,
|
extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr,
|
||||||
int empty_plte_permitted));
|
int empty_plte_permitted));
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
|
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
|
||||||
/* Set how many lines between output flushes - 0 for no flushing */
|
/* Set how many lines between output flushes - 0 for no flushing */
|
||||||
@ -2327,11 +2352,12 @@ extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
|
|||||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
|
extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
|
||||||
png_infop info_ptr, int unit, double width, double height));
|
png_infop info_ptr, int unit, double width, double height));
|
||||||
#endif
|
#else
|
||||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||||
extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
|
extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
|
||||||
png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
|
png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
|
#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
|
||||||
|
|
||||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||||
@ -2427,7 +2453,9 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
|
|||||||
#define png_debug2(l, m, p1, p2)
|
#define png_debug2(l, m, p1, p2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
extern PNG_EXPORT(png_bytep,png_sig_bytes) PNGARG((void));
|
extern PNG_EXPORT(png_bytep,png_sig_bytes) PNGARG((void));
|
||||||
|
#endif
|
||||||
|
|
||||||
extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
|
extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
|
||||||
extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
|
extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
|
||||||
@ -2572,6 +2600,44 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
|||||||
|
|
||||||
#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
|
#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
|
||||||
|
|
||||||
|
/* Inline macros to do direct reads of bytes from the input buffer. These
|
||||||
|
* require that you are using an architecture that uses PNG byte ordering
|
||||||
|
* (MSB first) and supports unaligned data storage. I think that PowerPC
|
||||||
|
* in big-endian mode and 680x0 are the only ones that will support this.
|
||||||
|
* The x86 line of processors definitely do not. The png_get_int_32()
|
||||||
|
* routine also assumes we are using two's complement format for negative
|
||||||
|
* values, which is almost certainly true.
|
||||||
|
*/
|
||||||
|
#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
|
||||||
|
# define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
|
||||||
|
# define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
|
||||||
|
# define png_get_int_32(buf) ( *((png_int_32p) (buf)))
|
||||||
|
#else
|
||||||
|
extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
|
||||||
|
extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
|
||||||
|
extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
|
||||||
|
#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
|
||||||
|
extern PNG_EXPORT(png_uint_32,png_get_uint_31)
|
||||||
|
PNGARG((png_structp png_ptr, png_bytep buf));
|
||||||
|
/* No png_get_int_16 -- may be added if there's a real need for it. */
|
||||||
|
|
||||||
|
/* Place a 32-bit number into a buffer in PNG byte order (big-endian).
|
||||||
|
*/
|
||||||
|
extern PNG_EXPORT(void,png_save_uint_32)
|
||||||
|
PNGARG((png_bytep buf, png_uint_32 i));
|
||||||
|
extern PNG_EXPORT(void,png_save_int_32)
|
||||||
|
PNGARG((png_bytep buf, png_int_32 i));
|
||||||
|
|
||||||
|
/* Place a 16-bit number into a buffer in PNG byte order.
|
||||||
|
* The parameter is declared unsigned int, not png_uint_16,
|
||||||
|
* just to avoid potential problems on pre-ANSI C compilers.
|
||||||
|
*/
|
||||||
|
extern PNG_EXPORT(void,png_save_uint_16)
|
||||||
|
PNGARG((png_bytep buf, unsigned int i));
|
||||||
|
/* No png_save_int_16 -- may be added if there's a real need for it. */
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
|
||||||
/* These next functions are used internally in the code. They generally
|
/* These next functions are used internally in the code. They generally
|
||||||
* shouldn't be used unless you are writing code to add or replace some
|
* shouldn't be used unless you are writing code to add or replace some
|
||||||
* functionality in libpng. More information about most functions can
|
* functionality in libpng. More information about most functions can
|
||||||
@ -2586,7 +2652,7 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
|||||||
#define PNG_HAVE_IHDR 0x01
|
#define PNG_HAVE_IHDR 0x01
|
||||||
#define PNG_HAVE_PLTE 0x02
|
#define PNG_HAVE_PLTE 0x02
|
||||||
#define PNG_HAVE_IDAT 0x04
|
#define PNG_HAVE_IDAT 0x04
|
||||||
#define PNG_AFTER_IDAT 0x08
|
#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
|
||||||
#define PNG_HAVE_IEND 0x10
|
#define PNG_HAVE_IEND 0x10
|
||||||
#define PNG_HAVE_gAMA 0x20
|
#define PNG_HAVE_gAMA 0x20
|
||||||
#define PNG_HAVE_cHRM 0x40
|
#define PNG_HAVE_cHRM 0x40
|
||||||
@ -2596,6 +2662,7 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
|||||||
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
|
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
|
||||||
#define PNG_BACKGROUND_IS_GRAY 0x800
|
#define PNG_BACKGROUND_IS_GRAY 0x800
|
||||||
#define PNG_HAVE_PNG_SIGNATURE 0x1000
|
#define PNG_HAVE_PNG_SIGNATURE 0x1000
|
||||||
|
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
|
||||||
|
|
||||||
/* flags for the transformations the PNG library does on the image data */
|
/* flags for the transformations the PNG library does on the image data */
|
||||||
#define PNG_BGR 0x0001
|
#define PNG_BGR 0x0001
|
||||||
@ -2624,7 +2691,7 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
|||||||
#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */
|
#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */
|
||||||
/* 0x800000L Unused */
|
/* 0x800000L Unused */
|
||||||
#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */
|
#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */
|
||||||
/* 0x2000000L unused */
|
#define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */
|
||||||
/* 0x4000000L unused */
|
/* 0x4000000L unused */
|
||||||
/* 0x8000000L unused */
|
/* 0x8000000L unused */
|
||||||
/* 0x10000000L unused */
|
/* 0x10000000L unused */
|
||||||
@ -2708,8 +2775,10 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
|||||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_sig[8];
|
PNG_EXPORT_VAR (const png_byte FARDATA) png_sig[8];
|
||||||
#else
|
#else
|
||||||
|
#if 0
|
||||||
#define png_sig png_sig_bytes(NULL)
|
#define png_sig png_sig_bytes(NULL)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif /* PNG_NO_EXTERN */
|
#endif /* PNG_NO_EXTERN */
|
||||||
|
|
||||||
/* Constant strings for known chunk types. If you need to add a chunk,
|
/* Constant strings for known chunk types. If you need to add a chunk,
|
||||||
@ -2762,31 +2831,7 @@ PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5];
|
|||||||
PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5];
|
PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5];
|
||||||
#endif /* PNG_USE_GLOBAL_ARRAYS */
|
#endif /* PNG_USE_GLOBAL_ARRAYS */
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
/* Inline macros to do direct reads of bytes from the input buffer. These
|
|
||||||
* require that you are using an architecture that uses PNG byte ordering
|
|
||||||
* (MSB first) and supports unaligned data storage. I think that PowerPC
|
|
||||||
* in big-endian mode and 680x0 are the only ones that will support this.
|
|
||||||
* The x86 line of processors definitely do not. The png_get_int_32()
|
|
||||||
* routine also assumes we are using two's complement format for negative
|
|
||||||
* values, which is almost certainly true.
|
|
||||||
*/
|
|
||||||
#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
|
|
||||||
# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED)
|
|
||||||
# define png_get_int_32(buf) ( *((png_int_32p) (buf)))
|
|
||||||
# endif
|
|
||||||
# define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
|
|
||||||
# define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
|
|
||||||
#else
|
|
||||||
# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED)
|
|
||||||
PNG_EXTERN png_int_32 png_get_int_32 PNGARG((png_bytep buf));
|
|
||||||
# endif
|
|
||||||
PNG_EXTERN png_uint_32 png_get_uint_32 PNGARG((png_bytep buf));
|
|
||||||
PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf));
|
|
||||||
#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
|
|
||||||
PNG_EXTERN png_uint_32 png_get_uint_31 PNGARG((png_structp png_ptr,
|
|
||||||
png_bytep buf));
|
|
||||||
|
|
||||||
/* Initialize png_ptr struct for reading, and allocate any other memory.
|
/* Initialize png_ptr struct for reading, and allocate any other memory.
|
||||||
* (old interface - DEPRECATED - use png_create_read_struct instead).
|
* (old interface - DEPRECATED - use png_create_read_struct instead).
|
||||||
*/
|
*/
|
||||||
@ -2794,12 +2839,17 @@ extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
|
|||||||
#undef png_read_init
|
#undef png_read_init
|
||||||
#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
|
#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
|
||||||
PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
|
PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
|
||||||
|
#endif
|
||||||
|
|
||||||
extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
|
extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
|
||||||
png_const_charp user_png_ver, png_size_t png_struct_size));
|
png_const_charp user_png_ver, png_size_t png_struct_size));
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
|
extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
|
||||||
png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
|
png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
|
||||||
png_info_size));
|
png_info_size));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
/* Initialize png_ptr struct for writing, and allocate any other memory.
|
/* Initialize png_ptr struct for writing, and allocate any other memory.
|
||||||
* (old interface - DEPRECATED - use png_create_write_struct instead).
|
* (old interface - DEPRECATED - use png_create_write_struct instead).
|
||||||
*/
|
*/
|
||||||
@ -2807,6 +2857,8 @@ extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr));
|
|||||||
#undef png_write_init
|
#undef png_write_init
|
||||||
#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
|
#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
|
||||||
PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
|
PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
|
||||||
|
#endif
|
||||||
|
|
||||||
extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
|
extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
|
||||||
png_const_charp user_png_ver, png_size_t png_struct_size));
|
png_const_charp user_png_ver, png_size_t png_struct_size));
|
||||||
extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,
|
extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,
|
||||||
@ -2906,23 +2958,6 @@ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
|
|||||||
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
|
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Place a 32-bit number into a buffer in PNG byte order (big-endian).
|
|
||||||
* The only currently known PNG chunks that use signed numbers are
|
|
||||||
* the ancillary extension chunks, oFFs and pCAL.
|
|
||||||
*/
|
|
||||||
PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i));
|
|
||||||
|
|
||||||
#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)
|
|
||||||
PNG_EXTERN void png_save_int_32 PNGARG((png_bytep buf, png_int_32 i));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Place a 16-bit number into a buffer in PNG byte order.
|
|
||||||
* The parameter is declared unsigned int, not png_uint_16,
|
|
||||||
* just to avoid potential problems on pre-ANSI C compilers.
|
|
||||||
*/
|
|
||||||
PNG_EXTERN void png_save_uint_16 PNGARG((png_bytep buf, unsigned int i));
|
|
||||||
|
|
||||||
/* simple function to write the signature */
|
/* simple function to write the signature */
|
||||||
PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
|
PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
|
||||||
|
|
||||||
|
|||||||
56
pngconf.h
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* libpng version 1.0.19rc1 - June 13, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -24,6 +24,13 @@
|
|||||||
* includes the resource compiler for Windows DLL configurations.
|
* includes the resource compiler for Windows DLL configurations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
|
||||||
|
#ifdef PNG_CONFIGURE_LIBPNG
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Added at libpng-1.2.8
|
* Added at libpng-1.2.8
|
||||||
*
|
*
|
||||||
@ -52,8 +59,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PRIVATEBUILD
|
#ifdef PRIVATEBUILD
|
||||||
# pragma message("PRIVATEBUILD is deprecated. Use\
|
# pragma message("PRIVATEBUILD is deprecated.\
|
||||||
PNG_USER_PRIVATEBUILD instead.")
|
Use PNG_USER_PRIVATEBUILD instead.")
|
||||||
# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
|
# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
|
||||||
#endif
|
#endif
|
||||||
#endif /* __STDC__ */
|
#endif /* __STDC__ */
|
||||||
@ -450,21 +457,33 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* The size of the png_text structure changed in libpng-1.0.6 when
|
/* The size of the png_text structure changed in libpng-1.0.6 when
|
||||||
* iTXt is supported. It is turned off by default, to support old apps
|
* iTXt support was added. iTXt support was turned off by default through
|
||||||
* that malloc the png_text structure instead of calling png_set_text()
|
* libpng-1.2.x, to support old apps that malloc the png_text structure
|
||||||
* and letting libpng malloc it. It will be turned on by default in
|
* instead of calling png_set_text() and letting libpng malloc it. It
|
||||||
* libpng-1.3.0.
|
* was turned on by default in libpng-1.3.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PNG_iTXt_SUPPORTED
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
|
# ifndef PNG_NO_iTXt_SUPPORTED
|
||||||
|
# define PNG_NO_iTXt_SUPPORTED
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_NO_READ_iTXt
|
||||||
# define PNG_NO_READ_iTXt
|
# define PNG_NO_READ_iTXt
|
||||||
# endif
|
# endif
|
||||||
# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
|
# ifndef PNG_NO_WRITE_iTXt
|
||||||
# define PNG_NO_WRITE_iTXt
|
# define PNG_NO_WRITE_iTXt
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(PNG_NO_iTXt_SUPPORTED)
|
||||||
|
# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
|
||||||
|
# define PNG_READ_iTXt
|
||||||
|
# endif
|
||||||
|
# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
|
||||||
|
# define PNG_WRITE_iTXt
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The following support, added after version 1.0.0, can be turned off here en
|
/* The following support, added after version 1.0.0, can be turned off here en
|
||||||
* masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
|
* masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
|
||||||
* with old applications that require the length of png_struct and png_info
|
* with old applications that require the length of png_struct and png_info
|
||||||
@ -582,11 +601,13 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
/* Deprecated, will be removed from version 2.0.0.
|
/* Deprecated, will be removed from version 2.0.0.
|
||||||
Use PNG_MNG_FEATURES_SUPPORTED instead. */
|
Use PNG_MNG_FEATURES_SUPPORTED instead. */
|
||||||
#ifndef PNG_NO_READ_EMPTY_PLTE
|
#ifndef PNG_NO_READ_EMPTY_PLTE
|
||||||
# define PNG_READ_EMPTY_PLTE_SUPPORTED
|
# define PNG_READ_EMPTY_PLTE_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* PNG_READ_SUPPORTED */
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|
||||||
@ -630,11 +651,15 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
|
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
|
||||||
|
|
||||||
|
#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
|
||||||
|
!defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
||||||
#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
|
#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
|
||||||
encoders, but can cause trouble
|
encoders, but can cause trouble
|
||||||
if left undefined */
|
if left undefined */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
|
#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
|
||||||
|
!defined(PNG_WRITE_WEIGHTED_FILTER) && \
|
||||||
defined(PNG_FLOATING_POINT_SUPPORTED)
|
defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||||
# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
@ -643,10 +668,12 @@
|
|||||||
# define PNG_WRITE_FLUSH_SUPPORTED
|
# define PNG_WRITE_FLUSH_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||||
/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
|
/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
|
||||||
#ifndef PNG_NO_WRITE_EMPTY_PLTE
|
#ifndef PNG_NO_WRITE_EMPTY_PLTE
|
||||||
# define PNG_WRITE_EMPTY_PLTE_SUPPORTED
|
# define PNG_WRITE_EMPTY_PLTE_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* PNG_WRITE_SUPPORTED */
|
#endif /* PNG_WRITE_SUPPORTED */
|
||||||
|
|
||||||
@ -693,9 +720,14 @@
|
|||||||
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||||
# define PNG_ASSEMBLER_CODE_SUPPORTED
|
# define PNG_ASSEMBLER_CODE_SUPPORTED
|
||||||
# endif
|
# endif
|
||||||
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
|
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) && \
|
||||||
|
defined(__MMX__)
|
||||||
# define PNG_MMX_CODE_SUPPORTED
|
# define PNG_MMX_CODE_SUPPORTED
|
||||||
# endif
|
# endif
|
||||||
|
# if !defined(PNG_USE_PNGGCCRD) && !defined(PNG_NO_MMX_CODE) && \
|
||||||
|
!defined(PNG_USE_PNGVCRD) && defined(__MMX__)
|
||||||
|
# define PNG_USE_PNGGCCRD
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If you are sure that you don't need thread safety and you are compiling
|
/* If you are sure that you don't need thread safety and you are compiling
|
||||||
|
|||||||
90
pngerror.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
static void /* PRIVATE */
|
static void /* PRIVATE */
|
||||||
png_default_error PNGARG((png_structp png_ptr,
|
png_default_error PNGARG((png_structp png_ptr,
|
||||||
png_const_charp error_message));
|
png_const_charp error_message));
|
||||||
@ -33,33 +34,37 @@ png_error(png_structp png_ptr, png_const_charp error_message)
|
|||||||
{
|
{
|
||||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||||
char msg[16];
|
char msg[16];
|
||||||
if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
|
if (png_ptr != NULL)
|
||||||
{
|
{
|
||||||
if (*error_message == '#')
|
if (png_ptr->flags&
|
||||||
|
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
|
||||||
{
|
{
|
||||||
int offset;
|
if (*error_message == '#')
|
||||||
for (offset=1; offset<15; offset++)
|
{
|
||||||
if (*(error_message+offset) == ' ')
|
int offset;
|
||||||
break;
|
for (offset=1; offset<15; offset++)
|
||||||
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
|
if (*(error_message+offset) == ' ')
|
||||||
{
|
break;
|
||||||
int i;
|
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
|
||||||
for (i=0; i<offset-1; i++)
|
{
|
||||||
msg[i]=error_message[i+1];
|
int i;
|
||||||
msg[i]='\0';
|
for (i=0; i<offset-1; i++)
|
||||||
error_message=msg;
|
msg[i]=error_message[i+1];
|
||||||
}
|
msg[i]='\0';
|
||||||
else
|
error_message=msg;
|
||||||
error_message+=offset;
|
}
|
||||||
}
|
else
|
||||||
else
|
error_message+=offset;
|
||||||
{
|
}
|
||||||
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
|
else
|
||||||
{
|
{
|
||||||
msg[0]='0';
|
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
|
||||||
msg[1]='\0';
|
{
|
||||||
error_message=msg;
|
msg[0]='0';
|
||||||
}
|
msg[1]='\0';
|
||||||
|
error_message=msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -80,19 +85,23 @@ void PNGAPI
|
|||||||
png_warning(png_structp png_ptr, png_const_charp warning_message)
|
png_warning(png_structp png_ptr, png_const_charp warning_message)
|
||||||
{
|
{
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
if (png_ptr != NULL)
|
||||||
if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (*warning_message == '#')
|
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||||
|
if (png_ptr->flags&
|
||||||
|
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
for (offset=1; offset<15; offset++)
|
if (*warning_message == '#')
|
||||||
if (*(warning_message+offset) == ' ')
|
{
|
||||||
break;
|
for (offset=1; offset<15; offset++)
|
||||||
|
if (*(warning_message+offset) == ' ')
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (png_ptr != NULL && png_ptr->warning_fn != NULL)
|
||||||
|
(*(png_ptr->warning_fn))(png_ptr, warning_message+offset);
|
||||||
}
|
}
|
||||||
if (png_ptr != NULL && png_ptr->warning_fn != NULL)
|
|
||||||
(*(png_ptr->warning_fn))(png_ptr, warning_message+offset);
|
|
||||||
else
|
else
|
||||||
png_default_warning(png_ptr, warning_message+offset);
|
png_default_warning(png_ptr, warning_message+offset);
|
||||||
}
|
}
|
||||||
@ -146,6 +155,8 @@ void PNGAPI
|
|||||||
png_chunk_error(png_structp png_ptr, png_const_charp error_message)
|
png_chunk_error(png_structp png_ptr, png_const_charp error_message)
|
||||||
{
|
{
|
||||||
char msg[18+64];
|
char msg[18+64];
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
png_error(png_ptr, error_message);
|
||||||
png_format_buffer(png_ptr, msg, error_message);
|
png_format_buffer(png_ptr, msg, error_message);
|
||||||
png_error(png_ptr, msg);
|
png_error(png_ptr, msg);
|
||||||
}
|
}
|
||||||
@ -154,6 +165,8 @@ void PNGAPI
|
|||||||
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
|
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
|
||||||
{
|
{
|
||||||
char msg[18+64];
|
char msg[18+64];
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
png_warning(png_ptr, warning_message);
|
||||||
png_format_buffer(png_ptr, msg, warning_message);
|
png_format_buffer(png_ptr, msg, warning_message);
|
||||||
png_warning(png_ptr, msg);
|
png_warning(png_ptr, msg);
|
||||||
}
|
}
|
||||||
@ -265,6 +278,8 @@ void PNGAPI
|
|||||||
png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
|
png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
|
||||||
png_error_ptr error_fn, png_error_ptr warning_fn)
|
png_error_ptr error_fn, png_error_ptr warning_fn)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->error_ptr = error_ptr;
|
png_ptr->error_ptr = error_ptr;
|
||||||
png_ptr->error_fn = error_fn;
|
png_ptr->error_fn = error_fn;
|
||||||
png_ptr->warning_fn = warning_fn;
|
png_ptr->warning_fn = warning_fn;
|
||||||
@ -278,6 +293,8 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
|
|||||||
png_voidp PNGAPI
|
png_voidp PNGAPI
|
||||||
png_get_error_ptr(png_structp png_ptr)
|
png_get_error_ptr(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return NULL;
|
||||||
return ((png_voidp)png_ptr->error_ptr);
|
return ((png_voidp)png_ptr->error_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,3 +310,4 @@ png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||||
|
|||||||
52
pnggccrd.c
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* pnggccrd.c - mixed C/assembler version of utilities to read a PNG file
|
/* pnggccrd.c - mixed C/assembler version of utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* For Intel x86 CPU (Pentium-MMX or later) and GNU C compiler.
|
* For Intel x86 CPU (Pentium-MMX or later) and GNU C compiler.
|
||||||
@ -6,9 +7,9 @@
|
|||||||
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
||||||
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1998, Intel Corporation
|
* Copyright (c) 1998, Intel Corporation
|
||||||
*
|
*
|
||||||
* Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.
|
* Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.
|
||||||
@ -255,9 +256,10 @@ static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||||
/* djgpp, Win32, and Cygwin add their own underscores to global variables,
|
/* djgpp, Win32, Cygwin, and OS2 add their own underscores to global variables,
|
||||||
* so define them without: */
|
* so define them without: */
|
||||||
#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__)
|
#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__) || \
|
||||||
|
defined(__OS2__)
|
||||||
# define _mmx_supported mmx_supported
|
# define _mmx_supported mmx_supported
|
||||||
# define _const4 const4
|
# define _const4 const4
|
||||||
# define _const6 const6
|
# define _const6 const6
|
||||||
@ -1737,6 +1739,7 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
int dummy_value_c; // fix 'forbidden register spilled'
|
int dummy_value_c; // fix 'forbidden register spilled'
|
||||||
int dummy_value_S;
|
int dummy_value_S;
|
||||||
int dummy_value_D;
|
int dummy_value_D;
|
||||||
|
int dummy_value_a;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"subl $21, %%edi \n\t"
|
"subl $21, %%edi \n\t"
|
||||||
@ -1744,7 +1747,7 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
|
|
||||||
".loop3_pass0: \n\t"
|
".loop3_pass0: \n\t"
|
||||||
"movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0
|
"movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0
|
||||||
"pand _const4, %%mm0 \n\t" // z z z z z 2 1 0
|
"pand (%3), %%mm0 \n\t" // z z z z z 2 1 0
|
||||||
"movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0
|
"movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0
|
||||||
"psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z
|
"psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z
|
||||||
"movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z
|
"movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z
|
||||||
@ -1769,12 +1772,14 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
|
|
||||||
: "=c" (dummy_value_c), // output regs (dummy)
|
: "=c" (dummy_value_c), // output regs (dummy)
|
||||||
"=S" (dummy_value_S),
|
"=S" (dummy_value_S),
|
||||||
"=D" (dummy_value_D)
|
"=D" (dummy_value_D),
|
||||||
|
"=a" (dummy_value_a)
|
||||||
|
|
||||||
|
|
||||||
: "1" (sptr), // esi // input regs
|
: "1" (sptr), // esi // input regs
|
||||||
"2" (dp), // edi
|
"2" (dp), // edi
|
||||||
"0" (width), // ecx
|
"0" (width), // ecx
|
||||||
"rim" (_const4) // %1(?) (0x0000000000FFFFFFLL)
|
"3" (&_const4) // %1(?) (0x0000000000FFFFFFLL)
|
||||||
|
|
||||||
#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||||
: "%mm0", "%mm1", "%mm2" // clobber list
|
: "%mm0", "%mm1", "%mm2" // clobber list
|
||||||
@ -1787,6 +1792,7 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
int dummy_value_c; // fix 'forbidden register spilled'
|
int dummy_value_c; // fix 'forbidden register spilled'
|
||||||
int dummy_value_S;
|
int dummy_value_S;
|
||||||
int dummy_value_D;
|
int dummy_value_D;
|
||||||
|
int dummy_value_a;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"subl $9, %%edi \n\t"
|
"subl $9, %%edi \n\t"
|
||||||
@ -1794,7 +1800,7 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
|
|
||||||
".loop3_pass2: \n\t"
|
".loop3_pass2: \n\t"
|
||||||
"movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0
|
"movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0
|
||||||
"pand _const4, %%mm0 \n\t" // z z z z z 2 1 0
|
"pand (%3), %%mm0 \n\t" // z z z z z 2 1 0
|
||||||
"movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0
|
"movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0
|
||||||
"psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z
|
"psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z
|
||||||
"movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z
|
"movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z
|
||||||
@ -1813,12 +1819,13 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
|
|
||||||
: "=c" (dummy_value_c), // output regs (dummy)
|
: "=c" (dummy_value_c), // output regs (dummy)
|
||||||
"=S" (dummy_value_S),
|
"=S" (dummy_value_S),
|
||||||
"=D" (dummy_value_D)
|
"=D" (dummy_value_D),
|
||||||
|
"=a" (dummy_value_a)
|
||||||
|
|
||||||
: "1" (sptr), // esi // input regs
|
: "1" (sptr), // esi // input regs
|
||||||
"2" (dp), // edi
|
"2" (dp), // edi
|
||||||
"0" (width), // ecx
|
"0" (width), // ecx
|
||||||
"rim" (_const4) // (0x0000000000FFFFFFLL)
|
"3" (&_const4) // (0x0000000000FFFFFFLL)
|
||||||
|
|
||||||
#if 0 /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
#if 0 /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||||
: "%mm0", "%mm1", "%mm2" // clobber list
|
: "%mm0", "%mm1", "%mm2" // clobber list
|
||||||
@ -1839,6 +1846,8 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
int dummy_value_c; // fix 'forbidden register spilled'
|
int dummy_value_c; // fix 'forbidden register spilled'
|
||||||
int dummy_value_S;
|
int dummy_value_S;
|
||||||
int dummy_value_D;
|
int dummy_value_D;
|
||||||
|
int dummy_value_a;
|
||||||
|
int dummy_value_d;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"subl $3, %%esi \n\t"
|
"subl $3, %%esi \n\t"
|
||||||
@ -1850,14 +1859,14 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
"movq %%mm0, %%mm1 \n\t" // x x 5 4 3 2 1 0
|
"movq %%mm0, %%mm1 \n\t" // x x 5 4 3 2 1 0
|
||||||
"movq %%mm0, %%mm2 \n\t" // x x 5 4 3 2 1 0
|
"movq %%mm0, %%mm2 \n\t" // x x 5 4 3 2 1 0
|
||||||
"psllq $24, %%mm0 \n\t" // 4 3 2 1 0 z z z
|
"psllq $24, %%mm0 \n\t" // 4 3 2 1 0 z z z
|
||||||
"pand _const4, %%mm1 \n\t" // z z z z z 2 1 0
|
"pand (%3), %%mm1 \n\t" // z z z z z 2 1 0
|
||||||
"psrlq $24, %%mm2 \n\t" // z z z x x 5 4 3
|
"psrlq $24, %%mm2 \n\t" // z z z x x 5 4 3
|
||||||
"por %%mm1, %%mm0 \n\t" // 4 3 2 1 0 2 1 0
|
"por %%mm1, %%mm0 \n\t" // 4 3 2 1 0 2 1 0
|
||||||
"movq %%mm2, %%mm3 \n\t" // z z z x x 5 4 3
|
"movq %%mm2, %%mm3 \n\t" // z z z x x 5 4 3
|
||||||
"psllq $8, %%mm2 \n\t" // z z x x 5 4 3 z
|
"psllq $8, %%mm2 \n\t" // z z x x 5 4 3 z
|
||||||
"movq %%mm0, (%%edi) \n\t"
|
"movq %%mm0, (%%edi) \n\t"
|
||||||
"psrlq $16, %%mm3 \n\t" // z z z z z x x 5
|
"psrlq $16, %%mm3 \n\t" // z z z z z x x 5
|
||||||
"pand _const6, %%mm3 \n\t" // z z z z z z z 5
|
"pand (%4), %%mm3 \n\t" // z z z z z z z 5
|
||||||
"por %%mm3, %%mm2 \n\t" // z z x x 5 4 3 5
|
"por %%mm3, %%mm2 \n\t" // z z x x 5 4 3 5
|
||||||
"subl $6, %%esi \n\t"
|
"subl $6, %%esi \n\t"
|
||||||
"movd %%mm2, 8(%%edi) \n\t"
|
"movd %%mm2, 8(%%edi) \n\t"
|
||||||
@ -1868,13 +1877,15 @@ png_do_read_interlace(png_structp png_ptr)
|
|||||||
|
|
||||||
: "=c" (dummy_value_c), // output regs (dummy)
|
: "=c" (dummy_value_c), // output regs (dummy)
|
||||||
"=S" (dummy_value_S),
|
"=S" (dummy_value_S),
|
||||||
"=D" (dummy_value_D)
|
"=D" (dummy_value_D),
|
||||||
|
"=a" (dummy_value_a),
|
||||||
|
"=d" (dummy_value_d)
|
||||||
|
|
||||||
: "1" (sptr), // esi // input regs
|
: "1" (sptr), // esi // input regs
|
||||||
"2" (dp), // edi
|
"2" (dp), // edi
|
||||||
"0" (width_mmx), // ecx
|
"0" (width_mmx), // ecx
|
||||||
"rim" (_const4), // 0x0000000000FFFFFFLL
|
"3" (&_const4), // 0x0000000000FFFFFFLL
|
||||||
"rim" (_const6) // 0x00000000000000FFLL
|
"4" (&_const6) // 0x00000000000000FFLL
|
||||||
|
|
||||||
#if 0 /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
#if 0 /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||||
: "%mm0", "%mm1" // clobber list
|
: "%mm0", "%mm1" // clobber list
|
||||||
@ -5102,7 +5113,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
|||||||
case 1: sprintf(filnm, "sub-%s",
|
case 1: sprintf(filnm, "sub-%s",
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
#if !defined(PNG_1_0_X)
|
#if !defined(PNG_1_0_X)
|
||||||
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" :
|
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" :
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
"x86");
|
"x86");
|
||||||
@ -5339,6 +5350,7 @@ int PNGAPI
|
|||||||
png_mmx_support(void)
|
png_mmx_support(void)
|
||||||
{
|
{
|
||||||
#if defined(PNG_MMX_CODE_SUPPORTED)
|
#if defined(PNG_MMX_CODE_SUPPORTED)
|
||||||
|
int result;
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction
|
"pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction
|
||||||
"pushl %%ecx \n\t" // so does ecx...
|
"pushl %%ecx \n\t" // so does ecx...
|
||||||
@ -5380,7 +5392,6 @@ png_mmx_support(void)
|
|||||||
"0: \n\t" // .NOT_SUPPORTED: target label for jump instructions
|
"0: \n\t" // .NOT_SUPPORTED: target label for jump instructions
|
||||||
"movl $0, %%eax \n\t" // set return value to 0
|
"movl $0, %%eax \n\t" // set return value to 0
|
||||||
"1: \n\t" // .RETURN: target label for jump instructions
|
"1: \n\t" // .RETURN: target label for jump instructions
|
||||||
"movl %%eax, _mmx_supported \n\t" // save in global static variable, too
|
|
||||||
"popl %%edx \n\t" // restore edx
|
"popl %%edx \n\t" // restore edx
|
||||||
"popl %%ecx \n\t" // restore ecx
|
"popl %%ecx \n\t" // restore ecx
|
||||||
"popl %%ebx \n\t" // restore ebx
|
"popl %%ebx \n\t" // restore ebx
|
||||||
@ -5388,16 +5399,17 @@ png_mmx_support(void)
|
|||||||
// "ret \n\t" // DONE: no MMX support
|
// "ret \n\t" // DONE: no MMX support
|
||||||
// (fall through to standard C "ret")
|
// (fall through to standard C "ret")
|
||||||
|
|
||||||
: // output list (none)
|
: "=a" (result) // output list
|
||||||
|
|
||||||
: // any variables used on input (none)
|
: // any variables used on input (none)
|
||||||
|
|
||||||
: "%eax" // clobber list
|
// no clobber list
|
||||||
// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually
|
// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually
|
||||||
// , "memory" // if write to a variable gcc thought was in a reg
|
// , "memory" // if write to a variable gcc thought was in a reg
|
||||||
// , "cc" // "condition codes" (flag bits)
|
// , "cc" // "condition codes" (flag bits)
|
||||||
);
|
);
|
||||||
#else
|
_mmx_supported = result;
|
||||||
|
#else
|
||||||
_mmx_supported = 0;
|
_mmx_supported = 0;
|
||||||
#endif /* PNG_MMX_CODE_SUPPORTED */
|
#endif /* PNG_MMX_CODE_SUPPORTED */
|
||||||
|
|
||||||
|
|||||||
9
pngget.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngget.c - retrieval of values from info struct
|
/* pngget.c - retrieval of values from info struct
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -11,6 +11,8 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
|
|
||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
|
png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
|
||||||
{
|
{
|
||||||
@ -916,6 +918,7 @@ png_get_mmx_rowbytes_threshold (png_structp png_ptr)
|
|||||||
return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
|
return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
|
||||||
}
|
}
|
||||||
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
|
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||||
|
#endif /* ?PNG_1_0_X */
|
||||||
|
|
||||||
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||||
/* these functions were added to libpng 1.2.6 */
|
/* these functions were added to libpng 1.2.6 */
|
||||||
@ -931,4 +934,4 @@ png_get_user_height_max (png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
||||||
|
|
||||||
#endif /* ?PNG_1_0_X */
|
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||||
|
|||||||
7
pngmem.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngmem.c - stub functions for memory allocation
|
/* pngmem.c - stub functions for memory allocation
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -17,6 +17,8 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
|
|
||||||
/* Borland DOS special memory handler */
|
/* Borland DOS special memory handler */
|
||||||
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
|
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
|
||||||
/* if you change this, be sure to change the one in png.h also */
|
/* if you change this, be sure to change the one in png.h also */
|
||||||
@ -593,3 +595,4 @@ png_get_mem_ptr(png_structp png_ptr)
|
|||||||
return ((png_voidp)png_ptr->mem_ptr);
|
return ((png_voidp)png_ptr->mem_ptr);
|
||||||
}
|
}
|
||||||
#endif /* PNG_USER_MEM_SUPPORTED */
|
#endif /* PNG_USER_MEM_SUPPORTED */
|
||||||
|
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||||
|
|||||||
15
pngpread.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.11 - June 7, 2004
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -214,6 +214,10 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
|||||||
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
|
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
|
||||||
|
if(png_ptr->mode & PNG_AFTER_IDAT)
|
||||||
|
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
|
||||||
|
|
||||||
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
||||||
{
|
{
|
||||||
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
||||||
@ -281,8 +285,9 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
if (png_ptr->mode & PNG_HAVE_IDAT)
|
if (png_ptr->mode & PNG_HAVE_IDAT)
|
||||||
{
|
{
|
||||||
if (png_ptr->push_length == 0)
|
if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||||
return;
|
if (png_ptr->push_length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (png_ptr->mode & PNG_AFTER_IDAT)
|
if (png_ptr->mode & PNG_AFTER_IDAT)
|
||||||
png_error(png_ptr, "Too many IDAT's found");
|
png_error(png_ptr, "Too many IDAT's found");
|
||||||
@ -614,7 +619,7 @@ png_push_save_buffer(png_structp png_ptr)
|
|||||||
png_size_t new_max;
|
png_size_t new_max;
|
||||||
png_bytep old_buffer;
|
png_bytep old_buffer;
|
||||||
|
|
||||||
if (png_ptr->save_buffer_size > PNG_SIZE_MAX -
|
if (png_ptr->save_buffer_size > PNG_SIZE_MAX -
|
||||||
(png_ptr->current_buffer_size + 256))
|
(png_ptr->current_buffer_size + 256))
|
||||||
{
|
{
|
||||||
png_error(png_ptr, "Potential overflow of save_buffer");
|
png_error(png_ptr, "Potential overflow of save_buffer");
|
||||||
|
|||||||
35
pngread.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.11 June 7, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -14,6 +14,8 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED)
|
||||||
|
|
||||||
/* Create a PNG structure for reading, and allocate any memory needed. */
|
/* Create a PNG structure for reading, and allocate any memory needed. */
|
||||||
png_structp PNGAPI
|
png_structp PNGAPI
|
||||||
png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
|
png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||||
@ -75,7 +77,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
png_free(png_ptr, png_ptr->zbuf);
|
png_free(png_ptr, png_ptr->zbuf);
|
||||||
png_ptr->zbuf=NULL;
|
png_ptr->zbuf=NULL;
|
||||||
#ifdef PNG_USER_MEM_SUPPORTED
|
#ifdef PNG_USER_MEM_SUPPORTED
|
||||||
png_destroy_struct_2((png_voidp)png_ptr,
|
png_destroy_struct_2((png_voidp)png_ptr,
|
||||||
(png_free_ptr)free_fn, (png_voidp)mem_ptr);
|
(png_free_ptr)free_fn, (png_voidp)mem_ptr);
|
||||||
#else
|
#else
|
||||||
png_destroy_struct((png_voidp)png_ptr);
|
png_destroy_struct((png_voidp)png_ptr);
|
||||||
@ -169,10 +171,10 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
return (png_ptr);
|
return (png_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
||||||
/* Initialize PNG structure for reading, and allocate any memory needed.
|
/* Initialize PNG structure for reading, and allocate any memory needed.
|
||||||
This interface is deprecated in favour of the png_create_read_struct(),
|
This interface is deprecated in favour of the png_create_read_struct(),
|
||||||
and it will eventually disappear. */
|
and it will disappear as of libpng-1.3.0. */
|
||||||
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
|
||||||
#undef png_read_init
|
#undef png_read_init
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_read_init(png_structp png_ptr)
|
png_read_init(png_structp png_ptr)
|
||||||
@ -180,7 +182,6 @@ png_read_init(png_structp png_ptr)
|
|||||||
/* We only come here via pre-1.0.7-compiled applications */
|
/* We only come here via pre-1.0.7-compiled applications */
|
||||||
png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
|
png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||||
@ -188,7 +189,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
|||||||
{
|
{
|
||||||
/* We only come here via pre-1.0.12-compiled applications */
|
/* We only come here via pre-1.0.12-compiled applications */
|
||||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||||
if(png_sizeof(png_struct) > png_struct_size ||
|
if(png_sizeof(png_struct) > png_struct_size ||
|
||||||
png_sizeof(png_info) > png_info_size)
|
png_sizeof(png_info) > png_info_size)
|
||||||
{
|
{
|
||||||
char msg[80];
|
char msg[80];
|
||||||
@ -224,6 +225,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
|||||||
}
|
}
|
||||||
png_read_init_3(&png_ptr, user_png_ver, png_struct_size);
|
png_read_init_3(&png_ptr, user_png_ver, png_struct_size);
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_1_0_X || PNG_1_2_X */
|
||||||
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
||||||
@ -411,6 +413,10 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
/* This should be a binary subdivision search or a hash for
|
/* This should be a binary subdivision search or a hash for
|
||||||
* matching the chunk name rather than a linear search.
|
* matching the chunk name rather than a linear search.
|
||||||
*/
|
*/
|
||||||
|
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
|
||||||
|
if(png_ptr->mode & PNG_AFTER_IDAT)
|
||||||
|
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
|
||||||
|
|
||||||
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
||||||
png_handle_IHDR(png_ptr, info_ptr, length);
|
png_handle_IHDR(png_ptr, info_ptr, length);
|
||||||
else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
|
else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
|
||||||
@ -736,7 +742,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
|
|
||||||
png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
|
png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
|
||||||
png_ptr->rowbytes + 1);
|
png_ptr->rowbytes + 1);
|
||||||
|
|
||||||
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
||||||
if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
|
if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
|
||||||
(png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
|
(png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
|
||||||
@ -806,7 +812,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
|
* not called png_set_interlace_handling(), the display_row buffer will
|
||||||
* be ignored, so pass NULL to it.
|
* be ignored, so pass NULL to it.
|
||||||
*
|
*
|
||||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.18
|
* [*] png_handle_alpha() does not exist yet, as of this version of libpng
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
@ -856,7 +862,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
|||||||
* only call this function once. If you desire to have an image for
|
* only call this function once. If you desire to have an image for
|
||||||
* each pass of a interlaced image, use png_read_rows() instead.
|
* each pass of a interlaced image, use png_read_rows() instead.
|
||||||
*
|
*
|
||||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.18
|
* [*] png_handle_alpha() does not exist yet, as of this version of libpng
|
||||||
*/
|
*/
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_read_image(png_structp png_ptr, png_bytepp image)
|
png_read_image(png_structp png_ptr, png_bytepp image)
|
||||||
@ -983,11 +989,9 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
{
|
{
|
||||||
if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
|
if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
|
||||||
{
|
{
|
||||||
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
|
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||||
png_error(png_ptr, "Too many IDAT's found");
|
png_error(png_ptr, "Too many IDAT's found");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
|
||||||
png_handle_unknown(png_ptr, info_ptr, length);
|
png_handle_unknown(png_ptr, info_ptr, length);
|
||||||
if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
|
if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
|
||||||
png_ptr->mode |= PNG_HAVE_PLTE;
|
png_ptr->mode |= PNG_HAVE_PLTE;
|
||||||
@ -998,7 +1002,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
/* Zero length IDATs are legal after the last IDAT has been
|
/* Zero length IDATs are legal after the last IDAT has been
|
||||||
* read, but not after other chunks have been read.
|
* read, but not after other chunks have been read.
|
||||||
*/
|
*/
|
||||||
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
|
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||||
png_error(png_ptr, "Too many IDAT's found");
|
png_error(png_ptr, "Too many IDAT's found");
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
}
|
}
|
||||||
@ -1452,5 +1456,6 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
|||||||
/* quiet compiler warnings */ return;
|
/* quiet compiler warnings */ return;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* PNG_INFO_IMAGE_SUPPORTED */
|
||||||
#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
|
#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
9
pngrio.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngrio.c - functions for data input
|
/* pngrio.c - functions for data input
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -18,6 +18,8 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED)
|
||||||
|
|
||||||
/* Read the data from whatever input you are using. The default routine
|
/* Read the data from whatever input you are using. The default routine
|
||||||
reads from a file pointer. Note that this routine sometimes gets called
|
reads from a file pointer. Note that this routine sometimes gets called
|
||||||
with very small lengths, so you should implement some kind of simple
|
with very small lengths, so you should implement some kind of simple
|
||||||
@ -67,7 +69,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
|||||||
#define NEAR_BUF_SIZE 1024
|
#define NEAR_BUF_SIZE 1024
|
||||||
#define MIN(a,b) (a <= b ? a : b)
|
#define MIN(a,b) (a <= b ? a : b)
|
||||||
|
|
||||||
static void /* PRIVATE */
|
static void PNGAPI
|
||||||
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||||
{
|
{
|
||||||
int check;
|
int check;
|
||||||
@ -159,3 +161,4 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
|
|||||||
png_ptr->output_flush_fn = NULL;
|
png_ptr->output_flush_fn = NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
428
pngrtran.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -16,6 +16,8 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED)
|
||||||
|
|
||||||
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
|
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
|
png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
|
||||||
@ -549,7 +551,7 @@ void PNGAPI
|
|||||||
png_set_expand(png_structp png_ptr)
|
png_set_expand(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_expand\n");
|
png_debug(1, "in png_set_expand\n");
|
||||||
png_ptr->transformations |= PNG_EXPAND;
|
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GRR 19990627: the following three functions currently are identical
|
/* GRR 19990627: the following three functions currently are identical
|
||||||
@ -564,30 +566,47 @@ png_set_expand(png_structp png_ptr)
|
|||||||
*
|
*
|
||||||
* More to the point, these functions make it obvious what libpng will be
|
* More to the point, these functions make it obvious what libpng will be
|
||||||
* doing, whereas "expand" can (and does) mean any number of things.
|
* doing, whereas "expand" can (and does) mean any number of things.
|
||||||
|
*
|
||||||
|
* GRP 20060307: In libpng-1.4.0, png_set_gray_1_2_4_to_8() was modified
|
||||||
|
* to expand only the sample depth but not to expand the tRNS to alpha.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Expand paletted images to RGB. */
|
/* Expand paletted images to RGB. */
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_palette_to_rgb(png_structp png_ptr)
|
png_set_palette_to_rgb(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_expand\n");
|
png_debug(1, "in png_set_palette_to_rgb\n");
|
||||||
png_ptr->transformations |= PNG_EXPAND;
|
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(PNG_1_0_X)
|
||||||
/* Expand grayscale images of less than 8-bit depth to 8 bits. */
|
/* Expand grayscale images of less than 8-bit depth to 8 bits. */
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
|
png_set_expand_gray_1_2_4_to_8(png_structp png_ptr)
|
||||||
|
{
|
||||||
|
png_debug(1, "in png_set_expand_gray_1_2_4_to_8\n");
|
||||||
|
png_ptr->transformations |= PNG_EXPAND_tRNS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
||||||
|
/* Expand grayscale images of less than 8-bit depth to 8 bits. */
|
||||||
|
/* Deprecated as of libpng-1.2.9 */
|
||||||
|
void PNGAPI
|
||||||
png_set_gray_1_2_4_to_8(png_structp png_ptr)
|
png_set_gray_1_2_4_to_8(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_expand\n");
|
png_debug(1, "in png_set_gray_1_2_4_to_8\n");
|
||||||
png_ptr->transformations |= PNG_EXPAND;
|
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Expand tRNS chunks to alpha channels. */
|
/* Expand tRNS chunks to alpha channels. */
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_tRNS_to_alpha(png_structp png_ptr)
|
png_set_tRNS_to_alpha(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_expand\n");
|
png_debug(1, "in png_set_expand\n");
|
||||||
png_ptr->transformations |= PNG_EXPAND;
|
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||||
}
|
}
|
||||||
#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
|
#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
|
||||||
|
|
||||||
@ -705,23 +724,41 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
{
|
{
|
||||||
if (!(color_type & PNG_COLOR_MASK_COLOR)) /* i.e., GRAY or GRAY_ALPHA */
|
if (!(color_type & PNG_COLOR_MASK_COLOR)) /* i.e., GRAY or GRAY_ALPHA */
|
||||||
{
|
{
|
||||||
/* expand background chunk. */
|
/* expand background and tRNS chunks */
|
||||||
switch (png_ptr->bit_depth)
|
switch (png_ptr->bit_depth)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
png_ptr->background.gray *= (png_uint_16)0xff;
|
png_ptr->background.gray *= (png_uint_16)0xff;
|
||||||
png_ptr->background.red = png_ptr->background.green
|
png_ptr->background.red = png_ptr->background.green
|
||||||
= png_ptr->background.blue = png_ptr->background.gray;
|
= png_ptr->background.blue = png_ptr->background.gray;
|
||||||
|
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||||
|
{
|
||||||
|
png_ptr->trans_values.gray *= (png_uint_16)0xff;
|
||||||
|
png_ptr->trans_values.red = png_ptr->trans_values.green
|
||||||
|
= png_ptr->trans_values.blue = png_ptr->trans_values.gray;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
png_ptr->background.gray *= (png_uint_16)0x55;
|
png_ptr->background.gray *= (png_uint_16)0x55;
|
||||||
png_ptr->background.red = png_ptr->background.green
|
png_ptr->background.red = png_ptr->background.green
|
||||||
= png_ptr->background.blue = png_ptr->background.gray;
|
= png_ptr->background.blue = png_ptr->background.gray;
|
||||||
|
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||||
|
{
|
||||||
|
png_ptr->trans_values.gray *= (png_uint_16)0x55;
|
||||||
|
png_ptr->trans_values.red = png_ptr->trans_values.green
|
||||||
|
= png_ptr->trans_values.blue = png_ptr->trans_values.gray;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
png_ptr->background.gray *= (png_uint_16)0x11;
|
png_ptr->background.gray *= (png_uint_16)0x11;
|
||||||
png_ptr->background.red = png_ptr->background.green
|
png_ptr->background.red = png_ptr->background.green
|
||||||
= png_ptr->background.blue = png_ptr->background.gray;
|
= png_ptr->background.blue = png_ptr->background.gray;
|
||||||
|
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||||
|
{
|
||||||
|
png_ptr->trans_values.gray *= (png_uint_16)0x11;
|
||||||
|
png_ptr->trans_values.red = png_ptr->trans_values.green
|
||||||
|
= png_ptr->trans_values.blue = png_ptr->trans_values.gray;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
case 16:
|
case 16:
|
||||||
@ -743,7 +780,7 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
||||||
{
|
{
|
||||||
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
||||||
if (!(png_ptr->transformations & PNG_EXPAND))
|
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* invert the alpha channel (in tRNS) unless the pixels are
|
/* invert the alpha channel (in tRNS) unless the pixels are
|
||||||
@ -780,7 +817,8 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
png_ptr->transformations &= (~PNG_GAMMA);
|
png_ptr->transformations &= (~PNG_GAMMA);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY))
|
if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) &&
|
||||||
|
png_ptr->gamma != 0.0)
|
||||||
{
|
{
|
||||||
png_build_gamma_table(png_ptr);
|
png_build_gamma_table(png_ptr);
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED)
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||||
@ -788,7 +826,7 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
{
|
{
|
||||||
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
{
|
{
|
||||||
/* could skip if no transparency and
|
/* could skip if no transparency and
|
||||||
*/
|
*/
|
||||||
png_color back, back_1;
|
png_color back, back_1;
|
||||||
png_colorp palette = png_ptr->palette;
|
png_colorp palette = png_ptr->palette;
|
||||||
@ -1042,7 +1080,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
{
|
{
|
||||||
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
{
|
{
|
||||||
if (png_ptr->num_trans)
|
if (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||||
info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
|
info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
|
||||||
else
|
else
|
||||||
info_ptr->color_type = PNG_COLOR_TYPE_RGB;
|
info_ptr->color_type = PNG_COLOR_TYPE_RGB;
|
||||||
@ -1052,7 +1090,12 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (png_ptr->num_trans)
|
if (png_ptr->num_trans)
|
||||||
info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
|
{
|
||||||
|
if (png_ptr->transformations & PNG_EXPAND_tRNS)
|
||||||
|
info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
|
||||||
|
else
|
||||||
|
info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
|
||||||
|
}
|
||||||
if (info_ptr->bit_depth < 8)
|
if (info_ptr->bit_depth < 8)
|
||||||
info_ptr->bit_depth = 8;
|
info_ptr->bit_depth = 8;
|
||||||
info_ptr->num_trans = 0;
|
info_ptr->num_trans = 0;
|
||||||
@ -1086,6 +1129,16 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->bit_depth = 8;
|
info_ptr->bit_depth = 8;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
|
||||||
|
if (png_ptr->transformations & PNG_GRAY_TO_RGB)
|
||||||
|
info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||||
|
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
|
||||||
|
info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_DITHER_SUPPORTED)
|
#if defined(PNG_READ_DITHER_SUPPORTED)
|
||||||
if (png_ptr->transformations & PNG_DITHER)
|
if (png_ptr->transformations & PNG_DITHER)
|
||||||
{
|
{
|
||||||
@ -1103,16 +1156,6 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->bit_depth = 8;
|
info_ptr->bit_depth = 8;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
|
|
||||||
if (png_ptr->transformations & PNG_GRAY_TO_RGB)
|
|
||||||
info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
|
||||||
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
|
|
||||||
info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
info_ptr->channels = 1;
|
info_ptr->channels = 1;
|
||||||
else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
|
else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
|
||||||
@ -1198,7 +1241,7 @@ png_do_read_transformations(png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (png_ptr->num_trans)
|
if (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||||
png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
|
png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
|
||||||
&(png_ptr->trans_values));
|
&(png_ptr->trans_values));
|
||||||
else
|
else
|
||||||
@ -3601,8 +3644,8 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the bit depth < 8, it is expanded to 8. Also, if the
|
/* If the bit depth < 8, it is expanded to 8. Also, if the already
|
||||||
* transparency value is supplied, an alpha channel is built.
|
* expanded transparency value is supplied, an alpha channel is built.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_do_expand(png_row_infop row_info, png_bytep row,
|
png_do_expand(png_row_infop row_info, png_bytep row,
|
||||||
@ -3906,210 +3949,208 @@ void /* PRIVATE */
|
|||||||
png_build_gamma_table(png_structp png_ptr)
|
png_build_gamma_table(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_build_gamma_table\n");
|
png_debug(1, "in png_build_gamma_table\n");
|
||||||
if(png_ptr->gamma != 0.0)
|
|
||||||
|
if (png_ptr->bit_depth <= 8)
|
||||||
{
|
{
|
||||||
if (png_ptr->bit_depth <= 8)
|
int i;
|
||||||
{
|
double g;
|
||||||
int i;
|
|
||||||
double g;
|
|
||||||
|
|
||||||
if (png_ptr->screen_gamma > .000001)
|
if (png_ptr->screen_gamma > .000001)
|
||||||
g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
|
g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
|
||||||
else
|
else
|
||||||
g = 1.0;
|
g = 1.0;
|
||||||
|
|
||||||
png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr,
|
png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr,
|
||||||
(png_uint_32)256);
|
(png_uint_32)256);
|
||||||
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0,
|
png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0,
|
||||||
g) * 255.0 + .5);
|
g) * 255.0 + .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
||||||
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||||
if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY))
|
if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY))
|
||||||
{
|
{
|
||||||
|
|
||||||
g = 1.0 / (png_ptr->gamma);
|
g = 1.0 / (png_ptr->gamma);
|
||||||
|
|
||||||
png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr,
|
png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr,
|
||||||
(png_uint_32)256);
|
(png_uint_32)256);
|
||||||
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0,
|
png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0,
|
||||||
g) * 255.0 + .5);
|
g) * 255.0 + .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr,
|
png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr,
|
||||||
(png_uint_32)256);
|
(png_uint_32)256);
|
||||||
|
|
||||||
if(png_ptr->screen_gamma > 0.000001)
|
if(png_ptr->screen_gamma > 0.000001)
|
||||||
g = 1.0 / png_ptr->screen_gamma;
|
g = 1.0 / png_ptr->screen_gamma;
|
||||||
else
|
else
|
||||||
g = png_ptr->gamma; /* probably doing rgb_to_gray */
|
g = png_ptr->gamma; /* probably doing rgb_to_gray */
|
||||||
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0,
|
png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0,
|
||||||
g) * 255.0 + .5);
|
g) * 255.0 + .5);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
|
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double g;
|
double g;
|
||||||
int i, j, shift, num;
|
int i, j, shift, num;
|
||||||
int sig_bit;
|
int sig_bit;
|
||||||
png_uint_32 ig;
|
png_uint_32 ig;
|
||||||
|
|
||||||
if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
|
if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
|
||||||
{
|
{
|
||||||
sig_bit = (int)png_ptr->sig_bit.red;
|
sig_bit = (int)png_ptr->sig_bit.red;
|
||||||
if ((int)png_ptr->sig_bit.green > sig_bit)
|
if ((int)png_ptr->sig_bit.green > sig_bit)
|
||||||
sig_bit = png_ptr->sig_bit.green;
|
sig_bit = png_ptr->sig_bit.green;
|
||||||
if ((int)png_ptr->sig_bit.blue > sig_bit)
|
if ((int)png_ptr->sig_bit.blue > sig_bit)
|
||||||
sig_bit = png_ptr->sig_bit.blue;
|
sig_bit = png_ptr->sig_bit.blue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sig_bit = (int)png_ptr->sig_bit.gray;
|
sig_bit = (int)png_ptr->sig_bit.gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sig_bit > 0)
|
if (sig_bit > 0)
|
||||||
shift = 16 - sig_bit;
|
shift = 16 - sig_bit;
|
||||||
else
|
else
|
||||||
shift = 0;
|
shift = 0;
|
||||||
|
|
||||||
if (png_ptr->transformations & PNG_16_TO_8)
|
if (png_ptr->transformations & PNG_16_TO_8)
|
||||||
{
|
{
|
||||||
if (shift < (16 - PNG_MAX_GAMMA_8))
|
if (shift < (16 - PNG_MAX_GAMMA_8))
|
||||||
shift = (16 - PNG_MAX_GAMMA_8);
|
shift = (16 - PNG_MAX_GAMMA_8);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shift > 8)
|
if (shift > 8)
|
||||||
shift = 8;
|
shift = 8;
|
||||||
if (shift < 0)
|
if (shift < 0)
|
||||||
shift = 0;
|
shift = 0;
|
||||||
|
|
||||||
png_ptr->gamma_shift = (png_byte)shift;
|
png_ptr->gamma_shift = (png_byte)shift;
|
||||||
|
|
||||||
num = (1 << (8 - shift));
|
num = (1 << (8 - shift));
|
||||||
|
|
||||||
if (png_ptr->screen_gamma > .000001)
|
if (png_ptr->screen_gamma > .000001)
|
||||||
g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
|
g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
|
||||||
else
|
else
|
||||||
g = 1.0;
|
g = 1.0;
|
||||||
|
|
||||||
png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr,
|
png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr,
|
||||||
(png_uint_32)(num * png_sizeof (png_uint_16p)));
|
(png_uint_32)(num * png_sizeof (png_uint_16p)));
|
||||||
|
|
||||||
if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
|
if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
|
||||||
{
|
{
|
||||||
double fin, fout;
|
double fin, fout;
|
||||||
png_uint_32 last, max;
|
png_uint_32 last, max;
|
||||||
|
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
|
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||||
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
||||||
}
|
}
|
||||||
|
|
||||||
g = 1.0 / g;
|
g = 1.0 / g;
|
||||||
last = 0;
|
last = 0;
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
fout = ((double)i + 0.5) / 256.0;
|
fout = ((double)i + 0.5) / 256.0;
|
||||||
fin = pow(fout, g);
|
fin = pow(fout, g);
|
||||||
max = (png_uint_32)(fin * (double)((png_uint_32)num << 8));
|
max = (png_uint_32)(fin * (double)((png_uint_32)num << 8));
|
||||||
while (last <= max)
|
while (last <= max)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
|
png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
|
||||||
[(int)(last >> (8 - shift))] = (png_uint_16)(
|
[(int)(last >> (8 - shift))] = (png_uint_16)(
|
||||||
(png_uint_16)i | ((png_uint_16)i << 8));
|
(png_uint_16)i | ((png_uint_16)i << 8));
|
||||||
last++;
|
last++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (last < ((png_uint_32)num << 8))
|
while (last < ((png_uint_32)num << 8))
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
|
png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
|
||||||
[(int)(last >> (8 - shift))] = (png_uint_16)65535L;
|
[(int)(last >> (8 - shift))] = (png_uint_16)65535L;
|
||||||
last++;
|
last++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
|
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||||
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
||||||
|
|
||||||
ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4);
|
ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4);
|
||||||
for (j = 0; j < 256; j++)
|
for (j = 0; j < 256; j++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_table[i][j] =
|
png_ptr->gamma_16_table[i][j] =
|
||||||
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
|
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
|
||||||
65535.0, g) * 65535.0 + .5);
|
65535.0, g) * 65535.0 + .5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
||||||
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||||
if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
|
if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
|
||||||
{
|
{
|
||||||
|
|
||||||
g = 1.0 / (png_ptr->gamma);
|
g = 1.0 / (png_ptr->gamma);
|
||||||
|
|
||||||
png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr,
|
png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr,
|
||||||
(png_uint_32)(num * png_sizeof (png_uint_16p )));
|
(png_uint_32)(num * png_sizeof (png_uint_16p )));
|
||||||
|
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr,
|
png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||||
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
||||||
|
|
||||||
ig = (((png_uint_32)i *
|
ig = (((png_uint_32)i *
|
||||||
(png_uint_32)png_gamma_shift[shift]) >> 4);
|
(png_uint_32)png_gamma_shift[shift]) >> 4);
|
||||||
for (j = 0; j < 256; j++)
|
for (j = 0; j < 256; j++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_to_1[i][j] =
|
png_ptr->gamma_16_to_1[i][j] =
|
||||||
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
|
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
|
||||||
65535.0, g) * 65535.0 + .5);
|
65535.0, g) * 65535.0 + .5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(png_ptr->screen_gamma > 0.000001)
|
if(png_ptr->screen_gamma > 0.000001)
|
||||||
g = 1.0 / png_ptr->screen_gamma;
|
g = 1.0 / png_ptr->screen_gamma;
|
||||||
else
|
else
|
||||||
g = png_ptr->gamma; /* probably doing rgb_to_gray */
|
g = png_ptr->gamma; /* probably doing rgb_to_gray */
|
||||||
|
|
||||||
png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr,
|
png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr,
|
||||||
(png_uint_32)(num * png_sizeof (png_uint_16p)));
|
(png_uint_32)(num * png_sizeof (png_uint_16p)));
|
||||||
|
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr,
|
png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||||
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
||||||
|
|
||||||
ig = (((png_uint_32)i *
|
ig = (((png_uint_32)i *
|
||||||
(png_uint_32)png_gamma_shift[shift]) >> 4);
|
(png_uint_32)png_gamma_shift[shift]) >> 4);
|
||||||
for (j = 0; j < 256; j++)
|
for (j = 0; j < 256; j++)
|
||||||
{
|
{
|
||||||
png_ptr->gamma_16_from_1[i][j] =
|
png_ptr->gamma_16_from_1[i][j] =
|
||||||
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
|
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
|
||||||
65535.0, g) * 65535.0 + .5);
|
65535.0, g) * 65535.0 + .5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
|
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* To do: install integer version of png_build_gamma_table here */
|
/* To do: install integer version of png_build_gamma_table here */
|
||||||
@ -4175,3 +4216,4 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_MNG_FEATURES_SUPPORTED */
|
#endif /* PNG_MNG_FEATURES_SUPPORTED */
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
45
pngrutil.c
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.11 June 4, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -13,6 +14,8 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED)
|
||||||
|
|
||||||
#if defined(_WIN32_WCE)
|
#if defined(_WIN32_WCE)
|
||||||
/* strtod() function is not supported on WindowsCE */
|
/* strtod() function is not supported on WindowsCE */
|
||||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
@ -37,17 +40,17 @@ __inline double strtod(const char *nptr, char **endptr)
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
png_uint_32 /* PRIVATE */
|
png_uint_32 PNGAPI
|
||||||
png_get_uint_31(png_structp png_ptr, png_bytep buf)
|
png_get_uint_31(png_structp png_ptr, png_bytep buf)
|
||||||
{
|
{
|
||||||
png_uint_32 i = png_get_uint_32(buf);
|
png_uint_32 i = png_get_uint_32(buf);
|
||||||
if (i > PNG_UINT_31_MAX)
|
if (i > PNG_UINT_31_MAX)
|
||||||
png_error(png_ptr, "PNG unsigned integer out of range.\n");
|
png_error(png_ptr, "PNG unsigned integer out of range.");
|
||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
|
#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
|
||||||
/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
|
/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
|
||||||
png_uint_32 /* PRIVATE */
|
png_uint_32 PNGAPI
|
||||||
png_get_uint_32(png_bytep buf)
|
png_get_uint_32(png_bytep buf)
|
||||||
{
|
{
|
||||||
png_uint_32 i = ((png_uint_32)(*buf) << 24) +
|
png_uint_32 i = ((png_uint_32)(*buf) << 24) +
|
||||||
@ -58,11 +61,10 @@ png_get_uint_32(png_bytep buf)
|
|||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_READ_oFFs_SUPPORTED)
|
|
||||||
/* Grab a signed 32-bit integer from a buffer in big-endian format. The
|
/* Grab a signed 32-bit integer from a buffer in big-endian format. The
|
||||||
* data is stored in the PNG file in two's complement format, and it is
|
* data is stored in the PNG file in two's complement format, and it is
|
||||||
* assumed that the machine format for signed integers is the same. */
|
* assumed that the machine format for signed integers is the same. */
|
||||||
png_int_32 /* PRIVATE */
|
png_int_32 PNGAPI
|
||||||
png_get_int_32(png_bytep buf)
|
png_get_int_32(png_bytep buf)
|
||||||
{
|
{
|
||||||
png_int_32 i = ((png_int_32)(*buf) << 24) +
|
png_int_32 i = ((png_int_32)(*buf) << 24) +
|
||||||
@ -72,10 +74,9 @@ png_get_int_32(png_bytep buf)
|
|||||||
|
|
||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
#endif /* PNG_READ_pCAL_SUPPORTED */
|
|
||||||
|
|
||||||
/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */
|
/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */
|
||||||
png_uint_16 /* PRIVATE */
|
png_uint_16 PNGAPI
|
||||||
png_get_uint_16(png_bytep buf)
|
png_get_uint_16(png_bytep buf)
|
||||||
{
|
{
|
||||||
png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) +
|
png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) +
|
||||||
@ -619,7 +620,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PNG_READ_sRGB_SUPPORTED)
|
#if defined(PNG_READ_sRGB_SUPPORTED)
|
||||||
if (info_ptr->valid & PNG_INFO_sRGB)
|
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB))
|
||||||
if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))
|
if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))
|
||||||
{
|
{
|
||||||
png_warning(png_ptr,
|
png_warning(png_ptr,
|
||||||
@ -777,8 +778,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
png_crc_read(png_ptr, buf, 4);
|
png_crc_read(png_ptr, buf, 4);
|
||||||
uint_y = png_get_uint_32(buf);
|
uint_y = png_get_uint_32(buf);
|
||||||
|
|
||||||
if (uint_x > 80000L || uint_y > 80000L ||
|
if (uint_x + uint_y > 100000L)
|
||||||
uint_x + uint_y > 100000L)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid cHRM red point");
|
png_warning(png_ptr, "Invalid cHRM red point");
|
||||||
png_crc_finish(png_ptr, 16);
|
png_crc_finish(png_ptr, 16);
|
||||||
@ -793,8 +793,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
png_crc_read(png_ptr, buf, 4);
|
png_crc_read(png_ptr, buf, 4);
|
||||||
uint_y = png_get_uint_32(buf);
|
uint_y = png_get_uint_32(buf);
|
||||||
|
|
||||||
if (uint_x > 80000L || uint_y > 80000L ||
|
if (uint_x + uint_y > 100000L)
|
||||||
uint_x + uint_y > 100000L)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid cHRM green point");
|
png_warning(png_ptr, "Invalid cHRM green point");
|
||||||
png_crc_finish(png_ptr, 8);
|
png_crc_finish(png_ptr, 8);
|
||||||
@ -809,8 +808,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
png_crc_read(png_ptr, buf, 4);
|
png_crc_read(png_ptr, buf, 4);
|
||||||
uint_y = png_get_uint_32(buf);
|
uint_y = png_get_uint_32(buf);
|
||||||
|
|
||||||
if (uint_x > 80000L || uint_y > 80000L ||
|
if (uint_x + uint_y > 100000L)
|
||||||
uint_x + uint_y > 100000L)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid cHRM blue point");
|
png_warning(png_ptr, "Invalid cHRM blue point");
|
||||||
png_crc_finish(png_ptr, 0);
|
png_crc_finish(png_ptr, 0);
|
||||||
@ -831,7 +829,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_sRGB_SUPPORTED)
|
#if defined(PNG_READ_sRGB_SUPPORTED)
|
||||||
if (info_ptr->valid & PNG_INFO_sRGB)
|
if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB))
|
||||||
{
|
{
|
||||||
if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) ||
|
if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) ||
|
||||||
PNG_OUT_OF_RANGE(int_y_white, 32900, 1000) ||
|
PNG_OUT_OF_RANGE(int_y_white, 32900, 1000) ||
|
||||||
@ -842,7 +840,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
PNG_OUT_OF_RANGE(int_x_blue, 15000, 1000) ||
|
PNG_OUT_OF_RANGE(int_x_blue, 15000, 1000) ||
|
||||||
PNG_OUT_OF_RANGE(int_y_blue, 6000, 1000))
|
PNG_OUT_OF_RANGE(int_y_blue, 6000, 1000))
|
||||||
{
|
{
|
||||||
|
|
||||||
png_warning(png_ptr,
|
png_warning(png_ptr,
|
||||||
"Ignoring incorrect cHRM value when sRGB is also present");
|
"Ignoring incorrect cHRM value when sRGB is also present");
|
||||||
#ifndef PNG_NO_CONSOLE_IO
|
#ifndef PNG_NO_CONSOLE_IO
|
||||||
@ -926,7 +923,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
|
#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
|
||||||
if ((info_ptr->valid & PNG_INFO_gAMA))
|
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA))
|
||||||
{
|
{
|
||||||
png_fixed_point igamma;
|
png_fixed_point igamma;
|
||||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||||
@ -955,7 +952,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
|
|
||||||
#ifdef PNG_READ_cHRM_SUPPORTED
|
#ifdef PNG_READ_cHRM_SUPPORTED
|
||||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||||
if (info_ptr->valid & PNG_INFO_cHRM)
|
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
|
||||||
if (PNG_OUT_OF_RANGE(info_ptr->int_x_white, 31270, 1000) ||
|
if (PNG_OUT_OF_RANGE(info_ptr->int_x_white, 31270, 1000) ||
|
||||||
PNG_OUT_OF_RANGE(info_ptr->int_y_white, 32900, 1000) ||
|
PNG_OUT_OF_RANGE(info_ptr->int_y_white, 32900, 1000) ||
|
||||||
PNG_OUT_OF_RANGE(info_ptr->int_x_red, 64000L, 1000) ||
|
PNG_OUT_OF_RANGE(info_ptr->int_x_red, 64000L, 1000) ||
|
||||||
@ -1079,7 +1076,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
if(profile_size > profile_length)
|
if(profile_size > profile_length)
|
||||||
{
|
{
|
||||||
png_free(png_ptr, chunkdata);
|
png_free(png_ptr, chunkdata);
|
||||||
png_warning(png_ptr, "Ignoring truncated iCCP profile.\n");
|
png_warning(png_ptr, "Ignoring truncated iCCP profile.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1160,7 +1157,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_palette.nentries = (png_uint_32) (data_length / entry_size);
|
new_palette.nentries = (png_int_32) ( data_length / entry_size);
|
||||||
if ((png_uint_32) new_palette.nentries > (png_uint_32) (PNG_SIZE_MAX /
|
if ((png_uint_32) new_palette.nentries > (png_uint_32) (PNG_SIZE_MAX /
|
||||||
png_sizeof(png_sPLT_entry)))
|
png_sizeof(png_sPLT_entry)))
|
||||||
{
|
{
|
||||||
@ -2170,7 +2167,8 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
||||||
if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
|
if ((png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) ||
|
||||||
|
(png_ptr->read_user_chunk_fn != NULL))
|
||||||
{
|
{
|
||||||
png_unknown_chunk chunk;
|
png_unknown_chunk chunk;
|
||||||
|
|
||||||
@ -3122,3 +3120,4 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
|||||||
|
|
||||||
png_ptr->flags |= PNG_FLAG_ROW_INIT;
|
png_ptr->flags |= PNG_FLAG_ROW_INIT;
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
76
pngset.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -16,6 +16,8 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
|
|
||||||
#if defined(PNG_bKGD_SUPPORTED)
|
#if defined(PNG_bKGD_SUPPORTED)
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
|
png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
|
||||||
@ -100,6 +102,7 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
|
|||||||
"Ignoring attempt to set negative chromaticity value");
|
"Ignoring attempt to set negative chromaticity value");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
if (white_x > (double) PNG_UINT_31_MAX ||
|
if (white_x > (double) PNG_UINT_31_MAX ||
|
||||||
white_y > (double) PNG_UINT_31_MAX ||
|
white_y > (double) PNG_UINT_31_MAX ||
|
||||||
red_x > (double) PNG_UINT_31_MAX ||
|
red_x > (double) PNG_UINT_31_MAX ||
|
||||||
@ -108,6 +111,16 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
|
|||||||
green_y > (double) PNG_UINT_31_MAX ||
|
green_y > (double) PNG_UINT_31_MAX ||
|
||||||
blue_x > (double) PNG_UINT_31_MAX ||
|
blue_x > (double) PNG_UINT_31_MAX ||
|
||||||
blue_y > (double) PNG_UINT_31_MAX)
|
blue_y > (double) PNG_UINT_31_MAX)
|
||||||
|
#else
|
||||||
|
if (white_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||||
|
white_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||||
|
red_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||||
|
red_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||||
|
green_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||||
|
green_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||||
|
blue_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||||
|
blue_y > (png_fixed_point) PNG_UINT_31_MAX/100000L)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
png_warning(png_ptr,
|
png_warning(png_ptr,
|
||||||
"Ignoring attempt to set chromaticity value exceeding 21474.83");
|
"Ignoring attempt to set chromaticity value exceeding 21474.83");
|
||||||
@ -209,19 +222,21 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
|
|||||||
png_debug1(1, "in %s storage function\n", "hIST");
|
png_debug1(1, "in %s storage function\n", "hIST");
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
if (info_ptr->num_palette == 0)
|
if (info_ptr->num_palette <= 0 || info_ptr->num_palette
|
||||||
|
> PNG_MAX_PALETTE_LENGTH)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr,
|
png_warning(png_ptr,
|
||||||
"Palette size 0, hIST allocation skipped.");
|
"Invalid palette size, hIST allocation skipped.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_FREE_ME_SUPPORTED
|
#ifdef PNG_FREE_ME_SUPPORTED
|
||||||
png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
|
png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
|
||||||
#endif
|
#endif
|
||||||
/* Changed from info->num_palette to 256 in version 1.2.1 */
|
/* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in version
|
||||||
|
1.2.1 */
|
||||||
png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
|
png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
|
||||||
(png_uint_32)(256 * png_sizeof (png_uint_16)));
|
(png_uint_32)(PNG_MAX_PALETTE_LENGTH * png_sizeof (png_uint_16)));
|
||||||
if (png_ptr->hist == NULL)
|
if (png_ptr->hist == NULL)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Insufficient memory for hIST chunk data.");
|
png_warning(png_ptr, "Insufficient memory for hIST chunk data.");
|
||||||
@ -303,13 +318,13 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
|
|||||||
* 5. The color_type is RGB or RGBA
|
* 5. The color_type is RGB or RGBA
|
||||||
*/
|
*/
|
||||||
if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&png_ptr->mng_features_permitted)
|
if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&png_ptr->mng_features_permitted)
|
||||||
png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n");
|
png_warning(png_ptr,"MNG features are not allowed in a PNG datastream");
|
||||||
if(filter_type != PNG_FILTER_TYPE_BASE)
|
if(filter_type != PNG_FILTER_TYPE_BASE)
|
||||||
{
|
{
|
||||||
if(!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
|
if(!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
|
||||||
(filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
|
(filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
|
||||||
((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
|
((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
|
||||||
(color_type == PNG_COLOR_TYPE_RGB ||
|
(color_type == PNG_COLOR_TYPE_RGB ||
|
||||||
color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
|
color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
|
||||||
png_error(png_ptr, "Unknown filter method in IHDR");
|
png_error(png_ptr, "Unknown filter method in IHDR");
|
||||||
if(png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)
|
if(png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)
|
||||||
@ -517,6 +532,17 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
|
|||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH)
|
||||||
|
{
|
||||||
|
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
|
png_error(png_ptr, "Invalid palette length");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Invalid palette length");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It may not actually be necessary to set png_ptr->palette here;
|
* It may not actually be necessary to set png_ptr->palette here;
|
||||||
* we do it for backward compatibility with the way the png_handle_tRNS
|
* we do it for backward compatibility with the way the png_handle_tRNS
|
||||||
@ -526,11 +552,13 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);
|
png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Changed in libpng-1.2.1 to allocate 256 instead of num_palette entries,
|
/* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead
|
||||||
|
of num_palette entries,
|
||||||
in case of an invalid PNG file that has too-large sample values. */
|
in case of an invalid PNG file that has too-large sample values. */
|
||||||
png_ptr->palette = (png_colorp)png_malloc(png_ptr,
|
png_ptr->palette = (png_colorp)png_malloc(png_ptr,
|
||||||
256 * png_sizeof(png_color));
|
PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
|
||||||
png_memset(png_ptr->palette, 0, 256 * png_sizeof(png_color));
|
png_memset(png_ptr->palette, 0, PNG_MAX_PALETTE_LENGTH *
|
||||||
|
png_sizeof(png_color));
|
||||||
png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof (png_color));
|
png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof (png_color));
|
||||||
info_ptr->palette = png_ptr->palette;
|
info_ptr->palette = png_ptr->palette;
|
||||||
info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
|
info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
|
||||||
@ -890,10 +918,11 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
|
|||||||
#ifdef PNG_FREE_ME_SUPPORTED
|
#ifdef PNG_FREE_ME_SUPPORTED
|
||||||
png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
|
png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
|
||||||
#endif
|
#endif
|
||||||
/* Changed from num_trans to 256 in version 1.2.1 */
|
/* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */
|
||||||
png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr,
|
png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr,
|
||||||
(png_uint_32)256);
|
(png_uint_32)PNG_MAX_PALETTE_LENGTH);
|
||||||
png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);
|
if (num_trans <= PNG_MAX_PALETTE_LENGTH)
|
||||||
|
png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);
|
||||||
#ifdef PNG_FREE_ME_SUPPORTED
|
#ifdef PNG_FREE_ME_SUPPORTED
|
||||||
info_ptr->free_me |= PNG_FREE_TRNS;
|
info_ptr->free_me |= PNG_FREE_TRNS;
|
||||||
#else
|
#else
|
||||||
@ -921,6 +950,9 @@ png_set_sPLT(png_structp png_ptr,
|
|||||||
png_sPLT_tp np;
|
png_sPLT_tp np;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
np = (png_sPLT_tp)png_malloc_warn(png_ptr,
|
np = (png_sPLT_tp)png_malloc_warn(png_ptr,
|
||||||
(info_ptr->splt_palettes_num + nentries) * png_sizeof(png_sPLT_t));
|
(info_ptr->splt_palettes_num + nentries) * png_sizeof(png_sPLT_t));
|
||||||
if (np == NULL)
|
if (np == NULL)
|
||||||
@ -1023,13 +1055,14 @@ png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
||||||
#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
|
#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
|
||||||
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
|
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
|
png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
|
||||||
{
|
{
|
||||||
/* This function is deprecated in favor of png_permit_mng_features()
|
/* This function is deprecated in favor of png_permit_mng_features()
|
||||||
and will be removed from libpng-2.0.0 */
|
and will be removed from libpng-1.3.0 */
|
||||||
png_debug(1, "in png_permit_empty_plte, DEPRECATED.\n");
|
png_debug(1, "in png_permit_empty_plte, DEPRECATED.\n");
|
||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
@ -1038,6 +1071,7 @@ png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
|
|||||||
((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE)));
|
((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
@ -1059,6 +1093,8 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
|
|||||||
{
|
{
|
||||||
png_bytep new_list, p;
|
png_bytep new_list, p;
|
||||||
int i, old_num_chunks;
|
int i, old_num_chunks;
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
if (num_chunks == 0)
|
if (num_chunks == 0)
|
||||||
{
|
{
|
||||||
if(keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE)
|
if(keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE)
|
||||||
@ -1102,6 +1138,8 @@ png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,
|
|||||||
png_user_chunk_ptr read_user_chunk_fn)
|
png_user_chunk_ptr read_user_chunk_fn)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_read_user_chunk_fn\n");
|
png_debug(1, "in png_set_read_user_chunk_fn\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->read_user_chunk_fn = read_user_chunk_fn;
|
png_ptr->read_user_chunk_fn = read_user_chunk_fn;
|
||||||
png_ptr->user_chunk_ptr = user_chunk_ptr;
|
png_ptr->user_chunk_ptr = user_chunk_ptr;
|
||||||
}
|
}
|
||||||
@ -1128,6 +1166,8 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
|
|||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_compression_buffer_size(png_structp png_ptr, png_uint_32 size)
|
png_set_compression_buffer_size(png_structp png_ptr, png_uint_32 size)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
if(png_ptr->zbuf)
|
if(png_ptr->zbuf)
|
||||||
png_free(png_ptr, png_ptr->zbuf);
|
png_free(png_ptr, png_ptr->zbuf);
|
||||||
png_ptr->zbuf_size = (png_size_t)size;
|
png_ptr->zbuf_size = (png_size_t)size;
|
||||||
@ -1154,6 +1194,9 @@ png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
|
|||||||
png_uint_32 settable_asm_flags;
|
png_uint_32 settable_asm_flags;
|
||||||
png_uint_32 settable_mmx_flags;
|
png_uint_32 settable_mmx_flags;
|
||||||
|
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
settable_mmx_flags =
|
settable_mmx_flags =
|
||||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||||
PNG_ASM_FLAG_MMX_READ_COMBINE_ROW |
|
PNG_ASM_FLAG_MMX_READ_COMBINE_ROW |
|
||||||
@ -1196,6 +1239,8 @@ png_set_mmx_thresholds (png_structp png_ptr,
|
|||||||
png_byte mmx_bitdepth_threshold,
|
png_byte mmx_bitdepth_threshold,
|
||||||
png_uint_32 mmx_rowbytes_threshold)
|
png_uint_32 mmx_rowbytes_threshold)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->mmx_bitdepth_threshold = mmx_bitdepth_threshold;
|
png_ptr->mmx_bitdepth_threshold = mmx_bitdepth_threshold;
|
||||||
png_ptr->mmx_rowbytes_threshold = mmx_rowbytes_threshold;
|
png_ptr->mmx_rowbytes_threshold = mmx_rowbytes_threshold;
|
||||||
}
|
}
|
||||||
@ -1217,3 +1262,4 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
|
|||||||
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
||||||
|
|
||||||
#endif /* ?PNG_1_0_X */
|
#endif /* ?PNG_1_0_X */
|
||||||
|
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.6 - August 15, 2004
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -44,7 +44,6 @@
|
|||||||
#else
|
#else
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <assert.h>
|
|
||||||
# define READFILE(file, data, length, check) \
|
# define READFILE(file, data, length, check) \
|
||||||
check=(png_size_t)fread(data,(png_size_t)1,length,file)
|
check=(png_size_t)fread(data,(png_size_t)1,length,file)
|
||||||
# define WRITEFILE(file, data, length, check) \
|
# define WRITEFILE(file, data, length, check) \
|
||||||
@ -538,7 +537,6 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size)
|
|||||||
png_memset(pinfo->pointer, 0xdd, pinfo->size);
|
png_memset(pinfo->pointer, 0xdd, pinfo->size);
|
||||||
if(verbose)
|
if(verbose)
|
||||||
printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer);
|
printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer);
|
||||||
assert(pinfo->size != 12345678);
|
|
||||||
return (png_voidp)(pinfo->pointer);
|
return (png_voidp)(pinfo->pointer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1435,7 +1433,7 @@ main(int argc, char *argv[])
|
|||||||
current_allocation);
|
current_allocation);
|
||||||
while (pinfo != NULL)
|
while (pinfo != NULL)
|
||||||
{
|
{
|
||||||
fprintf(STDERR, " %lu bytes at %x\n", pinfo->size,
|
fprintf(STDERR, " %lu bytes at %x\n", pinfo->size,
|
||||||
(unsigned int) pinfo->pointer);
|
(unsigned int) pinfo->pointer);
|
||||||
pinfo = pinfo->next;
|
pinfo = pinfo->next;
|
||||||
}
|
}
|
||||||
@ -1551,4 +1549,4 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef version_1_0_18 your_png_h_is_not_version_1_0_18;
|
typedef version_1_0_19rc1 your_png_h_is_not_version_1_0_19rc1;
|
||||||
|
|||||||
18
pngtrans.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -11,6 +11,7 @@
|
|||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||||
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
|
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
|
||||||
/* turn on BGR-to-RGB mapping */
|
/* turn on BGR-to-RGB mapping */
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
@ -241,7 +242,7 @@ png_do_swap(png_row_infop row_info, png_bytep row)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
|
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
|
||||||
static png_byte onebppswaptable[256] = {
|
static PNG_CONST png_byte onebppswaptable[256] = {
|
||||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
|
||||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
|
||||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||||
@ -276,7 +277,7 @@ static png_byte onebppswaptable[256] = {
|
|||||||
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
|
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
|
||||||
};
|
};
|
||||||
|
|
||||||
static png_byte twobppswaptable[256] = {
|
static PNG_CONST png_byte twobppswaptable[256] = {
|
||||||
0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0,
|
0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0,
|
||||||
0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0,
|
0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0,
|
||||||
0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4,
|
0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4,
|
||||||
@ -311,7 +312,7 @@ static png_byte twobppswaptable[256] = {
|
|||||||
0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF
|
0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF
|
||||||
};
|
};
|
||||||
|
|
||||||
static png_byte fourbppswaptable[256] = {
|
static PNG_CONST png_byte fourbppswaptable[256] = {
|
||||||
0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70,
|
0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70,
|
||||||
0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0,
|
0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0,
|
||||||
0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71,
|
0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71,
|
||||||
@ -362,11 +363,11 @@ png_do_packswap(png_row_infop row_info, png_bytep row)
|
|||||||
end = row + row_info->rowbytes;
|
end = row + row_info->rowbytes;
|
||||||
|
|
||||||
if (row_info->bit_depth == 1)
|
if (row_info->bit_depth == 1)
|
||||||
table = onebppswaptable;
|
table = (png_bytep)onebppswaptable;
|
||||||
else if (row_info->bit_depth == 2)
|
else if (row_info->bit_depth == 2)
|
||||||
table = twobppswaptable;
|
table = (png_bytep)twobppswaptable;
|
||||||
else if (row_info->bit_depth == 4)
|
else if (row_info->bit_depth == 4)
|
||||||
table = fourbppswaptable;
|
table = (png_bytep)fourbppswaptable;
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -648,3 +649,4 @@ png_get_user_transform_ptr(png_structp png_ptr)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
/* pngvcrd.c - mixed C/assembler version of utilities to read a PNG file
|
/* pngvcrd.c - mixed C/assembler version of utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.6 - August 15, 2004
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1998, Intel Corporation
|
* Copyright (c) 1998, Intel Corporation
|
||||||
|
|||||||
4
pngwio.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngwio.c - functions for data output
|
/* pngwio.c - functions for data output
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.3 - May 21, 2002
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
|
|||||||
71
pngwrite.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -26,13 +26,15 @@ void PNGAPI
|
|||||||
png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
|
png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_write_info_before_PLTE\n");
|
png_debug(1, "in png_write_info_before_PLTE\n");
|
||||||
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
|
return;
|
||||||
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
|
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
|
||||||
{
|
{
|
||||||
png_write_sig(png_ptr); /* write PNG signature */
|
png_write_sig(png_ptr); /* write PNG signature */
|
||||||
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
||||||
if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted))
|
if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted))
|
||||||
{
|
{
|
||||||
png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n");
|
png_warning(png_ptr,"MNG features are not allowed in a PNG datastream");
|
||||||
png_ptr->mng_features_permitted=0;
|
png_ptr->mng_features_permitted=0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -128,13 +130,16 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
png_debug(1, "in png_write_info\n");
|
png_debug(1, "in png_write_info\n");
|
||||||
|
|
||||||
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
png_write_info_before_PLTE(png_ptr, info_ptr);
|
png_write_info_before_PLTE(png_ptr, info_ptr);
|
||||||
|
|
||||||
if (info_ptr->valid & PNG_INFO_PLTE)
|
if (info_ptr->valid & PNG_INFO_PLTE)
|
||||||
png_write_PLTE(png_ptr, info_ptr->palette,
|
png_write_PLTE(png_ptr, info_ptr->palette,
|
||||||
(png_uint_32)info_ptr->num_palette);
|
(png_uint_32)info_ptr->num_palette);
|
||||||
else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
png_error(png_ptr, "Valid palette required for paletted images\n");
|
png_error(png_ptr, "Valid palette required for paletted images");
|
||||||
|
|
||||||
#if defined(PNG_WRITE_tRNS_SUPPORTED)
|
#if defined(PNG_WRITE_tRNS_SUPPORTED)
|
||||||
if (info_ptr->valid & PNG_INFO_tRNS)
|
if (info_ptr->valid & PNG_INFO_tRNS)
|
||||||
@ -183,7 +188,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->scal_s_width, info_ptr->scal_s_height);
|
info_ptr->scal_s_width, info_ptr->scal_s_height);
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr,
|
png_warning(png_ptr,
|
||||||
"png_write_sCAL not supported; sCAL chunk not written.\n");
|
"png_write_sCAL not supported; sCAL chunk not written.");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -222,7 +227,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->text[i].lang_key,
|
info_ptr->text[i].lang_key,
|
||||||
info_ptr->text[i].text);
|
info_ptr->text[i].text);
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write international text\n");
|
png_warning(png_ptr, "Unable to write international text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
/* Mark this chunk as written */
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
||||||
@ -236,7 +241,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->text[i].text, 0,
|
info_ptr->text[i].text, 0,
|
||||||
info_ptr->text[i].compression);
|
info_ptr->text[i].compression);
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write compressed text\n");
|
png_warning(png_ptr, "Unable to write compressed text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
/* Mark this chunk as written */
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
||||||
@ -249,7 +254,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->text[i].text,
|
info_ptr->text[i].text,
|
||||||
0);
|
0);
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write uncompressed text\n");
|
png_warning(png_ptr, "Unable to write uncompressed text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
/* Mark this chunk as written */
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
||||||
@ -290,6 +295,8 @@ void PNGAPI
|
|||||||
png_write_end(png_structp png_ptr, png_infop info_ptr)
|
png_write_end(png_structp png_ptr, png_infop info_ptr)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_write_end\n");
|
png_debug(1, "in png_write_end\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
if (!(png_ptr->mode & PNG_HAVE_IDAT))
|
if (!(png_ptr->mode & PNG_HAVE_IDAT))
|
||||||
png_error(png_ptr, "No IDATs written into file");
|
png_error(png_ptr, "No IDATs written into file");
|
||||||
|
|
||||||
@ -323,7 +330,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->text[i].lang_key,
|
info_ptr->text[i].lang_key,
|
||||||
info_ptr->text[i].text);
|
info_ptr->text[i].text);
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write international text\n");
|
png_warning(png_ptr, "Unable to write international text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
/* Mark this chunk as written */
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
||||||
@ -336,7 +343,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->text[i].text, 0,
|
info_ptr->text[i].text, 0,
|
||||||
info_ptr->text[i].compression);
|
info_ptr->text[i].compression);
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write compressed text\n");
|
png_warning(png_ptr, "Unable to write compressed text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
/* Mark this chunk as written */
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
||||||
@ -348,7 +355,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
png_write_tEXt(png_ptr, info_ptr->text[i].key,
|
png_write_tEXt(png_ptr, info_ptr->text[i].key,
|
||||||
info_ptr->text[i].text, 0);
|
info_ptr->text[i].text, 0);
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write uncompressed text\n");
|
png_warning(png_ptr, "Unable to write uncompressed text");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Mark this chunk as written */
|
/* Mark this chunk as written */
|
||||||
@ -554,6 +561,8 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize png_ptr structure, and allocate any memory needed */
|
/* Initialize png_ptr structure, and allocate any memory needed */
|
||||||
|
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
|
||||||
|
/* Deprecated. */
|
||||||
#undef png_write_init
|
#undef png_write_init
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_write_init(png_structp png_ptr)
|
png_write_init(png_structp png_ptr)
|
||||||
@ -604,6 +613,7 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
|||||||
}
|
}
|
||||||
png_write_init_3(&png_ptr, user_png_ver, png_struct_size);
|
png_write_init_3(&png_ptr, user_png_ver, png_struct_size);
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_1_0_X || PNG_1_2_X */
|
||||||
|
|
||||||
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
@ -614,7 +624,12 @@ png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
|||||||
#ifdef PNG_SETJMP_SUPPORTED
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
jmp_buf tmp_jmp; /* to save current jump buffer */
|
jmp_buf tmp_jmp; /* to save current jump buffer */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (user_png_ver[i] != png_libpng_ver[i])
|
if (user_png_ver[i] != png_libpng_ver[i])
|
||||||
@ -691,6 +706,10 @@ png_write_rows(png_structp png_ptr, png_bytepp row,
|
|||||||
png_bytepp rp; /* row pointer */
|
png_bytepp rp; /* row pointer */
|
||||||
|
|
||||||
png_debug(1, "in png_write_rows\n");
|
png_debug(1, "in png_write_rows\n");
|
||||||
|
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
/* loop through the rows */
|
/* loop through the rows */
|
||||||
for (i = 0, rp = row; i < num_rows; i++, rp++)
|
for (i = 0, rp = row; i < num_rows; i++, rp++)
|
||||||
{
|
{
|
||||||
@ -708,6 +727,9 @@ png_write_image(png_structp png_ptr, png_bytepp image)
|
|||||||
int pass, num_pass; /* pass variables */
|
int pass, num_pass; /* pass variables */
|
||||||
png_bytepp rp; /* points to current row */
|
png_bytepp rp; /* points to current row */
|
||||||
|
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
png_debug(1, "in png_write_image\n");
|
png_debug(1, "in png_write_image\n");
|
||||||
#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
||||||
/* intialize interlace handling. If image is not interlaced,
|
/* intialize interlace handling. If image is not interlaced,
|
||||||
@ -731,8 +753,11 @@ png_write_image(png_structp png_ptr, png_bytepp image)
|
|||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_write_row(png_structp png_ptr, png_bytep row)
|
png_write_row(png_structp png_ptr, png_bytep row)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_debug2(1, "in png_write_row (row %ld, pass %d)\n",
|
png_debug2(1, "in png_write_row (row %ld, pass %d)\n",
|
||||||
png_ptr->row_number, png_ptr->pass);
|
png_ptr->row_number, png_ptr->pass);
|
||||||
|
|
||||||
/* initialize transformations and other stuff if first time */
|
/* initialize transformations and other stuff if first time */
|
||||||
if (png_ptr->row_number == 0 && png_ptr->pass == 0)
|
if (png_ptr->row_number == 0 && png_ptr->pass == 0)
|
||||||
{
|
{
|
||||||
@ -906,6 +931,8 @@ void PNGAPI
|
|||||||
png_set_flush(png_structp png_ptr, int nrows)
|
png_set_flush(png_structp png_ptr, int nrows)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_flush\n");
|
png_debug(1, "in png_set_flush\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->flush_dist = (nrows < 0 ? 0 : nrows);
|
png_ptr->flush_dist = (nrows < 0 ? 0 : nrows);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -916,6 +943,8 @@ png_write_flush(png_structp png_ptr)
|
|||||||
int wrote_IDAT;
|
int wrote_IDAT;
|
||||||
|
|
||||||
png_debug(1, "in png_write_flush\n");
|
png_debug(1, "in png_write_flush\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
/* We have already written out all of the data */
|
/* We have already written out all of the data */
|
||||||
if (png_ptr->row_number >= png_ptr->num_rows)
|
if (png_ptr->row_number >= png_ptr->num_rows)
|
||||||
return;
|
return;
|
||||||
@ -1092,6 +1121,8 @@ void PNGAPI
|
|||||||
png_set_filter(png_structp png_ptr, int method, int filters)
|
png_set_filter(png_structp png_ptr, int method, int filters)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_filter\n");
|
png_debug(1, "in png_set_filter\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
||||||
if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
|
if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
|
||||||
(method == PNG_INTRAPIXEL_DIFFERENCING))
|
(method == PNG_INTRAPIXEL_DIFFERENCING))
|
||||||
@ -1200,6 +1231,8 @@ png_set_filter_heuristics(png_structp png_ptr, int heuristic_method,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
png_debug(1, "in png_set_filter_heuristics\n");
|
png_debug(1, "in png_set_filter_heuristics\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST)
|
if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Unknown filter heuristic method");
|
png_warning(png_ptr, "Unknown filter heuristic method");
|
||||||
@ -1312,6 +1345,8 @@ void PNGAPI
|
|||||||
png_set_compression_level(png_structp png_ptr, int level)
|
png_set_compression_level(png_structp png_ptr, int level)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_compression_level\n");
|
png_debug(1, "in png_set_compression_level\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL;
|
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL;
|
||||||
png_ptr->zlib_level = level;
|
png_ptr->zlib_level = level;
|
||||||
}
|
}
|
||||||
@ -1320,6 +1355,8 @@ void PNGAPI
|
|||||||
png_set_compression_mem_level(png_structp png_ptr, int mem_level)
|
png_set_compression_mem_level(png_structp png_ptr, int mem_level)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_compression_mem_level\n");
|
png_debug(1, "in png_set_compression_mem_level\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL;
|
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL;
|
||||||
png_ptr->zlib_mem_level = mem_level;
|
png_ptr->zlib_mem_level = mem_level;
|
||||||
}
|
}
|
||||||
@ -1328,6 +1365,8 @@ void PNGAPI
|
|||||||
png_set_compression_strategy(png_structp png_ptr, int strategy)
|
png_set_compression_strategy(png_structp png_ptr, int strategy)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_compression_strategy\n");
|
png_debug(1, "in png_set_compression_strategy\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY;
|
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY;
|
||||||
png_ptr->zlib_strategy = strategy;
|
png_ptr->zlib_strategy = strategy;
|
||||||
}
|
}
|
||||||
@ -1335,6 +1374,8 @@ png_set_compression_strategy(png_structp png_ptr, int strategy)
|
|||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_compression_window_bits(png_structp png_ptr, int window_bits)
|
png_set_compression_window_bits(png_structp png_ptr, int window_bits)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
if (window_bits > 15)
|
if (window_bits > 15)
|
||||||
png_warning(png_ptr, "Only compression windows <= 32k supported by PNG");
|
png_warning(png_ptr, "Only compression windows <= 32k supported by PNG");
|
||||||
else if (window_bits < 8)
|
else if (window_bits < 8)
|
||||||
@ -1355,6 +1396,8 @@ void PNGAPI
|
|||||||
png_set_compression_method(png_structp png_ptr, int method)
|
png_set_compression_method(png_structp png_ptr, int method)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_compression_method\n");
|
png_debug(1, "in png_set_compression_method\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
if (method != 8)
|
if (method != 8)
|
||||||
png_warning(png_ptr, "Only compression method 8 is supported by PNG");
|
png_warning(png_ptr, "Only compression method 8 is supported by PNG");
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD;
|
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD;
|
||||||
@ -1364,6 +1407,8 @@ png_set_compression_method(png_structp png_ptr, int method)
|
|||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn)
|
png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->write_row_fn = write_row_fn;
|
png_ptr->write_row_fn = write_row_fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1373,6 +1418,8 @@ png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
|
|||||||
write_user_transform_fn)
|
write_user_transform_fn)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_set_write_user_transform_fn\n");
|
png_debug(1, "in png_set_write_user_transform_fn\n");
|
||||||
|
if (png_ptr == NULL)
|
||||||
|
return;
|
||||||
png_ptr->transformations |= PNG_USER_TRANSFORM;
|
png_ptr->transformations |= PNG_USER_TRANSFORM;
|
||||||
png_ptr->write_user_transform_fn = write_user_transform_fn;
|
png_ptr->write_user_transform_fn = write_user_transform_fn;
|
||||||
}
|
}
|
||||||
@ -1384,6 +1431,8 @@ void PNGAPI
|
|||||||
png_write_png(png_structp png_ptr, png_infop info_ptr,
|
png_write_png(png_structp png_ptr, png_infop info_ptr,
|
||||||
int transforms, voidp params)
|
int transforms, voidp params)
|
||||||
{
|
{
|
||||||
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
|
return;
|
||||||
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
|
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
|
||||||
/* invert the alpha channel from opacity to transparency */
|
/* invert the alpha channel from opacity to transparency */
|
||||||
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
|
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
|
||||||
|
|||||||
21
pngwtran.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.9 April 14, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -60,14 +60,14 @@ png_do_write_transformations(png_structp png_ptr)
|
|||||||
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
|
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
|
||||||
&(png_ptr->shift));
|
&(png_ptr->shift));
|
||||||
#endif
|
#endif
|
||||||
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
|
|
||||||
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
|
||||||
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
|
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
|
||||||
if (png_ptr->transformations & PNG_SWAP_ALPHA)
|
if (png_ptr->transformations & PNG_SWAP_ALPHA)
|
||||||
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
|
||||||
|
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
||||||
|
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
#if defined(PNG_WRITE_BGR_SUPPORTED)
|
#if defined(PNG_WRITE_BGR_SUPPORTED)
|
||||||
if (png_ptr->transformations & PNG_BGR)
|
if (png_ptr->transformations & PNG_BGR)
|
||||||
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
||||||
@ -439,9 +439,12 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
png_uint_32 row_width = row_info->width;
|
png_uint_32 row_width = row_info->width;
|
||||||
for (i = 0, sp = dp = row; i < row_width; i++)
|
for (i = 0, sp = dp = row; i < row_width; i++)
|
||||||
{
|
{
|
||||||
|
/* does nothing
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
|
*/
|
||||||
|
sp+=3; dp = sp;
|
||||||
*(dp++) = (png_byte)(255 - *(sp++));
|
*(dp++) = (png_byte)(255 - *(sp++));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -454,12 +457,15 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
|
|
||||||
for (i = 0, sp = dp = row; i < row_width; i++)
|
for (i = 0, sp = dp = row; i < row_width; i++)
|
||||||
{
|
{
|
||||||
|
/* does nothing
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
|
*/
|
||||||
|
sp+=6; dp = sp;
|
||||||
*(dp++) = (png_byte)(255 - *(sp++));
|
*(dp++) = (png_byte)(255 - *(sp++));
|
||||||
*(dp++) = (png_byte)(255 - *(sp++));
|
*(dp++) = (png_byte)(255 - *(sp++));
|
||||||
}
|
}
|
||||||
@ -489,8 +495,11 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
|
|
||||||
for (i = 0, sp = dp = row; i < row_width; i++)
|
for (i = 0, sp = dp = row; i < row_width; i++)
|
||||||
{
|
{
|
||||||
|
/* does nothing
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
|
*/
|
||||||
|
sp+=2; dp = sp;
|
||||||
*(dp++) = (png_byte)(255 - *(sp++));
|
*(dp++) = (png_byte)(255 - *(sp++));
|
||||||
*(dp++) = (png_byte)(255 - *(sp++));
|
*(dp++) = (png_byte)(255 - *(sp++));
|
||||||
}
|
}
|
||||||
|
|||||||
108
pngwutil.c
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* libpng version 1.0.18 - December 3, 2004
|
* Last changed in libpng 1.2.11 June 4, 2006
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*/
|
*/
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* with unsigned numbers for convenience, although one supported
|
* with unsigned numbers for convenience, although one supported
|
||||||
* ancillary chunk uses signed (two's complement) numbers.
|
* ancillary chunk uses signed (two's complement) numbers.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
void PNGAPI
|
||||||
png_save_uint_32(png_bytep buf, png_uint_32 i)
|
png_save_uint_32(png_bytep buf, png_uint_32 i)
|
||||||
{
|
{
|
||||||
buf[0] = (png_byte)((i >> 24) & 0xff);
|
buf[0] = (png_byte)((i >> 24) & 0xff);
|
||||||
@ -25,12 +25,11 @@ png_save_uint_32(png_bytep buf, png_uint_32 i)
|
|||||||
buf[3] = (png_byte)(i & 0xff);
|
buf[3] = (png_byte)(i & 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)
|
|
||||||
/* The png_save_int_32 function assumes integers are stored in two's
|
/* The png_save_int_32 function assumes integers are stored in two's
|
||||||
* complement format. If this isn't the case, then this routine needs to
|
* complement format. If this isn't the case, then this routine needs to
|
||||||
* be modified to write data in two's complement format.
|
* be modified to write data in two's complement format.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
void PNGAPI
|
||||||
png_save_int_32(png_bytep buf, png_int_32 i)
|
png_save_int_32(png_bytep buf, png_int_32 i)
|
||||||
{
|
{
|
||||||
buf[0] = (png_byte)((i >> 24) & 0xff);
|
buf[0] = (png_byte)((i >> 24) & 0xff);
|
||||||
@ -38,13 +37,12 @@ png_save_int_32(png_bytep buf, png_int_32 i)
|
|||||||
buf[2] = (png_byte)((i >> 8) & 0xff);
|
buf[2] = (png_byte)((i >> 8) & 0xff);
|
||||||
buf[3] = (png_byte)(i & 0xff);
|
buf[3] = (png_byte)(i & 0xff);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Place a 16-bit number into a buffer in PNG byte order.
|
/* Place a 16-bit number into a buffer in PNG byte order.
|
||||||
* The parameter is declared unsigned int, not png_uint_16,
|
* The parameter is declared unsigned int, not png_uint_16,
|
||||||
* just to avoid potential problems on pre-ANSI C compilers.
|
* just to avoid potential problems on pre-ANSI C compilers.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
void PNGAPI
|
||||||
png_save_uint_16(png_bytep buf, unsigned int i)
|
png_save_uint_16(png_bytep buf, unsigned int i)
|
||||||
{
|
{
|
||||||
buf[0] = (png_byte)((i >> 8) & 0xff);
|
buf[0] = (png_byte)((i >> 8) & 0xff);
|
||||||
@ -161,9 +159,11 @@ png_text_compress(png_structp png_ptr,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
comp->num_output_ptr = comp->max_output_ptr = 0;
|
comp->num_output_ptr = 0;
|
||||||
|
comp->max_output_ptr = 0;
|
||||||
comp->output_ptr = NULL;
|
comp->output_ptr = NULL;
|
||||||
comp->input = NULL;
|
comp->input = NULL;
|
||||||
|
comp->input_len = 0;
|
||||||
|
|
||||||
/* we may just want to pass the text right through */
|
/* we may just want to pass the text right through */
|
||||||
if (compression == PNG_TEXT_COMPRESSION_NONE)
|
if (compression == PNG_TEXT_COMPRESSION_NONE)
|
||||||
@ -730,6 +730,13 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
|||||||
compression_state comp;
|
compression_state comp;
|
||||||
|
|
||||||
png_debug(1, "in png_write_iCCP\n");
|
png_debug(1, "in png_write_iCCP\n");
|
||||||
|
|
||||||
|
comp.num_output_ptr = 0;
|
||||||
|
comp.max_output_ptr = 0;
|
||||||
|
comp.output_ptr = NULL;
|
||||||
|
comp.input = NULL;
|
||||||
|
comp.input_len = 0;
|
||||||
|
|
||||||
if (name == NULL || (name_len = png_check_keyword(png_ptr, name,
|
if (name == NULL || (name_len = png_check_keyword(png_ptr, name,
|
||||||
&new_name)) == 0)
|
&new_name)) == 0)
|
||||||
{
|
{
|
||||||
@ -930,8 +937,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
|
|||||||
itemp = (png_uint_32)(white_y * 100000.0 + 0.5);
|
itemp = (png_uint_32)(white_y * 100000.0 + 0.5);
|
||||||
png_save_uint_32(buf + 4, itemp);
|
png_save_uint_32(buf + 4, itemp);
|
||||||
|
|
||||||
if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 ||
|
if (red_x < 0 || red_y < 0 || red_x + red_y > 1.0)
|
||||||
red_x + red_y > 1.0)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid cHRM red point specified");
|
png_warning(png_ptr, "Invalid cHRM red point specified");
|
||||||
return;
|
return;
|
||||||
@ -941,8 +947,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
|
|||||||
itemp = (png_uint_32)(red_y * 100000.0 + 0.5);
|
itemp = (png_uint_32)(red_y * 100000.0 + 0.5);
|
||||||
png_save_uint_32(buf + 12, itemp);
|
png_save_uint_32(buf + 12, itemp);
|
||||||
|
|
||||||
if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 ||
|
if (green_x < 0 || green_y < 0 || green_x + green_y > 1.0)
|
||||||
green_x + green_y > 1.0)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid cHRM green point specified");
|
png_warning(png_ptr, "Invalid cHRM green point specified");
|
||||||
return;
|
return;
|
||||||
@ -952,8 +957,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
|
|||||||
itemp = (png_uint_32)(green_y * 100000.0 + 0.5);
|
itemp = (png_uint_32)(green_y * 100000.0 + 0.5);
|
||||||
png_save_uint_32(buf + 20, itemp);
|
png_save_uint_32(buf + 20, itemp);
|
||||||
|
|
||||||
if (blue_x < 0 || blue_x > 0.8 || blue_y < 0 || blue_y > 0.8 ||
|
if (blue_x < 0 || blue_y < 0 || blue_x + blue_y > 1.0)
|
||||||
blue_x + blue_y > 1.0)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid cHRM blue point specified");
|
png_warning(png_ptr, "Invalid cHRM blue point specified");
|
||||||
return;
|
return;
|
||||||
@ -991,7 +995,7 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
|
|||||||
png_save_uint_32(buf, (png_uint_32)white_x);
|
png_save_uint_32(buf, (png_uint_32)white_x);
|
||||||
png_save_uint_32(buf + 4, (png_uint_32)white_y);
|
png_save_uint_32(buf + 4, (png_uint_32)white_y);
|
||||||
|
|
||||||
if (red_x > 80000L || red_y > 80000L || red_x + red_y > 100000L)
|
if (red_x + red_y > 100000L)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid cHRM fixed red point specified");
|
png_warning(png_ptr, "Invalid cHRM fixed red point specified");
|
||||||
return;
|
return;
|
||||||
@ -999,7 +1003,7 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
|
|||||||
png_save_uint_32(buf + 8, (png_uint_32)red_x);
|
png_save_uint_32(buf + 8, (png_uint_32)red_x);
|
||||||
png_save_uint_32(buf + 12, (png_uint_32)red_y);
|
png_save_uint_32(buf + 12, (png_uint_32)red_y);
|
||||||
|
|
||||||
if (green_x > 80000L || green_y > 80000L || green_x + green_y > 100000L)
|
if (green_x + green_y > 100000L)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid fixed cHRM green point specified");
|
png_warning(png_ptr, "Invalid fixed cHRM green point specified");
|
||||||
return;
|
return;
|
||||||
@ -1007,7 +1011,7 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
|
|||||||
png_save_uint_32(buf + 16, (png_uint_32)green_x);
|
png_save_uint_32(buf + 16, (png_uint_32)green_x);
|
||||||
png_save_uint_32(buf + 20, (png_uint_32)green_y);
|
png_save_uint_32(buf + 20, (png_uint_32)green_y);
|
||||||
|
|
||||||
if (blue_x > 80000L || blue_y > 80000L || blue_x + blue_y > 100000L)
|
if (blue_x + blue_y > 100000L)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid fixed cHRM blue point specified");
|
png_warning(png_ptr, "Invalid fixed cHRM blue point specified");
|
||||||
return;
|
return;
|
||||||
@ -1344,6 +1348,12 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
|
|||||||
|
|
||||||
png_debug(1, "in png_write_zTXt\n");
|
png_debug(1, "in png_write_zTXt\n");
|
||||||
|
|
||||||
|
comp.num_output_ptr = 0;
|
||||||
|
comp.max_output_ptr = 0;
|
||||||
|
comp.output_ptr = NULL;
|
||||||
|
comp.input = NULL;
|
||||||
|
comp.input_len = 0;
|
||||||
|
|
||||||
if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
|
if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Empty keyword in zTXt chunk");
|
png_warning(png_ptr, "Empty keyword in zTXt chunk");
|
||||||
@ -1397,6 +1407,11 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
|
|||||||
|
|
||||||
png_debug(1, "in png_write_iTXt\n");
|
png_debug(1, "in png_write_iTXt\n");
|
||||||
|
|
||||||
|
comp.num_output_ptr = 0;
|
||||||
|
comp.max_output_ptr = 0;
|
||||||
|
comp.output_ptr = NULL;
|
||||||
|
comp.input = NULL;
|
||||||
|
|
||||||
if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
|
if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Empty keyword in iTXt chunk");
|
png_warning(png_ptr, "Empty keyword in iTXt chunk");
|
||||||
@ -1552,39 +1567,41 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
|
|||||||
/* write the sCAL chunk */
|
/* write the sCAL chunk */
|
||||||
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
|
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
|
png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
|
||||||
{
|
{
|
||||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||||
PNG_sCAL;
|
PNG_sCAL;
|
||||||
#endif
|
#endif
|
||||||
|
char buf[64];
|
||||||
png_size_t total_len;
|
png_size_t total_len;
|
||||||
char wbuf[32], hbuf[32];
|
|
||||||
png_byte bunit = unit;
|
|
||||||
|
|
||||||
png_debug(1, "in png_write_sCAL\n");
|
png_debug(1, "in png_write_sCAL\n");
|
||||||
|
|
||||||
|
buf[0] = (char)unit;
|
||||||
#if defined(_WIN32_WCE)
|
#if defined(_WIN32_WCE)
|
||||||
/* sprintf() function is not supported on WindowsCE */
|
/* sprintf() function is not supported on WindowsCE */
|
||||||
{
|
{
|
||||||
wchar_t wc_buf[32];
|
wchar_t wc_buf[32];
|
||||||
|
size_t wc_len;
|
||||||
swprintf(wc_buf, TEXT("%12.12e"), width);
|
swprintf(wc_buf, TEXT("%12.12e"), width);
|
||||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL);
|
wc_len = wcslen(wc_buf);
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL, NULL);
|
||||||
|
total_len = wc_len + 2;
|
||||||
swprintf(wc_buf, TEXT("%12.12e"), height);
|
swprintf(wc_buf, TEXT("%12.12e"), height);
|
||||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL);
|
wc_len = wcslen(wc_buf);
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + total_len, wc_len,
|
||||||
|
NULL, NULL);
|
||||||
|
total_len += wc_len;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sprintf(wbuf, "%12.12e", width);
|
sprintf(buf + 1, "%12.12e", width);
|
||||||
sprintf(hbuf, "%12.12e", height);
|
total_len = 1 + png_strlen(buf + 1) + 1;
|
||||||
|
sprintf(buf + total_len, "%12.12e", height);
|
||||||
|
total_len += png_strlen(buf + total_len);
|
||||||
#endif
|
#endif
|
||||||
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
|
|
||||||
|
|
||||||
png_debug1(3, "sCAL total length = %d\n", (int)total_len);
|
png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
|
||||||
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
|
png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len);
|
||||||
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
|
|
||||||
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
|
|
||||||
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
|
|
||||||
|
|
||||||
png_write_chunk_end(png_ptr);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||||
@ -1595,23 +1612,26 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
|
|||||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||||
PNG_sCAL;
|
PNG_sCAL;
|
||||||
#endif
|
#endif
|
||||||
png_size_t total_len;
|
png_byte buf[64];
|
||||||
char wbuf[32], hbuf[32];
|
png_size_t wlen, hlen, total_len;
|
||||||
png_byte bunit = unit;
|
|
||||||
|
|
||||||
png_debug(1, "in png_write_sCAL_s\n");
|
png_debug(1, "in png_write_sCAL_s\n");
|
||||||
|
|
||||||
png_strcpy(wbuf,(const char *)width);
|
wlen = png_strlen(width);
|
||||||
png_strcpy(hbuf,(const char *)height);
|
hlen = png_strlen(height);
|
||||||
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
|
total_len = wlen + hlen + 2;
|
||||||
|
if (total_len > 64)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Can't write sCAL (buffer too small)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
png_debug1(3, "sCAL total length = %d\n", total_len);
|
buf[0] = (png_byte)unit;
|
||||||
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
|
png_memcpy(buf + 1, width, wlen + 1); /* append the '\0' here */
|
||||||
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
|
png_memcpy(buf + wlen + 2, height, hlen); /* do NOT append the '\0' here */
|
||||||
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
|
|
||||||
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
|
|
||||||
|
|
||||||
png_write_chunk_end(png_ptr);
|
png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
|
||||||
|
png_write_chunk(png_ptr, (png_bytep)png_sCAL, buf, total_len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,22 +1,22 @@
|
|||||||
USEUNIT("libpng.cpp");
|
USEUNIT("libpng.cpp");
|
||||||
USEUNIT("..\..\png.c");
|
USEUNIT("..\..\png.c");
|
||||||
USEUNIT("..\..\pngerror.c");
|
USEUNIT("..\..\pngerror.c");
|
||||||
USEUNIT("..\..\pngget.c");
|
USEUNIT("..\..\pngget.c");
|
||||||
USEUNIT("..\..\pngmem.c");
|
USEUNIT("..\..\pngmem.c");
|
||||||
USEUNIT("..\..\pngpread.c");
|
USEUNIT("..\..\pngpread.c");
|
||||||
USEUNIT("..\..\pngread.c");
|
USEUNIT("..\..\pngread.c");
|
||||||
USEUNIT("..\..\pngrio.c");
|
USEUNIT("..\..\pngrio.c");
|
||||||
USEUNIT("..\..\pngrtran.c");
|
USEUNIT("..\..\pngrtran.c");
|
||||||
USEUNIT("..\..\pngrutil.c");
|
USEUNIT("..\..\pngrutil.c");
|
||||||
USEUNIT("..\..\pngset.c");
|
USEUNIT("..\..\pngset.c");
|
||||||
USEUNIT("..\..\pngtrans.c");
|
USEUNIT("..\..\pngtrans.c");
|
||||||
USEUNIT("..\..\pngwio.c");
|
USEUNIT("..\..\pngwio.c");
|
||||||
USEUNIT("..\..\pngwrite.c");
|
USEUNIT("..\..\pngwrite.c");
|
||||||
USEUNIT("..\..\pngwtran.c");
|
USEUNIT("..\..\pngwtran.c");
|
||||||
USEUNIT("..\..\pngwutil.c");
|
USEUNIT("..\..\pngwutil.c");
|
||||||
USELIB("..\..\..\zlib\zlib.lib");
|
USELIB("..\..\..\zlib\zlib.lib");
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
This file is used by the project manager only and should be treated like the project file
|
This file is used by the project manager only and should be treated like the project file
|
||||||
|
|
||||||
|
|
||||||
DllEntryPoint
|
DllEntryPoint
|
||||||
|
|||||||
@ -1,25 +1,25 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
VERSION = BWS.01
|
VERSION = BWS.01
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
!ifndef ROOT
|
!ifndef ROOT
|
||||||
ROOT = $(MAKEDIR)\..
|
ROOT = $(MAKEDIR)\..
|
||||||
!endif
|
!endif
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
PROJECTS = libpngstat.lib libpng.dll
|
PROJECTS = libpngstat.lib libpng.dll
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
default: $(PROJECTS)
|
default: $(PROJECTS)
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
libpngstat.lib: libpngstat.bpr
|
libpngstat.lib: libpngstat.bpr
|
||||||
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
|
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
|
||||||
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
|
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
|
||||||
|
|
||||||
libpng.dll: libpng.bpr
|
libpng.dll: libpng.bpr
|
||||||
$(ROOT)\bin\bpr2mak $**
|
$(ROOT)\bin\bpr2mak $**
|
||||||
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
|
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,157 +1,157 @@
|
|||||||
<?xml version='1.0' encoding='utf-8' ?>
|
<?xml version='1.0' encoding='utf-8' ?>
|
||||||
<!-- C++Builder XML Project -->
|
<!-- C++Builder XML Project -->
|
||||||
<PROJECT>
|
<PROJECT>
|
||||||
<MACROS>
|
<MACROS>
|
||||||
<VERSION value="BCB.05.03"/>
|
<VERSION value="BCB.05.03"/>
|
||||||
<PROJECT value="libpng.dll"/>
|
<PROJECT value="libpng.dll"/>
|
||||||
<OBJFILES value="libpng.obj ..\..\pngwutil.obj ..\..\pngerror.obj ..\..\pngget.obj
|
<OBJFILES value="libpng.obj ..\..\pngwutil.obj ..\..\pngerror.obj ..\..\pngget.obj
|
||||||
..\..\pngmem.obj ..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj
|
..\..\pngmem.obj ..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj
|
||||||
..\..\pngrtran.obj ..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj
|
..\..\pngrtran.obj ..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj
|
||||||
..\..\pngwio.obj ..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\png.obj"/>
|
..\..\pngwio.obj ..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\png.obj"/>
|
||||||
<RESFILES value=""/>
|
<RESFILES value=""/>
|
||||||
<DEFFILE value=""/>
|
<DEFFILE value=""/>
|
||||||
<RESDEPEN value="$(RESFILES)"/>
|
<RESDEPEN value="$(RESFILES)"/>
|
||||||
<LIBFILES value="..\..\..\zlib\zlib.lib"/>
|
<LIBFILES value="..\..\..\zlib\zlib.lib"/>
|
||||||
<LIBRARIES value="bcbsmp50.lib dclocx50.lib NMFast50.lib Tee50.lib Vclx50.lib Vcl50.lib"/>
|
<LIBRARIES value="bcbsmp50.lib dclocx50.lib NMFast50.lib Tee50.lib Vclx50.lib Vcl50.lib"/>
|
||||||
<SPARELIBS value="Vcl50.lib Vclx50.lib Tee50.lib NMFast50.lib dclocx50.lib bcbsmp50.lib"/>
|
<SPARELIBS value="Vcl50.lib Vclx50.lib Tee50.lib NMFast50.lib dclocx50.lib bcbsmp50.lib"/>
|
||||||
<PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi
|
<PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi
|
||||||
ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi
|
ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi
|
||||||
VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi
|
VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi
|
||||||
dclocx50.bpi bcb97axserver50.bpi SIMULUSCOMPONENTS.bpi Simulus2.bpi"/>
|
dclocx50.bpi bcb97axserver50.bpi SIMULUSCOMPONENTS.bpi Simulus2.bpi"/>
|
||||||
<PATHCPP value=".;..\.."/>
|
<PATHCPP value=".;..\.."/>
|
||||||
<PATHPAS value=".;"/>
|
<PATHPAS value=".;"/>
|
||||||
<PATHRC value=".;"/>
|
<PATHRC value=".;"/>
|
||||||
<PATHASM value=".;"/>
|
<PATHASM value=".;"/>
|
||||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||||
<LINKER value="tlink32"/>
|
<LINKER value="tlink32"/>
|
||||||
<USERDEFINES value="PNG_BUILD_DLL;PNG_NO_MODULEDEF"/>
|
<USERDEFINES value="PNG_BUILD_DLL;PNG_NO_MODULEDEF"/>
|
||||||
<SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/>
|
<SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/>
|
||||||
<MAINSOURCE value="libpng.bpf"/>
|
<MAINSOURCE value="libpng.bpf"/>
|
||||||
<INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
|
<INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
|
||||||
<LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
|
<LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||||
<WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wucp -wstv -wstu -wsig -wpin
|
<WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wucp -wstv -wstu -wsig -wpin
|
||||||
-wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/>
|
-wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/>
|
||||||
</MACROS>
|
</MACROS>
|
||||||
<OPTIONS>
|
<OPTIONS>
|
||||||
<CFLAG1 value="-WD -O2 -w -Vx -Ve -x- -RT- -X- -a8 -5 -b- -d -k- -vi -tWD -tWM -c"/>
|
<CFLAG1 value="-WD -O2 -w -Vx -Ve -x- -RT- -X- -a8 -5 -b- -d -k- -vi -tWD -tWM -c"/>
|
||||||
<PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
|
<PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
|
||||||
<RFLAGS value=""/>
|
<RFLAGS value=""/>
|
||||||
<AFLAGS value="/mx /w2 /zn"/>
|
<AFLAGS value="/mx /w2 /zn"/>
|
||||||
<LFLAGS value="-D"" -aa -Tpd -x -Gn -Gi -w"/>
|
<LFLAGS value="-D"" -aa -Tpd -x -Gn -Gi -w"/>
|
||||||
</OPTIONS>
|
</OPTIONS>
|
||||||
<LINKER>
|
<LINKER>
|
||||||
<ALLOBJ value="c0d32.obj $(OBJFILES)"/>
|
<ALLOBJ value="c0d32.obj $(OBJFILES)"/>
|
||||||
<ALLRES value="$(RESFILES)"/>
|
<ALLRES value="$(RESFILES)"/>
|
||||||
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/>
|
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/>
|
||||||
</LINKER>
|
</LINKER>
|
||||||
<IDEOPTIONS>
|
<IDEOPTIONS>
|
||||||
[Version Info]
|
[Version Info]
|
||||||
IncludeVerInfo=0
|
IncludeVerInfo=0
|
||||||
AutoIncBuild=0
|
AutoIncBuild=0
|
||||||
MajorVer=1
|
MajorVer=1
|
||||||
MinorVer=0
|
MinorVer=0
|
||||||
Release=0
|
Release=0
|
||||||
Build=0
|
Build=0
|
||||||
Debug=0
|
Debug=0
|
||||||
PreRelease=0
|
PreRelease=0
|
||||||
Special=0
|
Special=0
|
||||||
Private=0
|
Private=0
|
||||||
DLL=1
|
DLL=1
|
||||||
Locale=2057
|
Locale=2057
|
||||||
CodePage=1252
|
CodePage=1252
|
||||||
|
|
||||||
[Version Info Keys]
|
[Version Info Keys]
|
||||||
CompanyName=
|
CompanyName=
|
||||||
FileDescription=
|
FileDescription=
|
||||||
FileVersion=1.0.0.0
|
FileVersion=1.0.0.0
|
||||||
InternalName=
|
InternalName=
|
||||||
LegalCopyright=
|
LegalCopyright=
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
OriginalFilename=
|
OriginalFilename=
|
||||||
ProductName=
|
ProductName=
|
||||||
ProductVersion=
|
ProductVersion=
|
||||||
Comments=
|
Comments=
|
||||||
|
|
||||||
[HistoryLists\hlIncludePath]
|
[HistoryLists\hlIncludePath]
|
||||||
Count=18
|
Count=18
|
||||||
Item0=..\..;..\..\..\zlib;$(BCB)\include
|
Item0=..\..;..\..\..\zlib;$(BCB)\include
|
||||||
Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
|
Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
|
||||||
Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
|
Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
|
||||||
Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
|
Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
|
||||||
Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
|
Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
|
||||||
Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
|
Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
|
||||||
Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include
|
Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include
|
||||||
Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include
|
Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include
|
||||||
Item8=$(BCB)\include
|
Item8=$(BCB)\include
|
||||||
Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
|
Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
|
Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
|
Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
|
Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
|
Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl
|
Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl
|
Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl
|
Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl
|
||||||
Item17=$(BCB)\include;$(BCB)\include\vcl
|
Item17=$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
|
||||||
[HistoryLists\hlLibraryPath]
|
[HistoryLists\hlLibraryPath]
|
||||||
Count=10
|
Count=10
|
||||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
|
Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
|
Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
|
Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item4=$(BCB)\lib\obj;$(BCB)\lib
|
Item4=$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib
|
Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
|
Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
|
Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
|
Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib
|
Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
|
||||||
[HistoryLists\hlDebugSourcePath]
|
[HistoryLists\hlDebugSourcePath]
|
||||||
Count=1
|
Count=1
|
||||||
Item0=$(BCB)\source\vcl
|
Item0=$(BCB)\source\vcl
|
||||||
|
|
||||||
[HistoryLists\hlConditionals]
|
[HistoryLists\hlConditionals]
|
||||||
Count=20
|
Count=20
|
||||||
Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
|
Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
|
||||||
Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
|
Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
|
||||||
Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF
|
Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF
|
||||||
Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS
|
Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS
|
||||||
Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr
|
Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr
|
||||||
Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
|
Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
|
||||||
Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
|
Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
|
||||||
Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF
|
Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF
|
||||||
Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5
|
Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5
|
||||||
Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG
|
Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG
|
||||||
Item10=PNG_BUILD_DLL;ZLIB_DLL
|
Item10=PNG_BUILD_DLL;ZLIB_DLL
|
||||||
Item11=PNG_BUILD_DLL
|
Item11=PNG_BUILD_DLL
|
||||||
Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL
|
Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL
|
||||||
Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL
|
Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL
|
||||||
Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS
|
Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS
|
||||||
Item15=PNG_DLL;PNG_BUILD_DLL
|
Item15=PNG_DLL;PNG_BUILD_DLL
|
||||||
Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF
|
Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF
|
||||||
Item17=_HTML_FORM
|
Item17=_HTML_FORM
|
||||||
Item18=_DEBUG;_HTML_FORM
|
Item18=_DEBUG;_HTML_FORM
|
||||||
Item19=_DEBUG
|
Item19=_DEBUG
|
||||||
|
|
||||||
[HistoryLists\hlIntOutputDir]
|
[HistoryLists\hlIntOutputDir]
|
||||||
Count=2
|
Count=2
|
||||||
Item0=..\Obj
|
Item0=..\Obj
|
||||||
Item1=P:\Development\Obj
|
Item1=P:\Development\Obj
|
||||||
|
|
||||||
[Debugging]
|
[Debugging]
|
||||||
DebugSourceDirs=
|
DebugSourceDirs=
|
||||||
|
|
||||||
[Parameters]
|
[Parameters]
|
||||||
RunParams=
|
RunParams=
|
||||||
HostApplication=P:\Development\Executables\LibPNGTestApp.exe
|
HostApplication=P:\Development\Executables\LibPNGTestApp.exe
|
||||||
RemoteHost=
|
RemoteHost=
|
||||||
RemotePath=
|
RemotePath=
|
||||||
RemoteDebug=0
|
RemoteDebug=0
|
||||||
|
|
||||||
[Compiler]
|
[Compiler]
|
||||||
ShowInfoMsgs=0
|
ShowInfoMsgs=0
|
||||||
LinkDebugVcl=0
|
LinkDebugVcl=0
|
||||||
LinkCGLIB=0
|
LinkCGLIB=0
|
||||||
</IDEOPTIONS>
|
</IDEOPTIONS>
|
||||||
</PROJECT>
|
</PROJECT>
|
||||||
@ -1,29 +1,29 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Important note about DLL memory management when your DLL uses the
|
// Important note about DLL memory management when your DLL uses the
|
||||||
// static version of the RunTime Library:
|
// static version of the RunTime Library:
|
||||||
//
|
//
|
||||||
// If your DLL exports any functions that pass String objects (or structs/
|
// If your DLL exports any functions that pass String objects (or structs/
|
||||||
// classes containing nested Strings) as parameter or function results,
|
// classes containing nested Strings) as parameter or function results,
|
||||||
// you will need to add the library MEMMGR.LIB to both the DLL project and
|
// you will need to add the library MEMMGR.LIB to both the DLL project and
|
||||||
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
|
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
|
||||||
// if any other projects which use the DLL will be performing new or delete
|
// if any other projects which use the DLL will be performing new or delete
|
||||||
// operations on any non-TObject-derived classes which are exported from the
|
// operations on any non-TObject-derived classes which are exported from the
|
||||||
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
|
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
|
||||||
// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
|
// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
|
||||||
// the file BORLNDMM.DLL should be deployed along with your DLL.
|
// the file BORLNDMM.DLL should be deployed along with your DLL.
|
||||||
//
|
//
|
||||||
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
|
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
|
||||||
// ShortString parameters.
|
// ShortString parameters.
|
||||||
//
|
//
|
||||||
// If your DLL uses the dynamic version of the RTL, you do not need to
|
// If your DLL uses the dynamic version of the RTL, you do not need to
|
||||||
// explicitly add MEMMGR.LIB as this will be done implicitly for you
|
// explicitly add MEMMGR.LIB as this will be done implicitly for you
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*)
|
int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -1,22 +1,22 @@
|
|||||||
USEUNIT("..\..\png.c");
|
USEUNIT("..\..\png.c");
|
||||||
USEUNIT("..\..\pngerror.c");
|
USEUNIT("..\..\pngerror.c");
|
||||||
USEUNIT("..\..\pngget.c");
|
USEUNIT("..\..\pngget.c");
|
||||||
USEUNIT("..\..\pngmem.c");
|
USEUNIT("..\..\pngmem.c");
|
||||||
USEUNIT("..\..\pngpread.c");
|
USEUNIT("..\..\pngpread.c");
|
||||||
USEUNIT("..\..\pngread.c");
|
USEUNIT("..\..\pngread.c");
|
||||||
USEUNIT("..\..\pngrio.c");
|
USEUNIT("..\..\pngrio.c");
|
||||||
USEUNIT("..\..\pngrtran.c");
|
USEUNIT("..\..\pngrtran.c");
|
||||||
USEUNIT("..\..\pngrutil.c");
|
USEUNIT("..\..\pngrutil.c");
|
||||||
USEUNIT("..\..\pngset.c");
|
USEUNIT("..\..\pngset.c");
|
||||||
USEUNIT("..\..\pngtrans.c");
|
USEUNIT("..\..\pngtrans.c");
|
||||||
USEUNIT("..\..\pngwio.c");
|
USEUNIT("..\..\pngwio.c");
|
||||||
USEUNIT("..\..\pngwrite.c");
|
USEUNIT("..\..\pngwrite.c");
|
||||||
USEUNIT("..\..\pngwtran.c");
|
USEUNIT("..\..\pngwtran.c");
|
||||||
USEUNIT("..\..\pngwutil.c");
|
USEUNIT("..\..\pngwutil.c");
|
||||||
USELIB("..\..\..\zlib\zlib.lib");
|
USELIB("..\..\..\zlib\zlib.lib");
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#define Library
|
#define Library
|
||||||
|
|
||||||
// To add a file to the library use the Project menu 'Add to Project'.
|
// To add a file to the library use the Project menu 'Add to Project'.
|
||||||
|
|
||||||
|
|
||||||
@ -1,109 +1,109 @@
|
|||||||
<?xml version='1.0' encoding='utf-8' ?>
|
<?xml version='1.0' encoding='utf-8' ?>
|
||||||
<!-- C++Builder XML Project -->
|
<!-- C++Builder XML Project -->
|
||||||
<PROJECT>
|
<PROJECT>
|
||||||
<MACROS>
|
<MACROS>
|
||||||
<VERSION value="BCB.05.03"/>
|
<VERSION value="BCB.05.03"/>
|
||||||
<PROJECT value="libpngstat.lib"/>
|
<PROJECT value="libpngstat.lib"/>
|
||||||
<OBJFILES value="..\..\pngerror.obj ..\..\png.obj ..\..\pngwutil.obj ..\..\pngmem.obj
|
<OBJFILES value="..\..\pngerror.obj ..\..\png.obj ..\..\pngwutil.obj ..\..\pngmem.obj
|
||||||
..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj ..\..\pngrtran.obj
|
..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj ..\..\pngrtran.obj
|
||||||
..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj ..\..\pngwio.obj
|
..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj ..\..\pngwio.obj
|
||||||
..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\pngget.obj"/>
|
..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\pngget.obj"/>
|
||||||
<RESFILES value=""/>
|
<RESFILES value=""/>
|
||||||
<DEFFILE value=""/>
|
<DEFFILE value=""/>
|
||||||
<RESDEPEN value="$(RESFILES)"/>
|
<RESDEPEN value="$(RESFILES)"/>
|
||||||
<LIBFILES value="..\..\..\zlib\zlib.lib"/>
|
<LIBFILES value="..\..\..\zlib\zlib.lib"/>
|
||||||
<LIBRARIES value=""/>
|
<LIBRARIES value=""/>
|
||||||
<PACKAGES value=""/>
|
<PACKAGES value=""/>
|
||||||
<PATHCPP value=".;..\.."/>
|
<PATHCPP value=".;..\.."/>
|
||||||
<PATHPAS value=".;"/>
|
<PATHPAS value=".;"/>
|
||||||
<PATHRC value=".;"/>
|
<PATHRC value=".;"/>
|
||||||
<PATHASM value=".;"/>
|
<PATHASM value=".;"/>
|
||||||
<LINKER value="TLib"/>
|
<LINKER value="TLib"/>
|
||||||
<USERDEFINES value=""/>
|
<USERDEFINES value=""/>
|
||||||
<SYSDEFINES value="_RTLDLL;NO_STRICT"/>
|
<SYSDEFINES value="_RTLDLL;NO_STRICT"/>
|
||||||
<MAINSOURCE value="libpngstat.bpf"/>
|
<MAINSOURCE value="libpngstat.bpf"/>
|
||||||
<INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
|
<INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
|
||||||
<LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
|
<LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||||
<WARNINGS value="-w-par"/>
|
<WARNINGS value="-w-par"/>
|
||||||
<LISTFILE value=""/>
|
<LISTFILE value=""/>
|
||||||
</MACROS>
|
</MACROS>
|
||||||
<OPTIONS>
|
<OPTIONS>
|
||||||
<CFLAG1 value="-O2 -w -Vx -Ve -X- -a8 -5 -b- -d -k- -vi -c -tW -tWM"/>
|
<CFLAG1 value="-O2 -w -Vx -Ve -X- -a8 -5 -b- -d -k- -vi -c -tW -tWM"/>
|
||||||
<PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
|
<PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
|
||||||
<AFLAGS value="/mx /w2 /zn"/>
|
<AFLAGS value="/mx /w2 /zn"/>
|
||||||
<LFLAGS value=""/>
|
<LFLAGS value=""/>
|
||||||
</OPTIONS>
|
</OPTIONS>
|
||||||
<LINKER>
|
<LINKER>
|
||||||
<ALLOBJ value="$(OBJFILES)"/>
|
<ALLOBJ value="$(OBJFILES)"/>
|
||||||
<ALLLIB value=""/>
|
<ALLLIB value=""/>
|
||||||
</LINKER>
|
</LINKER>
|
||||||
<IDEOPTIONS>
|
<IDEOPTIONS>
|
||||||
[Version Info]
|
[Version Info]
|
||||||
IncludeVerInfo=0
|
IncludeVerInfo=0
|
||||||
AutoIncBuild=0
|
AutoIncBuild=0
|
||||||
MajorVer=1
|
MajorVer=1
|
||||||
MinorVer=0
|
MinorVer=0
|
||||||
Release=0
|
Release=0
|
||||||
Build=0
|
Build=0
|
||||||
Debug=0
|
Debug=0
|
||||||
PreRelease=0
|
PreRelease=0
|
||||||
Special=0
|
Special=0
|
||||||
Private=0
|
Private=0
|
||||||
DLL=0
|
DLL=0
|
||||||
Locale=2057
|
Locale=2057
|
||||||
CodePage=1252
|
CodePage=1252
|
||||||
|
|
||||||
[Version Info Keys]
|
[Version Info Keys]
|
||||||
CompanyName=
|
CompanyName=
|
||||||
FileDescription=
|
FileDescription=
|
||||||
FileVersion=1.0.0.0
|
FileVersion=1.0.0.0
|
||||||
InternalName=
|
InternalName=
|
||||||
LegalCopyright=
|
LegalCopyright=
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
OriginalFilename=
|
OriginalFilename=
|
||||||
ProductName=
|
ProductName=
|
||||||
ProductVersion=1.0.0.0
|
ProductVersion=1.0.0.0
|
||||||
Comments=
|
Comments=
|
||||||
|
|
||||||
[HistoryLists\hlIncludePath]
|
[HistoryLists\hlIncludePath]
|
||||||
Count=2
|
Count=2
|
||||||
Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
|
Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
|
||||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
|
||||||
[HistoryLists\hlLibraryPath]
|
[HistoryLists\hlLibraryPath]
|
||||||
Count=1
|
Count=1
|
||||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
|
||||||
[HistoryLists\hlDebugSourcePath]
|
[HistoryLists\hlDebugSourcePath]
|
||||||
Count=1
|
Count=1
|
||||||
Item0=$(BCB)\source\vcl
|
Item0=$(BCB)\source\vcl
|
||||||
|
|
||||||
[HistoryLists\hlConditionals]
|
[HistoryLists\hlConditionals]
|
||||||
Count=1
|
Count=1
|
||||||
Item0=_DEBUG
|
Item0=_DEBUG
|
||||||
|
|
||||||
[HistoryLists\hlTlibPageSize]
|
[HistoryLists\hlTlibPageSize]
|
||||||
Count=1
|
Count=1
|
||||||
Item0=0x0010
|
Item0=0x0010
|
||||||
|
|
||||||
[Debugging]
|
[Debugging]
|
||||||
DebugSourceDirs=$(BCB)\source\vcl
|
DebugSourceDirs=$(BCB)\source\vcl
|
||||||
|
|
||||||
[Parameters]
|
[Parameters]
|
||||||
RunParams=
|
RunParams=
|
||||||
HostApplication=
|
HostApplication=
|
||||||
RemoteHost=
|
RemoteHost=
|
||||||
RemotePath=
|
RemotePath=
|
||||||
RemoteDebug=0
|
RemoteDebug=0
|
||||||
|
|
||||||
[Compiler]
|
[Compiler]
|
||||||
ShowInfoMsgs=0
|
ShowInfoMsgs=0
|
||||||
LinkDebugVcl=0
|
LinkDebugVcl=0
|
||||||
LinkCGLIB=0
|
LinkCGLIB=0
|
||||||
|
|
||||||
[Language]
|
[Language]
|
||||||
ActiveLang=
|
ActiveLang=
|
||||||
ProjectLang=
|
ProjectLang=
|
||||||
RootDir=
|
RootDir=
|
||||||
</IDEOPTIONS>
|
</IDEOPTIONS>
|
||||||
</PROJECT>
|
</PROJECT>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
A set of project files is available for Netware. Get
|
A set of project files is available for Netware. Get
|
||||||
libpng-1.0.15-project-netware.zip from a libpng distribution
|
libpng-1.2.5-project-netware.zip from a libpng distribution
|
||||||
site such as http://libpng.sourceforge.net
|
site such as http://libpng.sourceforge.net
|
||||||
|
|
||||||
Put the zip file in this directory (projects) and then run
|
Put the zip file in this directory (projects) and then run
|
||||||
"unzip -a libpng-1.0.15-project-netware.zip"
|
"unzip -a libpng-1.2.5-project-netware.zip"
|
||||||
|
|||||||
@ -46,16 +46,9 @@ Notes:
|
|||||||
|
|
||||||
If you change anything in the source files, or select different compiler
|
If you change anything in the source files, or select different compiler
|
||||||
settings, please change the DLL name to something different than any of
|
settings, please change the DLL name to something different than any of
|
||||||
the above names.
|
the above names. Also, make sure that in your "pngusr.h" you define
|
||||||
|
PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX according to the
|
||||||
Also, make sure that DLLFNAME_POSTFIX and (PRIVATEBUILD or SPECIALBUILD)
|
instructions provided in "pngconf.h".
|
||||||
are defined when compiling the resource file. DLLFNAME_POSTFIX contains
|
|
||||||
the trailing letters that come after the version number. PRIVATEBUILD
|
|
||||||
and/or SPECIALBUILD store information describing the type of change made
|
|
||||||
in the VERSIONINFO structure. Please refer to MSDN for more information
|
|
||||||
on the used macros and the nature of their content. For an example on
|
|
||||||
how to define these macros, look at the resource compiler settings for
|
|
||||||
the "Win32 DLL VB" configuration.
|
|
||||||
|
|
||||||
All DLLs built by this project use the Microsoft dynamic C runtime library
|
All DLLs built by this project use the Microsoft dynamic C runtime library
|
||||||
MSVCRT.DLL (MSVCRTD.DLL for debug versions). If you distribute any of the
|
MSVCRT.DLL (MSVCRTD.DLL for debug versions). If you distribute any of the
|
||||||
|
|||||||
@ -1,59 +1,59 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "libpng"=".\libpng.dsp" - Package Owner=<4>
|
Project: "libpng"=".\libpng.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
Package=<4>
|
Package=<4>
|
||||||
{{{
|
{{{
|
||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name zlib
|
Project_Dep_Name zlib
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "pngtest"=".\pngtest.dsp" - Package Owner=<4>
|
Project: "pngtest"=".\pngtest.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
Package=<4>
|
Package=<4>
|
||||||
{{{
|
{{{
|
||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name libpng
|
Project_Dep_Name libpng
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "zlib"="..\..\..\zlib\projects\visualc6\zlib.dsp" - Package Owner=<4>
|
Project: "zlib"="..\..\..\zlib\projects\visualc6\zlib.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
Package=<4>
|
Package=<4>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Global:
|
Global:
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
Package=<3>
|
Package=<3>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|||||||
@ -1,314 +1,314 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="pngtest" - Package Owner=<4>
|
# Microsoft Developer Studio Project File - Name="pngtest" - Package Owner=<4>
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# ** DO NOT EDIT **
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
CFG=pngtest - Win32 DLL Release
|
CFG=pngtest - Win32 DLL Release
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "pngtest.mak".
|
!MESSAGE NMAKE /f "pngtest.mak".
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "pngtest.mak" CFG="pngtest - Win32 DLL Release"
|
!MESSAGE NMAKE /f "pngtest.mak" CFG="pngtest - Win32 DLL Release"
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "pngtest - Win32 DLL Release" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 DLL Release" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "pngtest - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "pngtest - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "pngtest - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "pngtest - Win32 LIB Release" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 LIB Release" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "pngtest - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "pngtest - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "pngtest - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
|
!MESSAGE "pngtest - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
# PROP AllowPerConfigDependencies 0
|
# PROP AllowPerConfigDependencies 0
|
||||||
# PROP Scc_ProjName ""
|
# PROP Scc_ProjName ""
|
||||||
# PROP Scc_LocalPath ""
|
# PROP Scc_LocalPath ""
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "pngtest - Win32 DLL Release"
|
!IF "$(CFG)" == "pngtest - Win32 DLL Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_DLL_Release"
|
# PROP BASE Output_Dir "pngtest___Win32_DLL_Release"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Release"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Release"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Win32_DLL_Release"
|
# PROP Output_Dir "Win32_DLL_Release"
|
||||||
# PROP Intermediate_Dir "Win32_DLL_Release"
|
# PROP Intermediate_Dir "Win32_DLL_Release"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 Win32_DLL_Release\libpng10.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
|
# ADD LINK32 Win32_DLL_Release\libpng10.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_DLL_Release
|
OutDir=.\Win32_DLL_Release
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Release; $(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Release; $(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL Debug"
|
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_DLL_Debug"
|
# PROP BASE Output_Dir "pngtest___Win32_DLL_Debug"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Debug"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Debug"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Win32_DLL_Debug"
|
# PROP Output_Dir "Win32_DLL_Debug"
|
||||||
# PROP Intermediate_Dir "Win32_DLL_Debug"
|
# PROP Intermediate_Dir "Win32_DLL_Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 Win32_DLL_Debug\libpng10d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 Win32_DLL_Debug\libpng10d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_DLL_Debug
|
OutDir=.\Win32_DLL_Debug
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Release"
|
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Release"
|
# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Release"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Release"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Release"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Win32_DLL_ASM_Release"
|
# PROP Output_Dir "Win32_DLL_ASM_Release"
|
||||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
|
# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 Win32_DLL_ASM_Release\libpng10.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release\zlib1.lib /nologo /subsystem:console /machine:I386
|
# ADD LINK32 Win32_DLL_ASM_Release\libpng10.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release\zlib1.lib /nologo /subsystem:console /machine:I386
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_DLL_ASM_Release
|
OutDir=.\Win32_DLL_ASM_Release
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release; $(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release; $(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Debug"
|
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Debug"
|
# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Debug"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Debug"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Debug"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Win32_DLL_ASM_Debug"
|
# PROP Output_Dir "Win32_DLL_ASM_Debug"
|
||||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
|
# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 Win32_DLL_ASM_Debug\libpng10d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 Win32_DLL_ASM_Debug\libpng10d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_DLL_ASM_Debug
|
OutDir=.\Win32_DLL_ASM_Debug
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Release"
|
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_LIB_Release"
|
# PROP BASE Output_Dir "pngtest___Win32_LIB_Release"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Release"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Release"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Win32_LIB_Release"
|
# PROP Output_Dir "Win32_LIB_Release"
|
||||||
# PROP Intermediate_Dir "Win32_LIB_Release"
|
# PROP Intermediate_Dir "Win32_LIB_Release"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
|
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.lib /nologo /subsystem:console /machine:I386
|
# ADD LINK32 Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.lib /nologo /subsystem:console /machine:I386
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_LIB_Release
|
OutDir=.\Win32_LIB_Release
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Debug"
|
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_LIB_Debug"
|
# PROP BASE Output_Dir "pngtest___Win32_LIB_Debug"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Debug"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Debug"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Win32_LIB_Debug"
|
# PROP Output_Dir "Win32_LIB_Debug"
|
||||||
# PROP Intermediate_Dir "Win32_LIB_Debug"
|
# PROP Intermediate_Dir "Win32_LIB_Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 Win32_LIB_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 Win32_LIB_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_LIB_Debug
|
OutDir=.\Win32_LIB_Debug
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Release"
|
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Release"
|
# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Release"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Release"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Release"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Win32_LIB_ASM_Release"
|
# PROP Output_Dir "Win32_LIB_ASM_Release"
|
||||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
|
# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
|
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 Win32_LIB_ASM_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Release\zlib.lib /nologo /subsystem:console /machine:I386
|
# ADD LINK32 Win32_LIB_ASM_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Release\zlib.lib /nologo /subsystem:console /machine:I386
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_LIB_ASM_Release
|
OutDir=.\Win32_LIB_ASM_Release
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Debug"
|
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Debug"
|
# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Debug"
|
||||||
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Debug"
|
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Debug"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Win32_LIB_ASM_Debug"
|
# PROP Output_Dir "Win32_LIB_ASM_Debug"
|
||||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
|
# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||||
# SUBTRACT BASE CPP /YX
|
# SUBTRACT BASE CPP /YX
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 Win32_LIB_ASM_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 Win32_LIB_ASM_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
OutDir=.\Win32_LIB_ASM_Debug
|
OutDir=.\Win32_LIB_ASM_Debug
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Desc=[Run Test]
|
PostBuild_Desc=[Run Test]
|
||||||
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
# Name "pngtest - Win32 DLL Release"
|
# Name "pngtest - Win32 DLL Release"
|
||||||
# Name "pngtest - Win32 DLL Debug"
|
# Name "pngtest - Win32 DLL Debug"
|
||||||
# Name "pngtest - Win32 DLL ASM Release"
|
# Name "pngtest - Win32 DLL ASM Release"
|
||||||
# Name "pngtest - Win32 DLL ASM Debug"
|
# Name "pngtest - Win32 DLL ASM Debug"
|
||||||
# Name "pngtest - Win32 LIB Release"
|
# Name "pngtest - Win32 LIB Release"
|
||||||
# Name "pngtest - Win32 LIB Debug"
|
# Name "pngtest - Win32 LIB Debug"
|
||||||
# Name "pngtest - Win32 LIB ASM Release"
|
# Name "pngtest - Win32 LIB ASM Release"
|
||||||
# Name "pngtest - Win32 LIB ASM Debug"
|
# Name "pngtest - Win32 LIB ASM Debug"
|
||||||
# Begin Group "Source Files"
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\pngtest.c
|
SOURCE=..\..\pngtest.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
|||||||
@ -1,88 +1,88 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng.vcproj", "{0008960E-E0DD-41A6-8265-00B31DDB4C21}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng.vcproj", "{0008960E-E0DD-41A6-8265-00B31DDB4C21}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0} = {2D4F8105-7D21-454C-9932-B47CAB71A5C0}
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0} = {2D4F8105-7D21-454C-9932-B47CAB71A5C0}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest.vcproj", "{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest.vcproj", "{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21} = {0008960E-E0DD-41A6-8265-00B31DDB4C21}
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21} = {0008960E-E0DD-41A6-8265-00B31DDB4C21}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4F8105-7D21-454C-9932-B47CAB71A5C0}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4F8105-7D21-454C-9932-B47CAB71A5C0}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfiguration) = preSolution
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
DLL ASM Debug = DLL ASM Debug
|
DLL ASM Debug = DLL ASM Debug
|
||||||
DLL ASM Release = DLL ASM Release
|
DLL ASM Release = DLL ASM Release
|
||||||
DLL Debug = DLL Debug
|
DLL Debug = DLL Debug
|
||||||
DLL Release = DLL Release
|
DLL Release = DLL Release
|
||||||
DLL VB = DLL VB
|
DLL VB = DLL VB
|
||||||
LIB ASM Debug = LIB ASM Debug
|
LIB ASM Debug = LIB ASM Debug
|
||||||
LIB ASM Release = LIB ASM Release
|
LIB ASM Release = LIB ASM Release
|
||||||
LIB Debug = LIB Debug
|
LIB Debug = LIB Debug
|
||||||
LIB Release = LIB Release
|
LIB Release = LIB Release
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32
|
||||||
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32
|
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32
|
||||||
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32
|
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32
|
||||||
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.Build.0 = LIB Release|Win32
|
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.Build.0 = LIB Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
@ -1,459 +1,459 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="7.10"
|
||||||
Name="pngtest"
|
Name="pngtest"
|
||||||
RootNamespace="pngtest">
|
RootNamespace="pngtest">
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
Name="Win32"/>
|
Name="Win32"/>
|
||||||
</Platforms>
|
</Platforms>
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="DLL Release|Win32"
|
Name="DLL Release|Win32"
|
||||||
OutputDirectory=".\Win32_DLL_Release\Test"
|
OutputDirectory=".\Win32_DLL_Release\Test"
|
||||||
IntermediateDirectory=".\Win32_DLL_Release\Test"
|
IntermediateDirectory=".\Win32_DLL_Release\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="TRUE"
|
EnableFunctionLevelLinking="TRUE"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SubSystem="1"/>
|
SubSystem="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="DLL Debug|Win32"
|
Name="DLL Debug|Win32"
|
||||||
OutputDirectory=".\Win32_DLL_Debug\Test"
|
OutputDirectory=".\Win32_DLL_Debug\Test"
|
||||||
IntermediateDirectory=".\Win32_DLL_Debug\Test"
|
IntermediateDirectory=".\Win32_DLL_Debug\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="DLL ASM Release|Win32"
|
Name="DLL ASM Release|Win32"
|
||||||
OutputDirectory=".\Win32_DLL_ASM_Release\Test"
|
OutputDirectory=".\Win32_DLL_ASM_Release\Test"
|
||||||
IntermediateDirectory=".\Win32_DLL_ASM_Release\Test"
|
IntermediateDirectory=".\Win32_DLL_ASM_Release\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="TRUE"
|
EnableFunctionLevelLinking="TRUE"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="DLL ASM Debug|Win32"
|
Name="DLL ASM Debug|Win32"
|
||||||
OutputDirectory=".\Win32_DLL_ASM_Debug\Test"
|
OutputDirectory=".\Win32_DLL_ASM_Debug\Test"
|
||||||
IntermediateDirectory=".\Win32_DLL_ASM_Debug\Test"
|
IntermediateDirectory=".\Win32_DLL_ASM_Debug\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="DLL VB|Win32"
|
Name="DLL VB|Win32"
|
||||||
OutputDirectory=".\Win32_DLL_VB\Test"
|
OutputDirectory=".\Win32_DLL_VB\Test"
|
||||||
IntermediateDirectory=".\Win32_DLL_VB\Test"
|
IntermediateDirectory=".\Win32_DLL_VB\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS;PNGAPI=__stdcall"
|
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS;PNGAPI=__stdcall"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="TRUE"
|
EnableFunctionLevelLinking="TRUE"
|
||||||
WarningLevel="2"
|
WarningLevel="2"
|
||||||
CallingConvention="2"
|
CallingConvention="2"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\..\Win32_DLL_Release\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\..\Win32_DLL_Release\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
IgnoreDefaultLibraryNames="$(IntDir)\libpng10vb.lib"
|
IgnoreDefaultLibraryNames="$(IntDir)\libpng10vb.lib"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="LIB Release|Win32"
|
Name="LIB Release|Win32"
|
||||||
OutputDirectory=".\Win32_LIB_Release\Test"
|
OutputDirectory=".\Win32_LIB_Release\Test"
|
||||||
IntermediateDirectory=".\Win32_LIB_Release\Test"
|
IntermediateDirectory=".\Win32_LIB_Release\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="TRUE"
|
EnableFunctionLevelLinking="TRUE"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="LIB Debug|Win32"
|
Name="LIB Debug|Win32"
|
||||||
OutputDirectory=".\Win32_LIB_Debug\Test"
|
OutputDirectory=".\Win32_LIB_Debug\Test"
|
||||||
IntermediateDirectory=".\Win32_LIB_Debug\Test"
|
IntermediateDirectory=".\Win32_LIB_Debug\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="LIB ASM Release|Win32"
|
Name="LIB ASM Release|Win32"
|
||||||
OutputDirectory=".\Win32_LIB_ASM_Release\Test"
|
OutputDirectory=".\Win32_LIB_ASM_Release\Test"
|
||||||
IntermediateDirectory=".\Win32_LIB_ASM_Release\Test"
|
IntermediateDirectory=".\Win32_LIB_ASM_Release\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;NDEBUG;PNG_NO_GLOBAL_ARRAYS"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="TRUE"
|
EnableFunctionLevelLinking="TRUE"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="LIB ASM Debug|Win32"
|
Name="LIB ASM Debug|Win32"
|
||||||
OutputDirectory=".\Win32_LIB_ASM_Debug\Test"
|
OutputDirectory=".\Win32_LIB_ASM_Debug\Test"
|
||||||
IntermediateDirectory=".\Win32_LIB_ASM_Debug\Test"
|
IntermediateDirectory=".\Win32_LIB_ASM_Debug\Test"
|
||||||
ConfigurationType="1">
|
ConfigurationType="1">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\..\zlib"
|
AdditionalIncludeDirectories="..\..\..\zlib"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
|
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
CompileAs="0"/>
|
CompileAs="0"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Testing..."
|
Description="Testing..."
|
||||||
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
|
||||||
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
|
||||||
Outputs="$(IntDir)\pngout.png"/>
|
Outputs="$(IntDir)\pngout.png"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/pngtest.exe"
|
OutputFile="$(OutDir)/pngtest.exe"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"/>
|
Name="VCResourceCompilerTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
<Files>
|
<Files>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\pngtest.c">
|
RelativePath="..\..\pngtest.c">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
</VisualStudioProject>
|
</VisualStudioProject>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
A set of project files is available for WinCE. Get
|
A set of project files is available for WinCE. Get
|
||||||
libpng-1.0.15-project-wince.zip from a libpng distribution
|
libpng-1.2.5-project-wince.zip from a libpng distribution
|
||||||
site such as http://libpng.sourceforge.net
|
site such as http://libpng.sourceforge.net
|
||||||
|
|
||||||
Put the zip file in this directory (projects) and then run
|
Put the zip file in this directory (projects) and then run
|
||||||
"unzip -a libpng-1.0.15-project-wince.zip"
|
"unzip -a libpng-1.2.5-project-wince.zip"
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# Modeled after libxml-config.
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
version=1.0.18
|
version=1.0.19rc1
|
||||||
prefix=""
|
prefix=""
|
||||||
libdir=""
|
libdir=""
|
||||||
libs=""
|
libs=""
|
||||||
|
|||||||
124
scripts/libpng-config.in
Executable file
@ -0,0 +1,124 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# libpng-config
|
||||||
|
# provides configuration info for libpng.
|
||||||
|
|
||||||
|
# Copyright (C) 2002, 2004, 2006 Glenn Randers-Pehrson
|
||||||
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
|
version="@PNGLIB_VERSION@"
|
||||||
|
prefix="@prefix@"
|
||||||
|
exec_prefix="@exec_prefix@"
|
||||||
|
libdir="@libdir@"
|
||||||
|
includedir="@includedir@/libpng@PNGLIB_MAJOR@"
|
||||||
|
libs="-lpng@PNGLIB_MAJOR@"
|
||||||
|
all_libs="-lpng@PNGLIB_MAJOR@ -lz -lm"
|
||||||
|
I_opts="-I${includedir}"
|
||||||
|
L_opts="-L${libdir}"
|
||||||
|
R_opts=""
|
||||||
|
cppflags=""
|
||||||
|
ccopts=""
|
||||||
|
ldopts=""
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
Usage: $0 [OPTION] ...
|
||||||
|
|
||||||
|
Known values for OPTION are:
|
||||||
|
|
||||||
|
--prefix print libpng prefix
|
||||||
|
--libdir print path to directory containing library
|
||||||
|
--libs print library linking information
|
||||||
|
--ccopts print compiler options
|
||||||
|
--cppflags print pre-processor flags
|
||||||
|
--cflags print preprocessor flags, I_opts, and compiler options
|
||||||
|
--I_opts print "-I" include options
|
||||||
|
--L_opts print linker "-L" flags for dynamic linking
|
||||||
|
--R_opts print dynamic linker "-R" or "-rpath" flags
|
||||||
|
--ldopts print linker options
|
||||||
|
--ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
|
||||||
|
--static revise subsequent outputs for static linking
|
||||||
|
--help print this help and exit
|
||||||
|
--version print version information
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
--prefix)
|
||||||
|
echo ${prefix}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--version)
|
||||||
|
echo ${version}
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--help)
|
||||||
|
usage 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--ccopts)
|
||||||
|
echo ${ccopts}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--cppflags)
|
||||||
|
echo ${cppflags}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--cflags)
|
||||||
|
echo ${I_opts} ${cppflags} ${ccopts}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--libdir)
|
||||||
|
echo ${libdir}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--libs)
|
||||||
|
echo ${libs}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--I_opts)
|
||||||
|
echo ${I_opts}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--L_opts)
|
||||||
|
echo ${L_opts}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--R_opts)
|
||||||
|
echo ${R_opts}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--ldopts)
|
||||||
|
echo ${ldopts}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--ldflags)
|
||||||
|
echo ${ldopts} ${L_opts} ${R_opts} ${libs}
|
||||||
|
;;
|
||||||
|
|
||||||
|
--static)
|
||||||
|
R_opts=""
|
||||||
|
libs=${all_libs}
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
@ -1,11 +1,10 @@
|
|||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@/libpng10
|
||||||
|
|
||||||
prefix=@PREFIX@
|
Name: libpng
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=${exec_prefix}/lib
|
|
||||||
includedir=${exec_prefix}/include
|
|
||||||
|
|
||||||
Name: libpng10
|
|
||||||
Description: Loads and saves PNG files
|
Description: Loads and saves PNG files
|
||||||
Version: 1.0.18
|
Version: 1.0.19rc1
|
||||||
Libs: -L${libdir} -lpng10 -lz -lm
|
Libs: -L${libdir} -lpng10
|
||||||
Cflags: -I${includedir}/libpng10
|
Cflags: -I${includedir}
|
||||||
|
|||||||
@ -1,16 +1,38 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
LIBNAME=libpng10
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).so
|
||||||
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||||
|
OLDSO=libpng.so
|
||||||
|
OLDSOMAJ=libpng.so.2
|
||||||
|
OLDSOVER=libpng.so.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
CC=cc
|
CC=cc
|
||||||
|
AR_RC=ar rc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -f -s
|
||||||
|
RANLIB=echo
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
SUN_CC_FLAGS=-fast -xtarget=ultra
|
SUN_CC_FLAGS=-fast -xtarget=ultra
|
||||||
SUN_LD_FLAGS=-fast -xtarget=ultra
|
SUN_LD_FLAGS=-fast -xtarget=ultra
|
||||||
|
|
||||||
# where make install puts libpng.a, libpng10.so and libpng10/png.h
|
# where make install puts libpng.a, libpng10.so and libpng10/png.h
|
||||||
prefix=/a
|
prefix=/a
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
# Changing these to ../zlib poses a security risk. If you want
|
# Changing these to ../zlib poses a security risk. If you want
|
||||||
@ -28,18 +50,10 @@ CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
|||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
#RANLIB=ranlib
|
|
||||||
RANLIB=echo
|
|
||||||
|
|
||||||
LIBNAME=libpng10
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -67,10 +81,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -89,13 +103,13 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
@case "`type ld`" in *ucb*) \
|
@case "`type ld`" in *ucb*) \
|
||||||
echo; \
|
echo; \
|
||||||
echo '## WARNING:'; \
|
echo '## WARNING:'; \
|
||||||
@ -108,77 +122,78 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
|||||||
echo; \
|
echo; \
|
||||||
;; \
|
;; \
|
||||||
esac
|
esac
|
||||||
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
|
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \
|
||||||
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
|
-o $(LIBSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
libpng.so.2.$(PNGMIN): $(OBJS)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.2 \
|
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \
|
||||||
-o libpng.so.2.$(PNGMIN) $(OBJSDLL)
|
-o $(OLDSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).so
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
test: pngtest
|
test: pngtest
|
||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.so.2.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so
|
-@$(RM_F) $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGVER)*
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
-@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)*
|
||||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -f -s libpng.so.2.$(PNGMIN) libpng.so.2; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -f -s libpng.so.2 libpng.so; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng10.pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/libpng10.pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/libpng10.pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -f -s libpng10.pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/libpng10-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/libpng10-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/libpng10-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -f -s libpng10-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -190,8 +205,8 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/libpng10-config --ldflags` \
|
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
@ -199,15 +214,15 @@ test-installed:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
$(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
|
||||||
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||||
libpng.so.2.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -1,16 +1,38 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
LIBNAME=libpng10
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).so
|
||||||
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||||
|
OLDSO=libpng.so
|
||||||
|
OLDSOMAJ=libpng.so.2
|
||||||
|
OLDSOVER=libpng.so.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
CC=cc
|
CC=cc
|
||||||
|
AR_RC=ar rc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -f -s
|
||||||
|
RANLIB=echo
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
|
SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
|
||||||
SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
|
SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
|
||||||
|
|
||||||
# where make install puts libpng.a, libpng10.so and libpng10/png.h
|
# where make install puts libpng.a, libpng10.so and libpng10/png.h
|
||||||
prefix=/a
|
prefix=/a
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
# Changing these to ../zlib poses a security risk. If you want
|
# Changing these to ../zlib poses a security risk. If you want
|
||||||
@ -28,18 +50,10 @@ CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
|||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng10 -lz -lm
|
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng10 -lz -lm
|
||||||
|
|
||||||
#RANLIB=ranlib
|
|
||||||
RANLIB=echo
|
|
||||||
|
|
||||||
LIBNAME=libpng10
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -67,10 +81,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -89,13 +103,13 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
@case "`type ld`" in *ucb*) \
|
@case "`type ld`" in *ucb*) \
|
||||||
echo; \
|
echo; \
|
||||||
echo '## WARNING:'; \
|
echo '## WARNING:'; \
|
||||||
@ -108,78 +122,78 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
|||||||
echo; \
|
echo; \
|
||||||
;; \
|
;; \
|
||||||
esac
|
esac
|
||||||
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
|
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \
|
||||||
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
|
-o $(LIBSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
libpng.so.2.$(PNGMIN): $(OBJSDLL)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.2 \
|
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \
|
||||||
-o libpng.so.2.$(PNGMIN) $(OBJSDLL)
|
-o $(OLDSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).so
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
test: pngtest
|
test: pngtest
|
||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.so.2.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ).$(PNGVER)*
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGVER)*
|
-@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)*
|
||||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -f -s libpng.so.2.$(PNGMIN) libpng.so.2; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -f -s libpng.so.2 libpng.so; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -f -s $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -191,8 +205,8 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/libpng10-config --ldflags` \
|
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
@ -200,15 +214,15 @@ test-installed:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags ` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
$(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
|
||||||
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||||
libpng.so.2.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng using gcc (generic, static library)
|
# makefile for libpng using gcc (generic, static library)
|
||||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
@ -12,13 +12,15 @@ ZLIBLIB = ../zlib
|
|||||||
# Compiler, linker, lib and other tools
|
# Compiler, linker, lib and other tools
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
AR = ar rcs
|
AR_RC = ar rcs
|
||||||
|
MKDIR_P = mkdir -p
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
RM = rm -f
|
RM_F = rm -f
|
||||||
|
LN_SF = ln -f -s
|
||||||
|
|
||||||
LIBNAME=libpng10
|
LIBNAME=libpng10
|
||||||
PNGMAJ = 0
|
PNGMAJ = 0
|
||||||
PNGMIN = 1.0.18
|
PNGMIN = 1.0.19rc1
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
@ -60,7 +62,7 @@ OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
|||||||
all: $(LIBNAME)$(A) pngtest$(E)
|
all: $(LIBNAME)$(A) pngtest$(E)
|
||||||
|
|
||||||
$(LIBNAME)$(A): $(OBJS)
|
$(LIBNAME)$(A): $(OBJS)
|
||||||
$(AR) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
test: pngtest$(E)
|
test: pngtest$(E)
|
||||||
@ -70,27 +72,27 @@ pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
|
|||||||
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
||||||
|
|
||||||
install: $(LIBNAME)$(A)
|
install: $(LIBNAME)$(A)
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@rm -f $(DI)/$(LIBNAME)/png.h
|
-@$(RM_F) $(DI)/$(LIBNAME)/png.h
|
||||||
-@rm -f $(DI)/$(LIBNAME)/pngconf.h
|
-@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@rm -f $(DI)/png.h
|
-@$(RM_F) $(DI)/png.h
|
||||||
-@rm -f $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/pngconf.h
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||||
$(DI)/$(LIBNAME)/pngconf.h
|
$(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@rm -rf $(DI)/libpng
|
-@$(RM_F) -r $(DI)/libpng
|
||||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
-@rm -f $(DL)/$(LIBNAME)$(A)
|
-@$(RM_F) $(DL)/$(LIBNAME)$(A)
|
||||||
-@rm -f $(DL)/libpng$(A)
|
-@$(RM_F) $(DL)/libpng$(A)
|
||||||
cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
|
cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
|
||||||
chmod 644 $(DL)/$(LIBNAME)$(A)
|
chmod 644 $(DL)/$(LIBNAME)$(A)
|
||||||
(cd $(DL); ln -f -s $(LIBNAME)$(A) libpng$(A))
|
(cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A))
|
||||||
(cd $(DI); ln -f -s libpng/* .;)
|
(cd $(DI); $(LN_SF) libpng/* .;)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o $(LIBNAME)$(A) pngtest pngout.png
|
$(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png
|
||||||
|
|
||||||
png$(O): png.h pngconf.h
|
png$(O): png.h pngconf.h
|
||||||
pngerror$(O): png.h pngconf.h
|
pngerror$(O): png.h pngconf.h
|
||||||
|
|||||||
@ -17,14 +17,14 @@ CC=bcc32
|
|||||||
LD=bcc32
|
LD=bcc32
|
||||||
LIB=tlib
|
LIB=tlib
|
||||||
|
|
||||||
#TARGET_CPU=6
|
# -3 = 386, -4 = 486, -5 = Pentium etc.
|
||||||
# 3 = 386, 4 = 486, 5 = Pentium etc.
|
|
||||||
!ifndef TARGET_CPU
|
!ifndef TARGET_CPU
|
||||||
TARGET_CPU=5
|
#TARGET_CPU=-6
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# Use this if you don't want Borland's fancy exception handling
|
# Use this if you don't want Borland's fancy exception handling
|
||||||
NOEHLIB=noeh32.lib
|
# (Caution: doesn't work with CBuilderX)
|
||||||
|
#NOEHLIB=noeh32.lib
|
||||||
|
|
||||||
!ifdef DEBUG
|
!ifdef DEBUG
|
||||||
CDEBUG=-v
|
CDEBUG=-v
|
||||||
@ -40,14 +40,14 @@ CDEBUG=$(CDEBUG) -N
|
|||||||
LDEBUG=$(LDEBUG) -N
|
LDEBUG=$(LDEBUG) -N
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# -X- turn on dependency generation in the object file
|
|
||||||
# -w set all warnings on
|
|
||||||
# -O2 optimize for speed
|
# -O2 optimize for speed
|
||||||
# -Z global optimization
|
# -d merge duplicate strings
|
||||||
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(CDEBUG)
|
# -k- turn off standard stack frame
|
||||||
|
# -w display all warnings
|
||||||
|
CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
||||||
|
|
||||||
# -M generate map file
|
# -M generate map file
|
||||||
LDFLAGS=-M -L$(ZLIB_DIR) $(LDEBUG)
|
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
||||||
|
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
@ -138,14 +138,15 @@ $(LIBOBJS), libpng
|
|||||||
|
|
|
|
||||||
|
|
||||||
|
|
||||||
# Clean up anything else you want
|
# Cleanup
|
||||||
clean:
|
clean:
|
||||||
-del *.obj
|
-del *.obj
|
||||||
-del *.exe
|
-del $(LIBNAME)
|
||||||
-del *.lib
|
-del pngtest.exe
|
||||||
-del *.lst
|
-del *.lst
|
||||||
-del *.map
|
-del *.map
|
||||||
-del *.tds
|
-del *.tds
|
||||||
|
-del pngout.png
|
||||||
|
|
||||||
|
|
||||||
# End of makefile for libpng
|
# End of makefile for libpng
|
||||||
|
|||||||
@ -1,20 +1,36 @@
|
|||||||
# makefile for libpng on BeOS x86 ELF with gcc
|
# makefile for libpng on BeOS x86 ELF with gcc
|
||||||
# modified from makefile.linux by Sander Stoks
|
# modified from makefile.linux by Sander Stoks
|
||||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1999 Greg Roelofs
|
# Copyright (C) 1999 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
LIBNAME=libpng10
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).so
|
||||||
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||||
|
OLDSO=libpng.so
|
||||||
|
OLDSOMAJ=libpng.so.2
|
||||||
|
OLDSOVER=libpng.so.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
AR_RC=ar rc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -sf
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
ZLIBLIB=/usr/local/lib
|
ZLIBLIB=/usr/local/lib
|
||||||
ZLIBINC=/usr/local/include
|
ZLIBINC=/usr/local/include
|
||||||
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
|
|
||||||
ALIGN=
|
ALIGN=
|
||||||
# For i386:
|
# For i386:
|
||||||
# ALIGN=-malign-loops=2 -malign-functions=2
|
# ALIGN=-malign-loops=2 -malign-functions=2
|
||||||
@ -27,18 +43,16 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
# still here in R4.5
|
# still here in R4.5
|
||||||
CFLAGS=-I$(ZLIBINC) -Wall -O1 -funroll-loops \
|
CFLAGS=-I$(ZLIBINC) -Wall -O1 -funroll-loops \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(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) -lpng -lz
|
||||||
LDFLAGS=-L. -Wl,-soname=$(LIBNAME).so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
|
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
||||||
|
|
||||||
RANLIB=ranlib
|
|
||||||
#RANLIB=echo
|
|
||||||
|
|
||||||
# where make install puts libpng.a, libpng10.so*, and png.h
|
# where make install puts libpng.a, libpng10.so*, and png.h
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
exec_prefix=$(prefix)
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -55,8 +69,6 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
LIBNAME=libpng10
|
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@ -65,10 +77,10 @@ OBJSDLL = $(OBJS)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -78,89 +90,89 @@ libpng-config:
|
|||||||
( cat scripts/libpng-config-head.in; \
|
( cat scripts/libpng-config-head.in; \
|
||||||
echo prefix=\"$(prefix)\"; \
|
echo prefix=\"$(prefix)\"; \
|
||||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||||
echo libs=\"-lpng10 -lz -lm\"; \
|
echo libs=\"-lpng10 -lz \"; \
|
||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
cp $(LIBNAME).so* /boot/home/config/lib
|
cp $(LIBSO)* /boot/home/config/lib
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
$(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \
|
$(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
|
||||||
$(LIBNAME).so.$(PNGVER) $(OBJSDLL)
|
$(LIBSOVER) $(OBJSDLL) $(LDFLAGS)
|
||||||
|
|
||||||
libpng.so.2.$(PNGMIN): $(OBJSDLL)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(CC) -nostart -Wl,-soname,libpng.so.2 -o \
|
$(CC) -nostart -Wl,-soname,$(OLDSOMAJ) -o \
|
||||||
libpng.so.2.$(PNGMIN) $(OBJSDLL)
|
$(OLDSOVER) $(OBJSDLL) $(LDFLAGS)
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).so
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -L$(ZLIBLIB) -lz -lpng10 -o pngtest pngtest.o
|
$(CC) -L$(ZLIBLIB) -L. -lz -lpng10 -o pngtest pngtest.o
|
||||||
|
|
||||||
test: pngtest
|
test: pngtest
|
||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.so.2.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
|
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.so.2.$(PNGMIN) libpng.so.2; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.so.2 libpng.so; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -172,22 +184,22 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) $(CFLAGS) \
|
$(CC) -I$(DI) $(CFLAGS) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -W1,-rpath $(ZLIBLIB):$(DL) \
|
-L$(DL) -L$(ZLIBLIB) -W1,-rpath $(ZLIBLIB):$(DL) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CFLAGS) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
|
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
|
||||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \
|
$(LIBSO) $(LIBSOMAJ)* pngtesti \
|
||||||
libpng.so.2.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
# of the library, and builds two copies of pngtest: one
|
# of the library, and builds two copies of pngtest: one
|
||||||
# statically linked and one dynamically linked.
|
# statically linked and one dynamically linked.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006 Soren Anderson, Charles Wilson,
|
||||||
# based on makefile for linux-elf w/mmx by:
|
# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
|
||||||
# Copyright (C) 1998-2000 Greg Roelofs
|
# Copyright (C) 1998-2000 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
@ -46,6 +46,7 @@ ifndef prefix
|
|||||||
prefix=/usr
|
prefix=/usr
|
||||||
$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
|
$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
|
||||||
endif
|
endif
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
ZLIBLIB= /usr/lib
|
ZLIBLIB= /usr/lib
|
||||||
@ -78,8 +79,8 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
|||||||
|
|
||||||
LIBNAME = libpng10
|
LIBNAME = libpng10
|
||||||
PNGMAJ = 0
|
PNGMAJ = 0
|
||||||
CYGDLL = 12
|
CYGDLL = 10
|
||||||
PNGMIN = 1.0.18
|
PNGMIN = 1.0.19rc1
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
SHAREDLIB=cygpng$(CYGDLL).dll
|
SHAREDLIB=cygpng$(CYGDLL).dll
|
||||||
@ -93,14 +94,14 @@ LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
|
|||||||
LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all)
|
LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all)
|
||||||
LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
|
LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
|
||||||
|
|
||||||
MKDIR=/bin/mkdir -pv
|
MKDIR_P=/bin/mkdir -pv
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
#RANLIB=echo
|
#RANLIB=echo
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
|
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
MAN3PATH=$(MANPATH)/man3
|
MAN3PATH=$(MANPATH)/man3
|
||||||
MAN5PATH=$(MANPATH)/man5
|
MAN5PATH=$(MANPATH)/man5
|
||||||
@ -176,7 +177,7 @@ $(STATLIB): $(OBJS)
|
|||||||
ar rc $@ $(OBJS)
|
ar rc $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
$(SHAREDDEF): scripts/png32ms.def
|
$(SHAREDDEF): scripts/pngw32.def
|
||||||
cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
|
cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
|
||||||
sed -e 's/\([^;]*\);/;/' > $@
|
sed -e 's/\([^;]*\);/;/' > $@
|
||||||
|
|
||||||
@ -204,15 +205,15 @@ test-shared: pngtest$(EXE)
|
|||||||
./pngtest $(S)/pngtest.png
|
./pngtest $(S)/pngtest.png
|
||||||
|
|
||||||
install-static: $(STATLIB) install-headers install-man
|
install-static: $(STATLIB) install-headers install-man
|
||||||
-@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
|
install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
|
||||||
-@rm -f $(DL)/$(STATLIB)
|
-@rm -f $(DL)/$(STATLIB)
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
|
(cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
|
||||||
|
|
||||||
install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
|
install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
|
||||||
-@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
||||||
install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
|
install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
|
||||||
@ -223,8 +224,8 @@ install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
|
|||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-headers:
|
install-headers:
|
||||||
-@if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
-@rm -f $(DI)/png.h
|
-@rm -f $(DI)/png.h
|
||||||
-@rm -f $(DI)/pngconf.h
|
-@rm -f $(DI)/pngconf.h
|
||||||
install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
|
install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
|
||||||
@ -232,13 +233,13 @@ install-headers:
|
|||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-man:
|
install-man:
|
||||||
-@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi
|
-@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR_P) $(D)$(MAN3PATH); fi
|
||||||
-@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi
|
-@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR_P) $(D)$(MAN5PATH); fi
|
||||||
install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
|
install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
|
||||||
install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
|
install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@/bin/rm -f $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Darwin / Mac OS X
|
# makefile for libpng on Darwin / Mac OS X
|
||||||
# Copyright (C) 2002,2004 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2004, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001 Christoph Pfisterer
|
# Copyright (C) 2001 Christoph Pfisterer
|
||||||
# derived from makefile.linux:
|
# derived from makefile.linux:
|
||||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||||
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
# where "make install" puts libpng.a, libpng10.dylib, png.h and pngconf.h
|
# where "make install" puts libpng.a, libpng10.dylib, png.h and pngconf.h
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
#ZLIBLIB=/usr/local/lib
|
#ZLIBLIB=/usr/local/lib
|
||||||
@ -15,22 +16,35 @@ prefix=/usr/local
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
LIBNAME = libpng10
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).dylib
|
||||||
|
LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
|
||||||
|
LIBSOVER=$(LIBNAME).$(PNGVER).dylib
|
||||||
|
OLDSO=libpng.dylib
|
||||||
|
OLDSOMAJ=libpng.2.dylib
|
||||||
|
OLDSOVER=libpng.2.$(PNGMIN).dylib
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
CC=cc
|
CC=cc
|
||||||
|
AR_RC=ar rc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -sf
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
|
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng10 -lz
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng10 -lz
|
||||||
|
|
||||||
#RANLIB=echo
|
|
||||||
RANLIB=ranlib
|
|
||||||
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
LIBNAME = libpng10
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -58,10 +72,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -77,92 +91,92 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).dylib: $(LIBNAME).$(PNGMAJ).dylib
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
$(CC) -dynamiclib \
|
$(CC) -dynamiclib \
|
||||||
-install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
|
-install_name $(LIBPATH)/$(LIBSOMAJ) \
|
||||||
-current_version $(PNGVER) -compatibility_version $(PNGVER) \
|
-current_version $(PNGVER) -compatibility_version $(PNGVER) \
|
||||||
-o $(LIBNAME).$(PNGVER).dylib \
|
-o $(LIBSOVER) \
|
||||||
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
||||||
|
|
||||||
libpng.3.$(PNGMIN).dylib: $(OBJSDLL)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(CC) -dynamiclib \
|
$(CC) -dynamiclib \
|
||||||
-install_name $(LIBPATH)/libpng.3.dylib \
|
-install_name $(LIBPATH)/$(OLDSOMAJ) \
|
||||||
-current_version 3 -compatibility_version 3 \
|
-current_version 3 -compatibility_version 3 \
|
||||||
-o libpng.3.$(PNGMIN).dylib \
|
-o $(OLDSOVER) \
|
||||||
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).dylib
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
test: pngtest
|
test: pngtest
|
||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
$(RANLIB) $(DL)/$(LIBNAME).a
|
$(RANLIB) $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).dylib libpng.pc \
|
install-shared: install-headers $(LIBSO) libpng.pc \
|
||||||
libpng.3.$(PNGMIN).dylib
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).$(PNGVER)*.dylib
|
-@$(RM_F) $(DL)/$(LIBNAME).$(PNGVER)*.dylib
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib
|
-@$(RM_F) $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).dylib
|
-@$(RM_F) $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.dylib
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.3.dylib
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.3.$(PNGMIN)*.dylib
|
-@$(RM_F) $(DL)/libpng.3.$(PNGMIN)*.dylib
|
||||||
cp $(LIBNAME).$(PNGVER).dylib $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.3.$(PNGMIN).dylib $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).$(PNGVER).dylib
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.3.$(PNGMIN).dylib
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.3.$(PNGMIN).dylib libpng.3.dylib; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.3.dylib libpng.dylib; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -174,21 +188,21 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CFLAGS) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o libpng.a pngtest pngout.png libpng-config \
|
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
|
||||||
libpng.3.$(PNGMIN).dylib \
|
$(OLDSOVER) \
|
||||||
libpng.pc $(LIBNAME).*dylib pngtesti
|
libpng.pc $(LIBNAME).*dylib pngtesti
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -1,14 +1,37 @@
|
|||||||
# makefile for libpng on DEC Alpha Unix
|
# makefile for libpng on DEC Alpha Unix
|
||||||
# Copyright (C) 2000-2002 Glenn Randers-Pehrson
|
# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
LIBNAME = libpng10
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).so
|
||||||
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||||
|
OLDSO=libpng.so
|
||||||
|
OLDSOMAJ=libpng.so.2
|
||||||
|
OLDSOVER=libpng.so.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
|
AR_RC=ar rc
|
||||||
|
CC=cc
|
||||||
|
MKDIR_P=mkdir
|
||||||
|
LN_SF=ln -f -s
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where make install puts libpng.a and png.h
|
# where make install puts libpng.a and png.h
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
exec_prefix=$(prefix)
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -31,26 +54,17 @@ DM=$(DESTDIR)$(MANPATH)
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
LIBNAME = libpng10
|
|
||||||
|
|
||||||
CC=cc
|
|
||||||
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
|
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
|
||||||
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
#RANLIB=echo
|
|
||||||
RANLIB=ranlib
|
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
all: $(LIBNAME).so libpng.a pngtest libpng.pc libpng-config
|
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -66,19 +80,19 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGVER): $(OBJS)
|
$(LIBSOVER): $(OBJS)
|
||||||
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
|
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
|
||||||
-soname $(LIBNAME).so.$(PNGMAJ)
|
-soname $(LIBSOMAJ)
|
||||||
|
|
||||||
libpng.so.2.$(PNGMIN): $(OBJS)
|
$(OLDSOVER): $(OBJS)
|
||||||
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
|
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
|
||||||
-soname libpng.so.2
|
-soname $(OLDSOMAJ)
|
||||||
|
|
||||||
pngtest: pngtest.o libpng.a
|
pngtest: pngtest.o libpng.a
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
@ -87,63 +101,63 @@ test: pngtest
|
|||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@/bin/rm -f $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@/bin/rm -f $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF)(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.so.2.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
-@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
-@/bin/rm -f $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so
|
-@/bin/rm -f $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2
|
-@/bin/rm -f $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
|
-@/bin/rm -f $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -f -s libpng.so.2.$(PNGMIN) libpng.so.2; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -f -s libpng.so.2 libpng.so; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
$(LN_SF)(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
$(LN_SF)(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF)(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@/bin/rm -f $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@/bin/rm -f $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@/bin/rm -f $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -155,24 +169,24 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -w1 -I$(DI) -I$(ZLIBINC) \
|
$(CC) -w1 -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -w1 -I$(ZLIBINC) \
|
$(CC) -w1 -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB) \
|
-L$(ZLIBLIB) -R$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
||||||
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||||
libpng.so.2.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|||||||
@ -1,25 +1,47 @@
|
|||||||
# makefile for libpng.a and libpng10.so on Linux ELF with gcc
|
# makefile for libpng.a and libpng10.so on Linux ELF with gcc
|
||||||
# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
|
# Copyright (C) 1998, 1999, 2002, 2006 Greg Roelofs and Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Modified for Debian by Junichi Uekawa and Josselin Mouette
|
||||||
|
# Major modifications are:
|
||||||
|
# * link libpng explicitly with libz and libm
|
||||||
|
# * $(OLDSO).2 is a symlink rather than a different library
|
||||||
|
# * versioned symbols
|
||||||
|
|
||||||
|
# Library name:
|
||||||
LIBNAME = libpng10
|
LIBNAME = libpng10
|
||||||
PNGMAJ = 0
|
PNGMAJ = 0
|
||||||
PNGMIN = 1.0.18
|
PNGMIN = 1.0.19rc1
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).so
|
||||||
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||||
|
OLDSO=libpng.so
|
||||||
|
OLDSOMAJ=libpng.so.2
|
||||||
|
OLDSOVER=libpng.so.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
|
AR_RC=ar rc
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -sf
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where "make install" puts libpng10.a, libpng10.so*,
|
# where "make install" puts libpng10.a, libpng10.so*,
|
||||||
# libpng10/png.h and libpng10/pngconf.h
|
# libpng10/png.h and libpng10/pngconf.h
|
||||||
# Prefix must be a full pathname.
|
# Prefix must be a full pathname.
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located.
|
# Where the zlib library and include files are located.
|
||||||
#ZLIBLIB=/usr/local/lib
|
ZLIBLIB=/usr/local/lib
|
||||||
#ZLIBINC=/usr/local/include
|
ZLIBINC=/usr/local/include
|
||||||
ZLIBLIB=../zlib
|
# ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
# ZLIBINC=../zlib
|
||||||
|
|
||||||
ALIGN=
|
ALIGN=
|
||||||
# for i386:
|
# for i386:
|
||||||
@ -31,19 +53,18 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
|
CFLAGS=-Wall -D_REENTRANT -O2 \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
|
|
||||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
|
LDFLAGS=-L. -lpng10
|
||||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS_A=libpng.a -lz -lm
|
||||||
|
LIBADDFLAGS=-lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
|
||||||
#RANLIB=echo
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -71,18 +92,18 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||||
|
|
||||||
libpng.syms: png.h pngconf.h
|
libpng.syms: png.h pngconf.h
|
||||||
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS png.h |\
|
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
|
||||||
awk -F '[\t [\]();]' 'BEGIN{print "{global:"}\
|
awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG10_%s {global:\n",PNGMAJ)}\
|
||||||
{ for (i=1;i+2<=NF;++i)\
|
{ for (i=1;i+2<=NF;++i)\
|
||||||
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
|
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
|
||||||
print $$(i+1) ";";\
|
print $$(i+1) ";";\
|
||||||
@ -90,38 +111,39 @@ libpng.syms: png.h pngconf.h
|
|||||||
if ($$(i)=="PNG_DATA_EXPORT")\
|
if ($$(i)=="PNG_DATA_EXPORT")\
|
||||||
print $$(i+1) ";";}\
|
print $$(i+1) ";";}\
|
||||||
END{print "local: *; };"}' >$@.new
|
END{print "local: *; };"}' >$@.new
|
||||||
rm -f $@
|
$(RM_F) $@
|
||||||
mv $@.new $@
|
mv $@.new $@
|
||||||
|
|
||||||
libpng-config:
|
libpng-config:
|
||||||
( cat scripts/libpng-config-head.in; \
|
( cat scripts/libpng-config-head.in; \
|
||||||
echo prefix=\"$(prefix)\"; \
|
echo prefix=\"$(prefix)\"; \
|
||||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
echo L_opts=\"\"; \
|
||||||
echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
|
echo R_opts=\"\"; \
|
||||||
echo libs=\"-lpng10 -lz -lm\"; \
|
echo libs=\"-lpng10\"; \
|
||||||
|
echo all_libs=\"-lpng10 $(LIBADDFLAGS)\"; \
|
||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL) libpng.syms
|
$(LIBSOVER): $(OBJSDLL) libpng.syms
|
||||||
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
|
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) \
|
||||||
-Wl,-version-script,libpng.syms \
|
-Wl,-version-script,libpng.syms \
|
||||||
-o $(LIBNAME).so.$(PNGVER) \
|
-o $(LIBSOVER) \
|
||||||
$(OBJSDLL)
|
$(OBJSDLL)
|
||||||
|
|
||||||
libpng.so.2.$(PNGMIN): $(OBJSDLL) libpng.syms
|
$(OLDSOVER): $(OBJSDLL) libpng.syms
|
||||||
$(CC) -shared -Wl,-soname,libpng.so.2 \
|
$(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
|
||||||
-Wl,-version-script,libpng.syms \
|
-Wl,-version-script,libpng.syms \
|
||||||
-o libpng.so.2.$(PNGMIN) \
|
-o $(OLDSOVER) \
|
||||||
$(OBJSDLL)
|
$(OBJSDLL)
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).so
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
pngtest-static: pngtest.o libpng.a
|
pngtest-static: pngtest.o libpng.a
|
||||||
@ -129,72 +151,72 @@ pngtest-static: pngtest.o libpng.a
|
|||||||
|
|
||||||
test: pngtest pngtest-static
|
test: pngtest pngtest-static
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Running pngtest dynamically linked with $(LIBNAME).so:"
|
@echo " Running pngtest dynamically linked with $(LIBSO):"
|
||||||
@echo ""
|
@echo ""
|
||||||
./pngtest
|
LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ./pngtest
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Running pngtest statically linked with libpng.a:"
|
@echo " Running pngtest statically linked with libpng.a:"
|
||||||
@echo ""
|
@echo ""
|
||||||
./pngtest-static
|
./pngtest-static
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.so.2.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
|
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.so.2.$(PNGMIN) libpng.so.2; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.so.2 libpng.so; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -206,22 +228,22 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a libpng.syms pngtest pngout.png libpng-config \
|
$(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \
|
||||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
|
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
|
||||||
libpng.so.2.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -10,42 +10,55 @@ ZLIBLIB = ../zlib
|
|||||||
# Compiler, linker, lib and other tools
|
# Compiler, linker, lib and other tools
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
AR = ar rcs
|
AR_RC = ar rcs
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
RM = rm -f
|
RM_F = rm -f
|
||||||
|
|
||||||
CDEBUG = -g -DPNG_DEBUG=5
|
CDEBUG = -g -DPNG_DEBUG=5
|
||||||
LDDEBUG =
|
LDDEBUG =
|
||||||
CRELEASE = -O2
|
CRELEASE = -O2
|
||||||
LDRELEASE = -s
|
LDRELEASE = -s
|
||||||
CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
|
#CFLAGS = -Wall $(CDEBUG)
|
||||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
|
CFLAGS = -Wall $(CRELEASE)
|
||||||
|
#LDFLAGS = $(LDDEBUG)
|
||||||
|
LDFLAGS = $(LDRELEASE)
|
||||||
|
LIBS = -lz -lm
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
O=.o
|
O=.o
|
||||||
A=.a
|
A=.a
|
||||||
E=
|
EXE=
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
||||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
||||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
all: libpng$(A) pngtest$(E)
|
all: static
|
||||||
|
|
||||||
|
.c$(O):
|
||||||
|
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
|
||||||
|
|
||||||
|
static: libpng$(A) pngtest$(EXE)
|
||||||
|
|
||||||
|
shared:
|
||||||
|
@echo This is a generic makefile that cannot create shared libraries.
|
||||||
|
@echo Please use a configuration that is specific to your platform.
|
||||||
|
@false
|
||||||
|
|
||||||
libpng$(A): $(OBJS)
|
libpng$(A): $(OBJS)
|
||||||
$(AR) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
test: pngtest$(E)
|
test: pngtest$(EXE)
|
||||||
./pngtest$(E)
|
./pngtest$(EXE)
|
||||||
|
|
||||||
pngtest$(E): pngtest$(O) libpng$(A)
|
pngtest$(EXE): pngtest$(O) libpng$(A)
|
||||||
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) *$(O) libpng$(A) pngtest$(E) pngout.png
|
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png
|
||||||
|
|
||||||
png$(O): png.h pngconf.h
|
png$(O): png.h pngconf.h
|
||||||
pngerror$(O): png.h pngconf.h
|
pngerror$(O): png.h pngconf.h
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng.a and libpng10.so on Linux ELF with gcc using MMX
|
# makefile for libpng.a and libpng10.so on Linux ELF with gcc using MMX
|
||||||
# assembler code
|
# assembler code
|
||||||
# Copyright 2002 Greg Roelofs and Glenn Randers-Pehrson
|
# Copyright 2002, 2006 Greg Roelofs and Glenn Randers-Pehrson
|
||||||
# Copyright 1998-2001 Greg Roelofs
|
# Copyright 1998-2001 Greg Roelofs
|
||||||
# Copyright 1996-1997 Andreas Dilger
|
# Copyright 1996-1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
@ -13,17 +13,34 @@
|
|||||||
# there are no floating-point programs (e.g., SETI@Home) running in
|
# there are no floating-point programs (e.g., SETI@Home) running in
|
||||||
# the background! Context switches between MMX and FPU are expensive.
|
# the background! Context switches between MMX and FPU are expensive.
|
||||||
|
|
||||||
|
# Library name:
|
||||||
LIBNAME = libpng10
|
LIBNAME = libpng10
|
||||||
PNGMAJ = 0
|
PNGMAJ = 0
|
||||||
PNGMIN = 1.0.18
|
PNGMIN = 1.0.19rc1
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
CC=gcc
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).so
|
||||||
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||||
|
OLDSO=libpng.so
|
||||||
|
OLDSOMAJ=libpng.so.2
|
||||||
|
OLDSOVER=libpng.so.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
|
CC = gcc
|
||||||
|
LD = $(CC)
|
||||||
|
AR_RC = ar rc
|
||||||
|
LN_SF = ln -sf
|
||||||
|
MKDIR_P = mkdir -p
|
||||||
|
RANLIB = ranlib
|
||||||
|
RM_F = /bin/rm -f
|
||||||
|
|
||||||
# where "make install" puts libpng10.a, libpng10.so*,
|
# where "make install" puts libpng10.a, libpng10.so*,
|
||||||
# libpng10/png.h and libpng10/pngconf.h
|
# libpng10/png.h and libpng10/pngconf.h
|
||||||
# Prefix must be a full pathname.
|
# Prefix must be a full pathname.
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located.
|
# Where the zlib library and include files are located.
|
||||||
#ZLIBLIB=/usr/local/lib
|
#ZLIBLIB=/usr/local/lib
|
||||||
@ -58,13 +75,11 @@ CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
|
|||||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
|
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
|
||||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
|
||||||
#RANLIB=echo
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -92,10 +107,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -118,23 +133,23 @@ pnggccrd.o: pnggccrd.c png.h pngconf.h
|
|||||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
||||||
|
|
||||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
|
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) \
|
||||||
-o $(LIBNAME).so.$(PNGVER) \
|
-o $(LIBSOVER) \
|
||||||
$(OBJSDLL)
|
$(OBJSDLL)
|
||||||
|
|
||||||
libpng.so.2.$(PNGMIN): $(OBJSDLL)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(CC) -shared -Wl,-soname,libpng.so.2 \
|
$(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
|
||||||
-o libpng.so.2.$(PNGMIN) \
|
-o $(OLDSOVER) \
|
||||||
$(OBJSDLL)
|
$(OBJSDLL)
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).so
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
pngtest-static: pngtest.o libpng.a
|
pngtest-static: pngtest.o libpng.a
|
||||||
@ -142,7 +157,7 @@ pngtest-static: pngtest.o libpng.a
|
|||||||
|
|
||||||
test: pngtest pngtest-static
|
test: pngtest pngtest-static
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Running pngtest dynamically linked with $(LIBNAME).so:"
|
@echo " Running pngtest dynamically linked with $(LIBSO):"
|
||||||
@echo ""
|
@echo ""
|
||||||
./pngtest
|
./pngtest
|
||||||
@echo ""
|
@echo ""
|
||||||
@ -151,63 +166,63 @@ test: pngtest pngtest-static
|
|||||||
./pngtest-static
|
./pngtest-static
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.so.2.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
|
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.so.2.$(PNGMIN) libpng.so.2; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.so.2 libpng.so; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -219,22 +234,22 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
|
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
|
||||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
|
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
|
||||||
libpng.so.2.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -15,7 +15,28 @@ ZLIBINC=/opt/zlib/include
|
|||||||
# LDSHARED=ld -b
|
# LDSHARED=ld -b
|
||||||
# SHAREDLIB=libz.sl
|
# SHAREDLIB=libz.sl
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
LIBNAME = libpng10
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).sl
|
||||||
|
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||||
|
OLDSO=libpng.sl
|
||||||
|
OLDSOMAJ=libpng.sl.2
|
||||||
|
OLDSOVER=libpng.sl.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
|
AR_RC=ar rc
|
||||||
CC=cc
|
CC=cc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -sf
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
@ -24,19 +45,13 @@ CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
|||||||
|
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
|
||||||
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
LIBNAME = libpng10
|
|
||||||
|
|
||||||
# where make install puts libpng.a, libpng10.sl, and png.h
|
# where make install puts libpng.a, libpng10.sl, and png.h
|
||||||
prefix=/opt/libpng
|
prefix=/opt/libpng
|
||||||
|
exec_prefix=$(prefix)
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -64,10 +79,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -83,19 +98,19 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
$(LD) -b +s \
|
$(LD) -b +s \
|
||||||
+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL)
|
+h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
libpng.sl.3.$(PNGMIN): $(OBJSDLL)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(LD) -b +s \
|
$(LD) -b +s \
|
||||||
+h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL)
|
+h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
pngtest: pngtest.o libpng.a
|
pngtest: pngtest.o libpng.a
|
||||||
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
|
||||||
@ -104,63 +119,63 @@ test: pngtest
|
|||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.sl.3.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl.3
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)*
|
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).sl.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.sl.3.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.sl.3.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.sl.3 libpng.sl; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -172,24 +187,24 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(CCFLAGS) \
|
$(CC) $(CCFLAGS) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
$(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
|
||||||
libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
|
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||||
libpng.sl.3.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -1,15 +1,36 @@
|
|||||||
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
||||||
# Copyright (C) 2002, Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001, Laurent faillie
|
# Copyright (C) 2001, Laurent faillie
|
||||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
LIBNAME = libpng10
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).sl
|
||||||
|
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||||
|
OLDSO=libpng.sl
|
||||||
|
OLDSOMAJ=libpng.sl.2
|
||||||
|
OLDSOVER=libpng.sl.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
CC=gcc
|
CC=gcc
|
||||||
LD=ld
|
LD=ld
|
||||||
|
AR_RC=ar rc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -sf
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where "make install" puts libpng.a, libpng.sl*, png.h and pngconf.h
|
# where "make install" puts libpng.a, $(OLDSO)*, png.h and pngconf.h
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
ZLIBLIB=/opt/zlib/lib
|
ZLIBLIB=/opt/zlib/lib
|
||||||
@ -37,18 +58,10 @@ CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
|
|||||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
|
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng10 -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng10 -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
|
||||||
#RANLIB=echo
|
|
||||||
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
LIBNAME = libpng10
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -76,10 +89,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -93,21 +106,21 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
$(LD) -b +s \
|
$(LD) -b +s \
|
||||||
+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL)
|
+h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
libpng.sl.3.$(PNGMIN): $(OBJSDLL)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(LD) -b +s \
|
$(LD) -b +s \
|
||||||
+h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL)
|
+h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).sl
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
test: pngtest
|
test: pngtest
|
||||||
@ -115,63 +128,63 @@ test: pngtest
|
|||||||
|
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.sl.3.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl.3
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)*
|
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).sl.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.sl.3.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.sl.3.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.sl.3 libpng.sl; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -183,24 +196,24 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -W1,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -W1,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
$(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
|
||||||
libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
|
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||||
libpng.sl.3.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||||
# Copyright (C) 1999-2002 Glenn Randers-Pehrson
|
# Copyright (C) 1999-2002, 2006 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||||
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
@ -15,26 +15,41 @@ ZLIBINC=/opt/zlib/include
|
|||||||
# LDSHARED=ld -b
|
# LDSHARED=ld -b
|
||||||
# SHAREDLIB=libz.sl
|
# SHAREDLIB=libz.sl
|
||||||
|
|
||||||
|
# Library name:
|
||||||
|
LIBNAME = libpng10
|
||||||
|
PNGMAJ = 0
|
||||||
|
PNGMIN = 1.0.19rc1
|
||||||
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).sl
|
||||||
|
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||||
|
OLDSO=libpng.sl
|
||||||
|
OLDSOMAJ=libpng.sl.2
|
||||||
|
OLDSOVER=libpng.sl.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
|
AR_RC=ar rc
|
||||||
CC=cc
|
CC=cc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -sf
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
|
# where make install puts libpng.a, libpng10.sl, and png.h
|
||||||
|
prefix=/opt/libpng
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
INCPATH=$(prefix)/include
|
||||||
|
LIBPATH=$(exec_prefix)/lib
|
||||||
|
MANPATH=$(prefix)/man
|
||||||
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
|
||||||
|
|
||||||
PNGMAJ = 0
|
|
||||||
PNGMIN = 1.0.18
|
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
|
||||||
LIBNAME = libpng10
|
|
||||||
|
|
||||||
# where make install puts libpng.a, libpng10.sl, and png.h
|
|
||||||
prefix=/opt/libpng
|
|
||||||
INCPATH=$(prefix)/include
|
|
||||||
LIBPATH=$(prefix)/lib
|
|
||||||
MANPATH=$(prefix)/man
|
|
||||||
BINPATH=$(prefix)/bin
|
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
#
|
#
|
||||||
@ -61,10 +76,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -80,19 +95,19 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
$(LD) -b +s \
|
$(LD) -b +s \
|
||||||
+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL)
|
+h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
libpng.sl.3.$(PNGMIN): $(OBJSDLL)
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
$(LD) -b +s \
|
$(LD) -b +s \
|
||||||
+h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL)
|
+h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
|
||||||
|
|
||||||
pngtest: pngtest.o libpng.a
|
pngtest: pngtest.o libpng.a
|
||||||
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
|
||||||
@ -101,63 +116,63 @@ test: pngtest
|
|||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.sl.3.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl.3
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)*
|
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).sl.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.sl.3.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.sl.3.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.sl.3 libpng.sl; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -169,24 +184,24 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(CCFLAGS) \
|
$(CC) $(CCFLAGS) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
$(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
|
||||||
libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
|
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||||
libpng.sl.3.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||
@ -1,19 +1,35 @@
|
|||||||
# makefile for libpng.a and libpng10.so on Linux ELF with gcc
|
# makefile for libpng.a and libpng10.so on Linux ELF with gcc
|
||||||
# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
|
# Copyright (C) 1998, 1999, 2002, 2006 Greg Roelofs and Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
# For conditions of distribution and use, see copyright notice in png.h
|
# For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
|
||||||
|
# Library name:
|
||||||
LIBNAME = libpng10
|
LIBNAME = libpng10
|
||||||
PNGMAJ = 0
|
PNGMAJ = 0
|
||||||
PNGMIN = 1.0.18
|
PNGMIN = 1.0.19rc1
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
# Shared library names:
|
||||||
|
LIBSO=$(LIBNAME).so
|
||||||
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||||
|
OLDSO=libpng.so
|
||||||
|
OLDSOMAJ=libpng.so.2
|
||||||
|
OLDSOVER=libpng.so.2.$(PNGMIN)
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
|
AR_RC=ar rc
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
|
LN_SF=ln -sf
|
||||||
|
RANLIB=ranlib
|
||||||
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where "make install" puts libpng10.a, libpng10.so*,
|
# where "make install" puts libpng10.a, libpng10.so*,
|
||||||
# libpng10/png.h and libpng10/pngconf.h
|
# libpng10/png.h and libpng10/pngconf.h
|
||||||
# Prefix must be a full pathname.
|
# Prefix must be a full pathname.
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
exec_prefix=$(prefix)
|
||||||
|
|
||||||
# Where the zlib library and include files are located.
|
# Where the zlib library and include files are located.
|
||||||
#ZLIBLIB=/usr/local/lib
|
#ZLIBLIB=/usr/local/lib
|
||||||
@ -37,13 +53,10 @@ CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
|
|||||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
|
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
|
||||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
|
||||||
#RANLIB=echo
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
# installing into a temporary location. Example:
|
# installing into a temporary location. Example:
|
||||||
@ -71,10 +84,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libpng.pc:
|
libpng.pc:
|
||||||
@ -90,23 +103,21 @@ libpng-config:
|
|||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
|
|
||||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
$(LIBSO): $(LIBSOMAJ)
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
$(LIBSOMAJ): $(LIBSOVER)
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||||
|
|
||||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
$(LIBSOVER): $(OBJSDLL)
|
||||||
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
|
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
|
||||||
-o $(LIBNAME).so.$(PNGVER) \
|
|
||||||
|
$(OLDSOVER): $(OBJSDLL)
|
||||||
|
$(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
|
||||||
|
-o $(OLDSOVER) \
|
||||||
$(OBJSDLL)
|
$(OBJSDLL)
|
||||||
|
|
||||||
libpng.so.2.$(PNGMIN): $(OBJSDLL)
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -shared -Wl,-soname,libpng.so.2 \
|
|
||||||
-o libpng.so.2.$(PNGMIN) \
|
|
||||||
$(OBJSDLL)
|
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBNAME).so
|
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
pngtest-static: pngtest.o libpng.a
|
pngtest-static: pngtest.o libpng.a
|
||||||
@ -114,7 +125,7 @@ pngtest-static: pngtest.o libpng.a
|
|||||||
|
|
||||||
test: pngtest pngtest-static
|
test: pngtest pngtest-static
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Running pngtest dynamically linked with $(LIBNAME).so:"
|
@echo " Running pngtest dynamically linked with $(LIBSO):"
|
||||||
@echo ""
|
@echo ""
|
||||||
./pngtest
|
./pngtest
|
||||||
@echo ""
|
@echo ""
|
||||||
@ -123,63 +134,63 @@ test: pngtest pngtest-static
|
|||||||
./pngtest-static
|
./pngtest-static
|
||||||
|
|
||||||
install-headers: png.h pngconf.h
|
install-headers: png.h pngconf.h
|
||||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
|
||||||
-@/bin/rm -f $(DI)/libpng
|
-@$(RM_F) $(DI)/libpng
|
||||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
install-static: install-headers libpng.a
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
cp libpng.a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
-@/bin/rm -f $(DL)/libpng.a
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
|
|
||||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||||
libpng.so.2.$(PNGMIN)
|
$(OLDSOVER)
|
||||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so
|
-@$(RM_F) $(DL)/$(OLDSO)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2
|
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
|
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
cp $(LIBSOVER) $(DL)
|
||||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
cp $(OLDSOVER) $(DL)
|
||||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
chmod 755 $(DL)/$(LIBSOVER)
|
||||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
chmod 755 $(DL)/$(OLDSOVER)
|
||||||
(cd $(DL); \
|
(cd $(DL); \
|
||||||
ln -sf libpng.so.2.$(PNGMIN) libpng.so.2; \
|
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||||
ln -sf libpng.so.2 libpng.so; \
|
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
$(LN_SF) $(LIBSOMAJ) $(LIBSO))
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
install-man: libpng.3 libpngpf.3 png.5
|
||||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
||||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
||||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
-@$(RM_F) $(DM)/man3/libpng.3
|
||||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
-@$(RM_F) $(DM)/man3/libpngpf.3
|
||||||
cp libpng.3 $(DM)/man3
|
cp libpng.3 $(DM)/man3
|
||||||
cp libpngpf.3 $(DM)/man3
|
cp libpngpf.3 $(DM)/man3
|
||||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
||||||
-@/bin/rm -f $(DM)/man5/png.5
|
-@$(RM_F) $(DM)/man5/png.5
|
||||||
cp png.5 $(DM)/man5
|
cp png.5 $(DM)/man5
|
||||||
|
|
||||||
install-config: libpng-config
|
install-config: libpng-config
|
||||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
||||||
-@/bin/rm -f $(DB)/libpng-config
|
-@$(RM_F) $(DB)/libpng-config
|
||||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
chmod 755 $(DB)/$(LIBNAME)-config
|
||||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
@ -191,22 +202,22 @@ test-dd:
|
|||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) -I$(ZLIBINC) \
|
||||||
`$(BINPATH)/libpng10-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
|
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
|
||||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
|
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
|
||||||
libpng.so.2.$(PNGMIN) \
|
$(OLDSOVER) \
|
||||||
libpng.pc
|
libpng.pc
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
|
|||||||