Files
macports-ports/science/molmol/files/molmol-png.diff
T
Tim Hentenaar 1e81aa3723 molmol: change openmotif to motif and bump revision
* Refresh PNG patch
* Remove unneeded dependency on libXp
* Fix port linting nits
2026-05-20 17:50:10 -04:00

37 lines
985 B
Diff

--- src/motogl/MotOGLDump.c 2001-07-07 21:21:34.000000000 -0400
+++ src/motogl/MotOGLDump.c 2026-04-30 16:54:06.000000000 -0400
@@ -245,10 +245,10 @@
#ifdef PNG_SUPPORT
static void
-pngErrHand(png_structp pngStrucP, char *errMsg)
+pngErrHand(png_structp pngStrucP, const char *errMsg)
{
IORaiseError(errMsg);
- longjmp(pngStrucP->jmpbuf, 1);
+ longjmp(png_jmpbuf(pngStrucP), 1);
}
#endif
@@ -357,7 +357,7 @@
return IO_RES_ERR;
}
- if (setjmp(pngStrucP->jmpbuf)) {
+ if (setjmp(png_jmpbuf(pngStrucP))) {
if (cBuf != NULL)
free(cBuf);
if (fBuf != NULL)
@@ -368,10 +368,7 @@
png_init_io(pngStrucP, ImgFileP);
- pngInfoP->width = imgW;
- pngInfoP->height = imgH;
- pngInfoP->bit_depth = 8;
- pngInfoP->color_type = PNG_COLOR_TYPE_RGB;
+ png_set_IHDR(pngStrucP, pngInfoP, imgW, imgH, 8, PNG_COLOR_TYPE_RGB, 0, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
png_write_info(pngStrucP, pngInfoP);
}
#endif