summaryrefslogtreecommitdiff
path: root/bindings/hubbub/utils.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-11-04 02:08:05 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-11-04 02:08:05 +0000
commit975de383a09510aae8d5a32f5fc97181fe2846a5 (patch)
tree081e9cd7931b54c03d46cadf312dad8dcf327844 /bindings/hubbub/utils.h
parent7b5b3cff17c9b0ba92d5c1b68d9852d28c108a48 (diff)
downloadlibdom-975de383a09510aae8d5a32f5fc97181fe2846a5.tar.gz
libdom-975de383a09510aae8d5a32f5fc97181fe2846a5.tar.bz2
Beginnings of a hubbub binding to libdom
Currently comprises a stubbed-out parser wrapper Todo: 1) Complete parser wrapper, such that it actually creates a DOM tree 2) Provide a hubbub-backed DOMImplementationSource svn path=/trunk/dom/; revision=3646
Diffstat (limited to 'bindings/hubbub/utils.h')
-rw-r--r--bindings/hubbub/utils.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/bindings/hubbub/utils.h b/bindings/hubbub/utils.h
new file mode 100644
index 0000000..2e2aaf2
--- /dev/null
+++ b/bindings/hubbub/utils.h
@@ -0,0 +1,28 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
+ */
+
+#ifndef dom_hubbub_utils_h_
+#define dom_hubbub_utils_h_
+
+#ifndef max
+#define max(a,b) ((a)>(b)?(a):(b))
+#endif
+
+#ifndef min
+#define min(a,b) ((a)<(b)?(a):(b))
+#endif
+
+#ifndef SLEN
+/* Calculate length of a string constant */
+#define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */
+#endif
+
+#ifndef UNUSED
+#define UNUSED(x) ((x)=(x))
+#endif
+
+#endif