From 9bf3ec8cd48c835e02ff96cd97d1581b2f9ba5b3 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Mon, 30 Jun 2014 22:50:14 +0100 Subject: Implemented rate limiter. Fixes #12. --- src/misc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/misc.h') diff --git a/src/misc.h b/src/misc.h index 8b00f8d..dc654d6 100644 --- a/src/misc.h +++ b/src/misc.h @@ -50,8 +50,10 @@ const char *my_dirname(char *path); than `*capacity` (may be 0) and stores the new capacity in `*capacity`. */ #define grow_array(array, capacity, member_size) grow_array_impl((void**)(array), (capacity), (member_size)) -void grow_array_impl(void **array, int* capacity, int member_size); +void grow_array_impl(void **array, int *capacity, int member_size); +/* Returns 1 on success, 0 on syntax error. */ +int parse_byte_count(const char *str, double *result); /* Simple arena allocation for when it's convenient to grow multiple times and deallocate all at once. */ -- cgit v1.2.3