X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fhuman.c;h=b342bf178445d2d4f68ad51999ab579be98df988;hb=22c1c15d0a29a1b7ea75456abe3f7062f835c887;hp=558263473a0d0e82a140654e9de579eb520b5232;hpb=ac600b55c5015bdab12df91e8d0d408031bcbb60;p=gnulib.git diff --git a/lib/human.c b/lib/human.c index 558263473..b342bf178 100644 --- a/lib/human.c +++ b/lib/human.c @@ -36,23 +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) @@ -353,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++;