(human_readable): Coalesce last two args into one, for convenience.
[gnulib.git] / lib / human.h
1 #ifndef HUMAN_H_
2 # define HUMAN_H_ 1
3
4 /* A conservative bound on the maximum length of a human-readable string.
5    The output can be the product of the largest uintmax_t and the largest int,
6    so add their sizes before converting to a bound on digits.  */
7 # define LONGEST_HUMAN_READABLE ((sizeof (uintmax_t) + sizeof (int)) \
8                                  * CHAR_BIT / 3)
9
10 # ifndef PARAMS
11 #  if defined PROTOTYPES || (defined __STDC__ && __STDC__)
12 #   define PARAMS(Args) Args
13 #  else
14 #   define PARAMS(Args) ()
15 #  endif
16 # endif
17
18 char *human_readable PARAMS ((uintmax_t, char *, int, int));
19
20 void human_block_size PARAMS ((char const *, int, int *));
21
22 #endif /* HUMAN_H_ */