Indentation updates.
This commit is contained in:
@@ -27,11 +27,12 @@ size_t pv_formatter_average_rate(pvformatter_args_t args)
|
||||
if (args->state->control.bits && !args->state->control.linemode) {
|
||||
/* bits per second */
|
||||
pv_describe_amount(content, sizeof(content),
|
||||
"(%s)", 8 * args->state->calc.average_rate, "", _("b/s"), args->display->count_type);
|
||||
"(%s)", 8 * args->state->calc.average_rate, "", _("b/s"), args->display->count_type);
|
||||
} else {
|
||||
/* bytes or lines per second */
|
||||
pv_describe_amount(content,
|
||||
sizeof(content), "(%s)", args->state->calc.average_rate, _("/s"), _("B/s"), args->display->count_type);
|
||||
sizeof(content), "(%s)", args->state->calc.average_rate, _("/s"), _("B/s"),
|
||||
args->display->count_type);
|
||||
}
|
||||
/*@+mustfreefresh@ *//* splint: see above. */
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ size_t pv_formatter_buffer_percent(pvformatter_args_t args)
|
||||
|
||||
if (args->state->transfer.buffer_size > 0) {
|
||||
int pct_used = pv_percentage((off_t)
|
||||
(args->state->transfer.read_position - args->state->transfer.write_position),
|
||||
(args->state->transfer.read_position -
|
||||
args->state->transfer.write_position),
|
||||
(off_t)
|
||||
(args->state->transfer.buffer_size));
|
||||
(void) pv_snprintf(content, sizeof(content), "{%3d%%}", pct_used);
|
||||
|
||||
@@ -28,10 +28,12 @@ size_t pv_formatter_bytes(pvformatter_args_t args)
|
||||
/*@-mustfreefresh@ */
|
||||
if (args->state->control.bits && !args->state->control.linemode) {
|
||||
pv_describe_amount(content, sizeof(content), "%s",
|
||||
(long double) (args->state->transfer.transferred * 8), "", _("b"), args->display->count_type);
|
||||
(long double) (args->state->transfer.transferred * 8), "", _("b"),
|
||||
args->display->count_type);
|
||||
} else {
|
||||
pv_describe_amount(content, sizeof(content), "%s",
|
||||
(long double) (args->state->transfer.transferred), "", _("B"), args->display->count_type);
|
||||
(long double) (args->state->transfer.transferred), "", _("B"),
|
||||
args->display->count_type);
|
||||
}
|
||||
/*@+mustfreefresh@ *//* splint - false positive from gettext(). */
|
||||
|
||||
|
||||
+2
-1
@@ -32,7 +32,8 @@ size_t pv_formatter_eta(pvformatter_args_t args)
|
||||
|
||||
eta =
|
||||
pv_seconds_remaining((args->state->transfer.transferred - args->display->initial_offset),
|
||||
args->state->control.size - args->display->initial_offset, args->state->calc.current_avg_rate);
|
||||
args->state->control.size - args->display->initial_offset,
|
||||
args->state->calc.current_avg_rate);
|
||||
|
||||
/*
|
||||
* Bounds check, so we don't overrun the suffix buffer. This means
|
||||
|
||||
@@ -48,7 +48,8 @@ size_t pv_formatter_fineta(pvformatter_args_t args)
|
||||
*/
|
||||
|
||||
eta = pv_seconds_remaining(args->state->transfer.transferred - args->display->initial_offset,
|
||||
args->state->control.size - args->display->initial_offset, args->state->calc.current_avg_rate);
|
||||
args->state->control.size - args->display->initial_offset,
|
||||
args->state->calc.current_avg_rate);
|
||||
|
||||
/* Bounds check - see pv_formatter_eta(). */
|
||||
eta = pv_bound_long(eta, 0, (long) 360000000L);
|
||||
|
||||
@@ -29,11 +29,12 @@ size_t pv_formatter_rate(pvformatter_args_t args)
|
||||
if (args->state->control.bits && !args->state->control.linemode) {
|
||||
/* bits per second */
|
||||
pv_describe_amount(content, sizeof(content), "[%s]",
|
||||
8 * args->state->calc.transfer_rate, "", _("b/s"), args->display->count_type);
|
||||
8 * args->state->calc.transfer_rate, "", _("b/s"), args->display->count_type);
|
||||
} else {
|
||||
/* bytes or lines per second */
|
||||
pv_describe_amount(content, sizeof(content),
|
||||
"[%s]", args->state->calc.transfer_rate, _("/s"), _("B/s"), args->display->count_type);
|
||||
"[%s]", args->state->calc.transfer_rate, _("/s"), _("B/s"),
|
||||
args->display->count_type);
|
||||
}
|
||||
/*@+mustfreefresh@ *//* splint: see above. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user