summaryrefslogtreecommitdiff
path: root/sysutils/klavg/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/klavg/patches/patch-ab')
-rw-r--r--sysutils/klavg/patches/patch-ab59
1 files changed, 0 insertions, 59 deletions
diff --git a/sysutils/klavg/patches/patch-ab b/sysutils/klavg/patches/patch-ab
deleted file mode 100644
index 7b42cde162d..00000000000
--- a/sysutils/klavg/patches/patch-ab
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 1999/11/06 15:57:41 hubertf Exp $
-
---- klavg.cc.orig Mon Jun 28 08:44:35 1999
-+++ klavg.cc Fri Nov 5 14:38:09 1999
-@@ -33,7 +33,9 @@
-
- #include "klavg.h"
-
-+#ifdef __linux__
- #define LAVG_FILE "/proc/loadavg"
-+#endif
-
- KLavg::KLavg()
- {
-@@ -70,13 +72,13 @@
- KConfig *kconfig = kapp->getConfig();
-
- kconfig->setGroup("General");
-- cfg.refresh_rate = kconfig->readNumEntry("RefreshRate",1 );
-- cfg.cmd = kconfig->readEntry("Command" ,"ktop");
-+ cfg.refresh_rate = kconfig->readNumEntry("RefreshRate",5 );
-+ cfg.cmd = kconfig->readEntry("Command" ,"xterm -e top");
-
- kconfig->setGroup("Colours");
-- cfg.bg_colour = kconfig->readColorEntry ("Background",&black );
-- cfg.fg_colour = kconfig->readColorEntry ("Foreground",&yellow);
-- cfg.grid_colour = kconfig->readColorEntry ("Grid" ,&red );
-+ cfg.bg_colour = kconfig->readColorEntry ("Background",&gray );
-+ cfg.fg_colour = kconfig->readColorEntry ("Foreground",&black);
-+ cfg.grid_colour = kconfig->readColorEntry ("Grid" ,&cyan );
- }
-
- void KLavg::saveCfg()
-@@ -167,6 +169,14 @@
-
- float KLavg::getLAVG()
- {
-+#if defined(__NetBSD__)
-+
-+ double res;
-+ getloadavg(&res, 1); // Mmm, abstract OS interfaces :-)
-+ return (float)res;
-+
-+#elif defined(__linux__)
-+
- FILE *f=fopen(LAVG_FILE,"r");
- if(!f)
- return 0.0;
-@@ -177,6 +187,10 @@
-
- //fprintf(stderr,"LAVG=%f\n",res);
- return res;
-+
-+#else
-+#error Sorry, no load gathering available.
-+#endif
- }
-
- int main(int ac, char **av)