.
[coreutils.git] / lib / human.h
blob66bedcce9574e6c2113fd7d050bc2a8a7cb592f4
1 #ifndef HUMAN_H_
2 # define HUMAN_H_ 1
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)
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
18 char *human_readable PARAMS ((uintmax_t, char *, int, int, int));
20 #endif /* HUMAN_H_ */