return 0;
}
-/* Like human_readable, except return "-" if the argument is -1,
- return the negative of N if NEGATIVE is 1,
- and take ceiling of fractions if posix_format. */
+/* Like human_readable_inexact, except return "-" if the argument is -1,
+ and return the negative of N if NEGATIVE is 1. */
static char const *
df_readable (int negative, uintmax_t n, char *buf,
- int from_block_size, int t_output_block_size)
+ int from_block_size, int t_output_block_size,
+ enum human_inexact_style s)
{
if (n == -1)
return "-";
char *p = human_readable_inexact (negative ? - n : n,
buf + negative, from_block_size,
t_output_block_size,
- (posix_format
- ? human_ceiling
- : human_round_to_even));
+ negative ? - s : s);
if (negative)
*--p = '-';
return p;
printf (" %*s %*s %*s ",
width, df_readable (0, total,
- buf[0], input_units, output_units),
+ buf[0], input_units, output_units,
+ (posix_format
+ ? human_ceiling
+ : human_round_to_even)),
width, df_readable (negate_used, used,
- buf[1], input_units, output_units),
+ buf[1], input_units, output_units,
+ human_ceiling),
width, df_readable (negate_available, available,
- buf[2], input_units, output_units));
+ buf[2], input_units, output_units,
+ posix_format ? human_ceiling : human_floor));
if (used != -1 && available != -1)
{