Changeset View
Changeset View
Standalone View
Standalone View
lib/libutil/humanize_number.c
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | for (max = 1, i = len - baselen; i-- > 0;) | ||||
max *= 10; | max *= 10; | ||||
/* | /* | ||||
* Divide the number until it fits the given column. | * Divide the number until it fits the given column. | ||||
* If there will be an overflow by the rounding below, | * If there will be an overflow by the rounding below, | ||||
* divide once more. | * divide once more. | ||||
*/ | */ | ||||
for (i = 0; | for (i = 0; | ||||
(quotient >= max || (quotient == max - 1 && | (quotient >= max || (quotient == max - 1 && | ||||
remainder >= divisordeccut)) && i < maxscale; i++) { | (remainder >= divisordeccut || remainder >= | ||||
cem: I think the previous indentation was correct. | |||||
divisor / 2))) && i < maxscale; i++) { | |||||
remainder = quotient % divisor; | remainder = quotient % divisor; | ||||
quotient /= divisor; | quotient /= divisor; | ||||
} | } | ||||
if (scale & HN_GETSCALE) | if (scale & HN_GETSCALE) | ||||
return (i); | return (i); | ||||
} else { | } else { | ||||
for (i = 0; i < scale && i < maxscale; i++) { | for (i = 0; i < scale && i < maxscale; i++) { | ||||
Show All 25 Lines |
I think the previous indentation was correct.