X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fhuman.h;h=4ec9f0da8602f1620291b58828ca712f2527aec0;hb=605fd0575956d48022b3a940c4d7bb463514619f;hp=de54bf8e9983248b1bf12e623c0fd9d9e5de99ad;hpb=c65fe04fafc9af53ae9229c4563313e3358eabda;p=gnulib.git diff --git a/lib/human.h b/lib/human.h index de54bf8e9..4ec9f0da8 100644 --- a/lib/human.h +++ b/lib/human.h @@ -1,6 +1,14 @@ #ifndef HUMAN_H_ # define HUMAN_H_ 1 +# if HAVE_CONFIG_H +# include +# endif + +# if HAVE_INTTYPES_H +# include +# endif + /* A conservative bound on the maximum length of a human-readable string. The output can be the product of the largest uintmax_t and the largest int, so add their sizes before converting to a bound on digits. */ @@ -15,7 +23,16 @@ # endif # endif +enum human_inexact_style +{ + human_floor = -1, + human_round_to_even = 0, + human_ceiling = 1 +}; + char *human_readable PARAMS ((uintmax_t, char *, int, int)); +char *human_readable_inexact PARAMS ((uintmax_t, char *, int, int, + enum human_inexact_style)); void human_block_size PARAMS ((char const *, int, int *));