summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-07-12 14:10:39 -0400
committerDaniel Mack <github@zonque.org>2015-07-12 14:10:39 -0400
commit89a2faeed5abf9ee284c157c1940a5ac1d829f9b (patch)
treed89026ced870f184d808d6e252a5c6c498616da0 /src/basic/util.h
parent9e400131f799e7cb565bf2865b874d876cb2937f (diff)
parent13a5d76b3277a2a499345cc24facc21eb17ccdae (diff)
Merge pull request #566 from teg/util-base64-2
util: add base64 handling
Diffstat (limited to 'src/basic/util.h')
-rw-r--r--src/basic/util.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/basic/util.h b/src/basic/util.h
index a1d1dd15c3..dae43006e4 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -240,6 +240,8 @@ char octchar(int x) _const_;
int unoctchar(char c) _const_;
char decchar(int x) _const_;
int undecchar(char c) _const_;
+char base64char(int x) _const_;
+int unbase64char(char c) _const_;
char *cescape(const char *s);
size_t cescape_char(char c, char *buf);
@@ -614,7 +616,10 @@ static inline void *mempset(void *s, int c, size_t n) {
}
char *hexmem(const void *p, size_t l);
-void *unhexmem(const char *p, size_t l);
+int unhexmem(const char *p, size_t l, void **mem, size_t *len);
+
+char *base64mem(const void *p, size_t l);
+int unbase64mem(const char *p, size_t l, void **mem, size_t *len);
char *strextend(char **x, ...) _sentinel_;
char *strrep(const char *s, unsigned n);