diff options
Diffstat (limited to 'wm/icewm/patches/patch-ab')
-rw-r--r-- | wm/icewm/patches/patch-ab | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/wm/icewm/patches/patch-ab b/wm/icewm/patches/patch-ab index 03a04b79c65..8bb9614a62a 100644 --- a/wm/icewm/patches/patch-ab +++ b/wm/icewm/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.3 2002/05/03 10:56:39 wiz Exp $ +$NetBSD: patch-ab,v 1.4 2003/06/03 16:04:45 jmmv Exp $ ---- src/aapm.cc.orig Tue Oct 9 16:54:03 2001 +--- src/aapm.cc.orig 2003-03-08 20:37:52.000000000 +0100 +++ src/aapm.cc -@@ -25,6 +25,12 @@ +@@ -15,6 +15,12 @@ #ifdef CONFIG_APPLET_APM @@ -12,21 +12,21 @@ $NetBSD: patch-ab,v 1.3 2002/05/03 10:56:39 wiz Exp $ +#include <fcntl.h> +#endif + - YColor *YApm::apmBg = 0; - YColor *YApm::apmFg = 0; - YFont *YApm::apmFont = 0; -@@ -32,6 +38,7 @@ - extern YPixmap *taskbackPixmap; + #include "ylib.h" + #include "sysdep.h" + +@@ -47,6 +53,7 @@ extern YColor *taskBarBg; + void ApmStr(char *s, bool Tool) { +#if !defined(__NetBSD__) - char buf[45]; + char buf[80]; int len, i, fd = open("/proc/apm", O_RDONLY); char driver[16]; -@@ -102,6 +109,46 @@ - strcat(s,_(" - Charging")); +@@ -121,6 +128,46 @@ void ApmStr(char *s, bool Tool) { + strcat(s, _(" - Charging")); else - strcat(s,_("M")); + strcat(s, _("C")); +#else + struct apm_power_info aip; + int fd = open(APMDEV, O_RDONLY); @@ -38,7 +38,7 @@ $NetBSD: patch-ab,v 1.3 2002/05/03 10:56:39 wiz Exp $ + memset(&aip, 0, sizeof(aip)); + if (ioctl(fd, APM_IOC_GETPOWER, &aip) == -1) { + fprintf(stderr, "ioctl failed on APMDEV"); -+ close(fd); ++ close(fd); + return; + } + @@ -69,4 +69,4 @@ $NetBSD: patch-ab,v 1.3 2002/05/03 10:56:39 wiz Exp $ +#endif } - YApm::YApm(YWindow *aParent): YWindow(aParent) { + int ignore_directory_entry(struct dirent *de) { |