link-grammar-5.8.0/link-grammar/string-id.c
/**
 * lookup the given string in the table.  Return an index
 * to the place it is, or the place where it should be.
 */
lookup the given string in the table.  Return an index
to the place it is, or the place where it should be.
lookup the given string in the table . Return an index to the place it is or the place where it should be .
static unsigned int find_place(const char *str, unsigned int h, String_id *ss)
{
	unsigned int coll_num = 0;
	unsigned int key = ss->mod_func(h);
	while (!place_found(str, &ss->table[key], h, ss))
	{
		key += 2 * ++coll_num - 1;
		if (key >= ss->size) key = ss->mod_func(key);
	}
	return key;
}
static unsigned int find_place ( const char * str , unsigned int h , String_id * ss ) { unsigned int coll_num = 0 ; unsigned int key = ss -> mod_func ( h ) ; while ( ! place_found ( str , & ss -> table [ key ] , h , ss ) ) { key += 2 * ++ coll_num - 1 ; if ( key >= ss -> size ) key = ss -> mod_func ( key ) ; } return key ; }
lookup the given string in the table.
lookup the given string in the table .
/* Quadratic probing. */