#include #include #include #include struct hive_h { void *addr; }; struct ntreg_hbin_block { char id[2]; }; typedef size_t hive_node_h; #define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0) #define BLOCK_ID_EQ(h,offs,eqid) \ (STREQLEN (((struct ntreg_hbin_block *)((h)->addr + (offs)))->id, (eqid), 2)) static size_t insert_lf_record (struct hive_h *h, size_t old_offs, size_t posn, const char *name, hive_node_h node) { assert (BLOCK_ID_EQ (h, old_offs, "lf") || BLOCK_ID_EQ (h, old_offs, "lh")); }