Hello community, here is the log from the commit of package qemacs checked in at Thu Jun 29 22:52:03 CEST 2006. -------- --- qemacs/qemacs.changes 2006-05-29 23:20:35.000000000 +0200 +++ qemacs/qemacs.changes 2006-06-29 17:04:27.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Jun 29 17:03:53 CEST 2006 - nadvornik@suse.cz + +- don't use deprecated libpng functions + +------------------------------------------------------------------- New: ---- qemacs-libpng.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qemacs.spec ++++++ --- /var/tmp/diff_new_pack.t3X3bN/_old 2006-06-29 22:51:55.000000000 +0200 +++ /var/tmp/diff_new_pack.t3X3bN/_new 2006-06-29 22:51:55.000000000 +0200 @@ -16,7 +16,7 @@ Group: Productivity/Editors/Other Autoreqprov: on Version: 0.3.1 -Release: 215 +Release: 216 URL: http://fabrice.bellard.free.fr/qemacs/ Source0: http://fabrice.bellard.free.fr/qemacs/qemacs-0.3.1.tar.bz2 Patch0: qemacs.patch @@ -24,6 +24,7 @@ Patch2: gcc4.patch Patch3: includes.patch Patch4: initcall.patch +Patch5: qemacs-libpng.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Quick Emacs is a very small but powerful editor @@ -70,6 +71,7 @@ %patch2 -p1 %patch3 %patch4 +%patch5 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -95,6 +97,8 @@ %doc %{_mandir}/man1/* %changelog -n qemacs +* Thu Jun 29 2006 - nadvornik@suse.cz +- don't use deprecated libpng functions * Mon May 29 2006 - schwab@suse.de - Don't strip binaries. * Wed May 24 2006 - schwab@suse.de ++++++ qemacs-libpng.patch ++++++ --- html2png.c +++ html2png.c @@ -186,13 +186,11 @@ } #ifdef CONFIG_PNG_OUTPUT -extern void png_write_init(); - int png_save(QEditScreen *s, const char *filename) { CFBContext *cfb = s->private; - png_struct * volatile png_ptr = NULL; - png_info * volatile info_ptr = NULL; + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; png_byte *row_ptr, *row_pointers[1], *row = NULL; int w, h, x, y; unsigned int r, g, b, v; @@ -202,32 +200,30 @@ row = malloc(3 * s->width); if (!row) goto fail; - png_ptr = malloc(sizeof (png_struct)); + png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) goto fail; - info_ptr = malloc(sizeof (png_info)); - if (!info_ptr) + info_ptr = png_create_info_struct (png_ptr); + if (!info_ptr) { + png_destroy_write_struct(&png_ptr, (png_infopp)NULL); goto fail; + } f = fopen(filename, "w"); if (!f) goto fail; if (setjmp(png_ptr->jmpbuf)) { - png_write_destroy(png_ptr); + png_destroy_write_struct(&png_ptr, &info_ptr); fail: /* free pointers before returning. Make sure you clean up anything else you've done. */ - free(png_ptr); - free(info_ptr); free(row); if (f) fclose(f); return -1; } - png_info_init(info_ptr); - png_write_init(png_ptr); png_init_io(png_ptr, f); data = (unsigned int *)cfb->base; @@ -259,10 +255,9 @@ data = (void *)((char *)data + cfb->wrap); } png_write_end(png_ptr, info_ptr); - png_write_destroy(png_ptr); - - free(png_ptr); - free(info_ptr); + png_destroy_write_struct (&png_ptr, &info_ptr); + + free(row); fclose(f); return 0; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org
participants (1)
-
root@suse.de