diff options
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h index 35209d1..ef21b22 100644 --- a/src/utils.h +++ b/src/utils.h @@ -68,6 +68,15 @@ void write_binary_string(const char *string, size_t len, FILE *to); /* Writes a normal C string to a file */ void write_string(const char *string, FILE *to); +/* Writes a single character to a file, URL-encoding if necessary */ +void write_char_url(int c, FILE *to); + +/* Writes binary data to a file, URL-encoding any bytes if necessary */ +void write_binary_url(const char *string, size_t len, FILE *to); + +/* Writes a normal C string to a file, URL-encoding any chars if necessary */ +void write_string_url(const char *string, FILE *to); + /* Reads an int from a file, using len bytes, in little-endian order */ uint64_t read_int(const char **from, size_t len, const char *max); |