[Pkg-wmaker-commits] [wmacpi] 05/105: wmacpi: Bump to wmacpi-ng version 0.90.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 18 01:13:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmacpi.

commit 5827b82e30d9c6a4138c673213abf5ef971bb8d5
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Mon Aug 18 17:56:11 2014 -0500

    wmacpi: Bump to wmacpi-ng version 0.90.
    
    Source obtained from http://sourceforge.net/projects/wmacpi/files/.
    
    2003 July 16 0.90
    	Make the time display show '--:--' instead of '00:00' when the
    	time remaining is 0 - I think this is reasonable, since it'll only
    	get into this state when the present rate value is 0. This only
    	happens when the battery is fully charged and neither discharging
    	or charging, or when the battery is completely drained. In any of
    	these states the time remaining is of very little interest, so we
    	don't lose anything. We also get to handle the (sadly, very
    	common) case where the ACPI subsystem doesn't report sane values
    	for the things we depend on.
---
 .xvpics/master-new.xpm | Bin 3588 -> 0 bytes
 .xvpics/master.xpm     | Bin 3588 -> 0 bytes
 .xvpics/master_low.xpm | Bin 3588 -> 0 bytes
 ChangeLog              |  47 ++++++++
 Makefile               |  13 ++-
 acpi-ng.c              |  26 +++--
 debian/acpi-ng.1       |   1 +
 debian/changelog       |  24 ++++
 debian/rules           |   2 +-
 debian/wmacpi-ng.1     |  10 +-
 libacpi.c              | 299 ++++++++++++++++++++++++++++++++-----------------
 libacpi.h              |  32 ++++--
 master.xpm             | 142 +++++++++++------------
 master_low.xpm         | 144 ++++++++++++------------
 wmacpi-ng.c            | 172 +++++++++++++++++++---------
 15 files changed, 590 insertions(+), 322 deletions(-)

diff --git a/.xvpics/master-new.xpm b/.xvpics/master-new.xpm
deleted file mode 100644
index e1c06f0..0000000
Binary files a/.xvpics/master-new.xpm and /dev/null differ
diff --git a/.xvpics/master.xpm b/.xvpics/master.xpm
deleted file mode 100644
index 4b09bc3..0000000
Binary files a/.xvpics/master.xpm and /dev/null differ
diff --git a/.xvpics/master_low.xpm b/.xvpics/master_low.xpm
deleted file mode 100644
index 913957f..0000000
Binary files a/.xvpics/master_low.xpm and /dev/null differ
diff --git a/ChangeLog b/ChangeLog
index 69b6af9..78bf8bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,50 @@
+2003 July 16 0.90
+	Make the time display show '--:--' instead of '00:00' when the
+	time remaining is 0 - I think this is reasonable, since it'll only
+	get into this state when the present rate value is 0. This only
+	happens when the battery is fully charged and neither discharging
+	or charging, or when the battery is completely drained. In any of
+	these states the time remaining is of very little interest, so we
+	don't lose anything. We also get to handle the (sadly, very
+	common) case where the ACPI subsystem doesn't report sane values
+	for the things we depend on.
+	
+2003 July 11 0.50a2
+	Make the time display show nothing (as opposed to 00:00) when the
+	time remaining is unknown, as requested by Emma Jane Hogbin.
+
+	Respect the critical level specified on the command line, and add
+	a new message to differentiate between the command line critical
+	level and the critical state reported by the battery.
+
+	Speed up the message scrolling, so that there isn't quite such a
+	painful delay between repeats. Also, up the speed when the battery
+	is low, more when it's critical, and scroll continuously when it's
+	hardware critical.
+
+	Finally, add support for disabling the blinking power and battery
+	glyphs from the command line, as requested by Sebastian
+	Henschel. We still blink the battery glyph when the battery
+	reports hardware critical level - I think that's worth being a bit
+	annoying about.
+
+	Also, added an acpi-ng manpage.
+	
+2003 July 11 0.50a1
+	Properly fix the AC adapter issue - it's not much use adding the
+	infrastructure and then forgetting to fix the code that uses it.
+
+	Fix the time disiplay so that it doesn't try to display values
+	greater than 99:59, since the display area won't fit anything
+	beyond that.
+	
+2003 July 10 0.50a
+	Bugfixes, to handle two problems: the case where something like
+	the present rate or some such is "unknown" (reported initially by
+	Emma Jane Hogbin, and where the AC adapter is called something
+	other than "AC" (reported by Sebastian Henschel). This an 'a'
+	release because I can't test these myself . . . 
+	
 2003 July 6 0.50
 	Finally got rid of that annoying button - that space now contains
 	a 'B 1' or 'B 2' (only those two at present, since I'm too lazy to
diff --git a/Makefile b/Makefile
index 229ef5a..66e62f6 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,9 @@ WMSRC	:= wmacpi-ng.c libacpi.c
 CLSRC := acpi-ng.c libacpi.c
 HEADERS := libacpi.h wmacpi-ng.h
 targets := wmacpi-ng acpi-ng
+doc_targets := debian/wmacpi-ng.1 debian/acpi-ng.1
+
+PREFIX := /usr/local
 
 all: $(targets)
 
@@ -29,10 +32,10 @@ include $(WMOBJ:.o=.d)
 include $(CLOBJ:.o=.d)
 
 wmacpi-ng:	$(WMOBJ)
-	gcc $(LDFLAGS) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^
 
 acpi-ng: $(CLOBJ)
-	gcc $(LDFLAGS) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^
 
 # build per-file dependencies - note that -MM may not be supported
 # in gcc versions older than 2.95.4, but most likely is.
@@ -45,5 +48,11 @@ clean:
 clean-all: clean
 	rm -f *.d $(targets)
 
+install: $(targets)
+	install -d $(PREFIX)/bin/
+	install -pc $(targets) $(PREFIX)/bin/
+	install -d $(PREFIX)/man/man1/
+	install -pc $(doc_targets) $(PREFIX)/man/man1/
+
 tags:
 	etags $(WMSRC) $(CLSRC) $(HEADERS)
diff --git a/acpi-ng.c b/acpi-ng.c
index b2919e2..5b5a4eb 100644
--- a/acpi-ng.c
+++ b/acpi-ng.c
@@ -26,7 +26,7 @@
 
 #include "libacpi.h"
 
-#define ACPI_NG_VER "0.50"
+#define ACPI_NG_VER "0.90"
 
 APMInfo *apminfo;
 
@@ -53,7 +53,8 @@ int main(int argc, char *argv[])
 	int i, j, ch;
 	int sleep_time = 0;
 	int samples = 1;
-	battery *binfo;
+	battery_t *binfo;
+	adapter_t *ap;
 
 	while((ch = getopt(argc, argv, "hvVa::")) != EOF) {
 		switch(ch) {
@@ -98,27 +99,32 @@ int main(int argc, char *argv[])
 		usleep(sleep_time);
 	}
 	
-	if(apminfo->power == AC) {
+	ap = &apminfo->adapter;
+	if(ap->power == AC) {
 		printf("On AC Power");
 		for(i = 0; i < batt_count; i++) {
 			binfo = &batteries[i];
-			if(binfo->present && binfo->charging) {
+			if(binfo->present && (binfo->charge_state == CHARGE)) {
 				printf("; Battery %s charging", binfo->name);
-				printf(", %2d:%02d remaining", binfo->charge_time/60,
-				       binfo->charge_time%60);
+				if(binfo->charge_time >= 0) 
+					printf(", %2d:%02d remaining", 
+					       binfo->charge_time/60,
+					       binfo->charge_time%60);
 			}
 		}
 		printf("\n");
-	} else if(apminfo->power == BATT) {
+	} else if(ap->power == BATT) {
 		printf("On Battery");
 		for(i = 0; i < batt_count; i++) {
 			binfo = &batteries[i];
-			if(binfo->present)
+			if(binfo->present && (binfo->percentage >= 0))
 				printf(", Battery %s at %d%%", binfo->name,
 				       binfo->percentage);
 		}
-		printf("; %d:%02d remaining\n", apminfo->rtime/60, 
-		       apminfo->rtime%60);
+		if(apminfo->rtime >= 0)
+			printf("; %d:%02d remaining", apminfo->rtime/60, 
+			       apminfo->rtime%60);
+		printf("\n");
 	}
 	return 0;
 }
diff --git a/debian/acpi-ng.1 b/debian/acpi-ng.1
new file mode 100644
index 0000000..c12e2a4
--- /dev/null
+++ b/debian/acpi-ng.1
@@ -0,0 +1 @@
+.so man1/wmacpi-ng.1
diff --git a/debian/changelog b/debian/changelog
index 527b8c0..2361cf4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,27 @@
+wmacpi-ng (0.90-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Simon Fowler <simon at hollie.himi.private>  Wed, 16 Jul 2003 18:52:04 +1000
+
+wmacpi-ng (0.50a2-1) unstable; urgency=low
+
+  * New alpha upstream version.
+
+ -- Simon Fowler <simon at dreamcraft.com.au>  Fri, 11 Jul 2003 14:29:44 +1000
+
+wmacpi-ng (0.50a1-1) unstable; urgency=low
+
+  * New alpha upstream version.
+
+ -- Simon Fowler <simon at hollie.himi.private>  Thu, 10 Jul 2003 11:46:11 +1000
+
+wmacpi-ng (0.50a-1) unstable; urgency=low
+
+  * New alpha upstream version.
+
+ -- Simon Fowler <simon at hollie.himi.private>  Thu, 10 Jul 2003 00:07:44 +1000
+
 wmacpi-ng (0.50-1) unstable; urgency=low
 
   * New upstream version.
diff --git a/debian/rules b/debian/rules
index 97fa83f..45c5893 100755
--- a/debian/rules
+++ b/debian/rules
@@ -70,7 +70,7 @@ binary-arch: build install
 #	dh_installpam
 #	dh_installinit
 #	dh_installcron
-	dh_installman debian/wmacpi-ng.1
+	dh_installman debian/wmacpi-ng.1 debian/acpi-ng.1
 #	dh_installinfo
 #	dh_undocumented
 	dh_installchangelogs ChangeLog
diff --git a/debian/wmacpi-ng.1 b/debian/wmacpi-ng.1
index 800f506..9744b6d 100644
--- a/debian/wmacpi-ng.1
+++ b/debian/wmacpi-ng.1
@@ -1,4 +1,4 @@
-.TH WMACPI-NG 1 "May 30, 2003"
+.TH WMACPI-NG 1 "July 11, 2003"
 .SH NAME
 wmacpi-ng \- Battery status monitor for systems supporting ACPI
 .SH NAME
@@ -20,6 +20,9 @@ battery no ]
 [
 .RI -v
 ]
+]
+.RI -n
+]
 [
 .RI -V
 ]
@@ -79,6 +82,9 @@ Set the X display to open the window on.
 .B \-m
 Set the battery to monitor initially.
 .TP
+.B \-n
+Disable blinking power glyph when charging. Note that it still blinks when 
+the battery reports its capacity state as critical.
 .B \-v
 Increase the verbosity of the program. Can be used more than once -
 each successive use increases the verbosity.
@@ -122,4 +128,4 @@ This manual page was originally written by Simon Richter
 .B wmacpi-ng
 by Simon Fowler.
 .br
-Last modification by Simon Fowler <simon at dreamcraft.com.au>, 2003-05-30.
+Last modification by Simon Fowler <simon at dreamcraft.com.au>, 2003-07-11.
diff --git a/libacpi.c b/libacpi.c
index e619143..fbc48f9 100644
--- a/libacpi.c
+++ b/libacpi.c
@@ -15,38 +15,17 @@ extern APMInfo *apminfo;
 char buf[512];
 
 /* local proto */
-int acpi_get_design_cap(int battery);
+int acpi_get_design_cap(int batt);
 
-/* see if we have ACPI support and check version */
-int power_init(void)
+/* initialise the batteries */
+int init_batteries(void)
 {
-    FILE *acpi;
-    char buf[4096];
     DIR *battdir;
     struct dirent *batt;
     char *name, *tmp1, *tmp2;
     char *names[MAXBATT];
     int i, j;
-    int acpi_ver = 0;
-
-    if (!(acpi = fopen("/proc/acpi/info", "r"))) {
-	fprintf(stderr, "This system does not support ACPI\n");
-	return 1;
-    }
-
-    /* okay, now see if we got the right version */
-    fread(buf, 4096, 1, acpi);
-    acpi_ver = strtol(buf + 25, NULL, 10);
-    eprint(0, "ACPI version detected: %d\n", acpi_ver);
-    if (acpi_ver < 20020214) {
-	fprintf(stderr, "This version requires ACPI subsystem version 20020214\n");
-	fclose(acpi);
-	return 1;
-    }
-
-    /* yep, all good */
-    fclose(acpi);
-
+    
     /* now enumerate batteries */
     batt_count = 0;
     battdir = opendir("/proc/acpi/battery");
@@ -95,12 +74,77 @@ int power_init(void)
 
     /* tell user some info */
     eprint(0, "%d batteries detected\n", batt_count);
-    fprintf(stderr, "wmacpi: found %d batter%s\n", batt_count,
+    fprintf(stderr, "libacpi: found %d batter%s\n", batt_count,
 	    (batt_count == 1) ? "y" : "ies");
     
     return 0;
 }
 
+/* the actual name of the subdirectory under ac_adapter may
+ * be anything, so we need to read the directory and use the
+ * name we find there. */
+int init_ac_adapters(void)
+{
+    DIR *acdir;
+    struct dirent *adapter;
+    adapter_t *ap = &apminfo->adapter;
+    char *name;
+
+    acdir = opendir("/proc/acpi/ac_adapter");
+    if (acdir == NULL) {
+	fprintf(stderr, "Unable to open /proc/acpi/ac_adapter -"
+		" are you sure this system supports ACPI?\n");
+	return 1;
+    }
+    name = NULL;
+    while ((adapter = readdir(acdir)) != NULL) {
+	name = adapter->d_name;
+
+	if (!strncmp(".", name, 1) || !strncmp("..", name, 2))
+	    continue;
+	fprintf(stderr, "found adapter %s\n", name);
+    }
+    /* we /should/ only see one filename other than . and .. so
+     * we'll just use the last value name acquires . . . */
+    ap->name = strdup(name);
+    snprintf(ap->state_file, MAX_NAME, "/proc/acpi/ac_adapter/%s/state",
+	     ap->name);
+    fprintf(stderr, "libacpi: found ac adapter %s\n", ap->name);
+    
+    return 0;
+}
+
+/* see if we have ACPI support and check version */
+int power_init(void)
+{
+    FILE *acpi;
+    char buf[4096];
+    int acpi_ver = 0;
+    int retval;
+
+    if (!(acpi = fopen("/proc/acpi/info", "r"))) {
+	fprintf(stderr, "This system does not support ACPI\n");
+	return 1;
+    }
+
+    /* okay, now see if we got the right version */
+    fread(buf, 4096, 1, acpi);
+    acpi_ver = strtol(buf + 25, NULL, 10);
+    eprint(0, "ACPI version detected: %d\n", acpi_ver);
+    if (acpi_ver < 20020214) {
+	fprintf(stderr, "This version requires ACPI subsystem version 20020214\n");
+	fclose(acpi);
+	return 1;
+    }
+    /* yep, all good */
+    fclose(acpi);
+
+    if (!(retval = init_batteries()))
+	retval = init_ac_adapters();
+
+    return retval;
+}
+
 char *get_value(char *string)
 {
     char *retval;
@@ -122,9 +166,11 @@ power_state_t get_power_status(void)
     FILE *file;
     char buf[1024];
     char *val;
+    adapter_t *ap = &apminfo->adapter;
     
-    if ((file = fopen("/proc/acpi/ac_adapter/AC/state", "r")) == NULL) {
-	perror("Could not open /proc/acpi/ac_adapter/AC/state\n");
+    if ((file = fopen(ap->state_file, "r")) == NULL) {
+	snprintf(buf, 1024, "Could not open state file %s", ap->state_file);
+	perror(buf);
 	return PS_ERR;
     }
 
@@ -140,7 +186,7 @@ power_state_t get_power_status(void)
 int get_battery_info(int batt_no)
 {
     FILE *file;
-    battery *info = &batteries[batt_no];
+    battery_t *info = &batteries[batt_no];
     char buf[1024];
     char *entry;
     int buflen;
@@ -221,7 +267,9 @@ int get_battery_info(int batt_no)
      * source code) - ok and critical. */
     entry = strstr(buf, "capacity state:");
     val = get_value(entry);
-    if ((strncmp(val, "ok", 2)) == 0)
+    if (val[0] == 'u')
+	info->capacity_state = CS_ERR;
+    else if ((strncmp(val, "ok", 2)) == 0)
 	info->capacity_state = OK;
     else
 	info->capacity_state = CRITICAL;
@@ -229,10 +277,12 @@ int get_battery_info(int batt_no)
     /* get charging state */
     entry = strstr(buf, "charging state:");
     val = get_value(entry);
-    if ((strncmp(val, "discharging", 10)) == 0)
-	info->charging = 0;
+    if (val[0] == 'u') 
+	info->charge_state = CH_ERR;
+    else if ((strncmp(val, "discharging", 10)) == 0)
+	info->charge_state = DISCHARGE;
     else
-	info->charging = 1;
+	info->charge_state = CHARGE;
 
     /* get current rate of burn 
      * note that if it's on AC, this will report 0 */
@@ -275,10 +325,67 @@ int get_battery_info(int batt_no)
  * some stuff to provide a similar interface to now.
  */
 
-void acquire_batt_info(int batt)
+/* calculate the percentage remaining, using the values of 
+ * remaining capacity and last full capacity, as outlined in
+ * the ACPI spec v2.0a, section 3.9.3. */
+static int calc_remaining_percentage(int batt)
+{
+    float rcap, lfcap;
+    battery_t *binfo;
+    int retval;
+    
+    binfo = &batteries[batt];
+
+    rcap = (float)binfo->remaining_cap;
+    lfcap = (float)binfo->last_full_cap;
+
+    /* we use -1 to indicate that the value is unknown . . . */
+    if (rcap < 0) {
+	eprint(0, "unknown percentage value\n");
+	retval = -1;
+    } else {
+	if (lfcap <= 0)
+	    lfcap = 1;
+	retval = (int)((rcap/lfcap) * 100.0);
+	eprint(0, "percent: %d\n", retval);
+    }
+    return retval;
+}
+
+/* calculate remaining time until the battery is charged.
+ * when charging, the battery state file reports the 
+ * current being used to charge the battery. We can use 
+ * this and the remaining capacity to work out how long
+ * until it reaches the last full capacity of the battery.
+ * XXX: make sure this is actually portable . . . */
+static int calc_charge_time(int batt)
 {
     float rcap, lfcap;
-    battery *binfo;
+    battery_t *binfo;
+    int charge_time = 0;
+
+    binfo = &batteries[batt];
+
+    if (binfo->charge_state == CHARGE) {
+	if (binfo->present_rate == -1) {
+	    eprint(0, "unknown present rate\n");
+	    charge_time = -1;
+	} else {
+	    lfcap = (float)binfo->last_full_cap;
+	    rcap = (float)binfo->remaining_cap;
+	    
+	    charge_time = (int)(((lfcap - rcap)/binfo->present_rate) * 60.0);
+	}
+    } else
+	if (binfo->charge_time)
+	    charge_time = 0;
+    return charge_time;
+}
+
+void acquire_batt_info(int batt)
+{
+    battery_t *binfo;
+    adapter_t *ap = &apminfo->adapter;
     
     get_battery_info(batt);
     
@@ -292,60 +399,37 @@ void acquire_batt_info(int batt)
 	return;
     }
 
-    /* calculate the percentage remaining, using the values of 
-     * remaining capacity and last full capacity, as outlined in
-     * the ACPI spec v2.0a, section 3.9.3. */
-    {
-	rcap = (float)binfo->remaining_cap;
-	lfcap = (float)binfo->last_full_cap;
-	if (rcap <= 0)
-	    rcap = 0;
-	if (lfcap <= 0)
-	    lfcap = 1;
-	binfo->percentage = (int)((rcap/lfcap) * 100.0);
-	eprint(0, "percent: %d\n", binfo->percentage);
-    }
+    binfo->percentage = calc_remaining_percentage(batt);
 
     /* set the battery's capacity state, based (at present) on some 
      * guesstimated values: more than 75% == HIGH, 25% to 75% MED, and
      * less than 25% is LOW. Less than apminfo->crit_level is CRIT. */
-    if (binfo->percentage > 75) 
+    if (binfo->percentage == -1)
+	binfo->state = BS_ERR;
+    if (binfo->percentage < apminfo->crit_level)
+	binfo->state = CRIT;
+    else if (binfo->percentage > 75) 
 	binfo->state = HIGH;
     else if (binfo->percentage > 25)
 	binfo->state = MED;
     else 
-	/* we only go to critical state if the battery is reporting
-	 * critical itself . . . */
 	binfo->state = LOW;
 
     /* we need to /know/ that we've got a valid state for the 
      * apminfo->power value . . . .*/
-    apminfo->power = get_power_status();
+    ap->power = get_power_status();
 
-    if ((apminfo->power != AC) && !binfo->charging) {
+    if ((ap->power != AC) && (binfo->charge_state == DISCHARGE)) {
 	/* we're not on power, and not charging. So we might as well 
 	 * check if we're at a critical battery level, and calculate
 	 * other interesting stuff . . . */
 	if (binfo->capacity_state == CRITICAL) {
 	    eprint(1, "Received critical battery status");
-	    apminfo->power = CRIT;
+	    ap->power = HARD_CRIT;
 	}
     }
     
-    if (binfo->charging) {
-	/* calculate remaining time until the battery is charged.
-	 * when charging, the battery state file reports the 
-	 * current being used to charge the battery. We can use 
-	 * this and the remaining capacity to work out how long
-	 * until it reaches the last full capacity of the battery.
-	 * XXX: make sure this is actually portable . . . */
-	lfcap = (float)binfo->last_full_cap;
-	rcap = (float)binfo->remaining_cap;
-	
-	binfo->charge_time = (int)(((lfcap - rcap)/binfo->present_rate) * 60.0);
-    } else
-	if (binfo->charge_time)
-	    binfo->charge_time = 0;
+    binfo->charge_time = calc_charge_time(batt);
 
     /* and finally, we tell anyone who wants to use this information
      * that it's now valid . . .*/
@@ -366,6 +450,8 @@ void acquire_global_info(void)
     int rtime;
     float rcap = 0;
     float rate = 0;
+    battery_t *binfo;
+    adapter_t *ap = &apminfo->adapter;
     static float rate_samples[SAMPLES];
     static int j = 0;
     static int sample_count = 0;
@@ -376,48 +462,57 @@ void acquire_global_info(void)
      * For added accuracy, we average the value over the last 
      * SAMPLES number of calls, or for anything less than this we
      * simply report the raw number. */
-    {
-	
-	for (i = 0; i < batt_count; i++) {
-	    if (batteries[i].present && batteries[i].valid) {
-		rcap += (float)batteries[i].remaining_cap;
-		rate += (float)batteries[i].present_rate;
-	    }
+    /* XXX: this needs to correctly handle the case where 
+     * any of the values used is unknown (which we flag using
+     * -1). */
+    for (i = 0; i < batt_count; i++) {
+	binfo = &batteries[i];
+	if (binfo->present && binfo->valid) {
+	    rcap += (float)binfo->remaining_cap;
+	    rate += (float)binfo->present_rate;
 	}
-	rate_samples[j] = rate;
-	j++, sample_count++;
-	j = j % SAMPLES;
-	
-	/* for the first SAMPLES number of calls we calculate the
-	 * average based on sample_count, then we use SAMPLES to
-	 * calculate the rolling average. */
-
-	/* when this fails, n should be equal to SAMPLES. */
-	if (sample_count < SAMPLES)
-	    n++;
-	for (i = 0, rate = 0; i < n; i++)
-	    rate += rate_samples[i];
-	rate = rate/n;
-
-	if ((rcap < 1) || (rate < 1)) {
-	    rtime = 0;
+    }
+    rate_samples[j] = rate;
+    j++, sample_count++;
+    j = j % SAMPLES;
+    
+    /* for the first SAMPLES number of calls we calculate the
+     * average based on sample_count, then we use SAMPLES to
+     * calculate the rolling average. */
+    
+    /* when this fails, n should be equal to SAMPLES. */
+    if (sample_count < SAMPLES)
+	n++;
+    for (i = 0, rate = 0; i < n; i++) {
+	/* if any of our samples are invalid, we drop 
+	 * straight out, and flag our unknown values. */
+	if (rate_samples[i] < 0) {
+	    rate = -1;
+	    rtime = -1;
 	    goto out;
 	}
-	if (rate <= 0) 
-	    rate = 1;
-	/* time remaining in minutes */
-	rtime = (int)((rcap/rate) * 60.0);
-	if(rtime <= 0) 
-	    rtime = 0;
-    out:
-	eprint(0, "time rem: %d\n", rtime);
-	apminfo->rtime = rtime;
+	rate += rate_samples[i];
+    }
+    rate = rate/(float)n;
+    
+    if ((rcap < 1) || (rate < 1)) {
+	rtime = 0;
+	goto out;
     }
+    if (rate <= 0) 
+	rate = 1;
+    /* time remaining in minutes */
+    rtime = (int)((rcap/rate) * 60.0);
+    if(rtime <= 0) 
+	rtime = 0;
+ out:
+    eprint(0, "time rem: %d\n", rtime);
+    apminfo->rtime = rtime;
 
     /* get the power status.
      * note that this is actually reported seperately from the
      * battery info, under /proc/acpi/ac_adapter/AC/state */
-    apminfo->power = get_power_status();
+    ap->power = get_power_status();
 }
 
 void acquire_all_info(void)
diff --git a/libacpi.h b/libacpi.h
index 0867711..61b83a4 100644
--- a/libacpi.h
+++ b/libacpi.h
@@ -2,7 +2,7 @@
 #define _LIBACPI_H_
 
 
-#define LIBACPI_VER "0.50"
+#define LIBACPI_VER "0.90"
 
 /* Here because we need it for definitions in this file . . . */
 #define MAX_NAME 128
@@ -15,11 +15,6 @@ typedef enum {
 } DspMode;
 
 typedef enum {
-    BLINK,
-    OFF
-} Mode;
-
-typedef enum {
     AC,
     BATT,
     PS_ERR,
@@ -30,11 +25,20 @@ typedef enum {
     MED,
     LOW,
     CRIT,
+    HARD_CRIT,
+    BS_ERR,
 } batt_state_t;
 
 typedef enum {
+    CHARGE,
+    DISCHARGE,
+    CH_ERR,
+} charge_state_t;
+
+typedef enum {
     OK,
     CRITICAL,
+    CS_ERR,
 } cap_state_t;
 
 typedef struct {
@@ -49,7 +53,7 @@ typedef struct {
     int design_voltage;		/* in mV */
     /* state info */
     cap_state_t capacity_state;
-    int charging;
+    charge_state_t charge_state;
     int present_rate;		/* in mAh */
     int remaining_cap;		/* in mAh */
     int present_voltage;	/* in mV */
@@ -59,14 +63,20 @@ typedef struct {
     int charge_time;		/* time left to charge this battery */
     /* and a flag to indicate that this is valid . . . */
     int valid;
-} battery;
+} battery_t;
     
 typedef struct {
-    power_state_t power;	/* On AC or not? */
+    char *name;
+    char state_file[MAX_NAME];
+    power_state_t power;
+} adapter_t;
+
+typedef struct {
+    adapter_t adapter;
     int rtime;			/* remaining time */
     int timer;			/* how long been on battery? */
     int crit_level;		/* anything below this is critical low */
-    battery *binfo;		/* pointer to the battery being monitored */
+    battery_t *binfo;		/* pointer to the battery being monitored */
 } APMInfo;
 
 /*
@@ -104,7 +114,7 @@ static int verbosity = 0;
     } while (0)
 
 /* since these /are/ needed here . . . */
-battery batteries[MAXBATT];
+battery_t batteries[MAXBATT];
 int batt_count;
 
 /* check if apm/acpi is enabled, etc */
diff --git a/master.xpm b/master.xpm
index cb1cddd..ba24bf1 100644
--- a/master.xpm
+++ b/master.xpm
@@ -93,13 +93,13 @@ static char * master_xpm[] = {
 "Y 	c #054000",
 "Z 	c #034000",
 "` 	c #C7C7C7",
-" .	c #303030",
+" .	c #004941",
 "..	c #20B2AE",
-"+.	c #004941",
-"@.	c #188A86",
-"#.	c #22B2AE",
-"$.	c #107D79",
-"%.	c #027E72",
+"+.	c #303030",
+"@.	c #027E72",
+"#.	c #188A86",
+"$.	c #22B2AE",
+"%.	c #107D79",
 "&.	c #034A40",
 "                                                                                                                                .   + @ # $ % & * = - % ; > , ' % ) ! ~ { % ] ^ / ( % _ : < [ % } | 1 2 % 3 4 5 6 % 7 8 9 0 % a b c d % e f g h                                                                           ",
 "                                                                                                                                .   + @ # $ % & * = - % ; > , ' % ) ! ~ { % ] ^ / ( % _ : < [ % } | 1 2 % 3 4 5 6 % 7 8 9 0 % a b c d % e f g h                                                                           ",
@@ -114,78 +114,78 @@ static char * master_xpm[] = {
 "        . i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                                                           ",
 "        . i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                                                           ",
 "        . i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                                                           ",
-"        ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                                                           ",
-"                                                                                                                                .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                                                           ",
-"        . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . . . . . . . .         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                                                           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % `     . % % % % % % % % % % % % % % % % % % % % % % % `         .    . . . .%  . . . .%  . . . .%  . . . .%  . . . .%  . . . .%  . . . .%  . . . .%  . . . .%  . . . .%  . . . .                                                                          ",
-"        . % % % % % % ..........% % % % ....................% % `     . % % % % % +.+.+.% % % +.+.+.% % % ..% % % % % `         .                                                                                                                                                                                         ",
-"        . % % % % % ..% % % % ......% % ..% % % % % % % % ..% % `     . % % +.% +.% % % +.% +.% % % +.% ..% ..% ..% % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
-"        . % % % % % ..% % % % ..% % % % ..% % % % % % % % ....% `     . % % +.% +.% % % +.% +.% % % +.% % ..% ..% % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
-"        . % % % ......% % % % ..% % % % ..% % % % % % % % ....% `     . % % % % % +.+.+.% % % +.+.+.% % % % ..% % % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
-"        . % % ..% % ..% % % % ......% % ..% % % % % % % % ....% `     . % % +.% +.% % % +.% +.% % % +.% % ..% ..% % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
-"        . % ..% % % % ..........% % % % ..% % % % % % % % ..% % `     . % % +.% +.% % % +.% +.% % % +.% ..% ..% ..% % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
-"        . % ..% % % % % % % % % % % % % ....................% % `     . % % % % % +.+.+.% % % +.+.+.% % % % % ..% % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % `     . % % % % % % % % % % % % % % % % % % % % % % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % `     . % % % % % % % % % % % % % % % % % % % % % % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z                                                                           ",
+"        ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %       ",
+"                                                                                                                                .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %   % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% %       ",
+"        . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . . . . . . . . . .         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %   %  .% % % %  .%  .% % % %  .% % ..% %  .% % % %  .%  .% % % %  .%       ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % `     . % % % % % % % % % % % % % % % % % % % % % % % `         .   +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.% +.+.+.+.  %  .% % % %  .%  .% % % %  .% % ..% %  .% % % %  .%  .% % % %  .%       ",
+"        . % % % % % % ..........% % % % ....................% % `     . % % % % %  . . .% % %  . . .% % % ..% % % % % `         .                                                                                                                 %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .%       ",
+"        . % % % % % ..% % % % ......% % ..% % % % % % % % ..% % `     . % %  .%  .% % %  .%  .% % %  .% ..% ..% ..% % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   % @......... at .% @......... at .% % % % % @......... at .% @......... at .%       ",
+"        . % % % % % ..% % % % ..% % % % ..% % % % % % % % ....% `     . % %  .%  .% % %  .%  .% % %  .% % ..% ..% % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %       ",
+"        . % % % ......% % % % ..% % % % ..% % % % % % % % ....% `     . % % % % %  . . .% % %  . . .% % % % ..% % % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   %  .% % % %  .%  .% % % %  .% % ..% %  .% % % %  .%  .% % % %  .%       ",
+"        . % % ..% % ..% % % % ......% % ..% % % % % % % % ....% `     . % %  .%  .% % %  .%  .% % %  .% % ..% ..% % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   %  .% % % %  .%  .% % % %  .% % ..% %  .% % % %  .%  .% % % %  .%       ",
+"        . % ..% % % % ..........% % % % ..% % % % % % % % ..% % `     . % %  .%  .% % %  .%  .% % %  .% ..% ..% ..% % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .%       ",
+"        . % ..% % % % % % % % % % % % % ....................% % `     . % % % % %  . . .% % %  . . .% % % % % ..% % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .%       ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % `     . % % % % % % % % % % % % % % % % % % % % % % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% %       ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % `     . % % % % % % % % % % % % % % % % % % % % % % % `         .   i j k l % m n o p % q r s t % u v w x % y z A B % C D E F % G H I J % K L M N % O P Q R % S T U V % W X Y Z   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %       ",
 "        ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `     ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `         .                                                                                                                                                                                         ",
 "                                                                                                                                .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                           ",
-"                                                                                                                                .   % % ......% % % +.+.+. at .% @....... at .% @....... at .% @.+.+.+. at .% @....... at .% @....... at .% @....... at .% @....... at .% @....... at .% % ..% % % % % % %                                           ",
-"        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . `         .   % ..% % % ..% +.% % % ..% +.% % % ..% +.% % % ..% ..% % % ..% ..% % % +.% ..% % % +.% +.% % % ..% ..% % % ..% ..% % % ..% ..% ..% ..% % ..%                                           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % ..% % % ..% +.% % % ..% +.% % % ..% +.% % % ..% ..% % % ..% ..% % % +.% ..% % % +.% +.% % % ..% ..% % % ..% ..% % % ..% % ..% ..% % % @.%                                           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % @.+.+.+. at .% % +.+.+. at .% @....... at .% % ...... at .% @....... at .% @....... at .% @....... at .% % +.+.+. at .% @....... at .% @....... at .% % % ..% % % % % %                                           ",
-"        . % % % +.+.+.+.% % % +.+.+.+.% % % % % % % +.+.+.+.% % % +.+.+.+.% % % `     % % % % % % % % % +.+.+.+.% % % `         .   % ..% % % ..% +.% % % ..% ..% % % +.% +.% % % ..% +.% % % ..% +.% % % ..% ..% % % ..% +.% % % ..% ..% % % ..% +.% % % ..% % ..% ..% % % % %                                           ",
-"        . % % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.% % `     % % % % % % % % +.% % % % +.% % `         .   % ..% % % ..% +.% % % ..% ..% % % +.% +.% % % ..% +.% % % ..% +.% % % ..% ..% % % ..% +.% % % ..% ..% % % ..% +.% % % ..% ..% ..% ..% % ..%                                           ",
-"        . % % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.% % `     % #.#.#.#.% % % +.% % % % +.% % `         .   % % ......% % % +.+.+. at .% @....... at .% @....... at .% % +.+.+. at .% @....... at .% @....... at .% % +.+.+. at .% @....... at .% @....... at .% % % % ..% % % @.%                                           ",
-"        . % % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.% % `     % #.% % % #.% % +.% % % % +.% % `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                           ",
-"        . % % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.% % `     % #.% % % #.% % +.% % % % +.% % `         .                                                                                                                                                                                         ",
-"        . % % % +.+.+.+.% % % +.+.+.+.% % % % % % % +.+.+.+.% % % +.+.+.+.% % % `     % #.% % % #.% % % +.+.+.+.% % % `         .   % % % % % % % % % % % % % %   % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % %   . . . . . . . . . . . . . . . . `   . . . . . . . . . . . . . . . . `           ",
-"        . % % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.% % `     % #.#.#.#.% % % +.% % % % +.% % `         .   % % % % % % ..........% % %   % ....................% %   % @.% % ......% % % ......% % % ..% % % %   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
-"        . % % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.% % `     % #.% % % #.% % +.% % % % +.% % `         .   % % % % % ..% % % % ......%   % ..% % % % % % % % ..% %   % ..% ..% % % ..% ..% % % ..% ..% ..% ..%   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
-"        . % % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.% % `     % #.% % % #.% % +.% % % % +.% % `         .   % % % % % ..% % % % ..% % %   % ..% % % % % % % % ....%   % ..% ..% % % ..% ..% % % ..% % ..% ..% %   % % % % % % % % % +.+.+.+.$.% % `   % % % % % % % % $......... at .% % `           ",
-"        . % % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.% % `     % #.% % % #.% % +.% % % % +.% % `         .   % % % ......% % % % ..% % %   % ..% % % % % % % % ....%   % @.% @.+.+.+. at .% @.+.+.+. at .% % % ..% % %   % % % % % % % % +.% % % % ..% % `   % % % % % % % % +.% % % % ..% % `           ",
-"        . % % % +.+.+.+.% % % +.+.+.+.% % % % % % % +.+.+.+.% % % +.+.+.+.% % % `     % #.#.#.#.% % % % +.+.+.+.% % % `         .   % % ..% % ..% % % % ......%   % ..% % % % % % % % ....%   % ..% ..% % % ..% ..% % % ..% % ..% ..% %   % #.#.#.#.% % % +.% % % % ..% % `   % #.#.#.#.% % % +.% % % % ..% % `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % ..% % % % ..........% % %   % ..% % % % % % % % ..% %   % ..% ..% % % ..% ..% % % ..% ..% ..% ..%   % #.% % % #.% % +.% % % % ..% % `   % #.% % % #.% % +.% % % % ..% % `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % ..% % % % % % % % % % % %   % ....................% %   % @.% % ......% % % ......% % % % % ..% %   % #.% % % #.% % +.% % % % ..% % `   % #.% % % #.% % +.% % % % ..% % `           ",
-"        ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `     ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `         .   % % % % % % % % % % % % % %   % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % %   % #.% % % #.% % % +.+.+.+.$.% % `   % #.% % % #.% % $.........$.% % `           ",
-"                                                                                                                                .                                                                                                         % #.#.#.#.% % % +.% % % % ..% % `   % #.#.#.#.% % % ..% % % % +.% % `           ",
-"                                                                                                                                .   % % % % % % % % % % % % % %   % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % %   % #.% % % #.% % +.% % % % ..% % `   % #.% % % #.% % ..% % % % +.% % `           ",
-"        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         .   % % % % % % +.+.+.+.+.% % %   % +.+.+.+.+.+.+.+.+.+.% %   % % % % +.+.+.% % % +.+.+.% % % +.% % % %   % #.% % % #.% % +.% % % % ..% % `   % #.% % % #.% % ..% % % % +.% % `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % % % % +.% % % % +.+.+.%   % +.% % % % % % % % +.% %   % +.% +.% % % +.% +.% % % +.% +.% +.% +.%   % #.% % % #.% % +.% % % % ..% % `   % #.% % % #.% % ..% % % % +.% % `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % % % % +.% % % % +.% % %   % +.% % % % % % % % +.+.%   % +.% +.% % % +.% +.% % % +.% % +.% +.% %   % #.#.#.#.% % % % +.+.+.+.$.% % `   % #.#.#.#.% % % $.........$.% % `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % % +.+.+.% % % % +.% % %   % +.% % % % % % % % +.+.%   % % % % +.+.+.% % % +.+.+.% % % % +.% % %   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % +.% % +.% % % % +.+.+.%   % +.% % % % % % % % +.+.%   % +.% +.% % % +.% +.% % % +.% % +.% +.% %   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % +.% % % % +.+.+.+.+.% % %   % +.% % % % % % % % +.% %   % +.% +.% % % +.% +.% % % +.% +.% +.% +.%   ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `   ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `           ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % +.% % % % % % % % % % % %   % +.+.+.+.+.+.+.+.+.+.% %   % % % % +.+.+.% % % +.+.+.% % % % % +.% %                                                                                   ",
+"                                                                                                                                .   % % ......% % %  . . .#.% #.......#.% #.......#.% #. . . .#.% #.......#.% #.......#.% #.......#.% #.......#.% #.......#.% % ..% % % % % % %                                           ",
+"        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     . . . . . . . . . . . . . . . . `         .   % ..% % % ..%  .% % % ..%  .% % % ..%  .% % % ..% ..% % % ..% ..% % %  .% ..% % %  .%  .% % % ..% ..% % % ..% ..% % % ..% ..% ..% ..% % ..%                                           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % ..% % % ..%  .% % % ..%  .% % % ..%  .% % % ..% ..% % % ..% ..% % %  .% ..% % %  .%  .% % % ..% ..% % % ..% ..% % % ..% % ..% ..% % % #.%                                           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % #. . . .#.% %  . . .#.% #.......#.% % ......#.% #.......#.% #.......#.% #.......#.% %  . . .#.% #.......#.% #.......#.% % % ..% % % % % %                                           ",
+"        . % % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% % % `     % % % % % % % % %  . . . .% % % `         .   % ..% % % ..%  .% % % ..% ..% % %  .%  .% % % ..%  .% % % ..%  .% % % ..% ..% % % ..%  .% % % ..% ..% % % ..%  .% % % ..% % ..% ..% % % % %                                           ",
+"        . % %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .% % `     % % % % % % % %  .% % % %  .% % `         .   % ..% % % ..%  .% % % ..% ..% % %  .%  .% % % ..%  .% % % ..%  .% % % ..% ..% % % ..%  .% % % ..% ..% % % ..%  .% % % ..% ..% ..% ..% % ..%                                           ",
+"        . % %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .% % `     % $.$.$.$.% % %  .% % % %  .% % `         .   % % ......% % %  . . .#.% #.......#.% #.......#.% %  . . .#.% #.......#.% #.......#.% %  . . .#.% #.......#.% #.......#.% % % % ..% % % #.%                                           ",
+"        . % %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .% % `     % $.% % % $.% %  .% % % %  .% % `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                           ",
+"        . % %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .% % `     % $.% % % $.% %  .% % % %  .% % `         .                                                                                                                                                                                         ",
+"        . % % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% % % `     % $.% % % $.% % %  . . . .% % % `         .   % % % % % % % % % % % % % %   % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % %   . . . . . . . . . . . . . . . . `   . . . . . . . . . . . . . . . . `           ",
+"        . % %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .% % `     % $.$.$.$.% % %  .% % % %  .% % `         .   % % % % % % ..........% % %   % ....................% %   % #.% % ......% % % ......% % % ..% % % %   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
+"        . % %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .% % `     % $.% % % $.% %  .% % % %  .% % `         .   % % % % % ..% % % % ......%   % ..% % % % % % % % ..% %   % ..% ..% % % ..% ..% % % ..% ..% ..% ..%   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
+"        . % %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .% % `     % $.% % % $.% %  .% % % %  .% % `         .   % % % % % ..% % % % ..% % %   % ..% % % % % % % % ....%   % ..% ..% % % ..% ..% % % ..% % ..% ..% %   % % % % % % % % %  . . . .%.% % `   % % % % % % % % %.........#.% % `           ",
+"        . % %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .% % `     % $.% % % $.% %  .% % % %  .% % `         .   % % % ......% % % % ..% % %   % ..% % % % % % % % ....%   % #.% #. . . .#.% #. . . .#.% % % ..% % %   % % % % % % % %  .% % % % ..% % `   % % % % % % % %  .% % % % ..% % `           ",
+"        . % % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% % % `     % $.$.$.$.% % % %  . . . .% % % `         .   % % ..% % ..% % % % ......%   % ..% % % % % % % % ....%   % ..% ..% % % ..% ..% % % ..% % ..% ..% %   % $.$.$.$.% % %  .% % % % ..% % `   % $.$.$.$.% % %  .% % % % ..% % `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % ..% % % % ..........% % %   % ..% % % % % % % % ..% %   % ..% ..% % % ..% ..% % % ..% ..% ..% ..%   % $.% % % $.% %  .% % % % ..% % `   % $.% % % $.% %  .% % % % ..% % `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `     % % % % % % % % % % % % % % % % `         .   % ..% % % % % % % % % % % %   % ....................% %   % #.% % ......% % % ......% % % % % ..% %   % $.% % % $.% %  .% % % % ..% % `   % $.% % % $.% %  .% % % % ..% % `           ",
+"        ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `     ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `         .   % % % % % % % % % % % % % %   % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % %   % $.% % % $.% % %  . . . .%.% % `   % $.% % % $.% % %.........%.% % `           ",
+"                                                                                                                                .                                                                                                         % $.$.$.$.% % %  .% % % % ..% % `   % $.$.$.$.% % % ..% % % %  .% % `           ",
+"                                                                                                                                .   % % % % % % % % % % % % % %   % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % %   % $.% % % $.% %  .% % % % ..% % `   % $.% % % $.% % ..% % % %  .% % `           ",
+"        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         .   % % % % % %  . . . . .% % %   %  . . . . . . . . . .% %   % % % %  . . .% % %  . . .% % %  .% % % %   % $.% % % $.% %  .% % % % ..% % `   % $.% % % $.% % ..% % % %  .% % `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % % % %  .% % % %  . . .%   %  .% % % % % % % %  .% %   %  .%  .% % %  .%  .% % %  .%  .%  .%  .%   % $.% % % $.% %  .% % % % ..% % `   % $.% % % $.% % ..% % % %  .% % `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % % % %  .% % % %  .% % %   %  .% % % % % % % %  . .%   %  .%  .% % %  .%  .% % %  .% %  .%  .% %   % $.$.$.$.% % % %  . . . .%.% % `   % $.$.$.$.% % % %.........%.% % `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % %  . . .% % % %  .% % %   %  .% % % % % % % %  . .%   % % % %  . . .% % %  . . .% % % %  .% % %   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % %  .% %  .% % % %  . . .%   %  .% % % % % % % %  . .%   %  .%  .% % %  .%  .% % %  .% %  .%  .% %   % % % % % % % % % % % % % % % % `   % % % % % % % % % % % % % % % % `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   %  .% % % %  . . . . .% % %   %  .% % % % % % % %  .% %   %  .%  .% % %  .%  .% % %  .%  .%  .%  .%   ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `   ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `           ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   %  .% % % % % % % % % % % %   %  . . . . . . . . . .% %   % % % %  . . .% % %  . . .% % % % %  .% %                                                                                   ",
 "        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % % % % % % % % % % % % %   % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % %                                                                                   ",
 "        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .                                                                                                                                                                                         ",
 "        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %   % % % % % %                       ",
-"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % #.#.#.% % % % % % %.% %.#.#.#.%.% %.#.#.#.%.% %.% % % %.% %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% % % % % % % % % % % % %   % % % % % %                       ",
-"        ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `         .   % #.% % % #.% % % % % #.% % % % % #.% % % % % #.% #.% % % #.% #.% % % % % #.% % % % % % % % % #.% #.% % % #.% #.% % % #.% % % % % % % % % % % % %   % % % % % %                       ",
-"                                                                                                                                .   % #.% % % #.% % % % % #.% % % % % #.% % % % % #.% #.% % % #.% #.% % % % % #.% % % % % % % % % #.% #.% % % #.% #.% % % #.% % % % % % % % % % % % %   % % % % % %                       ",
-"                                                                                                                                .   % %.% % % %.% % % % % %.% %.#.#.#.%.% % #.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% % % % % %.% &.#.#.#.&.% %.#.#.#.%.% %.#.#.#.%.% % % % % % %   % % % % % %                       ",
-"                                                                                                                                .   % #.% % % #.% % % % % #.% #.% % % % % % % % % #.% % % % % #.% % % % % #.% #.% % % #.% % % % % #.% #.% % % #.% % % % % #.% % % % % % % % % % % % %   % % % % % %                       ",
-"                                                                                                                                .   % #.% % % #.% % % % % #.% #.% % % % % % % % % #.% % % % % #.% % % % % #.% #.% % % #.% % % % % #.% #.% % % #.% % % % % #.% % % % % % % % % % % % %   % % % % % %                       ",
-". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   % % #.#.#.% % % % % % #.% %.#.#.#.%.% %.#.#.#.%.% % % % % %.% %.#.#.#.%.% %.#.#.#.%.% % % % % %.% %.#.#.#.%.% %.#.#.#.%.% % % % % % % % % % % % %   % % % % #.%                       ",
+"        . % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % `         .   % % $.$.$.% % % % % % @.% @.$.$.$. at .% @.$.$.$. at .% @.% % % @.% @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% % % % % % % % % % % % %   % % % % % %                       ",
+"        ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `         .   % $.% % % $.% % % % % $.% % % % % $.% % % % % $.% $.% % % $.% $.% % % % % $.% % % % % % % % % $.% $.% % % $.% $.% % % $.% % % % % % % % % % % % %   % % % % % %                       ",
+"                                                                                                                                .   % $.% % % $.% % % % % $.% % % % % $.% % % % % $.% $.% % % $.% $.% % % % % $.% % % % % % % % % $.% $.% % % $.% $.% % % $.% % % % % % % % % % % % %   % % % % % %                       ",
+"                                                                                                                                .   % @.% % % @.% % % % % @.% @.$.$.$. at .% % $.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% % % % % @.% &.$.$.$.&.% @.$.$.$. at .% @.$.$.$. at .% % % % % % %   % % % % % %                       ",
+"                                                                                                                                .   % $.% % % $.% % % % % $.% $.% % % % % % % % % $.% % % % % $.% % % % % $.% $.% % % $.% % % % % $.% $.% % % $.% % % % % $.% % % % % % % % % % % % %   % % % % % %                       ",
+"                                                                                                                                .   % $.% % % $.% % % % % $.% $.% % % % % % % % % $.% % % % % $.% % % % % $.% $.% % % $.% % % % % $.% $.% % % $.% % % % % $.% % % % % % % % % % % % %   % % % % % %                       ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   % % $.$.$.% % % % % % $.% @.$.$.$. at .% @.$.$.$. at .% % % % % @.% @.$.$.$. at .% @.$.$.$. at .% % % % % @.% @.$.$.$. at .% @.$.$.$. at .% % % % % % % % % % % % %   % % % % $.%                       ",
 "                                                                                                                                    % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %                                     ",
 "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % ",
-"% &.#.#.#.&.% %.#.#.#.% % %.#.#.#.%.% %.#.#.#.% % %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.% % % %.% % % %.% % % % % % % %.% %.% % % %.% %.% % % % % #.% % % #.% %.#.#.#.% % %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.#.#.#.%.% %.% % % %.% %.% % % %.% %.% % % %.% %.% % % %.% %.% % % %.% %.#.#.#.%.% ",
-"% #.% % % #.% #.% % % #.% #.% % % % % #.% % % #.% #.% % % % % #.% % % % % #.% % % % % #.% % % #.% % % #.% % % % % % % #.% #.% % % #.% #.% % % % % #.#.% #.#.% #.% % % #.% #.% % % #.% #.% % % #.% #.% % % #.% #.% % % #.% #.% % % % % % % #.% % % #.% % % #.% #.% % % #.% #.% % % #.% #.% % % #.% #.% % % #.% % % % % #.% ",
-"% #.% % % #.% #.% % % #.% #.% % % % % #.% % % #.% #.% % % % % #.% % % % % #.% % % % % #.% % % #.% % % #.% % % % % % % #.% #.% % #.&.% #.% % % % % #.% #.% #.% #.% % % #.% #.% % % #.% #.% % % #.% #.% % % #.% #.% % % #.% #.% % % % % % % #.% % % #.% % % #.% #.% % % #.% #.% % % #.% &.#.% #.&.% #.% % % #.% % % % #.&.% ",
-"% %.#.#.#.%.% %.#.#.#.% % %.% % % % % %.% % % %.% %.#.#.#.% % %.#.#.#.% % %.&.#.#.%.% %.#.#.#.%.% % % %.% % % % % % % %.% %.#.#.&.% % %.% % % % % %.% % % %.% %.% % % %.% %.% % % %.% %.#.#.#.%.% %.#.% % %.% %.#.#.#.% % %.#.#.#.%.% % % %.% % % %.% % % %.% %.% % % %.% %.% % % %.% % &.#.&.% % %.#.#.#.%.% % &.#.&.% % ",
-"% #.% % % #.% #.% % % #.% #.% % % % % #.% % % #.% #.% % % % % #.% % % % % #.% % % #.% #.% % % #.% % % #.% % % % % % % #.% #.% % #.&.% #.% % % % % #.% % % #.% #.% % % #.% #.% % % #.% #.% % % % % #.% #.% #.% #.% % % #.% % % % % #.% % % #.% % % #.% % % #.% #.% % % #.% #.% #.% #.% &.#.% #.&.% % % % % #.% &.#.% % % % ",
-"% #.% % % #.% #.% % % #.% #.% % % % % #.% % % #.% #.% % % % % #.% % % % % #.% % % #.% #.% % % #.% % % #.% % % % % % % #.% #.% % % #.% #.% % % % % #.% % % #.% #.% % % #.% #.% % % #.% #.% % % % % #.% % #.#.% #.% % % #.% % % % % #.% % % #.% % % #.% % % #.% #.% % % #.% #.#.% #.#.% #.% % % #.% % % % % #.% #.% % % % % ",
-"% %.% % % %.% %.#.#.#.% % %.#.#.#.%.% #.#.#.#.% % %.#.#.#.%.% #.% % % % % %.#.#.#.%.% %.% % % %.% % % #.% % % %.#.#.#.%.% %.% % % %.% %.#.#.#.&.% %.% % % %.% #.% % % #.% %.#.#.#.%.% %.% % % % % %.#.#.#.%.% %.% % % %.% %.#.#.#.%.% % % %.% % % &.#.#.#.#.% % #.#.#.% % #.% % % #.% %.% % % #.% %.#.#.#.%.% %.#.#.#.%.% ",
+"% &.$.$.$.&.% @.$.$.$.% % @.$.$.$. at .% @.$.$.$.% % @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.% % % @.% % % @.% % % % % % % @.% @.% % % @.% @.% % % % % $.% % % $.% @.$.$.$.% % @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.$.$.$. at .% @.% % % @.% @.% % % @.% @.% % % @.% @.% % % @.% @.% % % @.% @.$.$.$. at .% ",
+"% $.% % % $.% $.% % % $.% $.% % % % % $.% % % $.% $.% % % % % $.% % % % % $.% % % % % $.% % % $.% % % $.% % % % % % % $.% $.% % % $.% $.% % % % % $.$.% $.$.% $.% % % $.% $.% % % $.% $.% % % $.% $.% % % $.% $.% % % $.% $.% % % % % % % $.% % % $.% % % $.% $.% % % $.% $.% % % $.% $.% % % $.% $.% % % $.% % % % % $.% ",
+"% $.% % % $.% $.% % % $.% $.% % % % % $.% % % $.% $.% % % % % $.% % % % % $.% % % % % $.% % % $.% % % $.% % % % % % % $.% $.% % $.&.% $.% % % % % $.% $.% $.% $.% % % $.% $.% % % $.% $.% % % $.% $.% % % $.% $.% % % $.% $.% % % % % % % $.% % % $.% % % $.% $.% % % $.% $.% % % $.% &.$.% $.&.% $.% % % $.% % % % $.&.% ",
+"% @.$.$.$. at .% @.$.$.$.% % @.% % % % % @.% % % @.% @.$.$.$.% % @.$.$.$.% % @.&.$.$. at .% @.$.$.$. at .% % % @.% % % % % % % @.% @.$.$.&.% % @.% % % % % @.% % % @.% @.% % % @.% @.% % % @.% @.$.$.$. at .% @.$.% % @.% @.$.$.$.% % @.$.$.$. at .% % % @.% % % @.% % % @.% @.% % % @.% @.% % % @.% % &.$.&.% % @.$.$.$. at .% % &.$.&.% % ",
+"% $.% % % $.% $.% % % $.% $.% % % % % $.% % % $.% $.% % % % % $.% % % % % $.% % % $.% $.% % % $.% % % $.% % % % % % % $.% $.% % $.&.% $.% % % % % $.% % % $.% $.% % % $.% $.% % % $.% $.% % % % % $.% $.% $.% $.% % % $.% % % % % $.% % % $.% % % $.% % % $.% $.% % % $.% $.% $.% $.% &.$.% $.&.% % % % % $.% &.$.% % % % ",
+"% $.% % % $.% $.% % % $.% $.% % % % % $.% % % $.% $.% % % % % $.% % % % % $.% % % $.% $.% % % $.% % % $.% % % % % % % $.% $.% % % $.% $.% % % % % $.% % % $.% $.% % % $.% $.% % % $.% $.% % % % % $.% % $.$.% $.% % % $.% % % % % $.% % % $.% % % $.% % % $.% $.% % % $.% $.$.% $.$.% $.% % % $.% % % % % $.% $.% % % % % ",
+"% @.% % % @.% @.$.$.$.% % @.$.$.$. at .% $.$.$.$.% % @.$.$.$. at .% $.% % % % % @.$.$.$. at .% @.% % % @.% % % $.% % % @.$.$.$. at .% @.% % % @.% @.$.$.$.&.% @.% % % @.% $.% % % $.% @.$.$.$. at .% @.% % % % % @.$.$.$. at .% @.% % % @.% @.$.$.$. at .% % % @.% % % &.$.$.$.$.% % $.$.$.% % $.% % % $.% @.% % % $.% @.$.$.$. at .% @.$.$.$. at .% ",
 "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % ",
 "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %       % % % % % % % % ",
-"% % ........% % % +.+.+.+.$.% $......... at .% $.........$.% $.+.+.+.+.$.% $.........$.% $......... at .% $.........$.% $......... at .% $......... at .% % % % %         % % ........% % % ........% % % % % % % ........% % % ........% %   % % +.+.+.+.% % % +.+.+.+.% % % % % % % +.+.+.+.% % % +.+.+.+.% %       % % #.+.+.+.#.% ",
-"% ..% % % % ..% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% ..% % % % +.% ..% % % % +.% +.% % % % ..% ..% % % % ..% ..% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.%       % #.% #.% #.+.% ",
-"% ..% % % % ..% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% ..% % % % +.% ..% % % % +.% +.% % % % ..% ..% % % % ..% ..% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.%       % +.#.% #.% +.% ",
-"% ..% % % % ..% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% ..% % % % +.% ..% % % % +.% +.% % % % ..% ..% % % % ..% ..% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.%       % +.% #.% #.+.% ",
-"% ..% % % % ..% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% ..% % % % +.% ..% % % % +.% +.% % % % ..% ..% % % % ..% ..% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.%       % +.#.% #.% #.% ",
-"% $.+.+.+.+.$.% % +.+.+.+.$.% $.........$.% $.........$.% $.........$.% $.........$.% $.........$.% % +.+.+.+.$.% $.........$.% $.........$.% % % % %         % $.+.+.+.+.$.% $.+.+.+.+.$.% % % % % $.+.+.+.+.$.% $.+.+.+.+.$.%   % % +.+.+.+.% % % +.+.+.+.% % % % % % % +.+.+.+.% % % +.+.+.+.% %       % #.+.+.+.#.% % ",
-"% ..% % % % ..% +.% % % % ..% ..% % % % +.% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.%       % +.% % % % +.% ",
-"% ..% % % % ..% +.% % % % ..% ..% % % % +.% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % % % % +.% % % % +.% +.% % % % +.%       % #.#.#.#.#.+.% ",
-"% ..% % % % ..% +.% % % % ..% ..% % % % +.% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.%       % #.% % % #.#.% ",
-"% ..% % % % ..% +.% % % % ..% ..% % % % +.% +.% % % % ..% +.% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% ..% % % % ..% +.% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   % +.% % % % +.% +.% % % % +.% % +.% % +.% % % % +.% +.% % % % +.%       % #.% % % #.#.% ",
-"% % ........% % % +.+.+.+.$.% $.........$.% $.........$.% % +.+.+.+.$.% $.........$.% $.........$.% % +.+.+.+.$.% $.........$.% $.........$.% % % % %         % % ........% % % ........% % % % % % % ........% % % ........% %   % % +.+.+.+.% % % +.+.+.+.% % % % % % % +.+.+.+.% % % +.+.+.+.% %       % #.#.#.#.#.% % ",
+"% % ........% % %  . . . .%.% %.........#.% %.........%.% %. . . . .%.% %.........%.% %.........#.% %.........%.% %.........#.% %.........#.% % % % %         % % ........% % % ........% % % % % % % ........% % % ........% %   % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% %       % % $. . . .$.% ",
+"% ..% % % % ..%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..% ..% % % %  .% ..% % % %  .%  .% % % % ..% ..% % % % ..% ..% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .%       % $.% $.% $. .% ",
+"% ..% % % % ..%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..% ..% % % %  .% ..% % % %  .%  .% % % % ..% ..% % % % ..% ..% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .%       %  .$.% $.%  .% ",
+"% ..% % % % ..%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..% ..% % % %  .% ..% % % %  .%  .% % % % ..% ..% % % % ..% ..% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .%       %  .% $.% $. .% ",
+"% ..% % % % ..%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..% ..% % % %  .% ..% % % %  .%  .% % % % ..% ..% % % % ..% ..% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .%       %  .$.% $.% $.% ",
+"% %. . . . .%.% %  . . . .%.% %.........%.% %.........%.% %.........%.% %.........%.% %.........%.% %  . . . .%.% %.........%.% %.........%.% % % % %         % %. . . . .%.% %. . . . .%.% % % % % %. . . . .%.% %. . . . .%.%   % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% %       % $. . . .$.% % ",
+"% ..% % % % ..%  .% % % % ..% ..% % % %  .%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .%       %  .% % % %  .% ",
+"% ..% % % % ..%  .% % % % ..% ..% % % %  .%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% % % % %         % ..% % % % ..% ..% % % % ..% % % % % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% % % % %  .% % % %  .%  .% % % %  .%       % $.$.$.$.$. .% ",
+"% ..% % % % ..%  .% % % % ..% ..% % % %  .%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .%       % $.% % % $.$.% ",
+"% ..% % % % ..%  .% % % % ..% ..% % % %  .%  .% % % % ..%  .% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% ..% % % % ..%  .% % % % ..% % ..% %         % ..% % % % ..% ..% % % % ..% % ..% % ..% % % % ..% ..% % % % ..%   %  .% % % %  .%  .% % % %  .% %  .% %  .% % % %  .%  .% % % %  .%       % $.% % % $.$.% ",
+"% % ........% % %  . . . .%.% %.........%.% %.........%.% %  . . . .%.% %.........%.% %.........%.% %  . . . .%.% %.........%.% %.........%.% % % % %         % % ........% % % ........% % % % % % % ........% % % ........% %   % %  . . . .% % %  . . . .% % % % % % %  . . . .% % %  . . . .% %       % $.$.$.$.$.% % ",
 "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %   % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %       % % % % % % % % "};
diff --git a/master_low.xpm b/master_low.xpm
index 03ca81d..cbb21ed 100644
--- a/master_low.xpm
+++ b/master_low.xpm
@@ -11,13 +11,13 @@ static char * master_low_xpm[] = {
 "&	c #403B00",
 "*	c #034000",
 "=	c #AAAFA9",
-"-	c #20B2AE",
-";	c #004941",
-">	c #188A86",
-",	c #22B2AE",
-"'	c #C7C7C7",
-")	c #107D79",
-"!	c #027E72",
+"-	c #004941",
+";	c #20B2AE",
+">	c #027E72",
+",	c #188A86",
+"'	c #22B2AE",
+")	c #C7C7C7",
+"!	c #107D79",
 "~	c #034A40",
 "                                                                . ++++ at ++++@++++@####@####@####@####@$$$$@$$$$@$$$$@$$$$                                     ",
 "                                                                . ++++ at ++++@++++@####@####@####@####@$$$$@$$$$@$$$$@$$$$                                     ",
@@ -32,78 +32,78 @@ static char * master_low_xpm[] = {
 "    .%%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                     ",
 "    .%%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                     ",
 "    .%%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                     ",
-"    ========================================================    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                     ",
-"                                                                . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                     ",
-"    .............................  .........................    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@=  .@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                     ",
-"    .@@@@@@-----@@@@----------@@=  .@@@@@;;;@@@;;;@@@-@@@@@=    .                                                                                            ",
-"    .@@@@@-@@@@---@@-@@@@@@@@-@@=  .@@;@;@@@;@;@@@;@- at -@-@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
-"    .@@@@@-@@@@-@@@@-@@@@@@@@--@=  .@@;@;@@@;@;@@@;@@- at -@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
-"    .@@@---@@@@-@@@@-@@@@@@@@--@=  .@@@@@;;;@@@;;;@@@@-@@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
-"    .@@-@@-@@@@---@@-@@@@@@@@--@=  .@@;@;@@@;@;@@@;@@- at -@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
-"    . at -@@@@-----@@@@-@@@@@@@@-@@=  .@@;@;@@@;@;@@@;@- at -@-@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
-"    . at -@@@@@@@@@@@@@----------@@=  .@@@@@;;;@@@;;;@@@@@-@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@=  .@@@@@@@@@@@@@@@@@@@@@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@=  .@@@@@@@@@@@@@@@@@@@@@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@****                                     ",
+"    ========================================================    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   ",
+"                                                                . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@----@@@----@@@@@@@----@@@----@@   ",
+"    .............................  .........................    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @-@@@@- at -@@@@-@@;@@-@@@@- at -@@@@-@   ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@=  .@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @-@@@@- at -@@@@-@@;@@-@@@@- at -@@@@-@   ",
+"    .@@@@@@;;;;;@@@@;;;;;;;;;;@@=  .@@@@@---@@@---@@@;@@@@@=    .                                                        @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@   ",
+"    .@@@@@;@@@@;;;@@;@@@@@@@@;@@=  .@@- at -@@@- at -@@@-@;@;@;@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @>;;;;>@>;;;;>@@@@@>;;;;>@>;;;;>@   ",
+"    .@@@@@;@@@@;@@@@;@@@@@@@@;;@=  .@@- at -@@@- at -@@@-@@;@;@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   ",
+"    .@@@;;;@@@@;@@@@;@@@@@@@@;;@=  .@@@@@---@@@---@@@@;@@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @-@@@@- at -@@@@-@@;@@-@@@@- at -@@@@-@   ",
+"    .@@;@@;@@@@;;;@@;@@@@@@@@;;@=  .@@- at -@@@- at -@@@-@@;@;@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @-@@@@- at -@@@@-@@;@@-@@@@- at -@@@@-@   ",
+"    .@;@@@@;;;;;@@@@;@@@@@@@@;@@=  .@@- at -@@@- at -@@@-@;@;@;@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@   ",
+"    .@;@@@@@@@@@@@@@;;;;;;;;;;@@=  .@@@@@---@@@---@@@@@;@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@   ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@=  .@@@@@@@@@@@@@@@@@@@@@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @@----@@@----@@@@@@@----@@@----@@   ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@=  .@@@@@@@@@@@@@@@@@@@@@@@=    . %%%%@%%%%@%%%%@&&&&@&&&&@&&&&@&&&&@****@****@****@**** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   ",
 "    =============================  =========================    .                                                                                            ",
 "                                                                . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                     ",
-"                                                                . @@---@@@;;;>@>--->@>--->@>;;;>@>--->@>--->@>--->@>--->@>--->@@-@@@@@@@                     ",
-"    .....................................  ................=    . @-@@@-@;@@@-@;@@@-@;@@@- at -@@@- at -@@@;@-@@@;@;@@@- at -@@@- at -@@@- at -@- at -@@-@                     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @-@@@-@;@@@-@;@@@-@;@@@- at -@@@- at -@@@;@-@@@;@;@@@- at -@@@- at -@@@-@@- at -@@@>@                     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @>;;;>@@;;;>@>--->@@--->@>--->@>--->@>--->@@;;;>@>--->@>--->@@@-@@@@@@                     ",
-"    .@@@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@@=  @@@@@@@@@;;;;@@@=    . @-@@@-@;@@@- at -@@@;@;@@@-@;@@@-@;@@@- at -@@@-@;@@@- at -@@@-@;@@@-@@- at -@@@@@                     ",
-"    .@@;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@@=  @@@@@@@@;@@@@;@@=    . @-@@@-@;@@@- at -@@@;@;@@@-@;@@@-@;@@@- at -@@@-@;@@@- at -@@@-@;@@@- at -@- at -@@-@                     ",
-"    .@@;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@@=  @,,,,@@@;@@@@;@@=    . @@---@@@;;;>@>--->@>--->@@;;;>@>--->@>--->@@;;;>@>--->@>--->@@@@-@@@>@                     ",
-"    .@@;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@@=  @,@@@,@@;@@@@;@@=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                     ",
-"    .@@;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@@=  @,@@@,@@;@@@@;@@=    .                                                                                            ",
-"    .@@@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@@=  @,@@@,@@@;;;;@@@=    . @@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ ................' ................'     ",
-"    .@@;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@@=  @,,,,@@@;@@@@;@@=    . @@@@@@-----@@@ @----------@@ @>@@---@@@---@@@-@@@@ @@@@@@@@@@@@@@@@' @@@@@@@@@@@@@@@@'     ",
-"    .@@;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@@=  @,@@@,@@;@@@@;@@=    . @@@@@-@@@@---@ @-@@@@@@@@-@@ @- at -@@@- at -@@@- at -@- at -@ @@@@@@@@@@@@@@@@' @@@@@@@@@@@@@@@@'     ",
-"    .@@;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@@=  @,@@@,@@;@@@@;@@=    . @@@@@-@@@@-@@@ @-@@@@@@@@--@ @- at -@@@- at -@@@-@@- at -@@ @@@@@@@@@;;;;)@@' @@@@@@@@)---->@@'     ",
-"    .@@;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@@=  @,@@@,@@;@@@@;@@=    . @@@---@@@@-@@@ @-@@@@@@@@--@ @>@>;;;>@>;;;>@@@-@@@ @@@@@@@@;@@@@-@@' @@@@@@@@;@@@@-@@'     ",
-"    .@@@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@@=  @,,,,@@@@;;;;@@@=    . @@-@@-@@@@---@ @-@@@@@@@@--@ @- at -@@@- at -@@@-@@- at -@@ @,,,,@@@;@@@@-@@' @,,,,@@@;@@@@-@@'     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @-@@@@-----@@@ @-@@@@@@@@-@@ @- at -@@@- at -@@@- at -@- at -@ @,@@@,@@;@@@@-@@' @,@@@,@@;@@@@-@@'     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @-@@@@@@@@@@@@ @----------@@ @>@@---@@@---@@@@@-@@ @,@@@,@@;@@@@-@@' @,@@@,@@;@@@@-@@'     ",
-"    =====================================  =================    . @@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @,@@@,@@@;;;;)@@' @,@@@,@@)----)@@'     ",
-"                                                                .                                                    @,,,,@@@;@@@@-@@' @,,,,@@@-@@@@;@@'     ",
-"                                                                . @@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @,@@@,@@;@@@@-@@' @,@@@,@@-@@@@;@@'     ",
-"    ........................................................    . @@@@@@;;;;;@@@ @;;;;;;;;;;@@ @@@@;;;@@@;;;@@@;@@@@ @,@@@,@@;@@@@-@@' @,@@@,@@-@@@@;@@'     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@;@@@@;;;@ @;@@@@@@@@;@@ @;@;@@@;@;@@@;@;@;@;@ @,@@@,@@;@@@@-@@' @,@@@,@@-@@@@;@@'     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@;@@@@;@@@ @;@@@@@@@@;;@ @;@;@@@;@;@@@;@@;@;@@ @,,,,@@@@;;;;)@@' @,,,,@@@)----)@@'     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@;;;@@@@;@@@ @;@@@@@@@@;;@ @@@@;;;@@@;;;@@@@;@@@ @@@@@@@@@@@@@@@@' @@@@@@@@@@@@@@@@'     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@;@@;@@@@;;;@ @;@@@@@@@@;;@ @;@;@@@;@;@@@;@@;@;@@ @@@@@@@@@@@@@@@@' @@@@@@@@@@@@@@@@'     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @;@@@@;;;;;@@@ @;@@@@@@@@;@@ @;@;@@@;@;@@@;@;@;@;@ ''''''''''''''''' '''''''''''''''''     ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @;@@@@@@@@@@@@ @;;;;;;;;;;@@ @@@@;;;@@@;;;@@@@@;@@                                         ",
+"                                                                . @@;;;@@@---,@,;;;,@,;;;,@,---,@,;;;,@,;;;,@,;;;,@,;;;,@,;;;,@@;@@@@@@@                     ",
+"    .....................................  ................=    . @;@@@;@-@@@;@-@@@;@-@@@;@;@@@;@;@@@-@;@@@- at -@@@;@;@@@;@;@@@;@;@;@;@@;@                     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @;@@@;@-@@@;@-@@@;@-@@@;@;@@@;@;@@@-@;@@@- at -@@@;@;@@@;@;@@@;@@;@;@@@,@                     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @,---,@@---,@,;;;,@@;;;,@,;;;,@,;;;,@,;;;,@@---,@,;;;,@,;;;,@@@;@@@@@@                     ",
+"    .@@@----@@@----@@@@@@@----@@@----@@@=  @@@@@@@@@----@@@=    . @;@@@;@-@@@;@;@@@- at -@@@;@-@@@;@-@@@;@;@@@;@-@@@;@;@@@;@-@@@;@@;@;@@@@@                     ",
+"    .@@-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@@=  @@@@@@@@-@@@@-@@=    . @;@@@;@-@@@;@;@@@- at -@@@;@-@@@;@-@@@;@;@@@;@-@@@;@;@@@;@-@@@;@;@;@;@@;@                     ",
+"    .@@-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@@=  @''''@@@-@@@@-@@=    . @@;;;@@@---,@,;;;,@,;;;,@@---,@,;;;,@,;;;,@@---,@,;;;,@,;;;,@@@@;@@@,@                     ",
+"    .@@-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@@=  @'@@@'@@-@@@@-@@=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                     ",
+"    .@@-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@@=  @'@@@'@@-@@@@-@@=    .                                                                                            ",
+"    .@@@----@@@----@@@@@@@----@@@----@@@=  @'@@@'@@@----@@@=    . @@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ ................) ................)     ",
+"    .@@-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@@=  @''''@@@-@@@@-@@=    . @@@@@@;;;;;@@@ @;;;;;;;;;;@@ @,@@;;;@@@;;;@@@;@@@@ @@@@@@@@@@@@@@@@) @@@@@@@@@@@@@@@@)     ",
+"    .@@-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@@=  @'@@@'@@-@@@@-@@=    . @@@@@;@@@@;;;@ @;@@@@@@@@;@@ @;@;@@@;@;@@@;@;@;@;@ @@@@@@@@@@@@@@@@) @@@@@@@@@@@@@@@@)     ",
+"    .@@-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@@=  @'@@@'@@-@@@@-@@=    . @@@@@;@@@@;@@@ @;@@@@@@@@;;@ @;@;@@@;@;@@@;@@;@;@@ @@@@@@@@@----!@@) @@@@@@@@!;;;;,@@)     ",
+"    .@@-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@@=  @'@@@'@@-@@@@-@@=    . @@@;;;@@@@;@@@ @;@@@@@@@@;;@ @,@,---,@,---,@@@;@@@ @@@@@@@@-@@@@;@@) @@@@@@@@-@@@@;@@)     ",
+"    .@@@----@@@----@@@@@@@----@@@----@@@=  @''''@@@@----@@@=    . @@;@@;@@@@;;;@ @;@@@@@@@@;;@ @;@;@@@;@;@@@;@@;@;@@ @''''@@@-@@@@;@@) @''''@@@-@@@@;@@)     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @;@@@@;;;;;@@@ @;@@@@@@@@;@@ @;@;@@@;@;@@@;@;@;@;@ @'@@@'@@-@@@@;@@) @'@@@'@@-@@@@;@@)     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=  @@@@@@@@@@@@@@@@=    . @;@@@@@@@@@@@@ @;;;;;;;;;;@@ @,@@;;;@@@;;;@@@@@;@@ @'@@@'@@-@@@@;@@) @'@@@'@@-@@@@;@@)     ",
+"    =====================================  =================    . @@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @'@@@'@@@----!@@) @'@@@'@@!;;;;!@@)     ",
+"                                                                .                                                    @''''@@@-@@@@;@@) @''''@@@;@@@@-@@)     ",
+"                                                                . @@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @'@@@'@@-@@@@;@@) @'@@@'@@;@@@@-@@)     ",
+"    ........................................................    . @@@@@@-----@@@ @----------@@ @@@@---@@@---@@@-@@@@ @'@@@'@@-@@@@;@@) @'@@@'@@;@@@@-@@)     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@-@@@@---@ @-@@@@@@@@-@@ @- at -@@@- at -@@@- at -@- at -@ @'@@@'@@-@@@@;@@) @'@@@'@@;@@@@-@@)     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@-@@@@-@@@ @-@@@@@@@@--@ @- at -@@@- at -@@@-@@- at -@@ @''''@@@@----!@@) @''''@@@!;;;;!@@)     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@---@@@@-@@@ @-@@@@@@@@--@ @@@@---@@@---@@@@-@@@ @@@@@@@@@@@@@@@@) @@@@@@@@@@@@@@@@)     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@-@@-@@@@---@ @-@@@@@@@@--@ @- at -@@@- at -@@@-@@- at -@@ @@@@@@@@@@@@@@@@) @@@@@@@@@@@@@@@@)     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @-@@@@-----@@@ @-@@@@@@@@-@@ @- at -@@@- at -@@@- at -@- at -@ ))))))))))))))))) )))))))))))))))))     ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @-@@@@@@@@@@@@ @----------@@ @@@@---@@@---@@@@@-@@                                         ",
 "    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@                                         ",
 "    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    .                                                                                            ",
 "    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@           ",
-"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@,,,@@@@@@!@!,,,!@!,,,!@!@@@!@!,,,!@!,,,!@!,,,!@!,,,!@!,,,!@@@@@@@@@@@@@ @@@@@@           ",
-"    ========================================================    . @,@@@,@@@@@,@@@@@,@@@@@,@,@@@,@,@@@@@,@@@@@@@@@,@,@@@,@,@@@,@@@@@@@@@@@@@ @@@@@@           ",
-"                                                                . @,@@@,@@@@@,@@@@@,@@@@@,@,@@@,@,@@@@@,@@@@@@@@@,@,@@@,@,@@@,@@@@@@@@@@@@@ @@@@@@           ",
-"                                                                . @!@@@!@@@@@!@!,,,!@@,,,!@!,,,!@!,,,!@!,,,!@@@@@!@~,,,~@!,,,!@!,,,!@@@@@@@ @@@@@@           ",
-"                                                                . @,@@@,@@@@@,@,@@@@@@@@@,@@@@@,@@@@@,@,@@@,@@@@@,@,@@@,@@@@@,@@@@@@@@@@@@@ @@@@@@           ",
-"                                                                . @,@@@,@@@@@,@,@@@@@@@@@,@@@@@,@@@@@,@,@@@,@@@@@,@,@@@,@@@@@,@@@@@@@@@@@@@ @@@@@@           ",
-"................................................................. @@,,,@@@@@@,@!,,,!@!,,,!@@@@@!@!,,,!@!,,,!@@@@@!@!,,,!@!,,,!@@@@@@@@@@@@@ @@@@,@           ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=    . @@'''@@@@@@>@>'''>@>'''>@>@@@>@>'''>@>'''>@>'''>@>'''>@>'''>@@@@@@@@@@@@@ @@@@@@           ",
+"    ========================================================    . @'@@@'@@@@@'@@@@@'@@@@@'@'@@@'@'@@@@@'@@@@@@@@@'@'@@@'@'@@@'@@@@@@@@@@@@@ @@@@@@           ",
+"                                                                . @'@@@'@@@@@'@@@@@'@@@@@'@'@@@'@'@@@@@'@@@@@@@@@'@'@@@'@'@@@'@@@@@@@@@@@@@ @@@@@@           ",
+"                                                                . @>@@@>@@@@@>@>'''>@@'''>@>'''>@>'''>@>'''>@@@@@>@~'''~@>'''>@>'''>@@@@@@@ @@@@@@           ",
+"                                                                . @'@@@'@@@@@'@'@@@@@@@@@'@@@@@'@@@@@'@'@@@'@@@@@'@'@@@'@@@@@'@@@@@@@@@@@@@ @@@@@@           ",
+"                                                                . @'@@@'@@@@@'@'@@@@@@@@@'@@@@@'@@@@@'@'@@@'@@@@@'@'@@@'@@@@@'@@@@@@@@@@@@@ @@@@@@           ",
+"................................................................. @@'''@@@@@@'@>'''>@>'''>@@@@@>@>'''>@>'''>@@@@@>@>'''>@>'''>@@@@@@@@@@@@@ @@@@'@           ",
 "                                                                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                  ",
 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@~,,,~@!,,,@@!,,,!@!,,,@@!,,,!@!,,,!@!,,,!@!@@@!@@@!@@@@@@@!@!@@@!@!@@@@@,@@@,@!,,,@@!,,,!@!,,,!@!,,,!@!,,,!@!,,,!@!,,,!@!@@@!@!@@@!@!@@@!@!@@@!@!@@@!@!,,,!@",
-"@,@@@,@,@@@,@,@@@@@,@@@,@,@@@@@,@@@@@,@@@@@,@@@,@@@,@@@@@@@,@,@@@,@,@@@@@,,@,,@,@@@,@,@@@,@,@@@,@,@@@,@,@@@,@,@@@@@@@,@@@,@@@,@,@@@,@,@@@,@,@@@,@,@@@,@@@@@,@",
-"@,@@@,@,@@@,@,@@@@@,@@@,@,@@@@@,@@@@@,@@@@@,@@@,@@@,@@@@@@@,@,@@,~@,@@@@@,@,@,@,@@@,@,@@@,@,@@@,@,@@@,@,@@@,@,@@@@@@@,@@@,@@@,@,@@@,@,@@@,@~,@,~@,@@@,@@@@,~@",
-"@!,,,!@!,,,@@!@@@@@!@@@!@!,,,@@!,,,@@!~,,!@!,,,!@@@!@@@@@@@!@!,,~@@!@@@@@!@@@!@!@@@!@!@@@!@!,,,!@!,@@!@!,,,@@!,,,!@@@!@@@!@@@!@!@@@!@!@@@!@@~,~@@!,,,!@@~,~@@",
-"@,@@@,@,@@@,@,@@@@@,@@@,@,@@@@@,@@@@@,@@@,@,@@@,@@@,@@@@@@@,@,@@,~@,@@@@@,@@@,@,@@@,@,@@@,@,@@@@@,@,@,@,@@@,@@@@@,@@@,@@@,@@@,@,@@@,@,@,@,@~,@,~@@@@@,@~,@@@@",
-"@,@@@,@,@@@,@,@@@@@,@@@,@,@@@@@,@@@@@,@@@,@,@@@,@@@,@@@@@@@,@,@@@,@,@@@@@,@@@,@,@@@,@,@@@,@,@@@@@,@@,,@,@@@,@@@@@,@@@,@@@,@@@,@,@@@,@,,@,,@,@@@,@@@@@,@,@@@@@",
-"@!@@@!@!,,,@@!,,,!@,,,,@@!,,,!@,@@@@@!,,,!@!@@@!@@@,@@@!,,,!@!@@@!@!,,,~@!@@@!@,@@@,@!,,,!@!@@@@@!,,,!@!@@@!@!,,,!@@@!@@@~,,,,@@,,,@@,@@@,@!@@@,@!,,,!@!,,,!@",
+"@~'''~@>'''@@>'''>@>'''@@>'''>@>'''>@>'''>@>@@@>@@@>@@@@@@@>@>@@@>@>@@@@@'@@@'@>'''@@>'''>@>'''>@>'''>@>'''>@>'''>@>'''>@>@@@>@>@@@>@>@@@>@>@@@>@>@@@>@>'''>@",
+"@'@@@'@'@@@'@'@@@@@'@@@'@'@@@@@'@@@@@'@@@@@'@@@'@@@'@@@@@@@'@'@@@'@'@@@@@''@''@'@@@'@'@@@'@'@@@'@'@@@'@'@@@'@'@@@@@@@'@@@'@@@'@'@@@'@'@@@'@'@@@'@'@@@'@@@@@'@",
+"@'@@@'@'@@@'@'@@@@@'@@@'@'@@@@@'@@@@@'@@@@@'@@@'@@@'@@@@@@@'@'@@'~@'@@@@@'@'@'@'@@@'@'@@@'@'@@@'@'@@@'@'@@@'@'@@@@@@@'@@@'@@@'@'@@@'@'@@@'@~'@'~@'@@@'@@@@'~@",
+"@>'''>@>'''@@>@@@@@>@@@>@>'''@@>'''@@>~''>@>'''>@@@>@@@@@@@>@>''~@@>@@@@@>@@@>@>@@@>@>@@@>@>'''>@>'@@>@>'''@@>'''>@@@>@@@>@@@>@>@@@>@>@@@>@@~'~@@>'''>@@~'~@@",
+"@'@@@'@'@@@'@'@@@@@'@@@'@'@@@@@'@@@@@'@@@'@'@@@'@@@'@@@@@@@'@'@@'~@'@@@@@'@@@'@'@@@'@'@@@'@'@@@@@'@'@'@'@@@'@@@@@'@@@'@@@'@@@'@'@@@'@'@'@'@~'@'~@@@@@'@~'@@@@",
+"@'@@@'@'@@@'@'@@@@@'@@@'@'@@@@@'@@@@@'@@@'@'@@@'@@@'@@@@@@@'@'@@@'@'@@@@@'@@@'@'@@@'@'@@@'@'@@@@@'@@''@'@@@'@@@@@'@@@'@@@'@@@'@'@@@'@''@''@'@@@'@@@@@'@'@@@@@",
+"@>@@@>@>'''@@>'''>@''''@@>'''>@'@@@@@>'''>@>@@@>@@@'@@@>'''>@>@@@>@>'''~@>@@@>@'@@@'@>'''>@>@@@@@>'''>@>@@@>@>'''>@@@>@@@~''''@@'''@@'@@@'@>@@@'@>'''>@>'''>@",
 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   @@@@@@@@",
-"@@----@@@;;;;)@)---->@)----)@);;;;)@)----)@)---->@)----)@)---->@)---->@@@@@    @@----@@@----@@@@@@@----@@@----@@ @@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@   @@,;;;,@",
-"@-@@@@-@;@@@@-@;@@@@-@;@@@@- at -@@@@- at -@@@@;@-@@@@;@;@@@@- at -@@@@- at -@@@@-@@-@@    @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@   @,@,@,;@",
-"@-@@@@-@;@@@@-@;@@@@-@;@@@@- at -@@@@- at -@@@@;@-@@@@;@;@@@@- at -@@@@- at -@@@@-@@-@@    @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@   @;,@,@;@",
-"@-@@@@-@;@@@@-@;@@@@-@;@@@@- at -@@@@- at -@@@@;@-@@@@;@;@@@@- at -@@@@- at -@@@@-@@@@@    @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@   @;@,@,;@",
-"@-@@@@-@;@@@@-@;@@@@-@;@@@@- at -@@@@- at -@@@@;@-@@@@;@;@@@@- at -@@@@- at -@@@@-@@@@@    @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@   @;,@,@,@",
-"@);;;;)@@;;;;)@)----)@)----)@)----)@)----)@)----)@@;;;;)@)----)@)----)@@@@@    @);;;;)@);;;;)@@@@@);;;;)@);;;;)@ @@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@   @,;;;,@@",
-"@-@@@@-@;@@@@- at -@@@@;@;@@@@-@;@@@@-@;@@@@- at -@@@@-@;@@@@- at -@@@@-@;@@@@-@@@@@    @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@   @;@@@@;@",
-"@-@@@@-@;@@@@- at -@@@@;@;@@@@-@;@@@@-@;@@@@- at -@@@@-@;@@@@- at -@@@@-@;@@@@-@@@@@    @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@   @,,,,,;@",
-"@-@@@@-@;@@@@- at -@@@@;@;@@@@-@;@@@@-@;@@@@- at -@@@@-@;@@@@- at -@@@@-@;@@@@-@@-@@    @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@   @,@@@,,@",
-"@-@@@@-@;@@@@- at -@@@@;@;@@@@-@;@@@@-@;@@@@- at -@@@@-@;@@@@- at -@@@@-@;@@@@-@@-@@    @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@ @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@   @,@@@,,@",
-"@@----@@@;;;;)@)----)@)----)@@;;;;)@)----)@)----)@@;;;;)@)----)@)----)@@@@@    @@----@@@----@@@@@@@----@@@----@@ @@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@   @,,,,,@@",
+"@@;;;;@@@----!@!;;;;,@!;;;;!@!----!@!;;;;!@!;;;;,@!;;;;!@!;;;;,@!;;;;,@@@@@    @@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@ @@----@@@----@@@@@@@----@@@----@@   @@'---'@",
+"@;@@@@;@-@@@@;@-@@@@;@-@@@@;@;@@@@;@;@@@@-@;@@@@- at -@@@@;@;@@@@;@;@@@@;@@;@@    @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@   @'@'@'-@",
+"@;@@@@;@-@@@@;@-@@@@;@-@@@@;@;@@@@;@;@@@@-@;@@@@- at -@@@@;@;@@@@;@;@@@@;@@;@@    @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@   @-'@'@-@",
+"@;@@@@;@-@@@@;@-@@@@;@-@@@@;@;@@@@;@;@@@@-@;@@@@- at -@@@@;@;@@@@;@;@@@@;@@@@@    @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@   @-@'@'-@",
+"@;@@@@;@-@@@@;@-@@@@;@-@@@@;@;@@@@;@;@@@@-@;@@@@- at -@@@@;@;@@@@;@;@@@@;@@@@@    @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@   @-'@'@'@",
+"@!----!@@----!@!;;;;!@!;;;;!@!;;;;!@!;;;;!@!;;;;!@@----!@!;;;;!@!;;;;!@@@@@    @!----!@!----!@@@@@!----!@!----!@ @@----@@@----@@@@@@@----@@@----@@   @'---'@@",
+"@;@@@@;@-@@@@;@;@@@@- at -@@@@;@-@@@@;@-@@@@;@;@@@@;@-@@@@;@;@@@@;@-@@@@;@@@@@    @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@   @-@@@@-@",
+"@;@@@@;@-@@@@;@;@@@@- at -@@@@;@-@@@@;@-@@@@;@;@@@@;@-@@@@;@;@@@@;@-@@@@;@@@@@    @;@@@@;@;@@@@;@@@@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@@@@-@@@@- at -@@@@-@   @'''''-@",
+"@;@@@@;@-@@@@;@;@@@@- at -@@@@;@-@@@@;@-@@@@;@;@@@@;@-@@@@;@;@@@@;@-@@@@;@@;@@    @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@   @'@@@''@",
+"@;@@@@;@-@@@@;@;@@@@- at -@@@@;@-@@@@;@-@@@@;@;@@@@;@-@@@@;@;@@@@;@-@@@@;@@;@@    @;@@@@;@;@@@@;@@;@@;@@@@;@;@@@@;@ @-@@@@- at -@@@@-@@-@@-@@@@- at -@@@@-@   @'@@@''@",
+"@@;;;;@@@----!@!;;;;!@!;;;;!@@----!@!;;;;!@!;;;;!@@----!@!;;;;!@!;;;;!@@@@@    @@;;;;@@@;;;;@@@@@@@;;;;@@@;;;;@@ @@----@@@----@@@@@@@----@@@----@@   @'''''@@",
 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@   @@@@@@@@"};
diff --git a/wmacpi-ng.c b/wmacpi-ng.c
index 4d968dd..a369058 100644
--- a/wmacpi-ng.c
+++ b/wmacpi-ng.c
@@ -35,7 +35,7 @@
 #include "libacpi.h"
 #include "wmacpi-ng.h"
 
-#define WMACPI_NG_VER "0.50"
+#define WMACPI_NG_VER "0.90"
 
 /* main pixmap */
 #ifdef LOW_COLOR
@@ -56,9 +56,7 @@ typedef struct {
     Pixmap text;		/* pixmap for text scroller */
     int tw;			/* text width inside text pixmap */
     int update;			/* need to redraw? */
-    int pressed;		/* is the button pressed? */
-    DspMode dspmode;		/* time remaining or battery timer */
-    Mode blink;			/* should we blink the LED? (critical battery) */
+    int blink;			/* should we blink the LED? (critical battery) */
 } Dockapp;
 
 /* for debug printing */
@@ -72,6 +70,10 @@ APMInfo *apminfo;
 int count = 0;			/* global timer variable */
 int noisy_critical = 0;		/* ring xbell annoyingly if critical? */
 
+/* Time for scroll updates */
+#define DEFAULT_UPDATE 150
+static int update_timeout = DEFAULT_UPDATE;
+
 /* proto for local stuff */
 static void new_window(char *name);
 static int open_display(char *display);
@@ -112,6 +114,18 @@ static void kill_battery_glyph(void)
     copy_xpm_area(82, 48, 12, 7, 20, 17);
 }
 
+/* clear the time display */
+static void clear_time_display(void)
+{
+    copy_xpm_area(114, 76, 31, 11, 7, 32);
+}
+
+/* set time display to -- -- */
+static void invalid_time_display(void)
+{
+    copy_xpm_area(122, 13, 31, 11, 7, 32);
+}
+
 static void redraw_window(void)
 {
     if (dockapp->update) {
@@ -312,6 +326,9 @@ static void display_percentage(int percent)
 
     eprint(0, "received: %d\n", percent);
 
+    if (percent == -1)
+	percent = 0;
+
     if (op == percent)
 	return;
 
@@ -343,25 +360,25 @@ static void display_percentage(int percent)
 static void display_time(int minutes)
 {
     static int ohour = -1, omin = -1;
-    static int counter;
     int hour, min, tmp;
 
-    if (minutes == -1) {	/* error - blink 00:00 */
-	counter++;
-	if (counter == 5) {
-	    copy_xpm_area(80, 76, 31, 11, 7, 32);
-	} else if (counter == 10) {
-	    copy_xpm_area(114, 76, 31, 11, 7, 32);
-	}
-	if (counter > 10)
-	    counter = 0;
+    if (minutes <= 0) {	/* error - clear the display */
+	invalid_time_display();
 	ohour = omin = -1;
 	return;
     }
 
     /* render time on the display */
     hour = minutes / 60;
-    min = minutes % 60;
+    /* our display area only fits %2d:%2d, so we need to make sure
+     * what we're displaying will fit in those constraints. I don't
+     * think we're likely to see any batteries that do more than 
+     * 100 hours any time soon, so it's fairly safe. */
+    if (hour >= 100) {
+	hour = 99;
+	min = 59;
+    } else
+	min = minutes % 60;
 
     if (hour == ohour && min == omin)
 	return;
@@ -391,19 +408,57 @@ enum panel_states {
     PS_NULL,
 };
 
+static void really_blink_power_glyph(void)
+{
+    static int counter = 0;
+
+    if (counter == 10) 
+	display_power_glyph();
+    else if (counter == 20) 
+	kill_power_glyph();
+    else if (counter > 30)
+	counter = 0;
+    counter++;
+}
+
+static void blink_power_glyph(void)
+{
+    if (dockapp->blink)
+	really_blink_power_glyph();
+}
+
+static void really_blink_battery_glyph(void)
+{
+    static int counter = 0;
+
+    if (counter == 10)
+	display_battery_glyph();
+    else if (counter == 20)
+	kill_battery_glyph();
+    else if (counter > 30)
+	counter = 0;
+    counter++;
+}    
+
+static void blink_battery_glyph(void)
+{
+    if (dockapp->blink)
+	really_blink_battery_glyph();
+}
+
 static void set_power_panel(void)
 {
     enum panel_states power = PS_NULL;
-    static int counter = 0;
-    battery *binfo = apminfo->binfo;
+    battery_t *binfo = apminfo->binfo;
+    adapter_t *ap = &apminfo->adapter;
 
-    if (apminfo->power == AC) {
+    if (ap->power == AC) {
 	if (power != PS_AC) {
 	    power = PS_AC;
 	    kill_battery_glyph();
 	    display_power_glyph();
 	}
-    } else if (apminfo->power == BATT) {
+    } else if (ap->power == BATT) {
 	if (power != PS_BATT) {
 	    power = PS_BATT;
 	    kill_power_glyph();
@@ -411,25 +466,14 @@ static void set_power_panel(void)
 	}
     }
 
-    if (binfo->charging) {
-	if (counter == 10) 
-	    display_power_glyph();
-	else if (counter == 20) 
-	    kill_power_glyph();
-	else if (counter > 30)
-	    counter = 0;
-	counter++;
-    }
+    if (binfo->charge_state == CHARGE)
+	blink_power_glyph();
 
-    if (binfo->capacity_state == CRITICAL) {
-	if (counter == 10)
-	    display_battery_glyph();
-	else if (counter == 20)
-	    kill_battery_glyph();
-	else if (counter > 30)
-	    counter = 0;
-	counter++;
-    }
+    if (binfo->state == CRIT)
+	blink_battery_glyph();
+
+    if (binfo->state == HARD_CRIT)
+	really_blink_battery_glyph();
 }
 
 /* 
@@ -453,13 +497,15 @@ enum messages {
     M_BATT,	/* on battery */
     M_LB,	/* low battery */
     M_CB,	/* critical low battery */
+    M_HCB,	/* battery reported critical capacity state */
     M_NULL,	/* empty starting state */
 };
 
 static void set_message(void)
 {
     static enum messages state = M_NULL;
-    battery *binfo = apminfo->binfo;
+    battery_t *binfo = apminfo->binfo;
+    adapter_t *ap = &apminfo->adapter;
     
     /* battery not present case */
     if (!binfo->present) {
@@ -467,15 +513,17 @@ static void set_message(void)
 	    state = M_NP;
 	    render_text("not present");
 	}
-    } else if (apminfo->power == AC) {
-	if (binfo->charging) {
+    } else if (ap->power == AC) {
+	if (binfo->charge_state == CHARGE) {
 	    if (state != M_CH) {
 		state = M_CH;
+		update_timeout = DEFAULT_UPDATE;
 		render_text("battery charging");
 	    }
 	} else {
 	    if (state != M_AC) {
 		state = M_AC;
+		update_timeout = DEFAULT_UPDATE;
 		render_text("on ac power");
 	    }
 	}
@@ -483,22 +531,43 @@ static void set_message(void)
 	if (binfo->state == CRIT) {
 	    if (state != M_CB) {
 		state = M_CB;
+		update_timeout = 80;
 		render_text("critical low battery");
 	    }
+	} else if (binfo->state == HARD_CRIT) {
+	    if (state != M_HCB) {
+		state = M_HCB;
+		update_timeout = 60;
+		render_text("hard critical low battery");
+	    }
 	} else if (binfo->state == LOW) {
 	    if (state != M_LB) {
 		state = M_LB;
+		update_timeout = 100;
 		render_text("low battery");
 	    }
 	} else {
 	    if (state != M_BATT) {
 		state = M_BATT;
+		update_timeout = DEFAULT_UPDATE;
 		render_text("on battery");
 	    }
 	}
     }    
 }
 
+void set_time_display(void)
+{
+    battery_t *binfo = &batteries[battery_no];
+    
+    if (binfo->charge_state == CHARGE)
+	display_time(binfo->charge_time);
+    else if (binfo->charge_state == DISCHARGE)
+	display_time(apminfo->rtime);
+    else
+	invalid_time_display();
+}
+
 /*
  * This should really be fixed so that it can handle more than two batteries.
  */
@@ -549,12 +618,12 @@ int main(int argc, char **argv)
     char *display = NULL;
     char ch;
     int update = 0;
-    battery *binfo;
+    battery_t *binfo;
 
     dockapp = calloc(1, sizeof(Dockapp));
     apminfo = calloc(1, sizeof(APMInfo));
 
-    dockapp->blink = OFF;
+    dockapp->blink = 1;
     apminfo->crit_level = 10;
     battery_no = 1;
 
@@ -564,7 +633,7 @@ int main(int argc, char **argv)
 	exit(1);
 
     /* parse command-line options */
-    while ((ch = getopt(argc, argv, "bd:c:m:hvV")) != EOF) {
+    while ((ch = getopt(argc, argv, "bd:c:m:hnvV")) != EOF) {
 	switch (ch) {
 	case 'b':
 	    noisy_critical = 1;
@@ -608,6 +677,9 @@ int main(int argc, char **argv)
 	case 'V':
 	    print_version();
 	    return 0;
+	case 'n':
+	    dockapp->blink = 0;
+	    break;
 	default:
 	    usage(argv[0]);
 	    return 1;
@@ -621,15 +693,17 @@ int main(int argc, char **argv)
 	exit(1);
 
     /* make new dockapp window */
-    new_window("apm");
+    new_window("acpi");
 
     /* get initial statistics */
     acquire_all_info();
     binfo = &batteries[battery_no];
     apminfo->binfo = binfo;
     fprintf(stderr, "monitoring battery %s\n", binfo->name);
+    clear_time_display();
+    set_power_panel();
+    set_message();
     set_batt_id_area(battery_no);
-    dockapp->dspmode = REMAIN;
 
     /* main loop */
     while (1) {
@@ -663,12 +737,11 @@ int main(int argc, char **argv)
 	}
 
 	if (update++ == 30) {
-	    eprint(0, "polling apm");
 	    acquire_all_info();
 	    update = 0;
 	}
 
-	if (count++ == 256) {
+	if (count++ == update_timeout) {
 	    scroll_text(6, 50, 52, dockapp->tw, 1);
 	    count = 0;
 	}
@@ -684,10 +757,7 @@ int main(int argc, char **argv)
 	 * much time remained until the batteries were fully charged . . . 
 	 * That would be rather useful, though given it would vary rather a lot
 	 * it seems likely that it'd be little more than a rough guesstimate. */
-	if (binfo->charging)
-	    display_time(binfo->charge_time);
-	else
-	    display_time(apminfo->rtime);
+	set_time_display();
 	set_power_panel();
 	set_message();
 	display_percentage(binfo->percentage);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmacpi.git



More information about the Pkg-wmaker-commits mailing list