dict
heim_dict_t dict;
dict = _heim_alloc_object(&dict_object, sizeof(*dict));
dict->size = findprime(size);
if (dict->size == 0) {
heim_release(dict);
dict->tab = calloc(dict->size, sizeof(dict->tab[0]));
if (dict->tab == NULL) {
dict->size = 0;
heim_release(dict);
return dict;
_search(heim_dict_t dict, heim_object_t ptr)
for (p = dict->tab[v % dict->size]; p != NULL; p = p->next)
heim_dict_copy_value(heim_dict_t dict, heim_object_t key)
p = _search(dict, key);
heim_dict_add_value(heim_dict_t dict, heim_object_t key, heim_object_t value)
h = _search(dict, key);
tabptr = &dict->tab[v % dict->size];
heim_dict_delete_key(heim_dict_t dict, heim_object_t key)
struct hashentry *h = _search(dict, key);
heim_dict_iterate_f(heim_dict_t dict, heim_dict_iterator_f_t func, void *arg)
for (h = dict->tab; h < &dict->tab[dict->size]; ++h)
heim_dict_iterate(heim_dict_t dict, void (^func)(heim_object_t, heim_object_t))
for (h = dict->tab; h < &dict->tab[dict->size]; ++h)
heim_dict_t dict = ptr;
for (h = dict->tab; h < &dict->tab[dict->size]; ++h) {
free(dict->tab);
heim_dict_t dict;
dict = heim_dict_create(10);
heim_dict_add_value(dict, a1, a2);
heim_dict_add_value(dict, a3, a4);
heim_dict_delete_key(dict, a3);
heim_dict_delete_key(dict, a1);
heim_release(dict);
heim_dict_t dict;
dict = heim_dict_copy_value(modules, m);
if (dict == NULL) {
heim_dict_iterate_f(dict, search_modules, &s);
heim_release(dict);
dict->word_block = malloc(sb.st_size + 1);
if (dict->word_block == NULL) {
if (read(fd, dict->word_block, sb.st_size) != sb.st_size) {
dict->word_block[sb.st_size] = '\0';
p = dict->word_block;
dict->word_count++;
if ((dict->word_list = malloc(dict->word_count * sizeof(char *))) == NULL)
p = dict->word_block;
for (i = 0; i < dict->word_count; i++) {
dict->word_list[i] = p;
qsort(dict->word_list, dict->word_count, sizeof(char *), word_compare);
destroy_dict(dict_moddata dict)
if (dict == NULL)
free(dict->word_list);
free(dict->word_block);
free(dict);
dict_moddata dict;
dict = malloc(sizeof(*dict));
if (dict == NULL)
dict->word_list = NULL;
dict->word_block = NULL;
dict->word_count = 0;
ret = init_dict(dict, dict_file);
destroy_dict(dict);
*data = (krb5_pwqual_moddata)dict;
dict_moddata dict = (dict_moddata)data;
if (dict->word_list != NULL &&
bsearch(&password, dict->word_list, dict->word_count, sizeof(char *),
init_dict(dict_moddata dict, const char *dict_file)
char *dict = "words"; /* default dictionary */
dict = optarg;
if (dict == NULL)
free(dict->word_list);
free(dict->word_block);
free(dict);
combo_moddata dict;
dict = malloc(sizeof(*dict));
if (dict == NULL)
dict->word_list = NULL;
dict->word_block = NULL;
ret = init_dict(dict, dict_file);
destroy_dict(dict);
*data = (krb5_pwqual_moddata)dict;
combo_moddata dict = (combo_moddata)data;
if (dict->word_list == NULL)
for (word1 = dict->word_list; *word1 != NULL; word1++) {
for (word2 = dict->word_list; *word2 != NULL; word2++) {
init_dict(combo_moddata dict, const char *dict_file)
dict->word_block = malloc(sb.st_size + 1);
if (dict->word_block == NULL)
if (read(fd, dict->word_block, sb.st_size) != sb.st_size)
dict->word_block[sb.st_size] = '\0';
p = dict->word_block;
dict->word_list = calloc(count + 1, sizeof(char *));
if (dict->word_list == NULL)
p = dict->word_block;
dict->word_list[i] = p;
destroy_dict(combo_moddata dict)
char *dict = "words"; /* default dictionary */
dict = optarg;
return pDict->here - pDict->dict;
pDict->dict = ficlMalloc(nAlloc);
assert(pDict->dict);
pDict->here = pDict->dict;
return ((p >= (void *) &pDict->dict)
&& (p < (void *)(&pDict->dict + pDict->size))
dp->dict = ficlMalloc( dictIncrease.u * sizeof (CELL) );
assert(dp->dict);
dp->here = dp->dict;
CELL *dict; /* Base of dictionary memory */
nWords, (long) (dp->here - dp->dict), dp->size);
nWords, (long) (dp->here - dp->dict), dp->size);
static struct dict subjectnames[] = {
static struct dict resourcenames[] = {
static struct dict actionnames[] = {
str2value(const char *str, int *value, struct dict *table)
*dest = state->dict[state->hash]; /* Guess correct */
state->dict[state->hash] = *source; /* Guess wrong */
memset(state->dict, '\0', sizeof state->dict);
memset(state->dict, '\0', sizeof state->dict);
u_char dict[GUESS_TABLE_SIZE];
if (state->dict[state->hash] == *source) {
state->dict[state->hash] = *source;
*dest++ = state->dict[state->hash] = *source;