X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=lib%2Fnum2str.c;h=2f714ccd69ffc6040d1d3c80c0e212b5279298d5;hp=ed3545d95634553640d3ccaf537e0e436d432ac2;hb=5e7468209ad6956c3d7393110c379dd7d316dd7e;hpb=087c0cba36b6d2bf9c5f9b9ce96f308e0be1bd9e;ds=sidebyside diff --git a/lib/num2str.c b/lib/num2str.c index ed3545d9..2f714ccd 100644 --- a/lib/num2str.c +++ b/lib/num2str.c @@ -2,7 +2,10 @@ #include #include -#include "../fio.h" +#include "../compiler/compiler.h" +#include "num2str.h" + +#define ARRAY_SIZE(x) (sizeof((x)) / (sizeof((x)[0]))) /** * num2str() - Cheesy number->string conversion, complete with carry rounding error. @@ -10,7 +13,7 @@ * @maxlen: max number of digits in the output string (not counting prefix and units) * @base: multiplier for num (e.g., if num represents Ki, use 1024) * @pow2: select unit prefix - 0=power-of-10 decimal SI, nonzero=power-of-2 binary IEC - * @units: select units - N2S_* macros defined in fio.h + * @units: select units - N2S_* macros defined in num2str.h * @returns a malloc'd buffer containing "number[][]" */ char *num2str(uint64_t num, int maxlen, int base, int pow2, int units)