pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/gimp-rawphoto/patches Added a patch for gcc-2...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/74d46f274657
branches:  trunk
changeset: 490599:74d46f274657
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Mar 16 11:45:24 2005 +0000

description:
Added a patch for gcc-2.95.3. Approved by wiz.

diffstat:

 graphics/gimp-rawphoto/patches/patch-ab |  46 +++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diffs (50 lines):

diff -r c99cd1af3153 -r 74d46f274657 graphics/gimp-rawphoto/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/gimp-rawphoto/patches/patch-ab   Wed Mar 16 11:45:24 2005 +0000
@@ -0,0 +1,46 @@
+$NetBSD: patch-ab,v 1.1 2005/03/16 11:45:24 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- rawphoto.c.orig    Fri Oct 22 09:28:08 2004
++++ rawphoto.c Wed Mar 16 10:43:15 2005
+@@ -552,11 +552,12 @@ expose_histogram_event( GtkWidget *widge
+ 
+ void plotHistogram( void )
+ {
+-      gint w,h;
++      gint w, h, max_val, bottom, top, middle, r, g, b;
+       guint32 i,j;
+ 
+       GdkGC *gc;
+       GdkColor color;
++      GdkRectangle update_rect;
+ 
+       gc = gdk_gc_new (histoPixmap);
+       color.red = color.green = color.blue = 32768;
+@@ -566,7 +567,7 @@ void plotHistogram( void )
+       h = histo->allocation.height;
+ 
+       /* Find biggest bin for normalizing */
+-      gint max_val = 0;
++      max_val = 0;
+       for ( i=0 ; i < 3; i++ )
+               for ( j=0 ; j < RGBHISTLEN; j++ )
+                       max_val = MAX(histogramRGB[i][j], max_val);
+@@ -589,8 +590,6 @@ void plotHistogram( void )
+       printf("Max value: %d\n", max_val);
+ 
+       /* Draw histogram bars */
+-      gint bottom, top, middle;
+-      gint r,g,b;
+       for ( i=0 ; i < RGBHISTLEN; i++ ) {
+               r = histogramRGB[0][i];
+               g = histogramRGB[1][i];
+@@ -648,7 +647,6 @@ void plotHistogram( void )
+       for(i=w/5; i<(w-w/5); i+=(w/5)) DRAW_BAR(0,max_val);
+       
+       /* Notify GTK that the widget needs to be redrawn (via an expose) */
+-      GdkRectangle update_rect;
+       update_rect.x = 0;
+       update_rect.y = 0;
+       update_rect.width = HISTOGRAM_WIDTH;



Home | Main Index | Thread Index | Old Index