Lines Matching refs:ndx

188 cap_group_extents(ARGSTATE *argstate, Word ndx, Word *ret_start_ndx,  in cap_group_extents()  argument
191 *ret_end_ndx = ndx; in cap_group_extents()
197 while ((ndx > 0) && (argstate->cap.data[ndx].c_tag == CA_SUNW_NULL)) in cap_group_extents()
198 ndx--; in cap_group_extents()
199 while ((ndx > 0) && (argstate->cap.data[ndx - 1].c_tag != CA_SUNW_NULL)) in cap_group_extents()
200 ndx--; in cap_group_extents()
201 *ret_start_ndx = ndx; in cap_group_extents()
207 ndx = *ret_end_ndx; in cap_group_extents()
208 while (((ndx + 1) < argstate->cap.num) && in cap_group_extents()
209 (argstate->cap.data[ndx].c_tag != CA_SUNW_NULL)) in cap_group_extents()
210 ndx++; in cap_group_extents()
211 while (((ndx + 1) < argstate->cap.num) && in cap_group_extents()
212 (argstate->cap.data[ndx + 1].c_tag == CA_SUNW_NULL)) in cap_group_extents()
213 ndx++; in cap_group_extents()
214 *ret_end_ndx = ndx; in cap_group_extents()
225 Word ndx = argstate->cap.grp_start_ndx; in cap_group_id() local
226 Cap *cap = argstate->cap.data + ndx; in cap_group_id()
228 for (; ndx <= argstate->cap.grp_end_ndx; ndx++, cap++) { in cap_group_id()
253 argstate_cap_group(ARGSTATE *argstate, Word ndx) in argstate_cap_group() argument
258 cap_group_extents(argstate, ndx, &argstate->cap.grp_start_ndx, in argstate_cap_group()
273 group_title(ARGSTATE *argstate, Word ndx) in group_title() argument
278 cap_group_extents(argstate, ndx, &loc_argstate.cap.grp_start_ndx, in group_title()
389 Word cnt, ndx, printed = 0; in print_cap() local
409 ndx = arg; in print_cap()
412 ndx = argstate->cap.grp_start_ndx; in print_cap()
413 cnt = argstate->cap.grp_end_ndx - ndx + 1; in print_cap()
426 cap = &argstate->cap.data[ndx]; in print_cap()
427 for (; cnt--; cap++, ndx++) { in print_cap()
463 group_title(argstate, ndx); in print_cap()
466 Elf_cap_entry(NULL, cap, ndx, str, str_size, in print_cap()
602 Word ndx, ca_value; in arg_to_index() local
614 ndx = (Word) elfedit_atoui_range(arg, argname, 0, in arg_to_index()
616 argstate_cap_group(argstate, ndx); in arg_to_index()
617 return (ndx); in arg_to_index()
644 for (ndx = argstate->cap.grp_start_ndx; in arg_to_index()
645 ndx <= argstate->cap.grp_end_ndx; ndx++) { in arg_to_index()
646 if (argstate->cap.data[ndx].c_tag == ca_value) { in arg_to_index()
650 argstate->cap.sec->sec_name, EC_WORD(ndx), arg); in arg_to_index()
651 return (ndx); in arg_to_index()
660 if (argstate->cap.data[ndx].c_tag == CA_SUNW_NULL) { in arg_to_index()
661 if (ndx < argstate->cap.grp_end_ndx) { in arg_to_index()
667 argstate->cap.sec->sec_name, EC_WORD(ndx), in arg_to_index()
669 argstate->cap.data[ndx].c_tag = ca_value; in arg_to_index()
670 bzero(&argstate->cap.data[ndx].c_un, in arg_to_index()
671 sizeof (argstate->cap.data[ndx].c_un)); in arg_to_index()
672 return (ndx); in arg_to_index()
735 cap_set(ARGSTATE *argstate, Cap *cap, Word ndx, Word cap_ndx, in cap_set() argument
742 ncap = flag_bitop(argstate, cap[ndx].c_un.c_val, in cap_set()
746 if ((ocap = cap[ndx].c_un.c_val) == ncap) { in cap_set()
748 cap_ndx, cap_name, EC_WORD(ndx), in cap_set()
754 cap_ndx, cap_name, EC_WORD(ndx), in cap_set()
758 cap[ndx].c_un.c_val = ncap; in cap_set()
784 Word ndx; in cmd_body() local
803 ndx = arg_to_index(&argstate, argstate.argv[0], in cmd_body()
813 ndx = arg_to_index(&argstate, argstate.argv[0], in cmd_body()
821 ndx = arg_to_index(&argstate, argstate.argv[0], in cmd_body()
830 ndx = arg_to_index(&argstate, argstate.argv[0], in cmd_body()
837 ndx = arg_to_index(&argstate, elfedit_atoconst_value_to_str( in cmd_body()
844 ndx = arg_to_index(&argstate, elfedit_atoconst_value_to_str( in cmd_body()
851 ndx = arg_to_index(&argstate, elfedit_atoconst_value_to_str( in cmd_body()
858 ndx = arg_to_index(&argstate, elfedit_atoconst_value_to_str( in cmd_body()
872 print_cap(cmd, 0, &argstate, print_type, ndx); in cmd_body()
889 if (cap[ndx].c_tag == c_tag) { in cmd_body()
892 cap_ndx, cap_name, EC_WORD(ndx), in cmd_body()
897 cap_ndx, cap_name, EC_WORD(ndx), in cmd_body()
898 conv_cap_tag(cap[ndx].c_tag, 0, &inv_buf1), in cmd_body()
900 cap[ndx].c_tag = c_tag; in cmd_body()
919 if (cap[ndx].c_un.c_val == c_val) { in cmd_body()
924 EC_WORD(ndx), EC_XWORD(c_val)); in cmd_body()
930 EC_WORD(ndx), EC_XWORD(cap[ndx].c_un.c_val), in cmd_body()
932 cap[ndx].c_un.c_val = c_val; in cmd_body()
943 argstate.cap.grp_end_ndx - ndx + 1, NULL); in cmd_body()
962 if ((ndx + cnt - 1) > argstate.cap.grp_end_ndx) in cmd_body()
969 argstate.cap.grp_end_ndx + 1, ndx, cnt); in cmd_body()
993 ((ndx > dstndx) ? ndx : dstndx) + 1; in cmd_body()
1007 if ((ndx < argstate.cap.grp_start_ndx) || in cmd_body()
1008 ((ndx + cnt) > argstate.cap.grp_end_ndx) || in cmd_body()
1017 argstate.cap.grp_end_ndx + 1, ndx, dstndx, in cmd_body()
1026 ret = cap_set(&argstate, cap, ndx, cap_ndx, cap_name, in cmd_body()
1033 ret = cap_set(&argstate, cap, ndx, cap_ndx, cap_name, in cmd_body()
1040 ret = cap_set(&argstate, cap, ndx, cap_ndx, cap_name, in cmd_body()
1047 ret = cap_set(&argstate, cap, ndx, cap_ndx, cap_name, in cmd_body()
1062 print_cap(cmd, 1, &argstate, print_type, ndx); in cmd_body()