mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-27 09:48:46 +00:00
neaten
This commit is contained in:
parent
07c9a4ffd9
commit
b86afffe3c
7 changed files with 7 additions and 8 deletions
|
|
@ -70,7 +70,7 @@ void hss_free(hss_t* pset) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
// Used by get() and remove().
|
||||
// Returns >0 for where the key is *or* should go (end of chain).
|
||||
// Returns >=0 for where the key is *or* should go (end of chain).
|
||||
static int hss_find_index_for_key(hss_t* pset, char* key, int* pideal_index) {
|
||||
int hash = mlr_string_hash_func(key);
|
||||
int index = mlr_canonical_mod(hash, pset->array_length);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void lhms2v_free(lhms2v_t* pmap) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
// Used by get() and remove().
|
||||
// Returns >0 for where the key is *or* should go (end of chain).
|
||||
// Returns >=0 for where the key is *or* should go (end of chain).
|
||||
static int lhms2v_find_index_for_key(lhms2v_t* pmap, char* key1, char* key2, int* pideal_index) {
|
||||
int hash = mlr_string_pair_hash_func(key1, key2);
|
||||
int index = mlr_canonical_mod(hash, pmap->array_length);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ void lhmsi_free(lhmsi_t* pmap) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
// Used by get() and remove().
|
||||
// Returns >0 for where the key is *or* should go (end of chain).
|
||||
// Returns >=0 for where the key is *or* should go (end of chain).
|
||||
static int lhmsi_find_index_for_key(lhmsi_t* pmap, char* key, int* pideal_index) {
|
||||
int hash = mlr_string_hash_func(key);
|
||||
int index = mlr_canonical_mod(hash, pmap->array_length);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ void lhmslv_free(lhmslv_t* pmap) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
// Used by get() and remove().
|
||||
// Returns >0 for where the key is *or* should go (end of chain).
|
||||
// Returns >=0 for where the key is *or* should go (end of chain).
|
||||
static int lhmslv_find_index_for_key(lhmslv_t* pmap, slls_t* key, int* pideal_index) {
|
||||
int hash = slls_hash_func(key);
|
||||
int index = mlr_canonical_mod(hash, pmap->array_length);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ void lhmss_free(lhmss_t* pmap) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
// Used by get() and remove().
|
||||
// Returns >0 for where the key is *or* should go (end of chain).
|
||||
// Returns >=0 for where the key is *or* should go (end of chain).
|
||||
static int lhmss_find_index_for_key(lhmss_t* pmap, char* key, int* pideal_index) {
|
||||
int hash = mlr_string_hash_func(key);
|
||||
int index = mlr_canonical_mod(hash, pmap->array_length);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void lhmsv_free(lhmsv_t* pmap) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
// Used by get() and remove().
|
||||
// Returns >0 for where the key is *or* should go (end of chain).
|
||||
// Returns >=0 for where the key is *or* should go (end of chain).
|
||||
static int lhmsv_find_index_for_key(lhmsv_t* pmap, char* key, int* pideal_index) {
|
||||
int hash = mlr_string_hash_func(key);
|
||||
int index = mlr_canonical_mod(hash, pmap->array_length);
|
||||
|
|
|
|||
|
|
@ -134,8 +134,7 @@ static void mlhmmv_level_free(mlhmmv_level_t* plevel) {
|
|||
|
||||
// ----------------------------------------------------------------
|
||||
// Used by get() and remove().
|
||||
// xxx s.b. >=0? if so fix all comments (lhm*).
|
||||
// Returns >0 for where the key is *or* should go (end of chain).
|
||||
// Returns >=0 for where the key is *or* should go (end of chain).
|
||||
static int mlhmmv_level_find_index_for_key(mlhmmv_level_t* plevel, mv_t* plevel_key, int* pideal_index) {
|
||||
int hash = mlhmmv_hash_func(plevel_key);
|
||||
int index = mlr_canonical_mod(hash, plevel->array_length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue