summaryrefslogtreecommitdiff
path: root/sysutils/wmcpuload/patches/patch-ac
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-03-09 09:55:45 +0000
committerjmmv <jmmv@pkgsrc.org>2003-03-09 09:55:45 +0000
commit4657d2a9a561059787735c31913eafa1b23869d0 (patch)
treec352495ca0fb3b9129fe1e91e1fd395826f25a16 /sysutils/wmcpuload/patches/patch-ac
parente07e1857069bd56b6906e8e4b36dc68d9568f7f7 (diff)
downloadpkgsrc-4657d2a9a561059787735c31913eafa1b23869d0.tar.gz
Update to 1.0.1. Changes since 0.9.0:
* src/cpu_freebsd.c: changed to use <sys/resource.h> instead of <sys/dkstat.h> in the case of __FreeBSD_version >= 500101. (Thanks to Philip Paeps <philip at paeps.cx) * doc/wmcpuload.1: updated * cpu_darwin.c: added (Landon Fuller <landonblue at mac.com>) * main.c: changed description for `--cpu' oprion to be more clear. * README: updated * cpu_irix.c: added for IRIX (Jonathan C. Patschke <jp at celestrion.net>) * version 1.0.0 released * code cleanup/review * dockapp.c: renamed dockapp_getcolor() to dockapp_getcolor_pixel(). * dockapp.c: added get_closest_color_pixel() to find closest color in Pseudo visual class. * src/Makefile.am: added missing @DFLAGS@ * cpu_bsdi.c: added (Nicolas Belan <belan at matranet.com>) * dockapp.c, dockapp.h: moved to libdockapp/dockapp.[ch] * libdockapp/{COPYING,AUTHORS}: added (taken from libdockapp-0.4.0) * configure.ac: removed '-L/usr/local/lib' '-I/usr/local/include' from *_search_path (Thanks to Thomas Runge <coto at core.de>) * README: added 'for GNOME users' section * cpu_cywin.c: rewrote to separate cpu_get_usage(). ( ==> cpu_get_usage_9x(), cpu_get_usage_NT()) * dockapp.c: removed background panel from windowed mode. * dockapp.c: added '-wp, --windowed-withpanel' option. * main.c: added '-t, --title' option to specify title name (Thanks to Ryan Lovett <ryan at ocf.berkeley.edu>) * wmcpuload.1: updated * cpu_netbsd.c: added 'CP_INTR' parameter * added NetBSD support (Thomas Runge <coto at core.de>) Closes PR pkg/20631 by Thomas Runge (the maintainer).
Diffstat (limited to 'sysutils/wmcpuload/patches/patch-ac')
-rw-r--r--sysutils/wmcpuload/patches/patch-ac67
1 files changed, 0 insertions, 67 deletions
diff --git a/sysutils/wmcpuload/patches/patch-ac b/sysutils/wmcpuload/patches/patch-ac
deleted file mode 100644
index f018cbfb0ab..00000000000
--- a/sysutils/wmcpuload/patches/patch-ac
+++ /dev/null
@@ -1,67 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2002/03/24 18:04:57 wiz Exp $
-
---- src/cpu_netbsd.c.orig Sun Mar 24 18:18:37 2002
-+++ src/cpu_netbsd.c
-@@ -0,0 +1,62 @@
-+/*
-+ * cpu_netbsd - module to get cpu usage, for NetBSD
-+ *
-+ * Copyright (C) 2001, 2002 Seiichi SATO <ssato@sh.rim.or.jp>
-+ *
-+ * Licensed under the GPL
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <stdio.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include "cpu.h"
-+
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/sched.h>
-+
-+void cpu_init(void)
-+{
-+ /* You don't need initialization under NetBSD */
-+ return;
-+}
-+
-+/* Returns the current CPU usage in percent */
-+int cpu_get_usage(struct cpu_options *opts)
-+{
-+ int total, used, result;
-+ static int pre_total, pre_used;
-+
-+ int mib[] = { CTL_KERN, KERN_CP_TIME };
-+ u_int64_t cpu_time[CPUSTATES];
-+ size_t size = sizeof(cpu_time);
-+
-+ /* get cpu time*/
-+ if (sysctl(mib, 2, &cpu_time, &size, NULL, 0) < 0)
-+ return 0;
-+
-+ /* calc usage */
-+ used = cpu_time[CP_USER] + cpu_time[CP_SYS];
-+ if (!opts->ignore_nice)
-+ used += cpu_time[CP_NICE];
-+ total = used + cpu_time[CP_IDLE];
-+
-+ if (pre_total == 0)
-+ result = 0;
-+ else if ((total - pre_total) > 0)
-+ result = 100 * (double)(used - pre_used) / (double)(total - pre_total);
-+ else
-+ result = 0;
-+
-+ /* save used/total for next calculation */
-+ pre_used = used;
-+ pre_total = total;
-+
-+ return result;
-+}