diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-11-14 02:51:33 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-11-14 02:51:33 +0100 |
commit | 2b764051e4f75ac8868ba4371c53c3aecc8e72c8 (patch) | |
tree | 69af44be9fc6adf8d5fa67261556712b1203fd3a /include/slibc-human.h | |
parent | m (diff) | |
download | slibc-2b764051e4f75ac8868ba4371c53c3aecc8e72c8.tar.gz slibc-2b764051e4f75ac8868ba4371c53c3aecc8e72c8.tar.bz2 slibc-2b764051e4f75ac8868ba4371c53c3aecc8e72c8.tar.xz |
m slibc-human.h
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'include/slibc-human.h')
-rw-r--r-- | include/slibc-human.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/slibc-human.h b/include/slibc-human.h index 6f5a603..9aebcfd 100644 --- a/include/slibc-human.h +++ b/include/slibc-human.h @@ -160,12 +160,12 @@ enum machinesize_mode -char* humanmode(const char* restrict buffer, mode_t mode); +char* humanmode(char* restrict buffer, mode_t mode); mode_t machinemode(const char* restrict str, mode_t mode, mode_t mask); -char* humansize(const char* restrict buffer, size_t size, enum humansize_mode mode, int detail); +char* humansize(char* restrict buffer, size_t size, enum humansize_mode mode, int detail); int machinesize(size_t* restrict size, const char* restrict string, enum machinesize_mode mode); @@ -177,13 +177,22 @@ int machinedur(intmax_t* restrict sec, long int* nsec, const char* restrict str, const char* restrict space, const char* restrict comma); -int machineint(intmax_t* restrict r, const char* restrict str); +char* machineint(intmax_t* restrict r, const char* restrict str); +# ifdef __CONST_CORRECT +# define machineint(...) (__const_correct_2p(machineint, __VA_ARGS__)) +# endif -int machineuint(uintmax_t* restrict r, const char* restrict str); +char* machineuint(uintmax_t* restrict r, const char* restrict str); +# ifdef __CONST_CORRECT +# define machineuint(...) (__const_correct_2p(machineuint, __VA_ARGS__)) +# endif #endif int machinefloat(long double* restrict r, const char* restrict str, const char* restrict space, const char* restrict comma); +#ifdef __CONST_CORRECT +# define machinefloat(...) (__const_correct_2(machinefloat, __VA_ARGS__)) +#endif /** |