<inttypes.h>: Include it here instead.
[gnulib.git] / lib / human.h
1 #ifndef HUMAN_H_
2 # define HUMAN_H_ 1
3
4 # if HAVE_CONFIG_H
5 #  include <config.h>
6 # endif
7
8 # if HAVE_INTTYPES_H
9 #  include <inttypes.h>
10 # endif
11
12 /* A conservative bound on the maximum length of a human-readable string.
13    The output can be the product of the largest uintmax_t and the largest int,
14    so add their sizes before converting to a bound on digits.  */
15 # define LONGEST_HUMAN_READABLE ((sizeof (uintmax_t) + sizeof (int)) \
16                                  * CHAR_BIT / 3)
17
18 # ifndef PARAMS
19 #  if defined PROTOTYPES || (defined __STDC__ && __STDC__)
20 #   define PARAMS(Args) Args
21 #  else
22 #   define PARAMS(Args) ()
23 #  endif
24 # endif
25
26 char *human_readable PARAMS ((uintmax_t, char *, int, int));
27
28 void human_block_size PARAMS ((char const *, int, int *));
29
30 #endif /* HUMAN_H_ */