diff options
author | kristerw <kristerw> | 2004-06-28 00:47:40 +0000 |
---|---|---|
committer | kristerw <kristerw> | 2004-06-28 00:47:40 +0000 |
commit | 820f713ba8cfe99fad31c6b530001f2c5a83294a (patch) | |
tree | 3ee1d6e81d1ab01c51eab43fd1742844f2f35901 /sysutils/xfce4-cpugraph-plugin | |
parent | a96caff6e8f5353aff583aeec33b3553a4aaa534 (diff) | |
download | pkgsrc-820f713ba8cfe99fad31c6b530001f2c5a83294a.tar.gz |
Fix some C99 variable definitions, to make this build with gcc 2.95.
Diffstat (limited to 'sysutils/xfce4-cpugraph-plugin')
-rw-r--r-- | sysutils/xfce4-cpugraph-plugin/distinfo | 3 | ||||
-rw-r--r-- | sysutils/xfce4-cpugraph-plugin/patches/patch-aa | 96 |
2 files changed, 98 insertions, 1 deletions
diff --git a/sysutils/xfce4-cpugraph-plugin/distinfo b/sysutils/xfce4-cpugraph-plugin/distinfo index bb5c9108520..8115c3b1241 100644 --- a/sysutils/xfce4-cpugraph-plugin/distinfo +++ b/sysutils/xfce4-cpugraph-plugin/distinfo @@ -1,4 +1,5 @@ -$NetBSD: distinfo,v 1.1.1.1 2004/06/21 06:06:11 martti Exp $ +$NetBSD: distinfo,v 1.2 2004/06/28 00:47:40 kristerw Exp $ SHA1 (xfce4-cpugraph-plugin-0.2.0.tar.gz) = efad4db850e753e1c3e6f1ed93e7ce3251d750c0 Size (xfce4-cpugraph-plugin-0.2.0.tar.gz) = 209312 bytes +SHA1 (patch-aa) = 1ff45a4504fc418f7db4f5c2cdb525a851bfa452 diff --git a/sysutils/xfce4-cpugraph-plugin/patches/patch-aa b/sysutils/xfce4-cpugraph-plugin/patches/patch-aa new file mode 100644 index 00000000000..d8aaf593616 --- /dev/null +++ b/sysutils/xfce4-cpugraph-plugin/patches/patch-aa @@ -0,0 +1,96 @@ +$NetBSD: patch-aa,v 1.1 2004/06/28 00:47:40 kristerw Exp $ + +--- panel-plugin/cpu.c.orig Mon Jun 28 02:38:06 2004 ++++ panel-plugin/cpu.c Mon Jun 28 02:41:45 2004 +@@ -36,11 +36,12 @@ + void ReadSettings (Control *control, xmlNode *node) + { + xmlChar *value; ++ CPUGraph *base; + + if (node == NULL || node->children == NULL) + return; + +- CPUGraph *base = (CPUGraph *)control->data; ++ base = (CPUGraph *)control->data; + + for (node = node->children; node; node = node->next) + { +@@ -640,6 +641,8 @@ + + void DrawGraph (CPUGraph *base) + { ++ int startx, starty; ++ float step; + GdkGC *fg1, *fg2, *bg, *fc; + GtkWidget *da = base->m_DrawArea; + +@@ -658,8 +661,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; + + gdk_draw_rectangle (da->window, + bg, +@@ -678,7 +681,7 @@ + } + + +- float step = base->m_Height/100.0; ++ step = base->m_Height/100.0; + + if (base->m_Mode == 0) + { +@@ -718,12 +721,14 @@ + else if (base->m_Mode == 1) + { + GdkGC *gc; ++ int nrx, nry; ++ float tstep; ++ int x, y; + if (base->m_ColorMode > 0) + gc = gdk_gc_new (da->window); +- int nrx = base->m_Width/3.0; +- int nry = base->m_Height/2.0; +- float tstep = nry/100.0; +- int x, y; ++ nrx = base->m_Width/3.0; ++ nry = base->m_Height/2.0; ++ tstep = nry/100.0; + for (x=nrx-1;x>=0;x--) + { + int usage = (int)(base->m_History[nrx - 1 - x]*tstep); +@@ -761,12 +766,15 @@ + else if (base->m_Mode == 2) + { + GdkGC *gc; ++ int y; ++ int usage; ++ int tmp; ++ int length; + if (base->m_ColorMode > 0) + gc = gdk_gc_new (da->window); +- int y; +- int usage = (int)(base->m_History[0]*step); +- int tmp=0; +- int length = base->m_Height - (base->m_Height - usage); ++ usage = (int)(base->m_History[0]*step); ++ tmp=0; ++ length = base->m_Height - (base->m_Height - usage); + for (y=base->m_Height-1;y>=base->m_Height - usage;y--) + { + if (base->m_ColorMode > 0) +@@ -926,8 +934,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; |