diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-03 21:10:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-03 21:10:27 +0000 |
commit | 236e47e55554310cc19b8c37c7b844d53a239f28 (patch) | |
tree | daeba73a49d600e9d7fb441fe67f32686e38415b /src/include/gnunet_strings_lib.h | |
parent | f9b6dfb41e151628673595fd880318ec502ae4ed (diff) | |
download | gnunet-236e47e55554310cc19b8c37c7b844d53a239f28.tar.gz gnunet-236e47e55554310cc19b8c37c7b844d53a239f28.zip |
implementing time and size parsers for #1875
Diffstat (limited to 'src/include/gnunet_strings_lib.h')
-rw-r--r-- | src/include/gnunet_strings_lib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h index 6413fb102..637d4f7de 100644 --- a/src/include/gnunet_strings_lib.h +++ b/src/include/gnunet_strings_lib.h | |||
@@ -51,6 +51,18 @@ extern "C" | |||
51 | 51 | ||
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Convert a given fancy human-readable size to bytes. | ||
55 | * | ||
56 | * @param fancy_size human readable string (i.e. 1 MB) | ||
57 | * @param size set to the size in bytes | ||
58 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | ||
59 | */ | ||
60 | int | ||
61 | GNUNET_STRINGS_fancy_size_to_bytes (const char *fancy_size, | ||
62 | unsigned long long *size); | ||
63 | |||
64 | |||
65 | /** | ||
54 | * Convert a given filesize into a fancy human-readable format. | 66 | * Convert a given filesize into a fancy human-readable format. |
55 | * | 67 | * |
56 | * @param size number of bytes | 68 | * @param size number of bytes |
@@ -85,6 +97,7 @@ GNUNET_STRINGS_to_utf8 (const char *input, size_t len, const char *charset); | |||
85 | char * | 97 | char * |
86 | GNUNET_STRINGS_filename_expand (const char *fil); | 98 | GNUNET_STRINGS_filename_expand (const char *fil); |
87 | 99 | ||
100 | |||
88 | /** | 101 | /** |
89 | * Fill a buffer of the given size with | 102 | * Fill a buffer of the given size with |
90 | * count 0-terminated strings (given as varargs). | 103 | * count 0-terminated strings (given as varargs). |