|
|
@@ -1,8 +1,91 @@
|
|
|
---- src/aapm.cc.orig Sat Jan 4 01:25:45 2003
|
|
|
-+++ src/aapm.cc Mon Jan 6 19:00:50 2003
|
|
|
-@@ -26,6 +26,13 @@
|
|
|
- #include <string.h>
|
|
|
+Index: configure
|
|
|
+diff -Nau configure.orig configure
|
|
|
+--- configure.orig 2004-05-23 08:18:27 +0200
|
|
|
+--- configure 2004-06-14 17:43:11 +0200
|
|
|
+@@ -2316,6 +2316,9 @@
|
|
|
+
|
|
|
+ echo "$as_me:$LINENO: checking whether the C compiler ($CC) understands C++" >&5
|
|
|
+ echo $ECHO_N "checking whether the C compiler ($CC) understands C++... $ECHO_C" >&6
|
|
|
++if test "${ice_prog_gxx+set}" = set; then
|
|
|
++ echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
|
++else
|
|
|
+ cat > conftest.C <<EOF
|
|
|
+ #ifdef __cplusplus
|
|
|
+ int main() {return 0;}
|
|
|
+@@ -2336,6 +2339,7 @@
|
|
|
+ fi
|
|
|
+ echo "$as_me:$LINENO: result: $ice_prog_gxx" >&5
|
|
|
+ echo "${ECHO_T}$ice_prog_gxx" >&6
|
|
|
++fi
|
|
|
+
|
|
|
+ ac_ext=cc
|
|
|
+ ac_cpp='$CXXCPP $CPPFLAGS'
|
|
|
+Index: configure.in
|
|
|
+diff -Nau configure.in.orig configure.in
|
|
|
+--- configure.in.orig 2004-05-23 08:18:18 +0200
|
|
|
+--- configure.in 2004-06-14 17:43:11 +0200
|
|
|
+@@ -21,54 +21,9 @@
|
|
|
+
|
|
|
+ dnl ---------- Checking for a C compiler in hope that it understands C++ too ---
|
|
|
+ dnl
|
|
|
+-ICE_PROG_CXX_LIGHT
|
|
|
+ AC_LANG_CPLUSPLUS
|
|
|
+ AC_PROG_CXX
|
|
|
+
|
|
|
+-dnl ----------- If both CC and CXX are GNU compilers, it is better to use CC ---
|
|
|
+-dnl ---- for linking.
|
|
|
+-if test x"$ac_cv_prog_gxx" = x; then
|
|
|
+- AC_PROG_CC
|
|
|
+- if test x"$ac_cv_prog_gcc" = x; then
|
|
|
+- CXX_LINK=${CC}
|
|
|
+- fi
|
|
|
+-fi
|
|
|
+-
|
|
|
+-dnl ---------- Also check how to turn off RTTI and exception handling ---
|
|
|
+-
|
|
|
+-dnl --- SunONE C++ supports no-rtti flag only in compat=4 mode
|
|
|
+-if test -z "`${CXX} -V 2>&1 | grep Sun`"; then
|
|
|
+- ICE_CXX_FLAG_ACCEPT(no_rtti, -fno-rtti)
|
|
|
+-fi
|
|
|
+-dnl --- Intel C++ supports -fno-rtti, but doens't support -fno-*-exceptions
|
|
|
+-if test $(basename $CXX) != "icc"; then
|
|
|
+- if test -n "`${CXX} -V 2>&1 | grep Sun`"; then
|
|
|
+- dnl --- Sun ONE C++ syntax for "no exceptions"
|
|
|
+- ICE_CXX_FLAG_ACCEPT(no_exceptions, -features=no%except)
|
|
|
+- else
|
|
|
+- if test $(basename $CXX) = "g++" ||
|
|
|
+- test $(basename $CXX) = "gcc"; then
|
|
|
+- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-exceptions)
|
|
|
+- if test x"$no_exceptions_ok" = xno; then
|
|
|
+- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-handle-exceptions)
|
|
|
+- fi
|
|
|
+- fi
|
|
|
+- fi
|
|
|
+-fi
|
|
|
+-
|
|
|
+-if test $(basename $CXX) = "g++" ||
|
|
|
+- test $(basename $CXX) = "gcc" ; then
|
|
|
+- ICE_CXX_FLAG_ACCEPT(warn_xxx, -Wall -Wpointer-arith -Wconversion -Wwrite-strings -Winline -Woverloaded-virtual -W)
|
|
|
+- ICE_CXX_FLAG_ACCEPT(permissive, -fpermissive)
|
|
|
+-else
|
|
|
+- dnl --- Sun ONE doesn't support GCC -W* and -fpermissive
|
|
|
+- dnl --- Intel C++ doesn't supports lots of GCC -W* and -fpermissive
|
|
|
+- if test $(basename $CXX) = "icc"; then
|
|
|
+- dnl --- Using -w0 to avoid noisy "remark" messages
|
|
|
+- ICE_CXX_FLAG_ACCEPT(warn_xxx, -w0)
|
|
|
+- fi
|
|
|
+-fi
|
|
|
+-
|
|
|
+ if test x"$CXX_LINK" = x; then
|
|
|
+ CXX_LINK=$CXX
|
|
|
+ fi
|
|
|
+Index: src/aapm.cc
|
|
|
+diff -Nau src/aapm.cc.orig src/aapm.cc
|
|
|
+--- src/aapm.cc.orig 2004-05-23 08:18:19 +0200
|
|
|
+--- src/aapm.cc 2004-06-14 17:43:11 +0200
|
|
|
+@@ -27,6 +27,13 @@
|
|
|
#include <stdio.h>
|
|
|
+ #include <dirent.h>
|
|
|
|
|
|
+#ifdef __FreeBSD__
|
|
|
+#include <sys/file.h>
|
|
|
@@ -13,8 +96,8 @@
|
|
|
+
|
|
|
YColor *YApm::apmBg = 0;
|
|
|
YColor *YApm::apmFg = 0;
|
|
|
- YFont *YApm::apmFont = 0;
|
|
|
-@@ -47,8 +54,12 @@
|
|
|
+ ref<YFont> YApm::apmFont;
|
|
|
+@@ -48,8 +55,12 @@
|
|
|
|
|
|
|
|
|
void ApmStr(char *s, bool Tool) {
|
|
|
@@ -28,7 +111,7 @@
|
|
|
char driver[16];
|
|
|
char apmver[16];
|
|
|
int apmflags;
|
|
|
-@@ -60,9 +71,27 @@
|
|
|
+@@ -61,9 +72,31 @@
|
|
|
char units[16];
|
|
|
|
|
|
if (fd == -1) {
|
|
|
@@ -38,7 +121,6 @@
|
|
|
+ error = 1;
|
|
|
return ;
|
|
|
}
|
|
|
--
|
|
|
+#ifdef __FreeBSD__
|
|
|
+ if (ioctl(fd,APMIO_GETINFO, &ai) == -1)
|
|
|
+ {
|
|
|
@@ -50,14 +132,18 @@
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ close(fd);
|
|
|
-+ BATlife = ai.ai_batt_life;
|
|
|
-+ ACstatus = ai.ai_acline ;
|
|
|
+
|
|
|
++ sprintf(apmver, "%u.%u", ai.ai_major, ai.ai_minor);
|
|
|
++ ACstatus = ai.ai_acline;
|
|
|
+ BATflag = ai.ai_batt_stat == 3 ? 8 : 0;
|
|
|
++ BATlife = ai.ai_batt_life;
|
|
|
++ BATtime = ai.ai_batt_time == 0 ? -1 : ai.ai_batt_time;
|
|
|
++ strcpy(units, "sec");
|
|
|
+#else
|
|
|
len = read(fd, buf, sizeof(buf) - 1);
|
|
|
close(fd);
|
|
|
|
|
|
-@@ -76,10 +105,11 @@
|
|
|
+@@ -77,10 +110,11 @@
|
|
|
static int error = 1;
|
|
|
if (error) {
|
|
|
error = 0;
|
|
|
@@ -70,17 +156,74 @@
|
|
|
if (BATlife == -1)
|
|
|
BATlife = 0;
|
|
|
|
|
|
---- src/apppstatus.cc.orig Sat Mar 17 00:17:37 2001
|
|
|
-+++ src/apppstatus.cc Thu Apr 5 22:45:29 2001
|
|
|
-@@ -270,6 +270,7 @@
|
|
|
- return isUpIsdn();
|
|
|
+Index: src/aapm.h
|
|
|
+diff -Nau src/aapm.h.orig src/aapm.h
|
|
|
+--- src/aapm.h.orig 2004-05-23 08:18:19 +0200
|
|
|
+--- src/aapm.h 2004-06-14 17:43:11 +0200
|
|
|
+@@ -1,7 +1,5 @@
|
|
|
+
|
|
|
+-#ifndef linux
|
|
|
+-#undef CONFIG_APPLET_APM
|
|
|
+-#elif CONFIG_APPLET_APM
|
|
|
++#if (defined(linux) || defined (__FreeBSD__)) && defined(i386)
|
|
|
+
|
|
|
+ #include "ywindow.h"
|
|
|
+ #include "ytimer.h"
|
|
|
+@@ -62,4 +60,6 @@
|
|
|
+ char *acpiACName;
|
|
|
+
|
|
|
+ };
|
|
|
++#else
|
|
|
++#undef CONFIG_APPLET_APM
|
|
|
+ #endif
|
|
|
+Index: src/acpustatus.h
|
|
|
+diff -Nau src/acpustatus.h.orig src/acpustatus.h
|
|
|
+--- src/acpustatus.h.orig 2004-05-23 08:18:19 +0200
|
|
|
+--- src/acpustatus.h 2004-06-14 17:43:03 +0200
|
|
|
+@@ -1,7 +1,7 @@
|
|
|
+ #ifndef __CPUSTATUS_H
|
|
|
+ #define __CPUSTATUS_H
|
|
|
+
|
|
|
+-#if defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)
|
|
|
++#if (defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)) || defined (__FreeBSD__)
|
|
|
+
|
|
|
+ #define IWM_USER (0)
|
|
|
+ #define IWM_NICE (1)
|
|
|
+@@ -14,6 +14,10 @@
|
|
|
+
|
|
|
+ #include "ywindow.h"
|
|
|
+ #include "ytimer.h"
|
|
|
++#ifdef __FreeBSD__
|
|
|
++#include <kvm.h>
|
|
|
++#include <nlist.h>
|
|
|
++#endif
|
|
|
+
|
|
|
+ class CPUStatus: public YWindow, public YTimerListener {
|
|
|
+ public:
|
|
|
+@@ -35,6 +39,10 @@
|
|
|
+ unsigned long last_cpu[IWM_STATES];
|
|
|
+ YColor *color[IWM_STATES];
|
|
|
+ YTimer *fUpdateTimer;
|
|
|
++#ifdef __FreeBSD__
|
|
|
++ struct nlist namelist[2];
|
|
|
++ kvm_t *kd;
|
|
|
++#endif
|
|
|
+ };
|
|
|
+ #else
|
|
|
+ #undef CONFIG_APPLET_CPU_STATUS
|
|
|
+Index: src/acpustatus.cc
|
|
|
+diff -Nau src/apppstatus.cc.orig src/apppstatus.cc
|
|
|
+--- src/apppstatus.cc.orig 2004-05-23 08:18:19 +0200
|
|
|
+--- src/apppstatus.cc 2004-06-14 17:43:03 +0200
|
|
|
+@@ -358,6 +358,7 @@
|
|
|
+ return isUpIsdn();
|
|
|
#endif
|
|
|
|
|
|
+#ifndef __FreeBSD__
|
|
|
char buffer[32 * sizeof(struct ifreq)];
|
|
|
struct ifconf ifc;
|
|
|
struct ifreq *ifr;
|
|
|
-@@ -301,6 +302,38 @@
|
|
|
+@@ -389,6 +390,38 @@
|
|
|
}
|
|
|
|
|
|
close(s);
|
|
|
@@ -117,282 +260,23 @@
|
|
|
+ }
|
|
|
+#endif // __FreeBSD__
|
|
|
return false;
|
|
|
- #endif // if 0
|
|
|
}
|
|
|
---- src/sysdep.h.orig Tue Oct 9 23:54:03 2001
|
|
|
-+++ src/sysdep.h Wed Feb 20 15:22:43 2002
|
|
|
-@@ -57,7 +57,9 @@
|
|
|
-
|
|
|
- #ifdef CONFIG_I18N
|
|
|
- #include <locale.h>
|
|
|
-+#if __FreeBSD__ >= 5
|
|
|
- #include <langinfo.h>
|
|
|
-+#endif
|
|
|
- #endif
|
|
|
-
|
|
|
- #endif
|
|
|
---- src/acpustatus.cc.orig Sun Mar 9 04:37:52 2003
|
|
|
-+++ src/acpustatus.cc Thu Apr 24 05:09:50 2003
|
|
|
-@@ -26,7 +26,16 @@
|
|
|
|
|
|
- #include "intl.h"
|
|
|
-
|
|
|
--#if (defined(linux) || defined(HAVE_KSTAT_H))
|
|
|
-+#if (defined(linux) || defined(HAVE_KSTAT_H) || defined(__FreeBSD__))
|
|
|
-+
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+#include <fcntl.h>
|
|
|
-+#include <kvm.h>
|
|
|
-+#include <nlist.h>
|
|
|
-+#include <sys/dkstat.h>
|
|
|
-+#include <sys/resource.h>
|
|
|
-+#include <devstat.h>
|
|
|
-+#endif
|
|
|
-
|
|
|
- #define UPDATE_INTERVAL 500
|
|
|
-
|
|
|
-@@ -49,13 +58,42 @@
|
|
|
- color[IWM_SYS] = new YColor(clrCpuSys);
|
|
|
- color[IWM_IDLE] = *clrCpuIdle
|
|
|
- ? new YColor(clrCpuIdle) : NULL;
|
|
|
--
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ color[IWM_INTR] = new YColor(clrCpuIntr);
|
|
|
-+ for (unsigned int i = 0; i < taskBarCPUSamples; i++) {
|
|
|
-+ cpu[i][IWM_USER] = cpu[i][IWM_NICE] =
|
|
|
-+ cpu[i][IWM_SYS] = cpu[i][IWM_INTR] = 0;
|
|
|
-+ cpu[i][IWM_IDLE] = 1;
|
|
|
-+ }
|
|
|
-+ setSize(taskBarCPUSamples, 20);
|
|
|
-+ last_cpu[IWM_USER] = last_cpu[IWM_NICE] = last_cpu[IWM_SYS] =
|
|
|
-+ last_cpu[IWM_IDLE] = last_cpu[IWM_INTR] = 0;
|
|
|
-+ if( setegid( 2 ) == 0 ) {
|
|
|
-+ char errbuf[_POSIX2_LINE_MAX];
|
|
|
-+ kd = kvm_openfiles( NULL, NULL, NULL, O_RDONLY, errbuf );
|
|
|
-+ setegid( getgid() );
|
|
|
-+ if( kd == NULL )
|
|
|
-+ fprintf( stderr, "kvm_openfiles: %s\n", errbuf );
|
|
|
-+ else {
|
|
|
-+ memset( namelist, 0, sizeof(namelist) );
|
|
|
-+ namelist[0].n_name = (char*)("_cp_time");
|
|
|
-+ if( kvm_nlist( kd, namelist ) != 0 ) {
|
|
|
-+ kvm_close( kd );
|
|
|
-+ kd = NULL;
|
|
|
-+ }
|
|
|
-+ }
|
|
|
-+ } else {
|
|
|
-+ fprintf( stderr, "can't setegid(2), I'm not a setgid exec ?\n" );
|
|
|
-+ kd = NULL;
|
|
|
-+ }
|
|
|
-+#else
|
|
|
- for (int i(0); i < taskBarCPUSamples; i++) {
|
|
|
- cpu[i][IWM_USER] = cpu[i][IWM_NICE] = cpu[i][IWM_SYS] = 0;
|
|
|
- cpu[i][IWM_IDLE] = 1;
|
|
|
+@@ -437,8 +470,7 @@
|
|
|
}
|
|
|
- setSize(taskBarCPUSamples, 20);
|
|
|
- last_cpu[IWM_USER] = last_cpu[IWM_NICE] = last_cpu[IWM_SYS] = last_cpu[IWM_IDLE] = 0;
|
|
|
-+#endif
|
|
|
- getStatus();
|
|
|
- updateStatus();
|
|
|
- updateToolTip();
|
|
|
-@@ -70,6 +108,13 @@
|
|
|
- delete color[IWM_NICE]; color[IWM_NICE] = 0;
|
|
|
- delete color[IWM_SYS]; color[IWM_SYS] = 0;
|
|
|
- delete color[IWM_IDLE]; color[IWM_IDLE] = 0;
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ delete color[IWM_INTR]; color[IWM_INTR] = 0;
|
|
|
-+ if( kd != NULL ) {
|
|
|
-+ kvm_close( kd );
|
|
|
-+ kd = NULL;
|
|
|
-+ }
|
|
|
-+#endif
|
|
|
- }
|
|
|
-
|
|
|
- void CPUStatus::paint(Graphics &g, const YRect &/*r*/) {
|
|
|
-@@ -80,13 +125,34 @@
|
|
|
- int nice = cpu[i][IWM_NICE];
|
|
|
- int sys = cpu[i][IWM_SYS];
|
|
|
- int idle = cpu[i][IWM_IDLE];
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ int intr = cpu[i][IWM_INTR];
|
|
|
-+ int total = user + sys + intr + nice + idle;
|
|
|
-+ int totald = total;
|
|
|
-+#else
|
|
|
- int total = user + sys + nice + idle;
|
|
|
-+#endif
|
|
|
|
|
|
- int y = height() - 1;
|
|
|
-
|
|
|
- if (total > 0) {
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ if (intr) {
|
|
|
-+ totald -= intr;
|
|
|
-+ n = (h * totald) / total; // check rounding
|
|
|
-+ if (n >= y) n = y;
|
|
|
-+ g.setColor(color[IWM_INTR]);
|
|
|
-+ g.drawLine(i, y, i, n);
|
|
|
-+ y = n - 1;
|
|
|
-+ }
|
|
|
-+#endif
|
|
|
- if (sys) {
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ totald -= nice;
|
|
|
-+ n = (h * totald)/ total;
|
|
|
-+#else
|
|
|
- n = (h * (total - sys)) / total; // check rounding
|
|
|
-+#endif
|
|
|
- if (n >= y) n = y;
|
|
|
- g.setColor(color[IWM_SYS]);
|
|
|
- g.drawLine(i, y, i, n);
|
|
|
-@@ -102,7 +168,12 @@
|
|
|
- }
|
|
|
-
|
|
|
- if (user) {
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ totald -= user;
|
|
|
-+ n = (h * totald)/ total;
|
|
|
-+#else
|
|
|
- n = (h * (total - sys - nice - user))/ total;
|
|
|
-+#endif
|
|
|
- if (n >= y) n = y;
|
|
|
- g.setColor(color[IWM_USER]);
|
|
|
- g.drawLine(i, y, i, n);
|
|
|
-@@ -152,6 +223,14 @@
|
|
|
- sprintf(load, _("CPU Load: %3.2f %3.2f %3.2f, %d processes."),
|
|
|
- l1, l5, l15, sys.procs);
|
|
|
- setToolTip(load);
|
|
|
-+#elif defined(__FreeBSD__)
|
|
|
-+ char load[31]; // enough for "CPU Load: 999.99 999.99 999.99\0"
|
|
|
-+ double loadavg[3];
|
|
|
-+ if( kd != NULL && kvm_getloadavg( kd, loadavg, 3 ) != 3 )
|
|
|
-+ return;
|
|
|
-+ snprintf(load, sizeof(load), "CPU Load: %3.2f %3.2f %3.2f",
|
|
|
-+ loadavg[0], loadavg[1], loadavg[2]);
|
|
|
-+ setToolTip(load);
|
|
|
- #endif
|
|
|
- }
|
|
|
-
|
|
|
-@@ -169,13 +248,43 @@
|
|
|
- cpu[i - 1][IWM_NICE] = cpu[i][IWM_NICE];
|
|
|
- cpu[i - 1][IWM_SYS] = cpu[i][IWM_SYS];
|
|
|
- cpu[i - 1][IWM_IDLE] = cpu[i][IWM_IDLE];
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ cpu[i - 1][IWM_INTR] = cpu[i][IWM_INTR];
|
|
|
-+#endif
|
|
|
- }
|
|
|
- getStatus(),
|
|
|
- repaint();
|
|
|
- }
|
|
|
-
|
|
|
- void CPUStatus::getStatus() {
|
|
|
--#ifdef linux
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+
|
|
|
-+ cpu[taskBarCPUSamples-1][IWM_USER] = 0;
|
|
|
-+ cpu[taskBarCPUSamples-1][IWM_NICE] = 0;
|
|
|
-+ cpu[taskBarCPUSamples-1][IWM_SYS] = 0;
|
|
|
-+ cpu[taskBarCPUSamples-1][IWM_INTR] = 0;
|
|
|
-+ cpu[taskBarCPUSamples-1][IWM_IDLE] = 0;
|
|
|
-+
|
|
|
-+ if( kd == NULL ) return;
|
|
|
-+
|
|
|
-+ long cp_time[CPUSTATES];
|
|
|
-+ int c = sizeof( cp_time );
|
|
|
-+ if (kvm_read(kd, namelist[0].n_value, &cp_time, c) != c)
|
|
|
-+ return;
|
|
|
-+
|
|
|
-+ long cur[IWM_STATES];
|
|
|
-+ cur[IWM_USER] = cp_time[CP_USER];
|
|
|
-+ cur[IWM_NICE] = cp_time[CP_NICE];
|
|
|
-+ cur[IWM_SYS] = cp_time[CP_SYS];
|
|
|
-+ cur[IWM_INTR] = cp_time[CP_INTR];
|
|
|
-+ cur[IWM_IDLE] = cp_time[CP_IDLE];
|
|
|
-+
|
|
|
-+ for (int i = 0; i < IWM_STATES; i++) {
|
|
|
-+ cpu[taskBarCPUSamples-1][i] = cur[i] - last_cpu[i];
|
|
|
-+ last_cpu[i] = cur[i];
|
|
|
-+ }
|
|
|
-+
|
|
|
-+#elif defined(linux)
|
|
|
- char *p, buf[128];
|
|
|
- long cur[IWM_STATES];
|
|
|
- int len, fd = open("/proc/stat", O_RDONLY);
|
|
|
-@@ -209,8 +318,8 @@
|
|
|
- cpu[taskBarCPUSamples-1][IWM_USER], cpu[taskBarCPUSamples-1][IWM_NICE],
|
|
|
- cpu[taskBarCPUSamples-1][IWM_SYS], cpu[taskBarCPUSamples-1][IDLE]);
|
|
|
- #endif
|
|
|
--#endif /* linux */
|
|
|
--#ifdef HAVE_KSTAT_H
|
|
|
-+
|
|
|
-+#elif defined(HAVE_KSTAT_H)
|
|
|
- #ifdef HAVE_OLD_KSTAT
|
|
|
- #define ui32 ul
|
|
|
#endif
|
|
|
---- src/acpustatus.h.orig Sun Mar 9 04:37:52 2003
|
|
|
-+++ src/acpustatus.h Sun Apr 13 12:02:47 2003
|
|
|
-@@ -1,19 +1,29 @@
|
|
|
- #ifndef __CPUSTATUS_H
|
|
|
- #define __CPUSTATUS_H
|
|
|
-
|
|
|
--#if defined(linux) || defined(HAVE_KSTAT_H)
|
|
|
-+#if (defined(linux) || defined(HAVE_KSTAT_H)) || defined (__FreeBSD__)
|
|
|
-
|
|
|
- #ifdef HAVE_KSTAT_H
|
|
|
- #include <kstat.h>
|
|
|
- #include <sys/sysinfo.h>
|
|
|
- #endif /* have_kstat_h */
|
|
|
+-
|
|
|
+- cur_ibytes = 0;
|
|
|
++cur_ibytes = 0;
|
|
|
+ cur_obytes = 0;
|
|
|
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+#include <kvm.h>
|
|
|
-+#include <nlist.h>
|
|
|
-+#endif
|
|
|
|
|
|
- #define IWM_USER (0)
|
|
|
- #define IWM_NICE (1)
|
|
|
- #define IWM_SYS (2)
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+#define IWM_INTR (3)
|
|
|
-+#define IWM_IDLE (4)
|
|
|
-+#define IWM_STATES (5)
|
|
|
-+#else
|
|
|
- #define IWM_IDLE (3)
|
|
|
- #define IWM_STATES (4)
|
|
|
-+#endif
|
|
|
-
|
|
|
- #include "ywindow.h"
|
|
|
- #include "ytimer.h"
|
|
|
-@@ -38,6 +48,10 @@
|
|
|
- long last_cpu[IWM_STATES];
|
|
|
- YColor *color[IWM_STATES];
|
|
|
- YTimer *fUpdateTimer;
|
|
|
-+#ifdef __FreeBSD__
|
|
|
-+ struct nlist namelist[2];
|
|
|
-+ kvm_t *kd;
|
|
|
-+#endif
|
|
|
- };
|
|
|
- #else
|
|
|
- #undef CONFIG_APPLET_CPU_STATUS
|
|
|
---- src/default.h.orig Thu May 16 14:00:02 2002
|
|
|
-+++ src/default.h Tue May 28 04:44:02 2002
|
|
|
-@@ -455,6 +455,7 @@
|
|
|
- XSV(const char *, clrLabelText, "rgb:00/00/00")
|
|
|
- XSV(const char *, clrCpuUser, "rgb:00/FF/00")
|
|
|
- XSV(const char *, clrCpuSys, "rgb:FF/00/00")
|
|
|
-+XSV(const char *, clrCpuIntr, "rgb:FF/FF/00")
|
|
|
- XSV(const char *, clrCpuNice, "rgb:00/00/FF")
|
|
|
- XSV(const char *, clrCpuIdle, "rgb:00/00/00")
|
|
|
- XSV(const char *, clrNetSend, "rgb:FF/FF/00")
|
|
|
-@@ -837,6 +838,7 @@
|
|
|
- #ifdef CONFIG_APPLET_CPU_STATUS
|
|
|
- OSV("ColorCPUStatusUser", &clrCpuUser, "User load on the CPU monitor"),
|
|
|
- OSV("ColorCPUStatusSystem", &clrCpuSys, "System load on the CPU monitor"),
|
|
|
-+ OSV("ColorCPUStatusInterrupts", &clrCpuIntr, "Interrupts on the CPU monitor"),
|
|
|
- OSV("ColorCPUStatusNice", &clrCpuNice, "Nice load on the CPU monitor"),
|
|
|
- OSV("ColorCPUStatusIdle", &clrCpuIdle, "Idle (non) load on the CPU monitor, leave empty to force transparency"),
|
|
|
- #endif
|
|
|
---- src/wmapp.cc.orig Sun Mar 9 04:37:52 2003
|
|
|
-+++ src/wmapp.cc Sun Apr 13 00:09:19 2003
|
|
|
-@@ -1503,6 +1503,9 @@
|
|
|
+Index: src/wmapp.cc
|
|
|
+diff -Nau src/wmapp.cc.orig src/wmapp.cc
|
|
|
+--- src/wmapp.cc.orig 2004-05-23 08:18:19 +0200
|
|
|
+--- src/wmapp.cc 2004-06-14 17:43:11 +0200
|
|
|
+@@ -1450,6 +1450,9 @@
|
|
|
#endif
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
@@ -401,10 +285,12 @@
|
|
|
+#endif
|
|
|
YLocale locale;
|
|
|
|
|
|
- #ifndef NO_CONFIGURE
|
|
|
---- src/wmclient.h.orig Tue Mar 26 14:29:05 2002
|
|
|
-+++ src/wmclient.h Tue Mar 26 14:29:13 2002
|
|
|
-@@ -5,6 +5,8 @@
|
|
|
+ for (char ** arg = argv + 1; arg < argv + argc; ++arg) {
|
|
|
+Index: src/wmclient.h
|
|
|
+diff -Nau src/wmclient.h.orig src/wmclient.h
|
|
|
+--- src/wmclient.h.orig 2004-05-23 08:18:19 +0200
|
|
|
+--- src/wmclient.h 2004-06-14 17:43:11 +0200
|
|
|
+@@ -6,6 +6,8 @@
|
|
|
#include "ymenu.h"
|
|
|
#include "MwmUtil.h"
|
|
|
|
|
|
@@ -412,14 +298,18 @@
|
|
|
+
|
|
|
class YFrameWindow;
|
|
|
class WindowListItem;
|
|
|
+ class YIcon;
|
|
|
+Index: src/ylocale.cc
|
|
|
+diff -Nau src/ylocale.cc.orig src/ylocale.cc
|
|
|
+--- src/ylocale.cc.orig 2004-05-23 08:18:19 +0200
|
|
|
+--- src/ylocale.cc 2004-06-14 17:43:11 +0200
|
|
|
+@@ -149,7 +149,8 @@
|
|
|
+ return NULL;
|
|
|
|
|
|
---- src/icetray.cc.orig 2003-09-30 16:18:18.000000000 +0200
|
|
|
-+++ src/icetray.cc 2003-09-30 16:19:00.000000000 +0200
|
|
|
-@@ -6,6 +6,7 @@
|
|
|
- #include "base.h"
|
|
|
- #include "debug.h"
|
|
|
-
|
|
|
-+#include <stdio.h>
|
|
|
- #include <stdlib.h>
|
|
|
- #include <string.h>
|
|
|
+ YUChar * uStr(new YUChar[lLen + 1]);
|
|
|
+- char * inbuf((char *) lStr), * outbuf((char *) uStr);
|
|
|
++ const char * inbuf((char *) lStr);
|
|
|
++ char * outbuf((char *) uStr);
|
|
|
+ size_t inlen(lLen), outlen(4 * lLen);
|
|
|
|
|
|
+ if (0 > (int) iconv(instance->toUnicode, &inbuf, &inlen, &outbuf, &outlen))
|