mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
475709352c
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
25 lines
1.2 KiB
Diff
25 lines
1.2 KiB
Diff
diff -Naur wmnet-1.06/wmnet.c wmnet-1.06.patched/wmnet.c
|
|
--- wmnet-1.06/wmnet.c 2000-05-04 21:01:14.000000000 -0400
|
|
+++ wmnet-1.06.patched/wmnet.c 2023-01-30 15:53:12.218189907 -0500
|
|
@@ -660,11 +660,18 @@
|
|
snprintf(astring, 10, "%2.1fk/s", rate);
|
|
else if (rate >= 100. && rate < 1000.)
|
|
snprintf(astring, 10, "%dk/s", (unsigned int)rate);
|
|
- else if (rate > 1000. && rate < 10000.)
|
|
+ else if (rate >= 1000. && rate < 10000.)
|
|
snprintf(astring, 10, "%1.2fM/s", (rate / 1000.));
|
|
- else if (rate > 10000. && rate < 100000.)
|
|
+ else if (rate >= 10000. && rate < 100000.)
|
|
snprintf(astring, 10, "%2.1fM/s", (rate / 1000.));
|
|
- else sprintf(astring, "XXXX");
|
|
+ else if (rate >= 100000. && rate < 1000000.)
|
|
+ snprintf(astring, 10, "%dM/s", (unsigned int)(rate / 1000.));
|
|
+ else if (rate >= 1000000. && rate < 10000000.)
|
|
+ snprintf(astring, 10, "%1.2fG/s", (rate / 1000000.));
|
|
+ else if (rate >= 10000000. && rate < 100000000.)
|
|
+ snprintf(astring, 10, "%2.1fG/s", (rate / 1000000.));
|
|
+ else /* >= 100000000., won't happen any time soon */
|
|
+ snprintf(astring, 10, "%3.0fG/s", (rate / 1000000.));
|
|
|
|
XSetForeground(dpy, graphics_context, color);
|
|
XSetClipRectangles(dpy, graphics_context, 0, 0, &cliprect, 1, Unsorted);
|