diff options
-rw-r--r-- | x11/gnome-core/files/patch-sum | 4 | ||||
-rw-r--r-- | x11/gnome-core/patches/patch-ag | 64 |
2 files changed, 18 insertions, 50 deletions
diff --git a/x11/gnome-core/files/patch-sum b/x11/gnome-core/files/patch-sum index 6140317a6da..6d071abb05e 100644 --- a/x11/gnome-core/files/patch-sum +++ b/x11/gnome-core/files/patch-sum @@ -1,9 +1,9 @@ -$NetBSD: patch-sum,v 1.10 1999/11/07 20:52:07 tron Exp $ +$NetBSD: patch-sum,v 1.11 1999/11/14 19:00:01 tron Exp $ MD5 (patch-aa) = bbfda5e5e72f45c645356340cbec72a0 MD5 (patch-ab) = da663b71d7c71c707258fa57ed9af4a9 MD5 (patch-ac) = 4aab1f4ff482e45020ba26ef0a969cdd MD5 (patch-af) = a18ee68f6e295f5b4607f7b3fb6f3032 -MD5 (patch-ag) = 0ddce7d7bfbf857eab8ce9653c5b8863 +MD5 (patch-ag) = ba94f4a23817dd700fb47da5d802174b MD5 (patch-ah) = 5cce80b3eabd1a604cfebe3e9b5cc256 MD5 (patch-ai) = d5def5f3e883160814f0a3d7d901b1f4 diff --git a/x11/gnome-core/patches/patch-ag b/x11/gnome-core/patches/patch-ag index 2224271baff..34ecfa14426 100644 --- a/x11/gnome-core/patches/patch-ag +++ b/x11/gnome-core/patches/patch-ag @@ -1,50 +1,18 @@ -$NetBSD: patch-ag,v 1.3 1999/08/15 14:58:59 tron Exp $ +$NetBSD: patch-ag,v 1.4 1999/11/14 19:00:01 tron Exp $ ---- applets/battery/read-battery.c.orig Thu Jul 15 13:59:20 1999 -+++ applets/battery/read-battery.c Thu Jul 15 14:41:09 1999 -@@ -185,7 +185,44 @@ - close(fd); - return TRUE; - --#else /* ! ( __linux__ || __FreeBSD__) */ +--- applets/battery/read-battery.h.orig Tue Aug 24 21:41:15 1999 ++++ applets/battery/read-battery.h Sun Nov 14 19:04:44 1999 +@@ -18,7 +18,12 @@ + #include <fcntl.h> + #include <machine/apm_bios.h> + #define APMDEV "/dev/apm" +-#elif defined(__NetBSD__) || defined(__OpenBSD__) ++#elif defined(__OpenBSD__) ++#include <sys/ioctl.h> ++#include <machine/apmvar.h> ++#include <fcntl.h> ++#define APMDEV "/dev/apm" +#elif defined(__NetBSD_APM__) -+ -+ struct apm_power_info aip; -+ int fd; -+ -+ fd = open(APMDEV, O_RDONLY); -+ if (fd == -1) -+ { -+ g_error (_("Cannot open /dev/apm; can't get data.")); -+ return FALSE; -+ } -+ -+ if (ioctl(fd, APM_IOC_GETPOWER, &aip) == -1) { -+ g_error(_("ioctl failed on /dev/apm.")); -+ return FALSE; -+ } -+ -+ *hours_remaining = aip.minutes_left / 60; -+ aip.minutes_left %= 60; -+ *minutes_remaining = aip.minutes_left; -+ -+ /* if APM is not turned on */ -+ if (aip.battery_state == APM_BATT_UNKNOWN) -+ { -+ g_error(_("APM battery state unknown! Cannot read battery charge information.")); -+ } -+ if (aip.ac_state == APM_AC_UNKNOWN) -+ { -+ g_error(_("APM ac state is unknown! Cannot read battery charge information.")); -+ } -+ -+ *ac_online = aip.ac_state == APM_AC_ON; -+ *percentage = aip.battery_life; -+ -+ close(fd); -+ return TRUE; -+ -+#else /* ! ( __linux__ || __FreeBSD__ || __NetBSD_APM__ ) */ - - /* Assume always connected to power. */ - *ac_online = 1; + #include <sys/ioctl.h> + #include <machine/apmvar.h> + #include <fcntl.h> |