diff options
Diffstat (limited to 'desktop/wmnet/ludicrous_speed.diff')
-rw-r--r-- | desktop/wmnet/ludicrous_speed.diff | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/desktop/wmnet/ludicrous_speed.diff b/desktop/wmnet/ludicrous_speed.diff new file mode 100644 index 000000000000..345d389d13c1 --- /dev/null +++ b/desktop/wmnet/ludicrous_speed.diff @@ -0,0 +1,25 @@ +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); |