#ifndef HAVE_FMT_SCALED
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
fract = (10 * fract + 512) / 1024;
/* if the result would be >= 10, round main number */
if (fract == 10) {
if (fract >= 10) {
if (number >= 0)
number++;
else
number--;
fract = 0;
}
assert(fract >= 0);
if (number == 0)
strlcpy(result, "0B", FMT_SCALED_STRSIZE);
-