mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Imported from libpng-1.6.13beta01.tar
This commit is contained in:
@@ -59,15 +59,16 @@ INCS = $(PNGINC) $(ZINC) $(XINC)
|
||||
RLIBSd = $(PNGLIBd) $(ZLIBd) $(XLIB) -lm
|
||||
RLIBSs = $(PNGLIBs) $(ZLIBs) $(XLIB) -lm
|
||||
WLIBSd = $(PNGLIBd) $(ZLIBd) -lm
|
||||
WLIBSs = $(PNGLIBs) $(ZLIBs)
|
||||
WLIBSs = $(PNGLIBs) $(ZLIBs) -lm
|
||||
|
||||
CC = gcc
|
||||
LD = gcc
|
||||
RM = rm -f
|
||||
CPPFLAGS = $(INCS) -DFEATURE_LOOP
|
||||
CFLAGS = -O -Wall
|
||||
#CFLAGS = -O -W -Wall -Wextra -pedantic -ansi
|
||||
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
||||
# [-ansi, -pedantic and -W can also be used]
|
||||
# [-ansi, -pedantic, -Wextra, and -W can also be used]
|
||||
LDFLAGS =
|
||||
O = .o
|
||||
E =
|
||||
|
||||
@@ -163,8 +163,12 @@ uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
|
||||
|
||||
/* now we can go ahead and just read the whole image */
|
||||
|
||||
fread(image_data, 1L, rowbytes*height, saved_infile);
|
||||
|
||||
if (fread(image_data, 1L, rowbytes*height, saved_infile) <
|
||||
rowbytes*height) {
|
||||
free (image_data);
|
||||
image_data = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return image_data;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
- 1.14: added support for X resources (thanks to Gerhard Niklasch)
|
||||
- 2.00: dual-licensed (added GNU GPL)
|
||||
- 2.01: fixed improper display of usage screen on PNG error(s)
|
||||
- 2.02: Added "void(argc);" statement to quiet pedantic compiler warnings
|
||||
about unused variable (GR-P)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -80,7 +82,7 @@
|
||||
|
||||
#define PROGNAME "rpng-x"
|
||||
#define LONGNAME "Simple PNG Viewer for X"
|
||||
#define VERSION "2.01 of 16 March 2008"
|
||||
#define VERSION "2.02 of 15 June 2014"
|
||||
#define RESNAME "rpng" /* our X resource application name */
|
||||
#define RESCLASS "Rpng" /* our X resource class name */
|
||||
|
||||
@@ -279,15 +281,17 @@ int main(int argc, char **argv)
|
||||
"Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg] file.png\n"
|
||||
" xdpy\tname of the target X display (e.g., ``hostname:0'')\n"
|
||||
" exp \ttransfer-function exponent (``gamma'') of the display\n"
|
||||
"\t\t system in floating-point format (e.g., ``%.1f''); equal\n"
|
||||
"\t\t system in floating-point format (e.g., ``%.1f''); equal\n",
|
||||
PROGNAME, default_display_exponent);
|
||||
|
||||
fprintf(stderr, "\n"
|
||||
"\t\t to the product of the lookup-table exponent (varies)\n"
|
||||
"\t\t and the CRT exponent (usually 2.2); must be positive\n"
|
||||
" bg \tdesired background color in 7-character hex RGB format\n"
|
||||
"\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n"
|
||||
"\t\t used with transparent images\n"
|
||||
"\nPress Q, Esc or mouse button 1 (within image window, after image\n"
|
||||
"is displayed) to quit.\n"
|
||||
"\n", PROGNAME, default_display_exponent);
|
||||
"is displayed) to quit.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -419,6 +423,8 @@ int main(int argc, char **argv)
|
||||
|
||||
rpng_x_cleanup();
|
||||
|
||||
(void)argc; /* Unused */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
- 2.02: fixed improper display of usage screen on PNG error(s); fixed
|
||||
unexpected-EOF and file-read-error cases
|
||||
- 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options
|
||||
- 2.04:
|
||||
(GR-P)
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -750,6 +750,7 @@ int main(int argc, char **argv)
|
||||
rpng2_x_cleanup();
|
||||
|
||||
(void)argc; /* Unused */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user