diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2014-06-30 22:50:14 +0100 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2014-06-30 22:50:14 +0100 |
commit | 9bf3ec8cd48c835e02ff96cd97d1581b2f9ba5b3 (patch) | |
tree | 05e8bfc74fdb13c1724991e3ee57308c7cf4a9a7 /src/misc.h | |
parent | 3f7daee57d1e57ef522447fd601805971bb358c8 (diff) | |
download | bindfs-9bf3ec8cd48c835e02ff96cd97d1581b2f9ba5b3.tar.gz |
Implemented rate limiter.
Fixes #12.
Diffstat (limited to 'src/misc.h')
-rw-r--r-- | src/misc.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. */ |