summaryrefslogtreecommitdiff
path: root/sysutils/xfce4-cpugraph-plugin
diff options
context:
space:
mode:
authorkristerw <kristerw>2005-01-01 00:02:56 +0000
committerkristerw <kristerw>2005-01-01 00:02:56 +0000
commitbaf2acba60db23796e96c965f7e1515bcc5e21b1 (patch)
treec237572adaee1bad4f7cc293efbd17c70f890f52 /sysutils/xfce4-cpugraph-plugin
parent09ad81e0984264b182953bbc52986283822d78c7 (diff)
downloadpkgsrc-baf2acba60db23796e96c965f7e1515bcc5e21b1.tar.gz
Fix C99-isms to make this pkg build with gcc 2.95.
Diffstat (limited to 'sysutils/xfce4-cpugraph-plugin')
-rw-r--r--sysutils/xfce4-cpugraph-plugin/distinfo4
-rw-r--r--sysutils/xfce4-cpugraph-plugin/patches/patch-aa102
2 files changed, 93 insertions, 13 deletions
diff --git a/sysutils/xfce4-cpugraph-plugin/distinfo b/sysutils/xfce4-cpugraph-plugin/distinfo
index 8bc3dee7c82..50dc1d6c8d1 100644
--- a/sysutils/xfce4-cpugraph-plugin/distinfo
+++ b/sysutils/xfce4-cpugraph-plugin/distinfo
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.3 2004/06/30 12:33:53 martti Exp $
+$NetBSD: distinfo,v 1.4 2005/01/01 00:02:56 kristerw Exp $
SHA1 (xfce4-cpugraph-plugin-0.2.2.tar.gz) = 64914e2d766ba093b6158d45ab37c0021057121b
Size (xfce4-cpugraph-plugin-0.2.2.tar.gz) = 210953 bytes
-SHA1 (patch-aa) = e82ba46e5c089dd6dcc12f93361e4ba86cc9bd42
+SHA1 (patch-aa) = fe1b2d46334ba73a9a6c661c09b14bc1f2a342a9
diff --git a/sysutils/xfce4-cpugraph-plugin/patches/patch-aa b/sysutils/xfce4-cpugraph-plugin/patches/patch-aa
index 299264f0ce0..f23f34ce7b6 100644
--- a/sysutils/xfce4-cpugraph-plugin/patches/patch-aa
+++ b/sysutils/xfce4-cpugraph-plugin/patches/patch-aa
@@ -1,34 +1,93 @@
-$NetBSD: patch-aa,v 1.2 2004/06/30 12:33:53 martti Exp $
+$NetBSD: patch-aa,v 1.3 2005/01/01 00:02:56 kristerw Exp $
---- panel-plugin/cpu.c.orig 2004-06-12 01:25:31.000000000 +0000
-+++ panel-plugin/cpu.c 2004-06-30 15:18:42.000000000 +0000
-@@ -38,2 +38,3 @@
+--- panel-plugin/cpu.c.orig Sat Jun 12 03:25:31 2004
++++ panel-plugin/cpu.c Sat Jan 1 00:58:45 2005
+@@ -36,11 +36,12 @@
+ void ReadSettings (Control *control, xmlNode *node)
+ {
xmlChar *value;
+ CPUGraph *base;
-@@ -42,3 +43,3 @@
+ if (node == NULL || node->children == NULL)
+ return;
- CPUGraph *base = (CPUGraph *)control->data;
+ base = (CPUGraph *)control->data;
-@@ -653,2 +654,4 @@
+ for (node = node->children; node; node = node->next)
+ {
+@@ -48,10 +49,10 @@
+ {
+ if ((value = xmlGetProp (node, (const xmlChar *)"UpdateInterval")))
+ {
++ int update = 1000;
+ base->m_UpdateInterval = atoi ((const char *)value);
+ if (base->m_TimeoutID)
+ g_source_remove (base->m_TimeoutID);
+- int update = 1000;
+ if (base->m_UpdateInterval == 0)
+ update = 250;
+ else if (base->m_UpdateInterval == 1)
+@@ -223,10 +224,10 @@
+ }
+ gboolean CreateControl (Control *control)
+ {
++ int update = 1000;
+ CPUGraph *base = NewCPU ();
+ gtk_container_add (GTK_CONTAINER (control->base), GTK_WIDGET (base->m_Parent));
+
+- int update = 1000;
+ if (base->m_UpdateInterval == 0)
+ update = 250;
+ else if (base->m_UpdateInterval == 1)
+@@ -254,6 +255,7 @@
+ }
+ void SetOrientation (Control *control, int orientation)
+ {
++ int update=1000;
+ CPUGraph *base = (CPUGraph *)control->data;
+ base->m_Orientation = orientation;
+ SetRealGeometry (base);
+@@ -285,7 +287,6 @@
+ gtk_widget_show (base->m_Parent);
+ g_signal_connect (base->m_DrawArea, "expose_event", G_CALLBACK (DrawAreaExposeEvent), control->data);
+
+- int update=1000;
+ if (base->m_UpdateInterval == 0)
+ update = 250;
+ else if (base->m_UpdateInterval == 1)
+@@ -651,6 +652,8 @@
+
+ void DrawGraph (CPUGraph *base)
{
+ int startx, starty;
+ float step;
GdkGC *fg1, *fg2, *bg, *fc;
-@@ -671,4 +674,4 @@
+ GtkWidget *da = base->m_DrawArea;
+
+@@ -669,8 +672,8 @@
+ gdk_gc_set_rgb_fg_color (fc, &base->m_FrameColor);
+ }
- int startx = base->m_Frame ? 1 : 0;
- int starty = base->m_Frame ? 1 : 0;
+ startx = base->m_Frame ? 1 : 0;
+ starty = base->m_Frame ? 1 : 0;
-@@ -691,3 +694,3 @@
+ gdk_draw_rectangle (da->window,
+ bg,
+@@ -689,7 +692,7 @@
+ }
+
- float step = base->m_Height/100.0;
+ step = base->m_Height/100.0;
-@@ -731,8 +734,10 @@
+ if (base->m_Mode == 0)
+ {
+@@ -729,12 +732,14 @@
+ else if (base->m_Mode == 1)
+ {
GdkGC *gc;
+ int nrx, nry;
+ float tstep;
@@ -43,7 +102,11 @@ $NetBSD: patch-aa,v 1.2 2004/06/30 12:33:53 martti Exp $
+ nry = (base->m_Height+1)/2.0;
+ tstep = nry/100.0;
for (x=nrx-1;x>=0;x--)
-@@ -774,8 +779,11 @@
+ {
+ float usage = base->m_History[nrx - 1 - x]*tstep;
+@@ -772,12 +777,15 @@
+ else if (base->m_Mode == 2)
+ {
GdkGC *gc;
+ int y;
+ float usage;
@@ -59,9 +122,26 @@ $NetBSD: patch-aa,v 1.2 2004/06/30 12:33:53 martti Exp $
+ tmp=0;
+ length = base->m_Height - (base->m_Height - usage);
for (y=base->m_Height-1;y>=base->m_Height - usage;y--)
-@@ -948,4 +956,4 @@
+ {
+ if (base->m_ColorMode > 0)
+@@ -831,9 +839,9 @@
+
+ void ApplyChanges (CPUGraph *base)
+ {
++ int update=1000;
+ if (base->m_TimeoutID)
+ g_source_remove (base->m_TimeoutID);
+- int update=1000;
+ if (base->m_UpdateInterval == 0)
+ update = 250;
+ else if (base->m_UpdateInterval == 1)
+@@ -946,8 +954,8 @@
+
+ void SetHistorySize (CPUGraph *base, int size)
{
- base->m_History = (long *)realloc (base->m_History, size*sizeof (long));
int i;
+ base->m_History = (long *)realloc (base->m_History, size*sizeof (long));
for (i=size-1;i>=base->m_Values;i--)
+ base->m_History[i] = 0;
+ base->m_Values = size;