summaryrefslogtreecommitdiff
path: root/x11/kdebase/patches/patch-ao
diff options
context:
space:
mode:
Diffstat (limited to 'x11/kdebase/patches/patch-ao')
-rw-r--r--x11/kdebase/patches/patch-ao98
1 files changed, 0 insertions, 98 deletions
diff --git a/x11/kdebase/patches/patch-ao b/x11/kdebase/patches/patch-ao
deleted file mode 100644
index e0a0afd25a2..00000000000
--- a/x11/kdebase/patches/patch-ao
+++ /dev/null
@@ -1,98 +0,0 @@
-$NetBSD: patch-ao,v 1.3 1999/07/15 08:46:23 tron Exp $
-
---- /dev/null Fri Jan 29 20:07:16 1999
-+++ kcontrol/info/memory_netbsd.cpp Fri Jan 29 20:04:24 1999
-@@ -0,0 +1,93 @@
-+#include <sys/param.h>
-+#if __NetBSD_Version__ > 103080000
-+#define UVM
-+#endif
-+
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <vm/vm_swap.h>
-+#ifdef UVM
-+#include <uvm/uvm_extern.h>
-+#endif
-+
-+void KMemoryWidget::update()
-+{
-+ struct swapent *swaplist;
-+ int mib[2], memory, nswap, rnswap, totalswap, freeswap, usedswap;
-+ size_t len;
-+#ifdef UVM
-+ struct uvmexp uvmexp;
-+#endif
-+
-+ /* memory */
-+ mib[0] = CTL_HW;
-+ mib[1] = HW_PHYSMEM;
-+ len = sizeof(memory);
-+ if( sysctl(mib,2,&memory,&len,NULL,0)< 0 )
-+ totalMem->setText(klocale->translate("Problem in determining"));
-+ else
-+ totalMem->setText(format(memory));
-+
-+#ifdef UVM
-+ mib[0] = CTL_VM;
-+ mib[1] = VM_UVMEXP;
-+ len = sizeof(uvmexp);
-+ if ( sysctl(mib, 2, &uvmexp, &len, NULL, 0) < 0 )
-+ {
-+ freeMem->setText(klocale->translate("Problem in determining"));
-+ activeMem->setText(klocale->translate("Problem in determining"));
-+ inactiveMem->setText(klocale->translate("Problem in determining"));
-+ swapMem->setText(klocale->translate("Problem in determining"));
-+ freeSwapMem->setText(klocale->translate("Problem in determining"));
-+ }
-+ else
-+ {
-+ freeMem->setText(format((long)uvmexp.free * uvmexp.pagesize));
-+ activeMem->setText(format((long)uvmexp.active * uvmexp.pagesize));
-+ inactiveMem->setText(format((long)uvmexp.inactive * uvmexp.pagesize));
-+ swapMem->setText(format((long)uvmexp.swpages * uvmexp.pagesize));
-+ freeSwapMem->setText(format((long)(uvmexp.swpages - uvmexp.swpginuse) *
-+ uvmexp.pagesize));
-+ }
-+#else
-+ freeMem->setText(klocale->translate("Not calculated"));
-+ activeMem->setText(klocale->translate("Not calculated"));
-+ inactiveMem->setText(klocale->translate("Not calculated"));
-+
-+ /* swap */
-+ totalswap = freeswap = usedswap = 0;
-+ nswap = swapctl(SWAP_NSWAP,0,0);
-+ if ( nswap > 0 )
-+ {
-+ if ( (swaplist = (struct swapent *)malloc(nswap * sizeof(*swaplist))) )
-+ {
-+ rnswap = swapctl(SWAP_STATS,swaplist,nswap);
-+ if ( rnswap < 0 || rnswap > nswap )
-+ totalswap = freeswap = -1; /* Error */
-+ else
-+ {
-+ while ( rnswap-- > 0 )
-+ {
-+ totalswap += swaplist[rnswap].se_nblks;
-+ usedswap += swaplist[rnswap].se_inuse;
-+ }
-+ freeswap = totalswap - usedswap;
-+ }
-+ }
-+ else
-+ totalswap = freeswap = -1; /* Error */
-+ if ( totalswap == -1 )
-+ {
-+ swapMem->setText(klocale->translate("Problem in determining"));
-+ freeSwapMem->setText(klocale->translate("Problem in determining"));
-+ }
-+ else
-+ { /* Cast to long for LP64 hosts */
-+ swapMem->setText(format(dbtob((long)totalswap)));
-+ freeSwapMem->setText(format(dbtob((long)freeswap)));
-+ }
-+ }
-+#endif
-+}