summaryrefslogtreecommitdiffstats
path: root/mandocdb.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-11-20 12:39:08 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-11-20 12:39:08 +0000
commit128b2e9569342adb6a230c39530c1386a24d423c (patch)
tree24c34899384d4b78e02777db602df64613de0bf0 /mandocdb.h
parente6a940ec63910db636acab48c5362bfbc6d35975 (diff)
downloadmandoc-128b2e9569342adb6a230c39530c1386a24d423c.tar.gz
Merge schwarze@'s work for 64-bit types. This is based on a tweaked patch
submitted to tech@ on 16/11/2011, 01:39. It has been updated to account for the logical-operator functions and to avoid keeping a live pointer into the DBT value, which is not guaranteed to be consistent across calls into the bdb library.
Diffstat (limited to 'mandocdb.h')
-rw-r--r--mandocdb.h55
1 files changed, 43 insertions, 12 deletions
diff --git a/mandocdb.h b/mandocdb.h
index 240f53ba..8f8791d3 100644
--- a/mandocdb.h
+++ b/mandocdb.h
@@ -17,20 +17,51 @@
#ifndef MANDOCDB_H
#define MANDOCDB_H
+struct db_val {
+ uint64_t mask;
+ uint32_t rec;
+};
+
#define MANDOC_DB "mandoc.db"
#define MANDOC_IDX "mandoc.index"
-#define TYPE_An 0x01
-#define TYPE_Cd 0x02
-#define TYPE_Er 0x04
-#define TYPE_Ev 0x08
-#define TYPE_Fn 0x10
-#define TYPE_In 0x20
-#define TYPE_Nd 0x40
-#define TYPE_Nm 0x100
-#define TYPE_Pa 0x200
-#define TYPE_St 0x400
-#define TYPE_Va 0x1000
-#define TYPE_Xr 0x2000
+#define TYPE_An 0x0000000000000001ULL
+#define TYPE_Ar 0x0000000000000002ULL
+#define TYPE_At 0x0000000000000004ULL
+#define TYPE_Bsx 0x0000000000000008ULL
+#define TYPE_Bx 0x0000000000000010ULL
+#define TYPE_Cd 0x0000000000000020ULL
+#define TYPE_Cm 0x0000000000000040ULL
+#define TYPE_Dv 0x0000000000000080ULL
+#define TYPE_Dx 0x0000000000000100ULL
+#define TYPE_Em 0x0000000000000200ULL
+#define TYPE_Er 0x0000000000000400ULL
+#define TYPE_Ev 0x0000000000000800ULL
+#define TYPE_Fa 0x0000000000001000ULL
+#define TYPE_Fl 0x0000000000002000ULL
+#define TYPE_Fn 0x0000000000004000ULL
+#define TYPE_Ft 0x0000000000008000ULL
+#define TYPE_Fx 0x0000000000010000ULL
+#define TYPE_Ic 0x0000000000020000ULL
+#define TYPE_In 0x0000000000040000ULL
+#define TYPE_Lb 0x0000000000080000ULL
+#define TYPE_Li 0x0000000000100000ULL
+#define TYPE_Lk 0x0000000000200000ULL
+#define TYPE_Ms 0x0000000000400000ULL
+#define TYPE_Mt 0x0000000000800000ULL
+#define TYPE_Nd 0x0000000001000000ULL
+#define TYPE_Nm 0x0000000002000000ULL
+#define TYPE_Nx 0x0000000004000000ULL
+#define TYPE_Ox 0x0000000008000000ULL
+#define TYPE_Pa 0x0000000010000000ULL
+#define TYPE_Rs 0x0000000020000000ULL
+#define TYPE_Sh 0x0000000040000000ULL
+#define TYPE_Ss 0x0000000080000000ULL
+#define TYPE_St 0x0000000100000000ULL
+#define TYPE_Sy 0x0000000200000000ULL
+#define TYPE_Tn 0x0000000400000000ULL
+#define TYPE_Va 0x0000000800000000ULL
+#define TYPE_Vt 0x0000001000000000ULL
+#define TYPE_Xr 0x0000002000000000ULL
#endif /*!MANDOCDB_H */