aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc_ohash.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-13 15:53:05 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-13 15:53:05 +0000
commite47784200392e2dea53b3decd3ceb23e1e2a0ca6 (patch)
tree06f0453944a7435752f1560277357ba9f8bec536 /mandoc_ohash.h
parent899e2d9f117239c813531c03cd4eb41d120bce26 (diff)
downloadmandoc-e47784200392e2dea53b3decd3ceb23e1e2a0ca6.tar.gz
mandoc-e47784200392e2dea53b3decd3ceb23e1e2a0ca6.tar.zst
mandoc-e47784200392e2dea53b3decd3ceb23e1e2a0ca6.zip
Reduce the amount of code by moving the three copies of the ohash
callback functions into one common place, preparing for the use of ohash for some additional purposes. No functional change.
Diffstat (limited to 'mandoc_ohash.h')
-rw-r--r--mandoc_ohash.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/mandoc_ohash.h b/mandoc_ohash.h
new file mode 100644
index 00000000..7e24517c
--- /dev/null
+++ b/mandoc_ohash.h
@@ -0,0 +1,27 @@
+/* $Id: mandoc_ohash.h,v 1.1 2015/10/13 15:53:05 schwarze Exp $ */
+/*
+ * Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#if HAVE_OHASH
+#include <ohash.h>
+#else
+#include "compat_ohash.h"
+#endif
+
+__BEGIN_DECLS
+
+void mandoc_ohash_init(struct ohash *, unsigned int, ptrdiff_t);
+
+__END_DECLS