chiark / gitweb /
basic: include only what we use
[elogind.git] / src / basic / parse-util.h
index 43f23500f15de1e90d2dbc6008803f7de2575850..a0277def9d918c8bbb848b27a59cd5ff051b8ef8 100644 (file)
@@ -22,6 +22,9 @@
 ***/
 
 #include <inttypes.h>
+#include <limits.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 
 #include "macro.h"
@@ -35,8 +38,7 @@ int parse_ifindex(const char *s, int *ret);
 
 int parse_size(const char *t, uint64_t base, uint64_t *size);
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int parse_range(const char *t, unsigned *lower, unsigned *upper);
 
 #define FORMAT_BYTES_MAX 8
@@ -94,3 +96,5 @@ static inline int safe_atoli(const char *s, long int *ret_u) {
 #endif
 
 int safe_atod(const char *s, double *ret_d);
+
+int parse_fractional_part_u(const char **s, size_t digits, unsigned *res);