00001 #ifndef HUMAN_H_
00002 # define HUMAN_H_ 1
00003
00004 # if HAVE_CONFIG_H
00005 # include <config.h>
00006 # endif
00007
00008 # if HAVE_INTTYPES_H
00009 # include <inttypes.h>
00010 # endif
00011
00012
00013
00014
00015 # define LONGEST_HUMAN_READABLE ((sizeof (uintmax_t) + sizeof (int)) \
00016 * CHAR_BIT / 3)
00017
00018 # ifndef PARAMS
00019 # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
00020 # define PARAMS(Args) Args
00021 # else
00022 # define PARAMS(Args) ()
00023 # endif
00024 # endif
00025
00026 enum human_inexact_style
00027 {
00028 human_floor = -1,
00029 human_round_to_even = 0,
00030 human_ceiling = 1
00031 };
00032
00033 char *human_readable PARAMS ((uintmax_t, char *, int, int));
00034 char *human_readable_inexact PARAMS ((uintmax_t, char *, int, int,
00035 enum human_inexact_style));
00036
00037 void human_block_size PARAMS ((char const *, int, int *));
00038
00039 #endif