Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Imported from libpng-1.0.8beta4.tar

  • Loading branch information...
commit a4d54bdb4ab6b727e6b98b6990950f0864b1e067 1 parent ff9c947
Glenn Randers-Pehrson authored

Showing 46 changed files with 391 additions and 103 deletions. Show diff stats Hide diff stats

  1. +4 1 ANNOUNCE
  2. +5 1 CHANGES
  3. +6 6 INSTALL
  4. +18 4 KNOWNBUG
  5. +3 3 LICENSE
  6. +7 6 README
  7. +2 2 Y2KINFO
  8. +1 1  configure
  9. +9 9 libpng.3
  10. +3 3 libpng.txt
  11. +2 2 libpngpf.3
  12. +1 1  msvc/README.txt
  13. +1 1  msvc/png32ms.def
  14. +1 1  png.5
  15. +8 6 png.c
  16. +11 11 png.h
  17. +1 1  pngasmrd.h
  18. BIN  pngbar.jpg
  19. BIN  pngbar.png
  20. +110 13 pngconf.h
  21. +1 1  pngerror.c
  22. +3 3 pnggccrd.c
  23. +1 1  pngget.c
  24. +1 1  pngmem.c
  25. +1 1  pngpread.c
  26. +3 3 pngread.c
  27. +1 1  pngrio.c
  28. +1 1  pngrtran.c
  29. +1 1  pngrutil.c
  30. +1 1  pngset.c
  31. +2 2 pngtest.c
  32. +1 1  pngtrans.c
  33. +1 1  pngvcrd.c
  34. +1 1  pngwio.c
  35. +1 1  pngwrite.c
  36. +1 1  pngwtran.c
  37. +1 1  pngwutil.c
  38. +1 1  scripts/makefile.beos
  39. +165 0 scripts/makefile.cygwin
  40. +1 1  scripts/makefile.dec
  41. +3 1 scripts/makefile.gcmmx
  42. +1 1  scripts/makefile.linux
  43. +1 1  scripts/makefile.sco
  44. +2 2 scripts/makefile.sggcc
  45. +1 1  scripts/makefile.solaris
  46. +1 1  scripts/pngdef.pas
5 ANNOUNCE
... ... @@ -1,5 +1,5 @@
1 1
2   -Libpng 1.0.8beta3 - July 11, 2000
  2 +Libpng 1.0.8beta4 - July 14, 2000
3 3
4 4 This is a public release of libpng, intended for use in production codes.
5 5
@@ -15,6 +15,9 @@ Changes since the last public release (1.0.7):
15 15 Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS()
16 16 for indexed-color input files to avoid potential double-freeing trans array
17 17 under some unusual conditions; problem was introduced in version 1.0.7.
  18 + Added the files pngbar.png and pngbar.jpg to the distribution.
  19 + Added cygwin subdirectory, makefile.cygwin, and cygwin support in pngconf.h
  20 + Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
18 21
19 22 Send comments/corrections/commendations to
20 23 png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
6 CHANGES
@@ -797,7 +797,7 @@ version 1.0.7rc2 [June 28, 2000]
797 797 Fixed "DJBPP" typo in pnggccrd.c introduced in beta18.
798 798 version 1.0.7 [July 1, 2000]
799 799 Revised the definition of "trans_values" in libpng.3/libpng.txt
800   -version 1.0.8beta3 [July 11, 2000]
  800 +version 1.0.8beta4 [July 14, 2000]
801 801 version 1.0.8beta1 [July 8, 2000]
802 802 Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
803 803 Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
@@ -814,6 +814,10 @@ version 1.0.8beta3 [July 11, 2000]
814 814 for indexed-color input files to avoid potential double-freeing trans array
815 815 under some unusual conditions; problem was introduced in version 1.0.6f.
816 816 Further revisions to pngtest.c and files in the wince subdirectory.
  817 +version 1.0.8beta4 [July 14, 2000]
  818 + Added the files pngbar.png and pngbar.jpg to the distribution.
  819 + Added cygwin subdirectory, makefile.cygwin, and cygwin support in pngconf.h
  820 + Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
817 821
818 822 Send comments/corrections/commendations to
819 823 png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
12 INSTALL
... ... @@ -1,5 +1,5 @@
1 1
2   -Installing libpng version 1.0.8beta3 - July 11, 2000
  2 +Installing libpng version 1.0.8beta4 - July 14, 2000
3 3
4 4 Before installing libpng, you must first install zlib. zlib
5 5 can usually be found wherever you got libpng. zlib can be
@@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
10 10 version of zlib that's installed.
11 11
12 12 You can rename the directories that you downloaded (they
13   -might be called "libpng-1.0.8beta3" or "lpng107" and "zlib-1.1.3"
  13 +might be called "libpng-1.0.8beta4" or "lpng107" and "zlib-1.1.3"
14 14 or "zlib113") so that you have directories called "zlib" and "libpng".
15 15
16 16 Your directory structure should look like this:
@@ -57,8 +57,8 @@ The files that are presently available in the scripts directory
57 57 include
58 58
59 59 makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
60   - makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta3)
61   - makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta3,
  60 + makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta4)
  61 + makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta4,
62 62 uses assembler code tuned for Intel MMX platform)
63 63 makefile.gcc => Generic makefile (gcc, creates static libpng.a)
64 64 makefile.knr => Archaic UNIX Makefile that converts files with
@@ -70,9 +70,9 @@ include
70 70 makefile.intel => Intel C/C++ version 4.0 and later
71 71 libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
72 72 makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
73   - makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta3)
  73 + makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta4)
74 74 makefile.sunos => Sun makefile
75   - makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8beta3)
  75 + makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8beta4)
76 76 makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
77 77 makefile.mips => MIPS makefile
78 78 makefile.acorn => Acorn makefile
22 KNOWNBUG
@@ -9,6 +9,13 @@ Known bugs and suggested enhancements in libpng-1.0.7
9 9 STATUS: Under investigation. Experts on MMX assembler code are
10 10 invited to help with the debugging. Note that pngvcrd.c works fine.
11 11
  12 + Update: fixed in libpng-1.0.8beta1. It compiles under gcc-2.7.2.3
  13 + and seems to work; under gcc-2.7.2.1 it compiles but crashes in
  14 + execution. It is recommended that people use 2.95.2 or later.
  15 +
  16 + The png_read_filter() function has still not been fully converted and
  17 + will not compile under gcc-2.95.2; it is currently ifdef'ed out.
  18 +
12 19 2. July 3, 2000 -- BUG -- MEMORY LEAK
13 20
14 21 There is a memory leak in pngpread.c; it doesn't free "key".
@@ -38,11 +45,18 @@ Known bugs and suggested enhancements in libpng-1.0.7
38 45 Libpng-1.0.7 does not support WindowsCE.
39 46
40 47 STATUS: Libpng-1.0.8 and libpng-2.0.0 will support WindowsCE. A
41   - new typedef, png_file_p, will be added which is normally FILE * but
  48 + new typedef, png_FILE_p, will be added which is normally FILE * but
42 49 will be HANDLE if libpng is being built for WindowsCE. Other patches
43 50 required for WindowsCE support have been provided and will be applied.
  51 + Finished in libpng-1.0.8beta3.
  52 +
  53 +6. July 13, 2000 -- ENHANCEMENT -- Cygwin support
  54 +
  55 + Libpng-1.0.7 does not support building DLLs under Cygwin
  56 +
  57 + STATUS: Cygwin support has been added to libpng-1.0.8beta4.
44 58
45   -6. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
  59 +7. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
46 60
47 61 Loops need to be optimized everywhere
48 62
@@ -57,7 +71,7 @@ Known bugs and suggested enhancements in libpng-1.0.7
57 71 libpng-1.1.0. About 160 loops will be turned around
58 72 in libpng-2.0.x betaxx, for testing.
59 73
60   -7. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
  74 +8. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
61 75
62 76 libpng-1.0.5 and earlier transform colors to gamma=1.0 space for
63 77 merging with background, and then back to the image's gamma. The
@@ -69,7 +83,7 @@ Known bugs and suggested enhancements in libpng-1.0.7
69 83
70 84 STATUS: under development.
71 85
72   -8. September 1999 -- ENHANCEMENT --
  86 +9. September 1999 -- ENHANCEMENT --
73 87
74 88 It should be possible to use libpng without floating-point aritmetic.
75 89
6 LICENSE
@@ -4,7 +4,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
4 4 If you modify libpng you may insert additional notices immediately following
5 5 this sentence.
6 6
7   -libpng version 1.0.8beta3, July 11, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
  7 +libpng version 1.0.8beta4, July 14, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
8 8 Distributed according to the same disclaimer and license as libpng-1.0.6
9 9 with the following individuals added to the list of Contributing Authors
10 10
@@ -87,11 +87,11 @@ boxes and the like:
87 87 printf("%s",png_get_copyright(NULL));
88 88
89 89 Also, the PNG logo (in PNG format, of course) is supplied in the
90   -file "pngnow.png".
  90 +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
91 91
92 92 Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
93 93 certification mark of the Open Source Initiative.
94 94
95 95 Glenn Randers-Pehrson
96 96 randeg@alum.rpi.edu
97   -July 11, 2000
  97 +July 14, 2000
13 README
... ... @@ -1,4 +1,4 @@
1   -README for libpng 1.0.8beta3 - July 11, 2000 (shared library 2.1)
  1 +README for libpng 1.0.8beta4 - July 14, 2000 (shared library 2.1)
2 2 See the note about version numbers near the top of png.h
3 3
4 4 See INSTALL for instructions on how to install libpng.
@@ -148,7 +148,8 @@ Files in this distribution:
148 148 pngerror.c => Error/warning message I/O functions
149 149 pngget.c => Functions for retrieving info from struct
150 150 pngmem.c => Memory handling functions
151   - pngnow.png => PNG logo
  151 + pngbar.png => PNG logo, 88x31
  152 + pngnow.png => PNG logo, 98x31
152 153 pngpread.c => Progressive reading functions
153 154 pngread.c => Read data/helper high-level functions
154 155 pngrio.c => Lowest-level data read I/O functions
@@ -176,9 +177,9 @@ Files in this distribution:
176 177 descrip.mms => VMS makefile for MMS or MMK
177 178 makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
178 179 makefile.linux => Linux/ELF makefile
179   - (gcc, creates libpng.so.2.1.0.8beta3)
  180 + (gcc, creates libpng.so.2.1.0.8beta4)
180 181 makefile.gcmmx => Linux/ELF makefile (gcc, creates
181   - libpng.so.2.1.0.8beta3, uses assembler code
  182 + libpng.so.2.1.0.8beta4, uses assembler code
182 183 tuned for Intel MMX platform)
183 184 makefile.gcc => Generic makefile (gcc, creates static libpng.a)
184 185 makefile.knr => Archaic UNIX Makefile that converts files with
@@ -190,10 +191,10 @@ Files in this distribution:
190 191 makefile.intel => Intel C/C++ version 4.0 and later
191 192 libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
192 193 makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
193   - makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta3)
  194 + makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta4)
194 195 makefile.sunos => Sun makefile
195 196 makefile.solaris => Solaris 2.X makefile
196   - (gcc, creates libpng.so.2.1.0.8beta3)
  197 + (gcc, creates libpng.so.2.1.0.8beta4)
197 198 makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
198 199 makefile.mips => MIPS makefile
199 200 makefile.acorn => Acorn makefile
4 Y2KINFO
... ... @@ -1,13 +1,13 @@
1 1 Y2K compliance in libpng:
2 2 =========================
3 3
4   - July 11, 2000
  4 + July 14, 2000
5 5
6 6 Since the PNG Development group is an ad-hoc body, we can't make
7 7 an official declaration.
8 8
9 9 This is your unofficial assurance that libpng from version 0.71 and
10   - upward through 1.0.8beta3 are Y2K compliant. It is my belief that earlier
  10 + upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
11 11 versions were also Y2K compliant.
12 12
13 13 Libpng only has three year fields. One is a 2-byte unsigned integer
2  configure
... ... @@ -1,5 +1,5 @@
1 1 echo "
2   - There is no \"configure\" script for Libpng-1.0.8beta3. Instead, please
  2 + There is no \"configure\" script for Libpng-1.0.8beta4. Instead, please
3 3 copy the appropriate makefile for your system from the \"scripts\"
4 4 directory. Read the INSTALL file for more details.
5 5 "
18 libpng.3
... ... @@ -1,6 +1,6 @@
1   -.TH LIBPNG 3 "July 11, 2000"
  1 +.TH LIBPNG 3 "July 14, 2000"
2 2 .SH NAME
3   -libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta3
  3 +libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta4
4 4 .SH SYNOPSIS
5 5 \fI\fB
6 6
@@ -747,7 +747,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
747 747 .SH LIBPNG.TXT
748 748 libpng.txt - A description on how to use and modify libpng
749 749
750   - libpng version 1.0.8beta3 - July 11, 2000
  750 + libpng version 1.0.8beta4 - July 14, 2000
751 751 Updated and distributed by Glenn Randers-Pehrson
752 752 <randeg@alum.rpi.edu>
753 753 Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
@@ -3381,13 +3381,13 @@ application:
3381 3381
3382 3382 .SH VII. Y2K Compliance in libpng
3383 3383
3384   -July 11, 2000
  3384 +July 14, 2000
3385 3385
3386 3386 Since the PNG Development group is an ad-hoc body, we can't make
3387 3387 an official declaration.
3388 3388
3389 3389 This is your unofficial assurance that libpng from version 0.71 and
3390   -upward through 1.0.8beta3 are Y2K compliant. It is my belief that earlier
  3390 +upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
3391 3391 versions were also Y2K compliant.
3392 3392
3393 3393 Libpng only has three year fields. One is a 2-byte unsigned integer that
@@ -3528,7 +3528,7 @@ possible without all of you.
3528 3528
3529 3529 Thanks to Frank J. T. Wojcik for helping with the documentation.
3530 3530
3531   -Libpng version 1.0.8beta3 - July 11, 2000:
  3531 +Libpng version 1.0.8beta4 - July 14, 2000:
3532 3532 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
3533 3533 Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
3534 3534
@@ -3541,7 +3541,7 @@ Supported by the PNG development group
3541 3541 If you modify libpng you may insert additional notices immediately following
3542 3542 this sentence.
3543 3543
3544   -libpng version 1.0.8beta3, July 11, 2000 is
  3544 +libpng version 1.0.8beta4, July 14, 2000 is
3545 3545 Copyright (c) 2000 Glenn Randers-Pehrson
3546 3546 Distributed according to the same disclaimer and license as libpng-1.0.6
3547 3547 with the following individuals added to the list of Contributing Authors
@@ -3625,14 +3625,14 @@ boxes and the like:
3625 3625 printf("%s",png_get_copyright(NULL));
3626 3626
3627 3627 Also, the PNG logo (in PNG format, of course) is supplied in the
3628   -file "pngnow.png".
  3628 +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
3629 3629
3630 3630 Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
3631 3631 certification mark of the Open Source Initiative.
3632 3632
3633 3633 Glenn Randers-Pehrson
3634 3634 randeg@alum.rpi.edu
3635   -July 11, 2000
  3635 +July 14, 2000
3636 3636
3637 3637 .\" end of man page
3638 3638
6 libpng.txt
... ... @@ -1,6 +1,6 @@
1 1 libpng.txt - A description on how to use and modify libpng
2 2
3   - libpng version 1.0.8beta3 - July 11, 2000
  3 + libpng version 1.0.8beta4 - July 14, 2000
4 4 Updated and distributed by Glenn Randers-Pehrson
5 5 <randeg@alum.rpi.edu>
6 6 Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
@@ -2634,13 +2634,13 @@ application:
2634 2634
2635 2635 VII. Y2K Compliance in libpng
2636 2636
2637   -July 11, 2000
  2637 +July 14, 2000
2638 2638
2639 2639 Since the PNG Development group is an ad-hoc body, we can't make
2640 2640 an official declaration.
2641 2641
2642 2642 This is your unofficial assurance that libpng from version 0.71 and
2643   -upward through 1.0.8beta3 are Y2K compliant. It is my belief that earlier
  2643 +upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
2644 2644 versions were also Y2K compliant.
2645 2645
2646 2646 Libpng only has three year fields. One is a 2-byte unsigned integer that
4 libpngpf.3
... ... @@ -1,6 +1,6 @@
1   -.TH LIBPNGPF 3 "July 11, 2000"
  1 +.TH LIBPNGPF 3 "July 14, 2000"
2 2 .SH NAME
3   -libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta3
  3 +libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta4
4 4 (private functions)
5 5 .SH SYNOPSIS
6 6 \fB#include <png.h>\fP
2  msvc/README.txt
... ... @@ -1,5 +1,5 @@
1 1 Microsoft Developer Studio Build File, Format Version 6.00 for
2   -libpng 1.0.8beta3 (July 11, 2000) and zlib
  2 +libpng 1.0.8beta4 (July 14, 2000) and zlib
3 3
4 4 Copyright (C) 2000 Simon-Pierre Cadieux
5 5 For conditions of distribution and use, see copyright notice in png.h
2  msvc/png32ms.def
@@ -6,7 +6,7 @@ LIBRARY
6 6 DESCRIPTION "PNG image compression library for Windows"
7 7
8 8 EXPORTS
9   -;Version 1.0.8beta3
  9 +;Version 1.0.8beta4
10 10 png_build_grayscale_palette @1
11 11 png_check_sig @2
12 12 png_chunk_error @3
2  png.5
... ... @@ -1,4 +1,4 @@
1   -.TH PNG 5 "July 11, 2000"
  1 +.TH PNG 5 "July 14, 2000"
2 2 .SH NAME
3 3 png \- Portable Network Graphics (PNG) format
4 4 .SH DESCRIPTION
14 png.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* png.c - location for general purpose libpng functions
3 3 *
4   - * libpng version 1.0.8beta3 - July 11, 2000
  4 + * libpng version 1.0.8beta4 - July 14, 2000
5 5 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
6 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -13,14 +13,14 @@
13 13 #include "png.h"
14 14
15 15 /* Generate a compiler error if there is an old png.h in the search path. */
16   -typedef version_1_0_8beta3 Your_png_h_is_not_version_1_0_8beta3;
  16 +typedef version_1_0_8beta4 Your_png_h_is_not_version_1_0_8beta4;
17 17
18 18 /* Version information for C files. This had better match the version
19 19 * string defined in png.h. */
20 20
21 21 #ifdef PNG_USE_GLOBAL_ARRAYS
22 22 /* png_libpng_ver was changed to a function in version 1.0.5c */
23   -char png_libpng_ver[12] = "1.0.8beta3";
  23 +char png_libpng_ver[12] = "1.0.8beta4";
24 24
25 25 /* png_sig was changed to a function in version 1.0.5c */
26 26 /* Place to hold the signature string for a PNG file. */
@@ -140,6 +140,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
140 140 png_uint_32 num_bytes = (png_uint_32)items * size;
141 141 png_voidp ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
142 142
  143 +#ifndef PNG_NO_ZALLOC_ZERO
143 144 if (num_bytes > (png_uint_32)0x8000L)
144 145 {
145 146 png_memset(ptr, 0, (png_size_t)0x8000L);
@@ -150,6 +151,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
150 151 {
151 152 png_memset(ptr, 0, (png_size_t)num_bytes);
152 153 }
  154 +#endif
153 155 return ((voidpf)ptr);
154 156 }
155 157
@@ -616,7 +618,7 @@ png_charp PNGAPI
616 618 png_get_copyright(png_structp png_ptr)
617 619 {
618 620 if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
619   - return ("\n libpng version 1.0.8beta3 - July 11, 2000\n\
  621 + return ("\n libpng version 1.0.8beta4 - July 14, 2000\n\
620 622 Copyright (c) 1998-2000 Glenn Randers-Pehrson\n\
621 623 Copyright (c) 1996, 1997 Andreas Dilger\n\
622 624 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
@@ -634,8 +636,8 @@ png_get_libpng_ver(png_structp png_ptr)
634 636 {
635 637 /* Version of *.c files used when building libpng */
636 638 if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
637   - return("1.0.8beta3");
638   - return("1.0.8beta3");
  639 + return("1.0.8beta4");
  640 + return("1.0.8beta4");
639 641 }
640 642
641 643 png_charp PNGAPI
22 png.h
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* png.h - header file for PNG reference library
3 3 *
4   - * libpng version 1.0.8beta3 - July 11, 2000
  4 + * libpng version 1.0.8beta4 - July 14, 2000
5 5 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
6 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -9,7 +9,7 @@
9 9 * Authors and maintainers:
10 10 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
11 11 * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
12   - * libpng versions 0.97, January 1998, through 1.0.8beta3 - July 11, 2000: Glenn
  12 + * libpng versions 0.97, January 1998, through 1.0.8beta4 - July 14, 2000: Glenn
13 13 * See also "Contributing Authors", below.
14 14 *
15 15 * Note about libpng version numbers:
@@ -82,7 +82,7 @@
82 82 * If you modify libpng you may insert additional notices immediately following
83 83 * this sentence.
84 84 *
85   - * libpng version 1.0.8beta3, July 11, 2000, is
  85 + * libpng version 1.0.8beta4, July 14, 2000, is
86 86 * Copyright (c) 2000 Glenn Randers-Pehrson
87 87 * Distributed according to the same disclaimer and license as libpng-1.0.6
88 88 * with the following individuals added to the list of Contributing Authors
@@ -167,7 +167,7 @@
167 167 * printf("%s",png_get_copyright(NULL));
168 168 *
169 169 * Also, the PNG logo (in PNG format, of course) is supplied in the
170   - * file "pngnow.png".
  170 + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
171 171 */
172 172
173 173 /*
@@ -187,13 +187,13 @@
187 187 * Y2K compliance in libpng:
188 188 * =========================
189 189 *
190   - * July 11, 2000
  190 + * July 14, 2000
191 191 *
192 192 * Since the PNG Development group is an ad-hoc body, we can't make
193 193 * an official declaration.
194 194 *
195 195 * This is your unofficial assurance that libpng from version 0.71 and
196   - * upward through 1.0.8beta3 are Y2K compliant. It is my belief that earlier
  196 + * upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
197 197 * versions were also Y2K compliant.
198 198 *
199 199 * Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -249,7 +249,7 @@
249 249 */
250 250
251 251 /* Version information for png.h - this should match the version in png.c */
252   -#define PNG_LIBPNG_VER_STRING "1.0.8beta3"
  252 +#define PNG_LIBPNG_VER_STRING "1.0.8beta4"
253 253
254 254 #define PNG_LIBPNG_VER_SONUM 2
255 255
@@ -259,7 +259,7 @@
259 259 #define PNG_LIBPNG_VER_RELEASE 8
260 260 /* This should match the numeric part of the final component of
261 261 * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
262   -#define PNG_LIBPNG_VER_BUILD 3
  262 +#define PNG_LIBPNG_VER_BUILD 4
263 263
264 264 /* Careful here. At one time, Guy wanted to use 082, but that would be octal.
265 265 * We must not include leading zeros.
@@ -1147,9 +1147,9 @@ struct png_struct_def
1147 1147 };
1148 1148
1149 1149 /* This prevents a compiler error in png_get_copyright() in png.c if png.c
1150   -and png.h are both at * version 1.0.8beta3
  1150 +and png.h are both at * version 1.0.8beta4
1151 1151 */
1152   -typedef png_structp version_1_0_8beta3;
  1152 +typedef png_structp version_1_0_8beta4;
1153 1153
1154 1154 typedef png_struct FAR * FAR * png_structpp;
1155 1155
@@ -2171,7 +2171,7 @@ extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)
2171 2171 extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
2172 2172
2173 2173 #define PNG_HEADER_VERSION_STRING \
2174   - " libpng version 1.0.8beta3 - July 11, 2000 (header)\n"
  2174 + " libpng version 1.0.8beta4 - July 14, 2000 (header)\n"
2175 2175
2176 2176 #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
2177 2177 /* With these routines we avoid an integer divide, which will be slower on
2  pngasmrd.h
... ... @@ -1,6 +1,6 @@
1 1 /* pngasmrd.h - assembler version of utilities to read a PNG file
2 2 *
3   - * libpng 1.0.8beta3 - July 11, 2000
  3 + * libpng 1.0.8beta4 - July 14, 2000
4 4 * For conditions of distribution and use, see copyright notice in png.h
5 5 * Copyright (c) 1999, 2000 Glenn Randers-Pehrson
6 6 *
BIN  pngbar.jpg
BIN  pngbar.png
123 pngconf.h
... ... @@ -1,6 +1,6 @@
1 1 /* pngconf.h - machine configurable file for libpng
2 2 *
3   - * libpng 1.0.8beta3 - July 11, 2000
  3 + * libpng 1.0.8beta4 - July 14, 2000
4 4 * For conditions of distribution and use, see copyright notice in png.h
5 5 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
6 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -49,6 +49,60 @@
49 49 #define PNG_MAX_MALLOC_64K
50 50 #endif
51 51
  52 +/* Special munging to support doing things the 'cygwin' way:
  53 + * 'Normal' png-on-win32 defines/defaults:
  54 + * PNG_BUILD_DLL -- building dll
  55 + * PNG_USE_DLL -- building an application, linking to dll
  56 + * (no define) -- building static library, or building an
  57 + * application and linking to the static lib
  58 + * 'Cygwin' defines/defaults:
  59 + * PNG_BUILD_DLL -- building the dll
  60 + * (no define) -- building an application, linking to the dll
  61 + * PNG_STATIC -- building the static lib, or building an application
  62 + * which links to the static lib.
  63 + * Thus,
  64 + * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
  65 + * this bit of #ifdefs will define the 'correct' config variables based on
  66 + * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
  67 + * unnecessary.
  68 + */
  69 +#if defined(__CYGWIN__)
  70 +# if defined(PNG_BUILD_DLL)
  71 +# if defined(PNG_USE_DLL)
  72 +# undef PNG_USE_DLL
  73 +# endif
  74 +# if !defined(PNG_DLL)
  75 +# define PNG_DLL
  76 +# endif
  77 +# if defined(PNG_STATIC)
  78 +# undef PNG_STATIC
  79 +# endif
  80 +# else
  81 +# if defined(PNG_STATIC)
  82 +# if defined(PNG_USE_DLL)
  83 +# undef PNG_USE_DLL
  84 +# endif
  85 +# if defined(PNG_DLL)
  86 +# undef PNG_DLL
  87 +# endif
  88 +# else
  89 +# if defined(PNG_USE_DLL)
  90 +# if !defined(PNG_DLL)
  91 +# define PNG_DLL
  92 +# endif
  93 +# else
  94 +# if defined(PNG_DLL)
  95 +# define PNG_USE_DLL
  96 +# else
  97 +# define PNG_USE_DLL
  98 +# define PNG_DLL
  99 +# endif
  100 +# endif
  101 +# endif
  102 +# endif
  103 +#endif
  104 +
  105 +
52 106 /* This protects us against compilers that run on a windowing system
53 107 * and thus don't have or would rather us not use the stdio types:
54 108 * stdin, stdout, and stderr. The only one currently used is stderr
@@ -534,6 +588,9 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
534 588 #ifndef PNG_NO_USER_MEM
535 589 #define PNG_USER_MEM_SUPPORTED
536 590 #endif
  591 +#ifndef PNG_NO_ZALLOC_ZERO
  592 +#define PNG_ZALLOC_ZERO
  593 +#endif
537 594 */
538 595
539 596 /* This is only for PowerPC big-endian and 680x0 systems */
@@ -854,7 +911,7 @@ typedef size_t png_size_t;
854 911 #define LDATA 0
855 912 #endif
856 913
857   -#if !defined(__WIN32__) && !defined(__FLAT__)
  914 +#if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
858 915 #define PNG_MAX_MALLOC_64K
859 916 #if (LDATA != 1)
860 917 #ifndef FAR
@@ -868,7 +925,7 @@ typedef size_t png_size_t;
868 925 * const if your compiler supports it. (SJT)
869 926 # define FARDATA FAR
870 927 */
871   -#endif /* __WIN32__, __FLAT__ */
  928 +#endif /* __WIN32__, __FLAT__, __CYGWIN__ */
872 929
873 930 #endif /* __BORLANDC__ */
874 931
@@ -952,12 +1009,43 @@ typedef z_stream FAR * png_zstreamp;
952 1009 * It is equivalent to Microsoft predefined macro _DLL which is
953 1010 * automatically defined when you compile using the share
954 1011 * version of the CRT (C Run-Time library)
  1012 + *
  1013 + * The cygwin mods make this behavior a little different:
  1014 + * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
  1015 + * Define PNG_STATIC if you are building a static library for use with cygwin,
  1016 + * -or- if you are building an application that you want to link to the
  1017 + * static library.
  1018 + * PNG_USE_DLL is defined by default (no user action needed) unless one of
  1019 + * the other flags is defined.
955 1020 */
956 1021
957 1022 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
958 1023 # define PNG_DLL
959 1024 #endif
960   -
  1025 +/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
  1026 + * When building a static lib, default to no GLOBAL ARRAYS, but allow
  1027 + * command-line override
  1028 + */
  1029 +#if defined(__CYGWIN__)
  1030 +# if !defined(PNG_STATIC)
  1031 +# if defined(PNG_USE_GLOBAL_ARRAYS)
  1032 +# undef PNG_USE_GLOBAL_ARRAYS
  1033 +# endif
  1034 +# if !defined(PNG_USE_LOCAL_ARRAYS)
  1035 +# define PNG_USE_LOCAL_ARRAYS
  1036 +# endif
  1037 +# else
  1038 +# if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
  1039 +# if defined(PNG_USE_GLOBAL_ARRAYS)
  1040 +# undef PNG_USE_GLOBAL_ARRAYS
  1041 +# endif
  1042 +# endif
  1043 +# endif
  1044 +# if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
  1045 +# define PNG_USE_LOCAL_ARRAYS
  1046 +# endif
  1047 +#endif
  1048 +
961 1049 /* Do not use global arrays (helps with building DLL's)
962 1050 * They are no longer used in libpng itself, since version 1.0.5c,
963 1051 * but might be required for some pre-1.0.5c applications.
@@ -972,19 +1060,21 @@ typedef z_stream FAR * png_zstreamp;
972 1060
973 1061 #ifndef PNGAPI
974 1062
975   -#if defined(__MINGW32__) || defined(__CYGWIN32__) && !defined(PNG_MODULEDEF)
  1063 +
  1064 +#if defined(__MINGW32__) || defined(__CYGWIN__) && !defined(PNG_MODULEDEF)
976 1065 # ifndef PNG_NO_MODULEDEF
977 1066 # define PNG_NO_MODULEDEF
978 1067 # endif
979   -#endif
980   -
  1068 +#endif
  1069 +
981 1070 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
982 1071 # define PNG_IMPEXP
983 1072 #endif
984 1073
985 1074 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
986   - defined(_Windows) || defined(_WINDOWS) || \
987   - defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
  1075 + (( defined(_Windows) || defined(_WINDOWS) || \
  1076 + defined(WIN32) || defined(_WIN32) || defined(__WIN32__) \
  1077 + ) && !defined(__CYGWIN__))
988 1078
989 1079 # ifdef __GNUC__
990 1080 # define PNGAPI __cdecl
@@ -1026,11 +1116,18 @@ typedef z_stream FAR * png_zstreamp;
1026 1116 # endif
1027 1117 # endif
1028 1118 # endif /* PNG_IMPEXP */
1029   -#else /* !(DLL || WINDOWS) */
1030   -# if 0 /* ... other platforms, with other meanings */
  1119 +#else /* !(DLL || non-cygwin WINDOWS) */
  1120 +# if defined(__CYGWIN__) && !defined(PNG_DLL)
  1121 +# if !defined(PNG_IMPEXP)
  1122 +# define PNG_IMPEXP
  1123 +# endif
  1124 +# define PNGAPI __cdecl
1031 1125 # else
1032   -# define PNGAPI
1033   -# define PNG_IMPEXP
  1126 +# if 0 /* ... other platforms, with other meanings */
  1127 +# else
  1128 +# define PNGAPI
  1129 +# define PNG_IMPEXP
  1130 +# endif
1034 1131 # endif
1035 1132 #endif
1036 1133 #endif
2  pngerror.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngerror.c - stub functions for i/o and memory allocation
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
6 pnggccrd.c
@@ -6,7 +6,7 @@
6 6 * and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
7 7 * for Intel's performance analysis of the MMX vs. non-MMX code.
8 8 *
9   - * libpng version 1.0.8beta3 - July 11, 2000
  9 + * libpng version 1.0.8beta4 - July 14, 2000
10 10 * For conditions of distribution and use, see copyright notice in png.h
11 11 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
12 12 * Copyright (c) 1998, Intel Corporation
@@ -166,9 +166,9 @@ static const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
166 166 static const int png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
167 167 #endif
168 168
169   -// djgpp and Win32 add their own underscores to global variables,
  169 +// djgpp, Win32, and Cygwin add their own underscores to global variables,
170 170 // so define them without:
171   -#if defined(__DJGPP__) || defined(WIN32)
  171 +#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__)
172 172 # define _unmask unmask
173 173 # define _const4 const4
174 174 # define _const6 const6
2  pngget.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngget.c - retrieval of values from info struct
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngmem.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngmem.c - stub functions for memory allocation
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngpread.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngpread.c - read a png file in push mode
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
6 pngread.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngread.c - read a PNG file
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -697,7 +697,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
697 697 * not called png_set_interlace_handling(), the display_row buffer will
698 698 * be ignored, so pass NULL to it.
699 699 *
700   - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta3
  700 + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta4
701 701 */
702 702
703 703 void PNGAPI
@@ -746,7 +746,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
746 746 * only call this function once. If you desire to have an image for
747 747 * each pass of a interlaced image, use png_read_rows() instead.
748 748 *
749   - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta3
  749 + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta4
750 750 */
751 751 void PNGAPI
752 752 png_read_image(png_structp png_ptr, png_bytepp image)
2  pngrio.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngrio.c - functions for data input
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngrtran.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngrtran.c - transforms the data in a row for PNG readers
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngrutil.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngrutil.c - utilities to read a PNG file
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngset.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngset.c - storage of image information into info struct
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
4 pngtest.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngtest.c - a simple test program to test libpng
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1435,4 +1435,4 @@ main(int argc, char *argv[])
1435 1435 }
1436 1436
1437 1437 /* Generate a compiler error if there is an old png.h in the search path. */
1438   -typedef version_1_0_8beta3 your_png_h_is_not_version_1_0_8beta3;
  1438 +typedef version_1_0_8beta4 your_png_h_is_not_version_1_0_8beta4;
2  pngtrans.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngtrans.c - transforms the data in a row (used by both readers and writers)
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngvcrd.c
@@ -2,7 +2,7 @@
2 2 *
3 3 * For Intel x86 CPU and Microsoft Visual C++ compiler
4 4 *
5   - * libpng 1.0.8beta3 - July 11, 2000
  5 + * libpng 1.0.8beta4 - July 14, 2000
6 6 * For conditions of distribution and use, see copyright notice in png.h
7 7 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
8 8 * Copyright (c) 1998, Intel Corporation
2  pngwio.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngwio.c - functions for data output
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngwrite.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngwrite.c - general routines to write a PNG file
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngwtran.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngwtran.c - transforms the data in a row for PNG writers
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  pngwutil.c
... ... @@ -1,7 +1,7 @@
1 1
2 2 /* pngwutil.c - utilities to write a PNG file
3 3 *
4   - * libpng 1.0.8beta3 - July 11, 2000
  4 + * libpng 1.0.8beta4 - July 14, 2000
5 5 * For conditions of distribution and use, see copyright notice in png.h
6 6 * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
7 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
2  scripts/makefile.beos
@@ -31,7 +31,7 @@ RANLIB=ranlib
31 31 # read libpng.txt or png.h to see why PNGMAJ is 2. You should not
32 32 # have to change it.
33 33 PNGMAJ = 2
34   -PNGMIN = 1.0.8beta3
  34 +PNGMIN = 1.0.8beta4
35 35 PNGVER = $(PNGMAJ).$(PNGMIN)
36 36
37 37 # where make install puts libpng.a, libpng.so*, and png.h
165 scripts/makefile.cygwin
... ... @@ -0,0 +1,165 @@
  1 +# makefile for cygwin on x86
  2 +# builds both dll (with import lib) and static lib versions
  3 +# of the library, and builds two copies of pngtest: one
  4 +# statically linked and one dynamically linked.
  5 +#
  6 +# based on makefile for linux-elf w/mmx by:
  7 +# Copyright (C) 1998-2000 Greg Roelofs
  8 +# Copyright (C) 1996, 1997 Andreas Dilger
  9 +# For conditions of distribution and use, see copyright notice in png.h
  10 +
  11 +# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to
  12 +# $CFLAGS, and include pnggccrd.o in $OBJS, below.
  13 +
  14 +CC=gcc
  15 +
  16 +# where "make install" puts libpng.a, libpng.so*, png.h and pngconf.h
  17 +prefix=/usr
  18 +
  19 +# Where the zlib library and include files are located
  20 +ZLIBLIB=${prefix}/lib
  21 +ZLIBINC=${prefix}/include
  22 +#ZLIBLIB=../zlib
  23 +#ZLIBINC=../zlib
  24 +
  25 +SHAREDLIB=libpng.dll
  26 +STATLIB=libpng.a
  27 +IMPLIB=libpng.dll.a
  28 +SHAREDDEF=libpng.def
  29 +LIBS=$(SHAREDLIB) $(STATLIB)
  30 +EXE=.exe
  31 +
  32 +ALIGN=
  33 +# for i386:
  34 +#ALIGN=-malign-loops=2 -malign-functions=2
  35 +
  36 +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
  37 + -Wmissing-declarations -Wtraditional -Wcast-align \
  38 + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
  39 +
  40 +#CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
  41 +# -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
  42 +CFLAGS=-I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
  43 + -fomit-frame-pointer
  44 +
  45 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
  46 +LDSHARED=gcc -shared -Wl,--enable-auto-image-base
  47 +LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(SHAREDDEF)
  48 +
  49 +RANLIB=ranlib
  50 +#RANLIB=echo
  51 +
  52 +# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
  53 +# have to change it.
  54 +PNGMAJ = 2
  55 +PNGMIN = 1.0.8beta3
  56 +PNGVER = $(PNGMAJ).$(PNGMIN)
  57 +
  58 +INCPATH=$(prefix)/include
  59 +LIBPATH=$(prefix)/lib
  60 +BINPATH=$(prefix)/bin
  61 +MANPATH=$(prefix)/man
  62 +MAN3PATH=$(MANPATH)/man3
  63 +DOCPATH=$(prefix)/doc/libpng-$(PNGMIN)
  64 +CYGDOCPATH=$(prefix)/doc/Cygwin
  65 +
  66 +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
  67 + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
  68 + pngwtran.o pngmem.o pngerror.o pngpread.o # pnggccrd.o
  69 +
  70 +OBJSDLL = $(OBJS:.o=.pic.o)
  71 +
  72 +.SUFFIXES: .c .o .pic.o
  73 +
  74 +%.o : %.c
  75 + $(CC) -c $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -o $@ $<
  76 +
  77 +%.pic.o : %.c
  78 + $(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
  79 +
  80 +all: $(SHAREDLIB) $(STATLIB) pngtest$(EXE) pngtest-stat$(EXE)
  81 +
  82 +pnggccrd.o: png.h pngconf.h pngasmrd.h
  83 + @echo ""
  84 + @echo ' You can ignore the single "control reaches end of non-void function"'
  85 + @echo ' warning and multiple "<variable> defined but not used" warnings:'
  86 + @echo ""
  87 + $(CC) -c $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -o $@ $*.c
  88 +
  89 +pnggccrd.pic.o: png.h pngconf.h pngasmrd.h
  90 + @echo ""
  91 + @echo ' You can ignore the single "control reaches end of non-void function"'
  92 + @echo ' warning and multiple "<variable> defined but not used" warnings:'
  93 + @echo ""
  94 + $(CC) -c $(CFLAGS) -o $@ pnggccrd.c
  95 +
  96 +$(STATLIB): $(OBJS)
  97 + ar rc $@ $(OBJS)
  98 + $(RANLIB) $@
  99 +
  100 +$(SHAREDDEF): msvc/png32ms.def
  101 + cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' > $@
  102 +
  103 +$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
  104 + $(LDSHARED) -o $@ $(LDEXTRA) $(OBJSDLL) -L. -L$(ZLIBLIB) -lz
  105 +
  106 +pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
  107 + $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
  108 +
  109 +pngtest-stat$(EXE): pngtest.o $(STATLIB)
  110 + $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
  111 +
  112 +pngtest.pic.o: pngtest.c
  113 + $(CC) $(CFLAGS) -c $< -o $@
  114 +
  115 +pngtest.o: pngtest.c
  116 + $(CC) $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -c $< -o $@
  117 +
  118 +test: test-dll test-stat
  119 +
  120 +test-stat: pngtest-stat$(EXE)
  121 + ./pngtest-stat
  122 +
  123 +test-dll: pngtest$(EXE)
  124 + ./pngtest
  125 +
  126 +install: $(STATLIB) $(SHAREDLIB)
  127 + -@if [ ! -d $(INCPATH) ]; then mkdir -p $(INCPATH); fi
  128 + -@if [ ! -d $(LIBPATH) ]; then mkdir -p $(LIBPATH); fi
  129 + -@if [ ! -d $(BINPATH) ]; then mkdir -p $(BINPATH); fi
  130 + -@if [ ! -d $(MAN3PATH) ]; then mkdir -p $(MAN3PATH); fi
  131 + -@if [ ! -d $(DOCPATH) ]; then mkdir -p $(DOCPATH); fi
  132 + install -m 644 png.h pngconf.h $(INCPATH)
  133 + install -m 755 $(STATLIB) $(IMPLIB) $(LIBPATH)
  134 + install -s -m 755 $(SHAREDLIB) $(BINPATH)
  135 + install -m 644 $(DOCS) $(DOCPATH)
  136 + install -m 644 libpngpf.3 libpng.3 $(MAN3PATH)
  137 +
  138 +clean:
  139 + /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
  140 + pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF)
  141 +
  142 +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
  143 +writelock:
  144 + chmod a-w *.[ch35] $(DOCS) scripts/*
  145 +
  146 +# DO NOT DELETE THIS LINE -- make depend depends on it.
  147 +
  148 +png.o png.pic.o: png.h pngconf.h png.c pngasmrd.h
  149 +pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
  150 +pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
  151 +pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
  152 +pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c
  153 +pngset.o pngset.pic.o: png.h pngconf.h pngset.c
  154 +pngget.o pngget.pic.o: png.h pngconf.h pngget.c
  155 +pngread.o pngread.pic.o: png.h pngconf.h pngread.c
  156 +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
  157 +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c pngasmrd.h
  158 +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
  159 +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
  160 +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
  161 +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
  162 +pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
  163 +
  164 +pngtest.o: png.h pngconf.h pngtest.c
  165 +pngtest-stat.o: png.h pngconf.h pngtest.c
2  scripts/makefile.dec
@@ -14,7 +14,7 @@ ZLIBINC=../zlib
14 14 # read libpng.txt or png.h to see why PNGMAJ is 2. You should not
15 15 # have to change it.
16 16 PNGMAJ = 2
17   -PNGMIN = 1.0.8beta3
  17 +PNGMIN = 1.0.8beta4
18 18 PNGVER = $(PNGMAJ).$(PNGMIN)
19 19
20 20 CC=cc
4 scripts/makefile.gcmmx
@@ -3,6 +3,8 @@
3 3 # Copyright 1998-2000 Greg Roelofs
4 4 # For conditions of distribution and use, see copyright notice in png.h
5 5
  6 +# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
  7 +
6 8 CC=gcc
7 9
8 10 # where "make install" puts libpng.a, libpng.so*, png.h and pngconf.h
@@ -34,7 +36,7 @@ RANLIB=ranlib
34 36 # read libpng.txt or png.h to see why PNGMAJ is 2. You should not
35 37 # have to change it.
36 38 PNGMAJ = 2
37   -PNGMIN = 1.0.8beta3
  39 +PNGMIN = 1.0.8beta4
38 40 PNGVER = $(PNGMAJ).$(PNGMIN)
39 41
40 42 INCPATH=$(prefix)/include
2  scripts/makefile.linux
@@ -34,7 +34,7 @@ RANLIB=ranlib
34 34 # read libpng.txt or png.h to see why PNGMAJ is 2. You should not
35 35 # have to change it.
36 36 PNGMAJ = 2
37   -PNGMIN = 1.0.8beta3
  37 +PNGMIN = 1.0.8beta4
38 38 PNGVER = $(PNGMAJ).$(PNGMIN)
39 39
40 40 INCPATH=$(prefix)/include
2  scripts/makefile.sco
@@ -25,7 +25,7 @@ RANLIB=echo
25 25 # read libpng.txt or png.h to see why PNGMAJ is 2. You should not
26 26 # have to change it.
27 27 PNGMAJ = 2
28   -PNGMIN = 1.0.8beta3
  28 +PNGMIN = 1.0.8beta4
29 29 PNGVER = $(PNGMAJ).$(PNGMIN)
30 30
31 31 INCPATH=$(prefix)/include
4 scripts/makefile.sggcc
@@ -19,8 +19,8 @@ CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 # -g -DPNG_DEBUG=5
19 19 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
20 20 LDSHARED=gcc -shared
21 21
22   -VER=1.0.8beta3
23   -LIBS=libpng.so.1.0.8beta3
  22 +VER=1.0.8beta4
  23 +LIBS=libpng.so.1.0.8beta4
24 24 SHAREDLIB=libpng.so
25 25 libdir=$(prefix)/lib32
26 26
2  scripts/makefile.solaris
@@ -31,7 +31,7 @@ RANLIB=echo
31 31 # read libpng.txt or png.h to see why PNGMAJ is 2. You should not
32 32 # have to change it.
33 33 PNGMAJ = 2
34   -PNGMIN = 1.0.8beta3
  34 +PNGMIN = 1.0.8beta4
35 35 PNGVER = $(PNGMAJ).$(PNGMIN)
36 36
37 37 INCPATH=$(prefix)/include
2  scripts/pngdef.pas
@@ -5,7 +5,7 @@