summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/src/entities.h
diff options
context:
space:
mode:
authorRené Schümann <white06tiger@gmail.com>2015-03-14 19:58:15 +0000
committerRené Schümann <white06tiger@gmail.com>2015-03-14 19:58:15 +0000
commit5a97f4b7c941dc704ab4dd2c370d19bb556c1ce6 (patch)
tree7ca8e397891238535958645ae5af8427068bcfd9 /plugins/MirOTR/src/entities.h
parent02eaf116807ce4b8b49dfaee47910d2dffbfef8f (diff)
MirOTR: part 3, file/folder structure change
git-svn-id: http://svn.miranda-ng.org/main/trunk@12404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/src/entities.h')
-rw-r--r--plugins/MirOTR/src/entities.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/MirOTR/src/entities.h b/plugins/MirOTR/src/entities.h
new file mode 100644
index 0000000000..0d3cc1b822
--- /dev/null
+++ b/plugins/MirOTR/src/entities.h
@@ -0,0 +1,24 @@
+// (C) of entities.h: Christoph
+// http://mercurial.intuxication.org/hg/cstuff/raw-file/tip/entities.h
+// http://stackoverflow.com/questions/1082162/how-to-unescape-html-in-c/1082191#1082191
+// modified by ProgAndy
+
+#ifndef DECODE_HTML_ENTITIES_UTF8
+#define DECODE_HTML_ENTITIES_UTF8
+
+extern size_t decode_html_entities_utf8(char *dest, const char *src, size_t len);
+/* if `src` is `NULL`, input will be taken from `dest`, decoding
+ the entities in-place
+
+ otherwise, the output will be placed in `dest`, which should point
+ to a buffer big enough to hold `strlen(src) + 1` characters, while
+ `src` remains unchanged
+ if `len` is given, `dest` must be at least big enough
+ to hold `len + 1` characters.
+
+ the function returns the length of the decoded string
+*/
+
+extern char * encode_html_entities_utf8(const char *src);
+
+#endif