pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xbatt Keep xbattbar from dumping core when th...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb3f1ebd6279
branches:  trunk
changeset: 539476:fb3f1ebd6279
user:      hubertf <hubertf%pkgsrc.org@localhost>
date:      Thu Mar 06 17:24:23 2008 +0000

description:
Keep xbattbar from dumping core when the battery reports
>100% full. Patch submitted by kre%munnari.OZ.AU@localhost in PR 38148.

diffstat:

 sysutils/xbatt/Makefile         |   4 ++--
 sysutils/xbatt/distinfo         |   4 ++--
 sysutils/xbatt/patches/patch-ab |  17 +++++++++++++----
 3 files changed, 17 insertions(+), 8 deletions(-)

diffs (65 lines):

diff -r 6d3c83c57921 -r fb3f1ebd6279 sysutils/xbatt/Makefile
--- a/sysutils/xbatt/Makefile   Thu Mar 06 16:50:38 2008 +0000
+++ b/sysutils/xbatt/Makefile   Thu Mar 06 17:24:23 2008 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.23 2008/02/09 23:52:00 tnn Exp $
+# $NetBSD: Makefile,v 1.24 2008/03/06 17:24:23 hubertf Exp $
 #
 
 DISTNAME=      xbatt-1.3pr1
 PKGNAME=       xbatt-1.3.1
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    sysutils x11
 MASTER_SITES=  http://www2.clave.gr.jp/~eto/xbatt/
 
diff -r 6d3c83c57921 -r fb3f1ebd6279 sysutils/xbatt/distinfo
--- a/sysutils/xbatt/distinfo   Thu Mar 06 16:50:38 2008 +0000
+++ b/sysutils/xbatt/distinfo   Thu Mar 06 17:24:23 2008 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.4 2005/02/24 13:40:59 agc Exp $
+$NetBSD: distinfo,v 1.5 2008/03/06 17:24:23 hubertf Exp $
 
 SHA1 (xbatt-1.3pr1.tar.gz) = dc6a8624c134d9e4262ea87640d3eda028973bcf
 RMD160 (xbatt-1.3pr1.tar.gz) = 1757aeee7cb25f3500a2bde62939e0ac6a714752
 Size (xbatt-1.3pr1.tar.gz) = 14412 bytes
 SHA1 (patch-aa) = b822b75668a3494a72b496d820b67720b732add4
-SHA1 (patch-ab) = 3f643fa06ce7e0bb2eeb9c3339a1640b94f13001
+SHA1 (patch-ab) = b34c33af521ad384b383fd7e8fb94a1f0be5b547
diff -r 6d3c83c57921 -r fb3f1ebd6279 sysutils/xbatt/patches/patch-ab
--- a/sysutils/xbatt/patches/patch-ab   Thu Mar 06 16:50:38 2008 +0000
+++ b/sysutils/xbatt/patches/patch-ab   Thu Mar 06 17:24:23 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 2001/11/26 20:02:36 wiz Exp $
+$NetBSD: patch-ab,v 1.3 2008/03/06 17:24:23 hubertf Exp $
 
---- xbatt.c.orig       Fri Sep 18 14:03:05 1998
+--- xbatt.c.orig       1998-09-18 14:03:05.000000000 +0200
 +++ xbatt.c
-@@ -219,6 +219,7 @@
+@@ -219,6 +219,7 @@ struct Digits      digits[] = {
  String fallback_resouces[] = {
      "*width: 39",
      "*height: 39",
@@ -10,7 +10,7 @@
  };
  
  main(
-@@ -494,6 +495,7 @@
+@@ -494,6 +495,7 @@ struct status getBatteryStatus()
  
  #ifdef __NetBSD__
      struct apm_power_info info;
@@ -18,3 +18,12 @@
      if( ioctl(apmfd, APM_IOC_GETPOWER, &info) == -1 ) {
        fprintf(stderr, "xbatt: ioctl APM_IOC_GETPOWER failed\n");
        exit(1);
+@@ -686,7 +688,7 @@ void updateWindow(struct status s)
+                          5, 5, 11, 7);
+       }
+ 
+-      if (s.remain == 100) {
++      if (s.remain >= 100) {
+           bm = XCreatePixmapFromBitmapData(XtDisplay(toplevel),
+                                            XtWindow(toplevel),
+                                            full_bits, full_width,



Home | Main Index | Thread Index | Old Index