diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2001-01-15 21:34:59 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2001-01-15 21:34:59 +0000 |
commit | d8acc37d1dd5a8ed1e5956cee97ad85464c1589e (patch) | |
tree | 41710d94e99d1a839f49577415ecef775b2b33fe /x11-wm/icewm/files/patch-ak | |
parent | 3fb1e7c462ea52a8d9d1567560715c56a4271f23 (diff) |
Notes
Diffstat (limited to 'x11-wm/icewm/files/patch-ak')
-rw-r--r-- | x11-wm/icewm/files/patch-ak | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/x11-wm/icewm/files/patch-ak b/x11-wm/icewm/files/patch-ak index e134d02129f0..88a64b028ff6 100644 --- a/x11-wm/icewm/files/patch-ak +++ b/x11-wm/icewm/files/patch-ak @@ -1,6 +1,6 @@ ---- src/aapm.cc.orig Mon Nov 8 20:45:52 1999 -+++ src/aapm.cc Wed Dec 1 16:42:31 1999 -@@ -20,15 +20,32 @@ +--- src/aapm.cc.orig Mon Jan 15 06:49:39 2001 ++++ src/aapm.cc Mon Jan 15 22:18:05 2001 +@@ -21,15 +21,32 @@ #include <string.h> #include <stdio.h> @@ -11,7 +11,7 @@ +#include <machine/apm_bios.h> +#endif + - #ifdef CONFIG_APM + #ifdef CONFIG_APPLET_APM YColor *YApm::apmBg = 0; YColor *YApm::apmFg = 0; @@ -34,26 +34,26 @@ char driver[16]; char apmver[16]; int apmflags; -@@ -40,9 +57,27 @@ +@@ -41,9 +58,27 @@ char units[16]; if (fd == -1) { -+ static int error = 0; -+ if (!error) -+ perror("Can't open the apm device"); -+ error = 1; ++ static int error = 0; ++ if (!error) ++ perror("Can't open the apm device"); ++ error = 1; return ; } - +#ifdef __FreeBSD__ + if (ioctl(fd,APMIO_GETINFO, &ai) == -1) + { -+ static int error = 0; -+ if (!error) -+ perror("Can't ioctl the apm device"); -+ error = 1; -+ close(fd); -+ return; ++ static int error = 0; ++ if (!error) ++ perror("Can't ioctl the apm device"); ++ error = 1; ++ close(fd); ++ return; + } + close(fd); + BATlife = ai.ai_batt_life; @@ -63,11 +63,10 @@ len = read(fd, buf, sizeof(buf) - 1); close(fd); -@@ -60,6 +95,7 @@ +@@ -61,6 +96,7 @@ } return ; } +#endif if (BATlife == -1) BATlife = 0; - |