Lines Matching refs:ndx
186 cap_group_extents(ARGSTATE *argstate, Word ndx, Word *ret_start_ndx,
189 *ret_end_ndx = ndx;
195 while ((ndx > 0) && (argstate->cap.data[ndx].c_tag == CA_SUNW_NULL))
196 ndx--;
197 while ((ndx > 0) && (argstate->cap.data[ndx - 1].c_tag != CA_SUNW_NULL))
198 ndx--;
199 *ret_start_ndx = ndx;
205 ndx = *ret_end_ndx;
206 while (((ndx + 1) < argstate->cap.num) &&
207 (argstate->cap.data[ndx].c_tag != CA_SUNW_NULL))
208 ndx++;
209 while (((ndx + 1) < argstate->cap.num) &&
210 (argstate->cap.data[ndx + 1].c_tag == CA_SUNW_NULL))
211 ndx++;
212 *ret_end_ndx = ndx;
223 Word ndx = argstate->cap.grp_start_ndx;
224 Cap *cap = argstate->cap.data + ndx;
226 for (; ndx <= argstate->cap.grp_end_ndx; ndx++, cap++) {
251 argstate_cap_group(ARGSTATE *argstate, Word ndx)
256 cap_group_extents(argstate, ndx, &argstate->cap.grp_start_ndx,
271 group_title(ARGSTATE *argstate, Word ndx)
276 cap_group_extents(argstate, ndx, &loc_argstate.cap.grp_start_ndx,
372 * ndx = If print_type is PRINT_CAP_T_NDX, displays the index specified.
387 Word cnt, ndx, printed = 0;
407 ndx = arg;
410 ndx = argstate->cap.grp_start_ndx;
411 cnt = argstate->cap.grp_end_ndx - ndx + 1;
424 cap = &argstate->cap.data[ndx];
425 for (; cnt--; cap++, ndx++) {
461 group_title(argstate, ndx);
464 Elf_cap_entry(NULL, cap, ndx, str, str_size,
592 Word ndx, ca_value;
604 ndx = (Word) elfedit_atoui_range(arg, argname, 0,
606 argstate_cap_group(argstate, ndx);
607 return (ndx);
634 for (ndx = argstate->cap.grp_start_ndx;
635 ndx <= argstate->cap.grp_end_ndx; ndx++) {
636 if (argstate->cap.data[ndx].c_tag == ca_value) {
640 argstate->cap.sec->sec_name, EC_WORD(ndx), arg);
641 return (ndx);
650 if (argstate->cap.data[ndx].c_tag == CA_SUNW_NULL) {
651 if (ndx < argstate->cap.grp_end_ndx) {
657 argstate->cap.sec->sec_name, EC_WORD(ndx),
659 argstate->cap.data[ndx].c_tag = ca_value;
660 bzero(&argstate->cap.data[ndx].c_un,
661 sizeof (argstate->cap.data[ndx].c_un));
662 return (ndx);
718 * ndx - capabilities data index
725 cap_set(ARGSTATE *argstate, Cap *cap, Word ndx, Word cap_ndx,
732 ncap = flag_bitop(argstate, cap[ndx].c_un.c_val,
736 if ((ocap = cap[ndx].c_un.c_val) == ncap) {
738 cap_ndx, cap_name, EC_WORD(ndx),
744 cap_ndx, cap_name, EC_WORD(ndx),
748 cap[ndx].c_un.c_val = ncap;
774 Word ndx;
793 ndx = arg_to_index(&argstate, argstate.argv[0],
803 ndx = arg_to_index(&argstate, argstate.argv[0],
811 ndx = arg_to_index(&argstate, argstate.argv[0],
820 ndx = arg_to_index(&argstate, argstate.argv[0],
827 ndx = arg_to_index(&argstate, elfedit_atoconst_value_to_str(
834 ndx = arg_to_index(&argstate, elfedit_atoconst_value_to_str(
841 ndx = arg_to_index(&argstate, elfedit_atoconst_value_to_str(
855 print_cap(cmd, 0, &argstate, print_type, ndx);
872 if (cap[ndx].c_tag == c_tag) {
875 cap_ndx, cap_name, EC_WORD(ndx),
880 cap_ndx, cap_name, EC_WORD(ndx),
881 conv_cap_tag(cap[ndx].c_tag, 0, &inv_buf1),
883 cap[ndx].c_tag = c_tag;
902 if (cap[ndx].c_un.c_val == c_val) {
907 EC_WORD(ndx), EC_XWORD(c_val));
913 EC_WORD(ndx), EC_XWORD(cap[ndx].c_un.c_val),
915 cap[ndx].c_un.c_val = c_val;
926 argstate.cap.grp_end_ndx - ndx + 1, NULL);
945 if ((ndx + cnt - 1) > argstate.cap.grp_end_ndx)
952 argstate.cap.grp_end_ndx + 1, ndx, cnt);
976 ((ndx > dstndx) ? ndx : dstndx) + 1;
990 if ((ndx < argstate.cap.grp_start_ndx) ||
991 ((ndx + cnt) > argstate.cap.grp_end_ndx) ||
1000 argstate.cap.grp_end_ndx + 1, ndx, dstndx,
1009 ret = cap_set(&argstate, cap, ndx, cap_ndx, cap_name,
1016 ret = cap_set(&argstate, cap, ndx, cap_ndx, cap_name,
1023 ret = cap_set(&argstate, cap, ndx, cap_ndx, cap_name,
1037 print_cap(cmd, 1, &argstate, print_type, ndx);