Lines Matching refs:top
6 * forth in the LICENSE file which can be found at the top level of
737 sm_ldap_add_recurse(top, item, type, rpool)
738 SM_LDAP_RECURSE_LIST **top;
759 if (*top == NULL)
762 *top = sm_rpool_malloc_x(rpool, sizeof **top);
763 (*top)->lrl_cnt = 0;
764 (*top)->lrl_size = 0;
765 (*top)->lrl_data = NULL;
768 if ((*top)->lrl_cnt >= (*top)->lrl_size)
771 olddata = (*top)->lrl_data;
772 if ((*top)->lrl_size == 0)
775 (*top)->lrl_size = 256;
779 oldsizeb = (*top)->lrl_size * sizeof *((*top)->lrl_data);
780 (*top)->lrl_size *= 2;
782 (*top)->lrl_data = sm_rpool_malloc_x(rpool,
783 (*top)->lrl_size * sizeof *((*top)->lrl_data));
785 memcpy((*top)->lrl_data, olddata, oldsizeb);
794 m = (*top)->lrl_cnt - 1;
804 rc = sm_strcasecmp(item, (*top)->lrl_data[p]->lr_search);
806 rc = type - (*top)->lrl_data[p]->lr_type;
813 return (*top)->lrl_data[p];
817 else if (n >= (*top)->lrl_cnt)
818 insertat = (*top)->lrl_cnt;
831 moveb = ((*top)->lrl_cnt - insertat) * sizeof *((*top)->lrl_data);
833 memmove(&((*top)->lrl_data[insertat + 1]),
834 &((*top)->lrl_data[insertat]),
843 ((*top)->lrl_data)[insertat] = newe;
844 (*top)->lrl_cnt++;
871 /* Are we the top top level of the search? */
1378 ** Spin through the built-up recurse list at the top
1382 ** top. Any items added to the list during that recursion
1383 ** will be expanded by the top level.