summaryrefslogtreecommitdiff
path: root/src/houdini.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/houdini.h')
-rw-r--r--src/houdini.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/houdini.h b/src/houdini.h
index b926cf3..f738e82 100644
--- a/src/houdini.h
+++ b/src/houdini.h
@@ -10,33 +10,39 @@ extern "C" {
#include "buffer.h"
#ifdef HAVE___BUILTIN_EXPECT
-# define likely(x) __builtin_expect((x),1)
-# define unlikely(x) __builtin_expect((x),0)
+#define likely(x) __builtin_expect((x), 1)
+#define unlikely(x) __builtin_expect((x), 0)
#else
-# define likely(x) (x)
-# define unlikely(x) (x)
+#define likely(x) (x)
+#define unlikely(x) (x)
#endif
#ifdef HOUDINI_USE_LOCALE
-# define _isxdigit(c) isxdigit(c)
-# define _isdigit(c) isdigit(c)
+#define _isxdigit(c) isxdigit(c)
+#define _isdigit(c) isdigit(c)
#else
/*
* Helper _isdigit methods -- do not trust the current locale
* */
-# define _isxdigit(c) (strchr("0123456789ABCDEFabcdef", (c)) != NULL)
-# define _isdigit(c) ((c) >= '0' && (c) <= '9')
+#define _isxdigit(c) (strchr("0123456789ABCDEFabcdef", (c)) != NULL)
+#define _isdigit(c) ((c) >= '0' && (c) <= '9')
#endif
-#define HOUDINI_ESCAPED_SIZE(x) (((x) * 12) / 10)
+#define HOUDINI_ESCAPED_SIZE(x) (((x)*12) / 10)
#define HOUDINI_UNESCAPED_SIZE(x) (x)
-extern bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src, bufsize_t size);
-extern int houdini_escape_html(cmark_strbuf *ob, const uint8_t *src, bufsize_t size);
-extern int houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src, bufsize_t size, int secure);
-extern int houdini_unescape_html(cmark_strbuf *ob, const uint8_t *src, bufsize_t size);
-extern void houdini_unescape_html_f(cmark_strbuf *ob, const uint8_t *src, bufsize_t size);
-extern int houdini_escape_href(cmark_strbuf *ob, const uint8_t *src, bufsize_t size);
+extern bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src,
+ bufsize_t size);
+extern int houdini_escape_html(cmark_strbuf *ob, const uint8_t *src,
+ bufsize_t size);
+extern int houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src,
+ bufsize_t size, int secure);
+extern int houdini_unescape_html(cmark_strbuf *ob, const uint8_t *src,
+ bufsize_t size);
+extern void houdini_unescape_html_f(cmark_strbuf *ob, const uint8_t *src,
+ bufsize_t size);
+extern int houdini_escape_href(cmark_strbuf *ob, const uint8_t *src,
+ bufsize_t size);
#ifdef __cplusplus
}