summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/dcc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-05-11 11:52:32 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-05-11 11:52:32 +0000
commitc61edaf7c9e43fc74610e5889ea46e4b6ce731cf (patch)
tree4fd9542a698ccadac1d93bc312aa02ce5ad7004c /src/fe-common/irc/dcc
parent4c42e7d8943a1198380ad801726c005e06a097d4 (diff)
downloadirssi-c61edaf7c9e43fc74610e5889ea46e4b6ce731cf.zip
always round up the kB value so we won't have 0kB file sizes..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1468 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/dcc')
-rw-r--r--src/fe-common/irc/dcc/fe-dcc-get.c3
-rw-r--r--src/fe-common/irc/dcc/fe-dcc-send.c4
-rw-r--r--src/fe-common/irc/dcc/fe-dcc.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/fe-common/irc/dcc/fe-dcc-get.c b/src/fe-common/irc/dcc/fe-dcc-get.c
index b402ee3e..093b90e3 100644
--- a/src/fe-common/irc/dcc/fe-dcc-get.c
+++ b/src/fe-common/irc/dcc/fe-dcc-get.c
@@ -67,7 +67,8 @@ static void dcc_closed(GET_DCC_REC *dcc)
} else {
printformat(dcc->server, NULL, MSGLEVEL_DCC,
IRCTXT_DCC_GET_COMPLETE, dcc->arg,
- dcc->transfd/1024, dcc->nick, (long) secs, kbs);
+ (dcc->transfd+1023)/1024,
+ dcc->nick, (long) secs, kbs);
}
}
diff --git a/src/fe-common/irc/dcc/fe-dcc-send.c b/src/fe-common/irc/dcc/fe-dcc-send.c
index 715fa80f..788d34f9 100644
--- a/src/fe-common/irc/dcc/fe-dcc-send.c
+++ b/src/fe-common/irc/dcc/fe-dcc-send.c
@@ -59,8 +59,8 @@ static void dcc_closed(SEND_DCC_REC *dcc)
} else {
printformat(dcc->server, NULL, MSGLEVEL_DCC,
IRCTXT_DCC_SEND_COMPLETE,
- dcc->arg, dcc->transfd/1024, dcc->nick,
- (long) secs, kbs);
+ dcc->arg, (dcc->transfd+1023)/1024,
+ dcc->nick, (long) secs, kbs);
}
}
diff --git a/src/fe-common/irc/dcc/fe-dcc.c b/src/fe-common/irc/dcc/fe-dcc.c
index c347b48a..1526b1b4 100644
--- a/src/fe-common/irc/dcc/fe-dcc.c
+++ b/src/fe-common/irc/dcc/fe-dcc.c
@@ -91,7 +91,7 @@ void dcc_list_print_file(FILE_DCC_REC *dcc)
printformat(NULL, NULL, MSGLEVEL_DCC,
IRCTXT_DCC_LIST_LINE_FILE,
dcc->nick, dcc_type2str(dcc->type),
- dcc->transfd/1024, dcc->size/1024,
+ (dcc->transfd+1023)/1024, (dcc->size+1023)/1024,
dcc->size == 0 ? 0 : (int)((double)dcc->transfd/(double)dcc->size*100.0),
(double) (dcc->transfd-dcc->skipped)/going/1024, dcc->arg);
}