commit xgrabsc for openSUSE:Factory

Hello community, here is the log from the commit of package xgrabsc for openSUSE:Factory checked in at Fri Nov 27 16:08:46 CET 2009. -------- --- xgrabsc/xgrabsc.changes 2008-08-22 15:36:34.000000000 +0200 +++ /mounts/work_src_done/STABLE/xgrabsc/xgrabsc.changes 2009-11-27 09:11:41.000000000 +0100 @@ -1,0 +2,10 @@ +Fri Nov 27 09:09:21 UTC 2009 - mseben@novell.com + +- Update patches to apply with fuzz=0 + +------------------------------------------------------------------- +Thu Oct 15 22:24:22 CEST 2009 - marek.belisko@open-nandra.com + +- Fixed memory leak (bnc #542498) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- xgrabsc-2.41-memoryleak.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xgrabsc.spec ++++++ --- /var/tmp/diff_new_pack.KcaKfq/_old 2009-11-27 16:08:11.000000000 +0100 +++ /var/tmp/diff_new_pack.KcaKfq/_new 2009-11-27 16:08:11.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package xgrabsc (Version 2.41) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,11 +21,11 @@ Name: xgrabsc Url: ftp://ftp.x.org/contrib/applications/ BuildRequires: libgcc libstdc++ ncurses-devel openmotif openmotif-devel update-desktop-files xorg-x11 -License: Any permissive; X11/MIT +License: PERMISSIVE-OSI-COMPLIANT ; MIT Group: System/X11/Utilities AutoReqProv: on Version: 2.41 -Release: 1225 +Release: 1238 Summary: A Screen Grabber for the X Window System. Source: xgrabsc-%{version}.tar.bz2 Source1: xgrabsc.desktop @@ -34,6 +34,8 @@ Patch2: xgrabsc-%{version}-implicit_decl.patch Patch3: xgrabsc-%{version}-no_xrdb.patch Patch4: xgrabsc-%{version}-new_ncurses.patch +# PATCH-FIX-OPENSUSE xgrabsc-2.41-memoryleak.patch bnc#542498 +Patch5: xgrabsc-%{version}-memoryleak.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if "%(xft-config --prefix)" == "/usr" %define _xorg7libs %_lib @@ -93,6 +95,7 @@ %if %suse_version > 1100 %patch4 %endif +%patch5 %build xmkmf ++++++ xgrabsc-2.41-gcc4.patch ++++++ --- /var/tmp/diff_new_pack.KcaKfq/_old 2009-11-27 16:08:11.000000000 +0100 +++ /var/tmp/diff_new_pack.KcaKfq/_new 2009-11-27 16:08:11.000000000 +0100 @@ -1,6 +1,7 @@ -diff -ur xgrabsc-orig/convert.c xgrabsc-2.41/convert.c ---- xgrabsc-orig/convert.c 1995-11-07 20:31:40.000000000 +0100 -+++ xgrabsc-2.41/convert.c 2005-04-29 13:01:16.398051398 +0200 +Index: xgrabsc-2.41/convert.c +=================================================================== +--- xgrabsc-2.41.orig/convert.c ++++ xgrabsc-2.41/convert.c @@ -22,8 +22,7 @@ /* * convert a pixmap image into a bitmap image @@ -11,7 +12,7 @@ { XImage *ximage = image->ximage; int x, y; -@@ -139,9 +138,7 @@ +@@ -140,9 +139,7 @@ static byte DitherBits[GRAYS][4] = { /* halftone or dither a color image, changing it into a monochrome * image */ @@ -22,10 +23,11 @@ { XImage *ximage = image->ximage; XImage *newImage; -diff -ur xgrabsc-orig/process.c xgrabsc-2.41/process.c ---- xgrabsc-orig/process.c 1995-11-07 20:31:40.000000000 +0100 -+++ xgrabsc-2.41/process.c 2005-04-29 12:58:08.415304537 +0200 -@@ -229,8 +229,7 @@ +Index: xgrabsc-2.41/process.c +=================================================================== +--- xgrabsc-2.41.orig/process.c ++++ xgrabsc-2.41/process.c +@@ -230,8 +230,7 @@ reverseColors(image) * Compress the colors used in an XImage so that all pixel values are * adjacent. Alters the rgb color tables and the XImage data values. */ @@ -35,9 +37,10 @@ { XImage *ximage = image->ximage; long map[MAX_CELLS]; -diff -ur xgrabsc-orig/write.c xgrabsc-2.41/write.c ---- xgrabsc-orig/write.c 1995-11-07 20:31:40.000000000 +0100 -+++ xgrabsc-2.41/write.c 2005-04-29 13:11:02.122000239 +0200 +Index: xgrabsc-2.41/write.c +=================================================================== +--- xgrabsc-2.41.orig/write.c ++++ xgrabsc-2.41/write.c @@ -21,8 +21,7 @@ @@ -48,7 +51,7 @@ { byte b2; -@@ -124,9 +123,7 @@ +@@ -128,9 +127,7 @@ writeint(intValue, outfile) } @@ -59,7 +62,7 @@ { dw width, height, hasColormap, colormapSize; int i, w, h; -@@ -1165,9 +1162,7 @@ +@@ -1210,9 +1207,7 @@ writeColorPS(image, outfile, encode, enc * Write an image in 'puzzle' format, suitable for loading with * "puzzle -picture". */ @@ -70,7 +73,7 @@ { XImage *ximage = image->ximage; int nc, width, height, w, h, cidx; -@@ -1207,10 +1202,7 @@ +@@ -1253,10 +1248,7 @@ writePuzzle(image, outfile) @@ -82,7 +85,7 @@ { XImage *ximage = image->ximage; XWDFileHeader header; -@@ -1327,9 +1319,7 @@ +@@ -1374,9 +1366,7 @@ writeXWD(image, outfile, xyformat) * use it. */ @@ -93,7 +96,7 @@ { XImage *ximage = image->ximage; int w, h; -@@ -1384,9 +1374,7 @@ +@@ -1432,9 +1422,7 @@ writeXYPixmap(image, outfile) * Write a color image out in Pixmap format. * Supported output formats are xpm1 (original xpm), xpm2 and xpm3 */ @@ -104,7 +107,7 @@ { XImage *ximage = image->ximage; int nc, width, height, w, h, cidx, cpp; -@@ -1483,9 +1471,7 @@ +@@ -1597,9 +1585,7 @@ fprintf(outfile, "/* pixels */\n"); /* * Write a color image out in PPM, a portable bitmap format. */ ++++++ xgrabsc-2.41-implicit_decl.patch ++++++ --- /var/tmp/diff_new_pack.KcaKfq/_old 2009-11-27 16:08:11.000000000 +0100 +++ /var/tmp/diff_new_pack.KcaKfq/_new 2009-11-27 16:08:11.000000000 +0100 @@ -1,6 +1,8 @@ ---- xgrabsc.c +Index: xgrabsc.c +=================================================================== +--- xgrabsc.c.orig +++ xgrabsc.c -@@ -34,8 +34,10 @@ +@@ -34,6 +34,8 @@ */ #include "xgrabsc.h" @@ -9,9 +11,7 @@ - /* versions of XmuGetClientWindow and screenNumberOfScreen. - * GetClientWindow is used so Xmu need not be linked (causes problems on -@@ -626,7 +629,7 @@ +@@ -626,7 +628,7 @@ xgrabsc(argc, argv, env) case sourceKey: childWindow = #ifdef SELECTION_MASK @@ -20,7 +20,9 @@ #else getWindowWhenKeyIsPressed(ControlMask); #endif ---- xgrabxaw.c +Index: xgrabxaw.c +=================================================================== +--- xgrabxaw.c.orig +++ xgrabxaw.c @@ -23,6 +23,7 @@ #include "config.h" @@ -30,7 +32,9 @@ #include <ctype.h> #include <X11/Intrinsic.h> #include <X11/StringDefs.h> ---- xgrabxm.c +Index: xgrabxm.c +=================================================================== +--- xgrabxm.c.orig +++ xgrabxm.c @@ -22,6 +22,7 @@ #include "config.h" ++++++ xgrabsc-2.41-memoryleak.patch ++++++ Index: write.c =================================================================== --- write.c.orig +++ write.c @@ -1575,8 +1575,11 @@ fprintf(outfile, "/* pixels */\n"); /* write end */ fputs("};\n", outfile); + free(pix_red); + free(pix_green); + free(pix_blue); - return 0; + return 0; } ++++++ xgrabsc-2.41-new_ncurses.patch ++++++ --- /var/tmp/diff_new_pack.KcaKfq/_old 2009-11-27 16:08:11.000000000 +0100 +++ /var/tmp/diff_new_pack.KcaKfq/_new 2009-11-27 16:08:11.000000000 +0100 @@ -1,4 +1,6 @@ ---- xgrabsc.c +Index: xgrabsc.c +=================================================================== +--- xgrabsc.c.orig +++ xgrabsc.c @@ -35,7 +35,7 @@ ++++++ xgrabsc-2.41-no_xrdb.patch ++++++ --- /var/tmp/diff_new_pack.KcaKfq/_old 2009-11-27 16:08:11.000000000 +0100 +++ /var/tmp/diff_new_pack.KcaKfq/_new 2009-11-27 16:08:11.000000000 +0100 @@ -1,6 +1,8 @@ ---- Imakefile +Index: Imakefile +=================================================================== +--- Imakefile.orig +++ Imakefile -@@ -78,7 +78,7 @@ +@@ -78,7 +78,7 @@ XGrab.ad: ADName ADName: ADSource rm -f ADName ++++++ xgrabsc-2.41.patch ++++++ --- /var/tmp/diff_new_pack.KcaKfq/_old 2009-11-27 16:08:11.000000000 +0100 +++ /var/tmp/diff_new_pack.KcaKfq/_new 2009-11-27 16:08:11.000000000 +0100 @@ -1,6 +1,8 @@ ---- XGrabxm.res +Index: XGrabxm.res +=================================================================== +--- XGrabxm.res.orig +++ XGrabxm.res -@@ -22,8 +22,8 @@ +@@ -22,8 +22,8 @@ XGrab*.selectiontype.numColumns: 1 XGrab*.selectiontype.x: 5 XGrab*.click.labelString: Click @@ -10,7 +12,7 @@ XGrab*.key.labelString: Ctrl key XGrab*.root.labelString: Everything! -@@ -85,7 +85,7 @@ +@@ -85,7 +85,7 @@ XGrab*.xwd.labelString: X Window Dump XGrab*.ps.labelString: PostScript XGrab*.xpm3.labelString: XPM3 XGrab*.ppm.labelString: PPM @@ -19,7 +21,9 @@ XGrab*.puzzle.labelString: Puzzle XGrab*.xwdxy.labelString: XWD-xy XGrab*.xpm.labelString: XPM1 ---- config.h +Index: config.h +=================================================================== +--- config.h.orig +++ config.h @@ -75,11 +75,17 @@ * The inset sizes control the maximum size of the image on the page. @@ -52,9 +56,11 @@ #define DEFAULT_COMMAND lpr #define DEFAULT_PRESLEEP 3 #define DEFAULT_POSTSLEEP 0 ---- convert.c +Index: convert.c +=================================================================== +--- convert.c.orig +++ convert.c -@@ -105,6 +105,7 @@ +@@ -105,6 +105,7 @@ pixmap2bitmap(image) image->used[whitep] = 1; image->used[blackp] = 1; image->numcells = 2; @@ -62,25 +68,22 @@ } -@@ -331,5 +332,6 @@ +@@ -331,5 +332,6 @@ pixmap2halftone(image, dither) image->used[whitep] = 1; image->used[blackp] = 1; image->numcells = 2; + return 0; } ---- get.c +Index: get.c +=================================================================== +--- get.c.orig +++ get.c -@@ -80,35 +80,40 @@ +@@ -80,35 +80,40 @@ getImage(xrect, image, window) XCloseDisplay(hDisplay); exit(3); } -+ -+ if (depth <= 8) { -+ /* this won't cut the mustard for DirectColor */ -+ for (i=0; i<ncolors; i++) -+ colors[i].pixel = i; - +- - /* this won't cut the mustard for DirectColor */ - for (i=0; i<ncolors; i++) - colors[i].pixel = i; @@ -91,7 +94,7 @@ - image->green[i] = colors[i].green; - image->blue[i] = colors[i].blue; - } -- + - /* figure out which colormap entries are actually used by the image */ - ncolors = cmapSize = 0; - memset((char *)image->used, 0, MAX_CELLS); @@ -104,6 +107,11 @@ - cmapSize = i+1; - ncolors++; - } ++ if (depth <= 8) { ++ /* this won't cut the mustard for DirectColor */ ++ for (i=0; i<ncolors; i++) ++ colors[i].pixel = i; ++ + XQueryColors(hDisplay, cmap, colors, ncolors); + for (i=0; i<ncolors; i++) { + image->red[i] = colors[i].red; @@ -139,9 +147,11 @@ return TRUE; } ---- process.c +Index: process.c +=================================================================== +--- process.c.orig +++ process.c -@@ -219,6 +219,7 @@ +@@ -219,6 +219,7 @@ reverseColors(image) image->green[cidx] = (unsigned short)0xFFFF & (unsigned short)~((unsigned short)(image->green[cidx])); } } @@ -149,7 +159,7 @@ } -@@ -237,6 +238,10 @@ +@@ -237,6 +238,10 @@ compressColormap(image) int ncolors, w, h, m; long p; @@ -160,9 +170,11 @@ if (ximage->depth <= 1 || image->numcells > MAX_CELLS) return; ---- write.c +Index: write.c +=================================================================== +--- write.c.orig +++ write.c -@@ -59,6 +59,7 @@ +@@ -59,6 +59,7 @@ swapbytes(pDblw) cnv.bytes[1] = cnv.bytes[2]; cnv.bytes[2] = aByte; *pDblw = cnv.dbl; @@ -170,7 +182,7 @@ } -@@ -83,6 +84,7 @@ +@@ -83,6 +84,7 @@ swapdws (bp, n) *bp++ = c; bp += 2; } @@ -178,7 +190,7 @@ } -@@ -101,6 +103,7 @@ +@@ -101,6 +103,7 @@ swapwords (bp, n) bp++; *bp++ = c; } @@ -186,7 +198,7 @@ } -@@ -121,6 +124,7 @@ +@@ -121,6 +124,7 @@ writeint(intValue, outfile) swapbytes(&intValue); fwrite(&(intValue), 4, 1, (outfile)); #endif @@ -194,7 +206,7 @@ } -@@ -159,6 +163,7 @@ +@@ -159,6 +163,7 @@ writeSimple(image, outfile) for (h=0; h<image->ximage->height; h++) for (w=0; w<image->ximage->width; w++) fputc(XGetPixel(image->ximage, w, h), outfile); @@ -202,7 +214,7 @@ } -@@ -184,6 +189,8 @@ +@@ -184,6 +189,8 @@ XImage* makePSImage(image, desiredDepth, int lshift, lmask; long p; int x, y, i; @@ -211,7 +223,7 @@ XImage* ximage = image->ximage; XImage* psimage; -@@ -230,10 +237,40 @@ +@@ -230,10 +237,40 @@ XImage* makePSImage(image, desiredDepth, for (y = 0; y < ximage->height; y++) { for (x = 0; x < ximage->width; x++) { p = XGetPixel(ximage, x, y); @@ -256,7 +268,7 @@ XPutPixel(psimage, x, y, i); } } -@@ -269,6 +306,7 @@ +@@ -269,6 +306,7 @@ writeOnlyPreview(image, outfile) free(psimage->data); free(psimage); } @@ -264,7 +276,7 @@ } -@@ -295,6 +333,7 @@ +@@ -295,6 +333,7 @@ copyImage(image, newImage) XCloseDisplay(hDisplay); exit(3); } @@ -272,7 +284,7 @@ } -@@ -381,6 +420,7 @@ +@@ -381,6 +420,7 @@ writePreview(image, outfile, defaultImag if (newImage.ximage) { XDestroyImage(newImage.ximage); } @@ -280,7 +292,7 @@ } -@@ -715,6 +755,7 @@ +@@ -715,6 +755,7 @@ writePostscript(image, outfile, encode, free(newImage->ximage); free(newImage); } @@ -288,7 +300,7 @@ } -@@ -741,6 +782,7 @@ +@@ -741,6 +782,7 @@ writeColorPS(image, outfile, encode, enc double xdpi, ydpi, xscale, yscale, f; double left, top; int depth, bpl, spb; @@ -296,7 +308,7 @@ long p; /* rle variables */ int rlecount; -@@ -1047,15 +1089,17 @@ +@@ -1047,15 +1089,17 @@ writeColorPS(image, outfile, encode, enc } @@ -318,7 +330,7 @@ fputs("pop pop\n\n", outfile); -@@ -1148,6 +1192,7 @@ +@@ -1148,6 +1192,7 @@ writeColorPS(image, outfile, encode, enc #if defined(TRAILING_EOD) fputc('\004', outfile); #endif @@ -326,7 +338,7 @@ } -@@ -1199,6 +1244,7 @@ +@@ -1199,6 +1244,7 @@ writePuzzle(image, outfile) /* this won't work if depth > 8 */ for (w=0; w<ximage->width; w++) fputc(XGetPixel(ximage, w, h), outfile); @@ -334,7 +346,7 @@ } -@@ -1315,6 +1361,7 @@ +@@ -1315,6 +1361,7 @@ writeXWD(image, outfile, xyformat) else fwrite(ximage->data, ximage->height * ximage->bytes_per_line, 1, outfile); } @@ -342,7 +354,7 @@ } -@@ -1371,6 +1418,7 @@ +@@ -1371,6 +1418,7 @@ writeXYPixmap(image, outfile) } } fputs(" };\n", outfile); @@ -350,7 +362,7 @@ } -@@ -1390,91 +1438,157 @@ +@@ -1390,91 +1438,157 @@ writeZPixmap(xpmFormat, image, outfile) { XImage *ximage = image->ximage; int nc, width, height, w, h, cidx, cpp; @@ -587,7 +599,7 @@ } -@@ -1499,21 +1613,77 @@ +@@ -1499,21 +1613,77 @@ writePPM(image, outfile) nc = image->numcells; time(&p); fprintf(outfile, "P3\n# PPM output created by xgrabsc on %s", ctime(&p)); @@ -677,16 +689,20 @@ } + return 0; } ---- xgrabsc.c +Index: xgrabsc.c +=================================================================== +--- xgrabsc.c.orig +++ xgrabsc.c -@@ -947,5 +947,6 @@ +@@ -947,5 +947,6 @@ main(argc, argv) char *env; env = (char *)getenv("XGRABSC"); xgrabsc(argc, argv, env); + return 0; } #endif ---- xgrabsc.h +Index: xgrabsc.h +=================================================================== +--- xgrabsc.h.orig +++ xgrabsc.h @@ -74,7 +74,8 @@ #include "virtual.h" @@ -698,9 +714,11 @@ #define MAX_CELLS 256 #define TRUE 1 #define FALSE 0 ---- xgrabxm.c +Index: xgrabxm.c +=================================================================== +--- xgrabxm.c.orig +++ xgrabxm.c -@@ -102,8 +102,8 @@ +@@ -102,8 +102,8 @@ typedef enum { radioType encValue = PS_NORMAL; radioType cnvValue = NO_DITHER; @@ -711,7 +729,7 @@ radioType outValue = TOFILE; -@@ -748,4 +748,5 @@ +@@ -748,4 +748,5 @@ int main(argc, argv, envp) XtRealizeWidget(hShell); XtAppMainLoop(appContext); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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@Hilbert.suse.de