Imported from libpng-1.2.0beta4.tar

This commit is contained in:
Glenn Randers-Pehrson
2001-06-23 08:03:17 -05:00
parent 8b6a889881
commit b182893c04
77 changed files with 419 additions and 10429 deletions

View File

@@ -26,6 +26,7 @@
- 1.11: added -usleep option for demos; fixed command-line parsing bug
- 1.12: added -pause option for demos and testing
- 1.20: added runtime MMX-enabling/disabling and new -mmx* options
- 1.21: fixed small X memory leak (thanks to Francois Petitjean)
---------------------------------------------------------------------------
@@ -56,7 +57,7 @@
#define PROGNAME "rpng2-x"
#define LONGNAME "Progressive PNG Viewer for X"
#define VERSION "1.20 of 29 January 2001"
#define VERSION "1.21 of 30 May 2001"
#include <stdio.h>
#include <stdlib.h>
@@ -585,8 +586,15 @@ static void rpng2_x_init(void)
* pattern */
if (rpng2_x_create_window()) {
/* GRR TEMPORARY HACK: this is fundamentally no different from cases
* above; libpng should longjmp() back to us when png_ptr goes away.
* If we/it segfault instead, seems like a libpng bug... */
/* we're here via libpng callback, so if window fails, clean and bail */
readpng2_cleanup(&rpng2_info);
return;
rpng2_x_cleanup();
exit(2);
}
}
@@ -738,6 +746,16 @@ static int rpng2_x_create_window(void)
XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0,
size_hints, wm_hints, NULL);
/* various properties and hints no longer needed; free memory */
if (pWindowName)
XFree(pWindowName->value);
if (pIconName)
XFree(pIconName->value);
if (size_hints)
XFree(size_hints);
if (wm_hints)
XFree(wm_hints);
XMapWindow(display, window);
gc = XCreateGC(display, window, 0, &gcvalues);