diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2006-10-07 10:21:01 +0000 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2006-10-07 10:21:01 +0000 |
| commit | 0eb36d3914b11b6cd7dc77de5380a191d0e6a124 (patch) | |
| tree | 9098cc433ba957c42fc922a8eb036675d085d31e /cli/btcli.h | |
| parent | e652eefa2642213b073298de5e5019486ee728ba (diff) | |
| download | btpd-0eb36d3914b11b6cd7dc77de5380a191d0e6a124.tar.gz btpd-0eb36d3914b11b6cd7dc77de5380a191d0e6a124.zip | |
btcli list now displays size, ratio and the percentage got of torrents.
It sorts by name instead of number (should probably add options for sorting). It now also takes torrents to list as optional arguments. Added ratio to btcli stat display. Changed the help text for both commands. Some code shuffle and other tweaks.
Diffstat (limited to 'cli/btcli.h')
| -rw-r--r-- | cli/btcli.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/btcli.h b/cli/btcli.h index 96c3f4b..e522f28 100644 --- a/cli/btcli.h +++ b/cli/btcli.h @@ -6,6 +6,7 @@ #include <getopt.h> #include <inttypes.h> #include <limits.h> +#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -26,6 +27,11 @@ enum ipc_err handle_ipc_res(enum ipc_err err, const char *cmd, char tstate_char(enum ipc_tstate ts); int torrent_spec(char *arg, struct ipc_torrent *tp); +void print_rate(long long rate); +void print_size(long long size); +void print_ratio(long long part, long long whole); +void print_percent(long long part, long long whole); + void usage_add(void); void cmd_add(int argc, char **argv); void usage_del(void); |