|
From: <bre...@us...> - 2008-09-12 05:03:41
|
Revision: 1251
http://conky.svn.sourceforge.net/conky/?rev=1251&view=rev
Author: brenden1
Date: 2008-09-12 05:03:38 +0000 (Fri, 12 Sep 2008)
Log Message:
-----------
* Added small patch to support negative values (such as negative disk capacity) (thanks hinokind)
Modified Paths:
--------------
trunk/conky1/AUTHORS
trunk/conky1/ChangeLog
trunk/conky1/src/conky.c
Modified: trunk/conky1/AUTHORS
===================================================================
--- trunk/conky1/AUTHORS 2008-09-12 03:01:33 UTC (rev 1250)
+++ trunk/conky1/AUTHORS 2008-09-12 05:03:38 UTC (rev 1251)
@@ -115,6 +115,9 @@
Hannu Saransaari <hipo at users dot sourceforge dot net>
Main code
+hinokind <hinokind at users dot sourceforge dot net>
+ support negative values in human_readable()
+
Jason Mitchell <jason.mitchell03 at saintleo dot edu>
developer
UTF8 fix
Modified: trunk/conky1/ChangeLog
===================================================================
--- trunk/conky1/ChangeLog 2008-09-12 03:01:33 UTC (rev 1250)
+++ trunk/conky1/ChangeLog 2008-09-12 05:03:38 UTC (rev 1251)
@@ -5,6 +5,8 @@
(http://bugs.gentoo.org/show_bug.cgi?id=235233)
* Improve timed_thread interval timing
* Improve Conky's overall interval timing
+ * Added small patch to support negative values (such as negative disk
+ capacity) (thanks hinokind)
2008-09-10
* Improved hddtemp support
Modified: trunk/conky1/src/conky.c
===================================================================
--- trunk/conky1/src/conky.c 2008-09-12 03:01:33 UTC (rev 1250)
+++ trunk/conky1/src/conky.c 2008-09-12 05:03:38 UTC (rev 1251)
@@ -1055,7 +1055,7 @@
int precision, len;
static const int WIDTH = 10, SHORT_WIDTH = 8;
- if (num < 1024LL) {
+ if (num < 1024LL && num > -1024LL) {
if (short_units) {
spaced_print(buf, size, "%lld%c", SHORT_WIDTH, func_name, num,
**suffix);
@@ -1065,7 +1065,7 @@
return;
}
- while (num / 1024 >= 1000LL && **(suffix + 2)) {
+ while ((num / 1024 >= 1000LL || num / 1024 <= -1024LL) && **(suffix + 2)) {
num /= 1024;
suffix++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|