*** empty log message ***

This commit is contained in:
fc_botelho
2008-04-12 06:17:21 +00:00
parent 44e343a040
commit b8d4392b85
39 changed files with 359 additions and 336 deletions

View File

@@ -22,7 +22,7 @@ int main(int argc, char **argv)
//Find key
const char *key = "jjjjjjjjjj";
unsigned int id = cmph_search(hash, key, strlen(key));
unsigned int id = cmph_search(hash, key, (cmph_uint32)strlen(key));
fprintf(stderr, "Id:%u\n", id);
//Destroy hash
cmph_destroy(hash);

View File

@@ -21,7 +21,7 @@ int main(int argc, char **argv)
unsigned int nkeys = 10;
FILE* mphf_fd = fopen("temp_struct_vector.mph", "w");
// Source of keys
cmph_io_adapter_t *source = cmph_io_struct_vector_adapter(vector, sizeof(rec_t), sizeof(cmph_uint32), 11, nkeys);
cmph_io_adapter_t *source = cmph_io_struct_vector_adapter(vector, (cmph_uint32)sizeof(rec_t), (cmph_uint32)sizeof(cmph_uint32), 11, nkeys);
//Create minimal perfect hash function using the default (chm) algorithm.
cmph_config_t *config = cmph_config_new(source);

View File

@@ -27,7 +27,7 @@ int main(int argc, char **argv)
hash = cmph_load(mphf_fd);
while (i < nkeys) {
const char *key = vector[i];
unsigned int id = cmph_search(hash, key, strlen(key));
unsigned int id = cmph_search(hash, key, (cmph_uint32)strlen(key));
fprintf(stderr, "key:%s -- hash:%u\n", key, id);
i++;
}