Lines Matching refs:ndx
85 int ndx = -1; in array_get_index() local
103 ndx = a->sorted[pos]; in array_get_index()
116 return ndx; in array_get_index()
120 int ndx; in array_get_element() local
122 if (-1 != (ndx = array_get_index(a, key, strlen(key) + 1, NULL))) { in array_get_element()
125 return a->data[ndx]; in array_get_element()
169 int ndx; in array_replace() local
171 if (-1 == (ndx = array_get_index(a, du->key->ptr, du->key->used, NULL))) { in array_replace()
175 data_unset *old = a->data[ndx]; in array_replace()
176 a->data[ndx] = du; in array_replace()
182 int ndx = -1; in array_insert_unique() local
193 if (-1 != (ndx = array_get_index(a, str->key->ptr, str->key->used, &pos))) { in array_insert_unique()
195 if (a->data[ndx]->type == str->type) { in array_insert_unique()
196 str->insert_dup(a->data[ndx], str); in array_insert_unique()
226 ndx = (int) a->used; in array_insert_unique()
229 if (a->data[ndx]) a->data[ndx]->free(a->data[ndx]); in array_insert_unique()
233 if (pos != ndx && in array_insert_unique()
240 if (pos != ndx) { in array_insert_unique()
241 memmove(a->sorted + (pos + 1), a->sorted + (pos), (ndx - pos) * sizeof(*a->sorted)); in array_insert_unique()
245 a->sorted[pos] = ndx; in array_insert_unique()
247 if (a->next_power_of_2 == (size_t)ndx) a->next_power_of_2 <<= 1; in array_insert_unique()