diff options
Diffstat (limited to 'dimension/utility.h')
-rw-r--r-- | dimension/utility.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dimension/utility.h b/dimension/utility.h index 1c0a98b..13cfdf5 100644 --- a/dimension/utility.h +++ b/dimension/utility.h @@ -21,6 +21,14 @@ #define UTILITY_H #include "parse.h" /* For dmnsn_parse_location */ +#include <stdbool.h> + +/* Wrappers for strtol and strtoul, and some added ones */ +bool dmnsn_strtoi(int *n, const char *nptr, int base); +bool dmnsn_strtol(long *n, const char *nptr, int base); +bool dmnsn_strtoui(unsigned int *n, const char *nptr, int base); +bool dmnsn_strtoul(unsigned long *n, const char *nptr, int base); +bool dmnsn_strtod(double *n, const char *nptr); #if defined(__GNUC__) || defined(__attribute__) #define DMNSN_PRINTF_WARN(f, a) __attribute__((format (printf, f, a))) |