[Pkg-wmaker-commits] [wmppp.app] 53/120: wmppp.app: Display speed in K when too high.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 27 12:04:35 UTC 2015


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

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

commit 9223318fc3f540ae452c22066bb5d657396cf6d5
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sun Sep 14 12:57:19 2014 -0500

    wmppp.app: Display speed in K when too high.
    
    When the download speed is too high, wmppp can't display it because it has
    only 5 digit. The most significant digits are hidden !
    
    This small patch display the speed in K when it is too high.
    
    Based on the patch by jguiton <jguiton at free.fr>.
    See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=328699.
---
 wmppp/wmppp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/wmppp/wmppp.c b/wmppp/wmppp.c
index 93adefa..97d386f 100644
--- a/wmppp/wmppp.c
+++ b/wmppp/wmppp.c
@@ -771,6 +771,11 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
 void PrintLittle(int i, int *k) {
 
 	switch (i) {
+	case -2:
+		*k -= 5;
+		/* Print the "k" letter */
+		copyXPMArea(11*5-5, 86, 4, 9, *k, 48);
+		break;
 	case -1:
 		*k -= 5;
 		copyXPMArea(13*5-5, 86, 4, 9, *k, 48);
@@ -836,6 +841,13 @@ void DrawLoadInd(int speed) {
 
 	k = 30;
 
+	/* If speed is greater than 99999, display it in K */
+	if (speed > 99999 )
+	{
+		speed /= 1024 ;
+		PrintLittle(-2, &k) ;
+	}
+
 	do {
 		PrintLittle(speed % 10, &k);
 		speed /= 10;

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



More information about the Pkg-wmaker-commits mailing list