summaryrefslogtreecommitdiff
path: root/src/utils/utils.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-07-06 14:32:44 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-07-06 14:32:44 +0000
commit5da747ff564cdcfeff90c5f5cfcfac03bc48332b (patch)
tree18a60e0aa3081bcb49156782f4c30576679cdc52 /src/utils/utils.h
downloadlibdom-5da747ff564cdcfeff90c5f5cfcfac03bc48332b.tar.gz
libdom-5da747ff564cdcfeff90c5f5cfcfac03bc48332b.tar.bz2
Import DOM library.
This is mainly stub functions atm (and is missing a number of key interfaces). svn path=/trunk/dom/; revision=3384
Diffstat (limited to 'src/utils/utils.h')
-rw-r--r--src/utils/utils.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/utils/utils.h b/src/utils/utils.h
new file mode 100644
index 0000000..ae861c7
--- /dev/null
+++ b/src/utils/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_utils_h_
+#define dom_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