提交 ec3f9498 编写于 作者: G Glenn Randers-Pehrson

[devel] Fixed some deprecated usages in the contrib directory.

上级 88429732
......@@ -641,6 +641,10 @@ version 1.4.0beta94 [November 9, 2009]
Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined.
version 1.4.0beta95 [November 9, 2009]
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -2327,6 +2327,10 @@ version 1.4.0beta94 [November 9, 2009]
Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined.
version 1.4.0beta95 [November 9, 2009]
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -159,7 +159,7 @@ void readpng2_version_info(void)
int readpng2_check_sig(uch *sig, int num)
{
return (!png_sig_cmp(sig, 0, num));
return !png_sig_cmp(sig, 0, num);
}
......@@ -379,6 +379,7 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
{
mainprog_info *mainprog_ptr;
int color_type, bit_depth;
png_uint_32 width, height;
double gamma;
......@@ -414,8 +415,10 @@ static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
/* this is just like in the non-progressive case */
png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width,
&mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
NULL, NULL, NULL);
mainprog_ptr->width = (ulg)width;
mainprog_ptr->height = (ulg)height;
/* since we know we've read all of the PNG file's "header" (i.e., up
......
......@@ -7,7 +7,7 @@ LD=$(CC)
RM=rm -f
CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
CFLAGS=-DPNG_CONFIGURE_LIBPNG -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
-DdeflateParams\(a,b,c\)=Z_OK -I. -O1
C=.c
......
......@@ -7,7 +7,7 @@ LD=$(CC)
RM=rm -f
CFLAGS=-DPNG_USER_CONFIG -DNO_GZIP -I. -O1
CFLAGS=-DPNG_CONFIGURE_LIBPNG -DPNG_USER_CONFIG -DNO_GZIP -I. -O1
C=.c
O=.o
......
......@@ -23,7 +23,7 @@ XLIB = -L/usr/X11R6/lib -lX11
#LIBS = $(XLIB)
LIBS = $(XLIB) -lm #platforms that need libm
CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
CFLAGS=-DPNG_CONFIGURE_LIBPNG -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
-DdeflateParams\(a,b,c\)=Z_OK -I. $(XINC) -O1
C=.c
......
......@@ -211,8 +211,8 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
if (ret != 8)
return FALSE;
ret = png_check_sig (buf, 8);
if (!ret)
ret = png_sig_cmp (buf, 0, 8);
if (ret)
return FALSE;
/* create png and info structures */
......
......@@ -126,7 +126,7 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
// first check the eight byte PNG signature
fread(pbSig, 1, 8, pfFile);
if (!png_check_sig(pbSig, 8))
if (png_sig_cmp(pbSig, 0, 8))
{
*ppbImageData = pbImageData = NULL;
return FALSE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册