X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fhc_matchfinder.h;fp=include%2Fwimlib%2Fhc_matchfinder.h;h=e1da62b5ca1a388566419f98030705971e9e31d3;hp=6c7020e5979a58b59cf56a1e6ebd5c3a3f7d54b9;hb=e9a04c1cb384cf3cf23d70107e85f79c4ac0a555;hpb=26396c2c45946ba38c18c6ac0207e8c1f68e4668 diff --git a/include/wimlib/hc_matchfinder.h b/include/wimlib/hc_matchfinder.h index 6c7020e5..e1da62b5 100644 --- a/include/wimlib/hc_matchfinder.h +++ b/include/wimlib/hc_matchfinder.h @@ -49,13 +49,13 @@ * * Notes on usage * - * Before including this header, you must define 'pos_t' to an integer type that - * can represent all possible positions. This can be a 16-bit or 32-bit + * Before including this header, you must define 'mf_pos_t' to an integer type + * that can represent all possible positions. This can be a 16-bit or 32-bit * unsigned integer. When possible, the former should be used due to the * reduced cache pressure. This header can be included multiple times in a - * single .c file with different 'pos_t' definitions; however, you must define a - * different MF_SUFFIX each time to generate different names for the matchfinder - * structure and functions. + * single .c file with different 'mf_pos_t' definitions; however, you must + * define a different MF_SUFFIX each time to generate different names for the + * matchfinder structure and functions. * * The number of bytes that must be allocated for a given 'struct * hc_matchfinder' must be gotten by calling hc_matchfinder_size(). @@ -118,15 +118,15 @@ struct TEMPLATED(hc_matchfinder) { /* The hash table for finding length 3 matches */ - pos_t hash3_tab[1UL << HC_MATCHFINDER_HASH3_ORDER]; + mf_pos_t hash3_tab[1UL << HC_MATCHFINDER_HASH3_ORDER]; /* The hash table which contains the first nodes of the linked lists for * finding length 4+ matches */ - pos_t hash4_tab[1UL << HC_MATCHFINDER_HASH4_ORDER]; + mf_pos_t hash4_tab[1UL << HC_MATCHFINDER_HASH4_ORDER]; /* The "next node" references for the linked lists. The "next node" of * the node for the sequence with position 'pos' is 'next_tab[pos]'. */ - pos_t next_tab[]; + mf_pos_t next_tab[]; }; /* Return the number of bytes that must be allocated for a 'hc_matchfinder' that @@ -135,7 +135,7 @@ static inline size_t TEMPLATED(hc_matchfinder_size)(size_t max_bufsize) { return sizeof(struct TEMPLATED(hc_matchfinder)) + - (max_bufsize * sizeof(pos_t)); + (max_bufsize * sizeof(mf_pos_t)); } /* Prepare the matchfinder for a new input buffer. */ @@ -188,7 +188,7 @@ TEMPLATED(hc_matchfinder_longest_match)(struct TEMPLATED(hc_matchfinder) * const const u8 *in_next = in_begin + cur_pos; u32 depth_remaining = max_search_depth; const u8 *best_matchptr = best_matchptr; /* uninitialized */ - pos_t cur_node3, cur_node4; + mf_pos_t cur_node3, cur_node4; u32 hash3, hash4; u32 next_seq3, next_seq4; u32 seq4;