Updated SPEC file.

Updated to version 0.8pre1.
Now compiles with older libpcap (without SLL support).
Further fixes to display of rates.
This commit is contained in:
pdw
2002-10-10 15:55:59 +00:00
parent 6da4be8a35
commit 3dcbe7a6c1
5 changed files with 19 additions and 10 deletions

6
ui.c
View File

@@ -63,11 +63,11 @@ int screen_line_compare(void* a, void* b) {
}
void readable_size(float n, char* buf, int bsize, int ksize, int bytes) {
if(n >= ksize * ksize) {
if(n >= 10 * ksize * ksize) {
snprintf(buf, bsize, " %4.1f%s", n / (ksize * ksize), bytes ? "MB" : "M");
}
if(n >= 100 * ksize) {
snprintf(buf, bsize, " %4.0f%s", n / ksize, bytes ? "KB" : "K" );
if(n >= ksize * ksize) {
snprintf(buf, bsize, " %4.2f%s", n / (ksize * ksize), bytes ? "MB" : "M" );
}
else if(n >= ksize) {
snprintf(buf, bsize, " %4.1f%s", n / ksize, bytes ? "KB" : "K" );