Add TODO markers at possible touch points for "--numeric --format" implementation (#127).
This commit is contained in:
@@ -509,6 +509,8 @@ int main(int argc, char **argv)
|
||||
pv_state_watch_fd_set(state, opts->watch_fd);
|
||||
pv_state_average_rate_window_set(state, opts->average_rate_window);
|
||||
|
||||
/* TODO: with --numeric, call a separate default format function. */
|
||||
|
||||
pv_state_set_format(state, opts->progress, opts->timer, can_have_eta ? opts->eta : false,
|
||||
can_have_eta ? opts->fineta : false, opts->rate, opts->average_rate,
|
||||
opts->bytes, opts->bufpercent, opts->lastwritten, opts->name);
|
||||
|
||||
@@ -487,6 +487,8 @@ pvdisplay_bytecount_t pv_formatter_segmentcontent(char *content, pvformatter_arg
|
||||
* If --rate was given, we output the current transfer rate instead of the
|
||||
* percentage. With --bytes as well, the rate is given after the
|
||||
* bytes/lines.
|
||||
*
|
||||
* TODO: replace this with a custom --format string.
|
||||
*/
|
||||
static bool pv__format_numeric(pvstate_t state, pvdisplay_t display)
|
||||
{
|
||||
@@ -1077,6 +1079,8 @@ bool pv_format(pvstate_t state, /*@null@ */ const char *format_supplied, pvdispl
|
||||
|
||||
/*
|
||||
* Use the numeric mode function if we're in numeric mode.
|
||||
*
|
||||
* TODO: use a custom --format string instead.
|
||||
*/
|
||||
if (state->control.numeric) {
|
||||
return pv__format_numeric(state, display);
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/*
|
||||
* Average transfer rate.
|
||||
*
|
||||
* TODO: show exact number without suffix if --numeric is active.
|
||||
*/
|
||||
pvdisplay_bytecount_t pv_formatter_average_rate(pvformatter_args_t args)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/*
|
||||
* Percentage transfer buffer utilisation.
|
||||
*
|
||||
* TODO: show exact number without suffix if --numeric is active.
|
||||
*/
|
||||
pvdisplay_bytecount_t pv_formatter_buffer_percent(pvformatter_args_t args)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/*
|
||||
* Number of bytes or lines transferred.
|
||||
*
|
||||
* TODO: show exact number without suffix if --numeric is active.
|
||||
*/
|
||||
pvdisplay_bytecount_t pv_formatter_bytes(pvformatter_args_t args)
|
||||
{
|
||||
|
||||
@@ -382,6 +382,8 @@ pvdisplay_bytecount_t pv_formatter_progress_bar_only(pvformatter_args_t args)
|
||||
|
||||
/*
|
||||
* The number after the progress bar.
|
||||
*
|
||||
* TODO: show percentage without adornment if --numeric is active.
|
||||
*/
|
||||
pvdisplay_bytecount_t pv_formatter_progress_amount_only(pvformatter_args_t args)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/*
|
||||
* Transfer rate.
|
||||
*
|
||||
* TODO: show exact number without suffix if --numeric is active.
|
||||
*/
|
||||
pvdisplay_bytecount_t pv_formatter_rate(pvformatter_args_t args)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/*
|
||||
* Elapsed time.
|
||||
*
|
||||
* TODO: show as a number if --numeric is active.
|
||||
*/
|
||||
pvdisplay_bytecount_t pv_formatter_timer(pvformatter_args_t args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user