[Pkg-wmaker-commits] [wmbattery] 36/241: * Added symbolic apm info constants to "apm.h", in case they are not in the system <apm.h>. * Put $(LIBS) last at link time.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbattery.
commit 9744982ac359d1d07e36e246ade42ca78fed1ecf
Author: joey <joey at a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Date: Wed Apr 24 15:18:46 2002 +0000
* Added symbolic apm info constants to "apm.h", in case they are
not in the system <apm.h>.
* Put $(LIBS) last at link time.
---
acpi.c | 2 +-
apm.h | 27 +++++++++++++++++++++++++++
autoconf/makeinfo.in | 2 +-
debian/changelog | 8 ++++++++
sonypi.c | 2 +-
wmbattery.c | 1 -
wmbattery.h | 2 ++
7 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/acpi.c b/acpi.c
index cbc7101..854b2ed 100644
--- a/acpi.c
+++ b/acpi.c
@@ -9,7 +9,7 @@
#include <dirent.h>
#include <string.h>
#ifdef ACPI_APM
-#include <apm.h>
+#include "apm.h"
#endif
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/apm.h b/apm.h
new file mode 100644
index 0000000..a5aec22
--- /dev/null
+++ b/apm.h
@@ -0,0 +1,27 @@
+#include <apm.h>
+
+/* Symbolic constants for apm may be in system apm.h, or may not. */
+#ifndef AC_LINE_STATUS_ON
+#define AC_LINE_STATUS_OFF (0)
+#define AC_LINE_STATUS_ON (1)
+#define AC_LINE_STATUS_BACKUP (2)
+#define AC_LINE_STATUS_UNKNOWN (0xff)
+
+#define BATTERY_STATUS_HIGH (0)
+#define BATTERY_STATUS_LOW (1)
+#define BATTERY_STATUS_CRITICAL (2)
+#define BATTERY_STATUS_CHARGING (3)
+#define BATTERY_STATUS_ABSENT (4)
+#define BATTERY_STATUS_UNKNOWN (0xff)
+
+#define BATTERY_FLAGS_HIGH (0x1)
+#define BATTERY_FLAGS_LOW (0x2)
+#define BATTERY_FLAGS_CRITICAL (0x4)
+#define BATTERY_FLAGS_CHARGING (0x8)
+#define BATTERY_FLAGS_ABSENT (0x80)
+
+#define BATTERY_PERCENTAGE_UNKNOWN (-1)
+
+#define BATTERY_TIME_UNKNOWN (-1)
+#endif /* AC_LINE_STATUS_ON */
+
diff --git a/autoconf/makeinfo.in b/autoconf/makeinfo.in
index 2584096..99babe0 100644
--- a/autoconf/makeinfo.in
+++ b/autoconf/makeinfo.in
@@ -40,6 +40,6 @@ uninstall:
rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1x $(icondir)
wmbattery: wmbattery.o acpi.o sonypi.o
- $(CC) $(LDFLAGS) $(LIBS) wmbattery.o acpi.o sonypi.o -o wmbattery
+ $(CC) $(LDFLAGS) wmbattery.o acpi.o sonypi.o -o wmbattery $(LIBS)
wmbattery.o: wmbattery.c wmbattery.h
diff --git a/debian/changelog b/debian/changelog
index 54fb13b..5564eb5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+wmbattery (2.07) unstable; urgency=low
+
+ * Added symbolic apm info constants to "apm.h", in case they are
+ not in the system <apm.h>.
+ * Put $(LIBS) last at link time.
+
+ -- Joey Hess <joeyh at debian.org> Tue, 23 Apr 2002 11:49:16 -0400
+
wmbattery (2.06) unstable; urgency=low
* Deal with -1 time left from apm (no estimate).
diff --git a/sonypi.c b/sonypi.c
index b4f658d..942699b 100644
--- a/sonypi.c
+++ b/sonypi.c
@@ -1,5 +1,5 @@
#include <sys/ioctl.h>
-#include <apm.h>
+#include "apm.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/wmbattery.c b/wmbattery.c
index 0181a80..6d9c4e5 100644
--- a/wmbattery.c
+++ b/wmbattery.c
@@ -7,7 +7,6 @@
#include <X11/extensions/shape.h>
#include <stdarg.h>
#include <signal.h>
-#include <apm.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
diff --git a/wmbattery.h b/wmbattery.h
index 0effedb..4936957 100644
--- a/wmbattery.h
+++ b/wmbattery.h
@@ -1,3 +1,5 @@
+#include "apm.h"
+
typedef struct {
Pixmap pixmap;
Pixmap mask;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git
More information about the Pkg-wmaker-commits
mailing list