[Pkg-wmaker-commits] [wmbattery] 183/241: Remove trailing whitespace.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:58 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 7a26f8f50cc363542e20838cebe2db4f0201dd9d
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sun Oct 5 10:29:59 2014 -0500

    Remove trailing whitespace.
---
 ChangeLog           |  4 ++--
 README              |  2 +-
 TODO                |  2 +-
 acpi.c              | 28 ++++++++++++++--------------
 acpi.h              |  2 +-
 apm.h               |  2 +-
 autoconf/install-sh | 16 ++++++++--------
 simplehal.c         | 12 ++++++------
 sonypi.c            | 10 +++++-----
 wmbattery.1x        |  4 ++--
 wmbattery.c         | 46 +++++++++++++++++++++++-----------------------
 11 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eac1b89..ca5a0e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -209,7 +209,7 @@ wmbattery (2.19) unstable; urgency=low
     on systems that label a fully charged battery's charging rate as
     unknown and state as charging.
   * Base battery charge calculations for ACPI on design capacity, instead of
-    last full capacity. Some batteries may exceed previous last full on 
+    last full capacity. Some batteries may exceed previous last full on
     their next charging, and this also lets you see when you have a damaged
     battery that is not fully charging.
   * If acpi battery charging state is unknown, but the rate is 0,
@@ -455,7 +455,7 @@ wmbattery (1.13) unstable; urgency=low
 
 wmbattery (1.12) unstable; urgency=low
 
-  * Use /usr/share/icons/wmbattery, not /usr/X11R6/share. Sheesh. 
+  * Use /usr/share/icons/wmbattery, not /usr/X11R6/share. Sheesh.
 
  -- Joey Hess <joeyh at debian.org>  Thu,  6 Apr 2000 13:16:52 -0700
 
diff --git a/README b/README
index 60c54bc..8f8987c 100644
--- a/README
+++ b/README
@@ -29,7 +29,7 @@ Conversely, here are some reasons to stick with wmapm:
   - You like its look.
   - It has a neat rainbow-colored progress bar.
   - It has buttons to suspend the laptop and stuff.
-  - It may be more actively and/or better maintained. Or not. 
+  - It may be more actively and/or better maintained. Or not.
     Decide for yourself.
 
 Still, forking is evil, and if I was doing this all over again, I suppose
diff --git a/TODO b/TODO
index 7b41755..18f6166 100644
--- a/TODO
+++ b/TODO
@@ -7,5 +7,5 @@
   programs use it).
 * Make -b 0 display an overall average of the status of all batteries,
   much like apm does on multi-battery laptops.
-* The simplehal interface is not very good. It polls once per second, 
+* The simplehal interface is not very good. It polls once per second,
   it would be much better if it let HAL notify it about changes instead.
diff --git a/acpi.c b/acpi.c
index 96950e6..39b662e 100644
--- a/acpi.c
+++ b/acpi.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * A not-yet-general-purpose ACPI library, by Joey Hess <joey at kitenet.net>
  */
 
@@ -134,7 +134,7 @@ inline char *scan_acpi_value (const char *buf, const char *key) {
 }
 
 /* Read an ACPI proc file, pull out the requested piece of information, and
- * return it (statically allocated string). Returns NULL on error, This is 
+ * return it (statically allocated string). Returns NULL on error, This is
  * the slow, dumb way, fine for initialization or if only one value is needed
  * from a file, slow if called many times. */
 char *get_acpi_value (const char *file, const char *key) {
@@ -173,7 +173,7 @@ int find_items (char *itemname, char infoarray[ACPI_MAXITEM][128],
 	int num_devices=0;
 	int i;
 	char **devices = malloc(ACPI_MAXITEM * sizeof(char *));
-	
+
 	char pathname[128];
 
 	sprintf(pathname, SYSFS_PATH);
@@ -185,7 +185,7 @@ int find_items (char *itemname, char infoarray[ACPI_MAXITEM][128],
 		char filename[128];
 		char buf[1024];
 
-		if (!strcmp(".", ent->d_name) || 
+		if (!strcmp(".", ent->d_name) ||
 		    !strcmp("..", ent->d_name))
 			continue;
 
@@ -270,10 +270,10 @@ int acpi_supported (void) {
 		return 0;
 	}
 	closedir(dir);
-	
+
 	/* If kernel is 2.6.21 or newer, version is in
 	   /sys/module/acpi/parameters/acpica_version */
-	
+
 	version = get_acpi_file("/sys/module/acpi/parameters/acpica_version");
 	if (version == NULL) {
 		return 0;
@@ -284,13 +284,13 @@ int acpi_supported (void) {
 				version, ACPI_VERSION);
 		return 0;
 	}
-	
+
 	find_batteries();
 	find_ac_adapters();
 #if ACPI_THERMAL
 	find_thermal();
 #endif
-	
+
 	return 1;
 }
 
@@ -299,7 +299,7 @@ int acpi_supported (void) {
  * apm_info struct. */
 int acpi_read (int battery, apm_info *info) {
 	char *buf, *state;
-	
+
 	if (acpi_batt_count == 0) {
 		info->battery_percentage = 0;
 		info->battery_time = 0;
@@ -309,10 +309,10 @@ int acpi_read (int battery, apm_info *info) {
 		info->ac_line_status = 1;
 		return 0;
 	}
-	
+
 	/* Internally it's zero indexed. */
 	battery--;
-	
+
 	buf = get_acpi_file(acpi_batt_info[battery]);
 	if (buf == NULL) {
 		fprintf(stderr, "unable to read %s\n", acpi_batt_info[battery]);
@@ -323,7 +323,7 @@ int acpi_read (int battery, apm_info *info) {
 	info->ac_line_status = 0;
 	info->battery_flags = 0;
 	info->using_minutes = 1;
-	
+
 	/* Work out if the battery is present, and what percentage of full
 	 * it is and how much time is left. */
 	if (strcmp(scan_acpi_value(buf, acpi_labels[label_present]), "1") == 0) {
@@ -340,7 +340,7 @@ int acpi_read (int battery, apm_info *info) {
 				info->battery_time = 0;
 			}
 			else {
-				/* a zero or unknown in the file; time 
+				/* a zero or unknown in the file; time
 				 * unknown so use a negative one to
 				 * indicate this */
 				info->battery_time = -1;
@@ -439,7 +439,7 @@ int acpi_read (int battery, apm_info *info) {
 			info->ac_line_status = on_ac_power();
 		}
 	}
-	
+
 	return 0;
 }
 #endif
diff --git a/acpi.h b/acpi.h
index f82cba7..44e5ed6 100644
--- a/acpi.h
+++ b/acpi.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * A not-yet-general-purpose ACPI library, by Joey Hess <joey at kitenet.net>
  */
 
diff --git a/apm.h b/apm.h
index a5aec22..4fd8671 100644
--- a/apm.h
+++ b/apm.h
@@ -19,7 +19,7 @@
 #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)
diff --git a/autoconf/install-sh b/autoconf/install-sh
index ebc6691..058b26c 100755
--- a/autoconf/install-sh
+++ b/autoconf/install-sh
@@ -115,7 +115,7 @@ fi
 if [ x"$dir_arg" != x ]; then
 	dst=$src
 	src=""
-	
+
 	if [ -d $dst ]; then
 		instcmd=:
 	else
@@ -124,7 +124,7 @@ if [ x"$dir_arg" != x ]; then
 else
 
 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
+# might cause directories to be created, which would be especially bad
 # if $src (and thus $dsttmp) contains '*'.
 
 	if [ -f $src -o -d $src ]
@@ -134,7 +134,7 @@ else
 		echo "install:  $src does not exist"
 		exit 1
 	fi
-	
+
 	if [ x"$dst" = x ]
 	then
 		echo "install:	no destination specified"
@@ -162,7 +162,7 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
 
 # Skip lots of stat calls in the usual case.
 if [ ! -d "$dstdir" ]; then
-defaultIFS='	
+defaultIFS='
 '
 IFS="${IFS-${defaultIFS}}"
 
@@ -201,17 +201,17 @@ else
 
 # If we're going to rename the final executable, determine the name now.
 
-	if [ x"$transformarg" = x ] 
+	if [ x"$transformarg" = x ]
 	then
 		dstfile=`basename $dst`
 	else
-		dstfile=`basename $dst $transformbasename | 
+		dstfile=`basename $dst $transformbasename |
 			sed $transformarg`$transformbasename
 	fi
 
 # don't allow the sed command to completely eliminate the filename
 
-	if [ x"$dstfile" = x ] 
+	if [ x"$dstfile" = x ]
 	then
 		dstfile=`basename $dst`
 	else
@@ -242,7 +242,7 @@ else
 # Now rename the file to the real destination.
 
 	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	$doit $mvcmd $dsttmp $dstdir/$dstfile
 
 fi &&
 
diff --git a/simplehal.c b/simplehal.c
index f6379cd..b107a37 100644
--- a/simplehal.c
+++ b/simplehal.c
@@ -51,7 +51,7 @@ int connect_hal (void) {
 
 	return 1;
 }
-	
+
 int hal_ready (void) {
 	if (hal_ctx && dbus_connection_get_is_connected(dbus_ctx)) {
 		return 1;
@@ -83,7 +83,7 @@ signed int get_hal_int (const char *udi, const char *key, int optional) {
 	dbus_error_init(&error);
 
 	ret = libhal_device_get_property_int (hal_ctx, udi, key, &error);
-	
+
 	if (! dbus_error_is_set (&error)) {
 		return ret;
 	}
@@ -100,15 +100,15 @@ signed int get_hal_int (const char *udi, const char *key, int optional) {
 signed int get_hal_bool (const char *udi, const char *key, int optional) {
 	int ret;
 	DBusError error;
-	
+
 	if (! hal_ready()) {
 		return -1;
 	}
-	
+
 	dbus_error_init(&error);
 
 	ret = libhal_device_get_property_bool (hal_ctx, udi, key, &error);
-	
+
 	if (! dbus_error_is_set (&error)) {
 		return ret;
 	}
@@ -190,7 +190,7 @@ int simplehal_read (int battery, apm_info *info) {
 		info->battery_status = BATTERY_STATUS_ABSENT;
 		return 0;
 	}
-	
+
 	/* remaining_time and charge_level.percentage are not a mandatory
 	 * keys, so if not present, -1 will be returned */
 	info->battery_time = get_hal_int(device, "battery.remaining_time", 1);
diff --git a/sonypi.c b/sonypi.c
index 71ff9b1..ab9922f 100644
--- a/sonypi.c
+++ b/sonypi.c
@@ -29,9 +29,9 @@ int sonypi_read (apm_info *info) {
 	__u8 batflags;
 	__u16 cap, rem;
 	int havebatt = 0;
-	
+
 	info->using_minutes = info->battery_flags = 0;
-	
+
 	if (! sonypi_ioctl(SONYPI_IOCGBATFLAGS, &batflags)) {
 		return 1;
 	}
@@ -57,7 +57,7 @@ int sonypi_read (apm_info *info) {
 		info->battery_percentage = 0;
 		info->battery_status = BATTERY_STATUS_ABSENT;
 	}
-	
+
 	if (havebatt) {
 		info->battery_percentage = 100 * rem / cap;
 		/* Guess at whether the battery is charging. */
@@ -66,9 +66,9 @@ int sonypi_read (apm_info *info) {
 			info->battery_status = BATTERY_STATUS_CHARGING;
 		}
 	}
-	
+
 	/* Sadly, there is no way to estimate this. */
 	info->battery_time = 0;
-	
+
 	return 0;
 }
diff --git a/wmbattery.1x b/wmbattery.1x
index 614376a..75a66fc 100644
--- a/wmbattery.1x
+++ b/wmbattery.1x
@@ -7,7 +7,7 @@ wmbattery \- dockable battery monitor
 .SH DESCRIPTION
 .PP
 .B wmbattery
-is a battery monitor.  It is used to visually display the system's battery 
+is a battery monitor.  It is used to visually display the system's battery
 status.
 .PP
 .B wmbattery
@@ -93,7 +93,7 @@ switch.
 .B \-e
 wmbattery contains code for estimating the time remaining before discharge,
 and until full charge, and this code is used if no other source of this
-informaton is available. This switch makes wmbattery use its time 
+informaton is available. This switch makes wmbattery use its time
 estimation code even if some other estimate is available.
 .TP
 .B \-s granularity
diff --git a/wmbattery.c b/wmbattery.c
index fe219b6..cecb90e 100644
--- a/wmbattery.c
+++ b/wmbattery.c
@@ -59,7 +59,7 @@ signed int critical_pct = -1;
 
 void error(const char *fmt, ...) {
 	va_list arglist;
-  
+
 	va_start(arglist, fmt);
 	fprintf(stderr, "Error: ");
 	vfprintf(stderr, fmt, arglist);
@@ -213,7 +213,7 @@ char *parse_commandline(int argc, char *argv[]) {
 	char *ret=NULL;
         char *s;
 	extern char *optarg;
-	
+
   	while (c != -1) {
   		c=getopt(argc, argv, "hd:g:if:b:w:c:l:es:a:");
 		switch (c) {
@@ -323,17 +323,17 @@ void make_window(char *display_name, int argc, char *argv[]) {
 	classhint.res_name = wname;
 	classhint.res_class = wname;
 	XSetClassHint(display, win, &classhint);
-  
+
 	if (! XStringListToTextProperty(&wname, 1, &name))
 		error("Can't allocate window name.");
 
 	XSetWMName(display, win, &name);
-  
+
 	/* Create GC for drawing */
 	gcv.foreground = fore_pix;
 	gcv.background = back_pix;
 	gcv.graphics_exposures = 0;
-	NormalGC = XCreateGC(display, root, 
+	NormalGC = XCreateGC(display, root,
 			     GCForeground | GCBackground | GCGraphicsExposures,
 			     &gcv);
 
@@ -343,15 +343,15 @@ void make_window(char *display_name, int argc, char *argv[]) {
 			  pixmask, ShapeSet);
 	XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0,
 			  pixmask, ShapeSet);
-	
+
 	wmhints.initial_state = initial_state;
 	wmhints.icon_window = iconwin;
 	wmhints.icon_x = sizehints.x;
 	wmhints.icon_y = sizehints.y;
 	wmhints.window_group = win;
-	wmhints.flags = StateHint | IconWindowHint | 
+	wmhints.flags = StateHint | IconWindowHint |
     			IconPositionHint | WindowGroupHint;
-  
+
 	XSetWMHints(display, win, &wmhints);
 	XSetCommand(display, win, argv, argc);
 
@@ -363,7 +363,7 @@ void make_window(char *display_name, int argc, char *argv[]) {
 
 void flush_expose(Window w) {
 	XEvent dummy;
-  
+
 	while (XCheckTypedWindowEvent(display, w, Expose, &dummy));
 }
 
@@ -371,7 +371,7 @@ void redraw_window() {
 	XCopyArea(display, images[FACE], iconwin, NormalGC, 0, 0,
 		  image_info[FACE].width, image_info[FACE].height, 0,0);
 	flush_expose(iconwin);
-	XCopyArea(display, images[FACE], win, NormalGC, 0, 0, 
+	XCopyArea(display, images[FACE], win, NormalGC, 0, 0,
 		  image_info[FACE].width, image_info[FACE].height, 0,0);
 	flush_expose(win);
 }
@@ -388,8 +388,8 @@ void copy_image(int image, int xoffset, int yoffset,
 
 /*
  * Display a letter in one of two fonts, at the specified x position.
- * Note that 10 is passed for special characters `:' or `1' at the 
- * end of the font. 
+ * Note that 10 is passed for special characters `:' or `1' at the
+ * end of the font.
  */
 void draw_letter(int letter, int font, int x) {
 	copy_image(font, image_info[font].charwidth * letter, 0,
@@ -399,7 +399,7 @@ void draw_letter(int letter, int font, int x) {
 
 /* Display an image at its normal location. */
 void draw_image(int image) {
-  	copy_image(image, 0, 0, 
+  	copy_image(image, 0, 0,
 		   image_info[image].width, image_info[image].height,
 		   image_info[image].x, image_info[image].y);
 }
@@ -407,7 +407,7 @@ void draw_image(int image) {
 void recalc_window(apm_info cur_info) {
 	int time_left, hour_left, min_left, digit, x;
 	static int blinked = 0;
-	
+
 	/* Display if it's plugged in. */
       	switch (cur_info.ac_line_status) {
 	  case AC_LINE_STATUS_ON:
@@ -416,7 +416,7 @@ void recalc_window(apm_info cur_info) {
        	  default:
 		draw_image(UNPLUGGED);
 	}
-	
+
       	/* Display the appropriate color battery. */
       	switch (cur_info.battery_status) {
 	  case BATTERY_STATUS_HIGH:
@@ -447,7 +447,7 @@ void recalc_window(apm_info cur_info) {
 
      	/*
        	 * Display the percent left dial. This has the side effect of
-         * clearing the time left field. 
+         * clearing the time left field.
          */
   	x=DIAL_MULTIPLIER * cur_info.battery_percentage;
       	if (x >= 0) {
@@ -463,7 +463,7 @@ void recalc_window(apm_info cur_info) {
 		   image_info[DIAL_DIM].height,
 		   image_info[DIAL_DIM].x + x,
 		   image_info[DIAL_DIM].y);
-  
+
 	/* Show percent remaining */
       	if (cur_info.battery_percentage >= 0) {
         	digit = cur_info.battery_percentage / 10;
@@ -494,7 +494,7 @@ void recalc_window(apm_info cur_info) {
         if (cur_info.using_minutes)
         	time_left = cur_info.battery_time;
         else
-        	time_left = cur_info.battery_time / 60; 
+        	time_left = cur_info.battery_time / 60;
         hour_left = time_left / 60;
         min_left = time_left % 60;
         digit = hour_left / 10;
@@ -505,7 +505,7 @@ void recalc_window(apm_info cur_info) {
         draw_letter(digit,BIGFONT,MINUTES_TENS_OFFSET);
         digit = min_left % 10;
         draw_letter(digit,BIGFONT,MINUTES_ONES_OFFSET);
-      	
+
 	redraw_window();
 }
 
@@ -562,9 +562,9 @@ void alarmhandler(int sig) {
 	 * cannot determine time. */
 	if (always_estimate_remaining || cur_info.battery_time < 0)
 		estimate_timeleft(&cur_info);
-	
+
 	/* Override the battery status? */
-	if ((low_pct > -1 || critical_pct > -1) && 
+	if ((low_pct > -1 || critical_pct > -1) &&
 	    cur_info.ac_line_status != AC_LINE_STATUS_ON) {
 		if (cur_info.battery_percentage <= critical_pct)
 			cur_info.battery_status = BATTERY_STATUS_CRITICAL;
@@ -573,7 +573,7 @@ void alarmhandler(int sig) {
 		else
 			cur_info.battery_status = BATTERY_STATUS_HIGH;
 	}
-	
+
 	/* If APM data changes redraw and wait for next update */
 	/* Always redraw if the status is critical, to make it blink. */
 	if (!apm_change(&cur_info) || cur_info.battery_status == BATTERY_STATUS_CRITICAL)
@@ -638,7 +638,7 @@ int main(int argc, char *argv[]) {
 	else {
 		error("No APM, ACPI, UPOWER, HAL or SPIC support detected.");
 	}
-		
+
 	load_images();
         load_audio();
 

-- 
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