X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fhuman.c;h=b342bf178445d2d4f68ad51999ab579be98df988;hb=c5467a5a59852da74dc849497f47b4966fcba269;hp=a838e8c41effe9f5f25760348a6e603160328a3f;hpb=ba21d44f8a2da711c7abbecc64aa356b25c8ab4a;p=gnulib.git diff --git a/lib/human.c b/lib/human.c index a838e8c41..b342bf178 100644 --- a/lib/human.c +++ b/lib/human.c @@ -36,25 +36,9 @@ # include #endif -#if HAVE_STDLIB_H -# include -#endif -#ifndef HAVE_DECL_GETENV -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_GETENV -char *getenv (); -#endif - -#if HAVE_STRING_H -# include -#endif - -#if HAVE_STRINGS_H -# include -#endif - #include +#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) @@ -355,11 +339,9 @@ human_readable (uintmax_t n, char *buf, int opts, } } - if (inexact_style == human_ceiling - ? 0 < tenths + rounding - : inexact_style == human_round_to_nearest - ? 5 < tenths + (2 < rounding + (amt & 1)) - : /* inexact_style == human_floor */ 0) + if (inexact_style == human_round_to_nearest + ? 5 < tenths + (0 < rounding + (amt & 1)) + : inexact_style == human_ceiling && 0 < tenths + rounding) { amt++;