Lines Matching refs:idx

285 #define CUR_STATE(idx)	((stateitem_T *)(current_state.ga_data))[idx]  argument
302 static int did_match_already(int idx, garray_T *gap);
305 static void update_si_attr(int idx);
310 static int push_current_state(int idx);
324 static void find_endpos(int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_endpos, long *flags…
328 static void syn_add_end_off(lpos_T *result, regmmatch_T *regmatch, synpat_T *spp, int idx, int extr…
329 static void syn_add_start_off(lpos_T *result, regmmatch_T *regmatch, synpat_T *spp, int idx, int ex…
333 static void syn_remove_pattern(synblock_T *block, int idx);
606 int idx; in syn_sync() local
689 for (idx = syn_block->b_syn_patterns.ga_len; --idx >= 0; ) in syn_sync()
690 if (SYN_ITEMS(syn_block)[idx].sp_syn.id in syn_sync()
692 && SYN_ITEMS(syn_block)[idx].sp_type == SPTYPE_START) in syn_sync()
695 if (push_current_state(idx) == OK) in syn_sync()
1770 int idx; in syn_current_attr() local
1958 for (idx = syn_block->b_syn_patterns.ga_len; --idx >= 0; ) in syn_current_attr()
1960 spp = &(SYN_ITEMS(syn_block)[idx]); in syn_current_attr()
2032 if (did_match_already(idx, &zero_width_next_ga)) in syn_current_attr()
2076 find_endpos(idx, &startpos, &endpos, &hl_endpos, in syn_current_attr()
2117 next_match_idx = idx; in syn_current_attr()
2225 for (idx = current_state.ga_len - 1; idx >= 0; --idx) in syn_current_attr()
2227 sip = &CUR_STATE(idx); in syn_current_attr()
2349 did_match_already(int idx, garray_T *gap) in did_match_already() argument
2356 && CUR_STATE(i).si_idx == idx) in did_match_already()
2362 if (((int *)(gap->ga_data))[i] == idx) in did_match_already()
2570 update_si_attr(int idx) in update_si_attr() argument
2572 stateitem_T *sip = &CUR_STATE(idx); in update_si_attr()
2598 if (idx == 0) in update_si_attr()
2607 sip->si_attr = CUR_STATE(idx - 1).si_attr; in update_si_attr()
2608 sip->si_trans_id = CUR_STATE(idx - 1).si_trans_id; in update_si_attr()
2612 sip->si_cont_list = CUR_STATE(idx - 1).si_cont_list; in update_si_attr()
2749 push_current_state(int idx) in push_current_state() argument
2754 CUR_STATE(current_state.ga_len).si_idx = idx; in push_current_state()
2789 int idx, // index of the pattern in find_endpos() argument
2810 if (idx < 0) in find_endpos()
2818 spp = &(SYN_ITEMS(syn_block)[idx]); in find_endpos()
2830 spp = &(SYN_ITEMS(syn_block)[idx]); in find_endpos()
2833 ++idx; in find_endpos()
2842 ++idx; in find_endpos()
2852 start_idx = idx; // remember the first END pattern. in find_endpos()
2864 for (idx = start_idx; idx < syn_block->b_syn_patterns.ga_len; ++idx) in find_endpos()
2869 spp = &(SYN_ITEMS(syn_block)[idx]); in find_endpos()
2886 best_idx = idx; in find_endpos()
3055 int idx, // index of offset in syn_add_end_off() argument
3063 if (spp->sp_off_flags & (1 << idx)) in syn_add_end_off()
3067 off = spp->sp_offsets[idx] + extra; in syn_add_end_off()
3073 off = spp->sp_offsets[idx]; in syn_add_end_off()
3107 int idx, in syn_add_start_off() argument
3115 if (spp->sp_off_flags & (1 << (idx + SPO_COUNT))) in syn_add_start_off()
3119 off = spp->sp_offsets[idx] + extra; in syn_add_start_off()
3125 off = spp->sp_offsets[idx]; in syn_add_start_off()
3611 int idx) in syn_remove_pattern() argument
3615 spp = &(SYN_ITEMS(block)[idx]); in syn_remove_pattern()
3620 syn_clear_pattern(block, idx); in syn_remove_pattern()
3622 sizeof(synpat_T) * (block->b_syn_patterns.ga_len - idx - 1)); in syn_remove_pattern()
3746 int idx; in syn_clear_one() local
3756 for (idx = curwin->w_s->b_syn_patterns.ga_len; --idx >= 0; ) in syn_clear_one()
3758 spp = &(SYN_ITEMS(curwin->w_s)[idx]); in syn_clear_one()
3761 syn_remove_pattern(curwin->w_s, idx); in syn_clear_one()
3993 int idx; in syn_list_one() local
4031 for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len && !got_int; ++idx) in syn_list_one()
4033 spp = &(SYN_ITEMS(curwin->w_s)[idx]); in syn_list_one()
4047 while (SYN_ITEMS(curwin->w_s)[idx].sp_type == SPTYPE_START) in syn_list_one()
4048 put_pattern("start", '=', &SYN_ITEMS(curwin->w_s)[idx++], attr); in syn_list_one()
4049 if (SYN_ITEMS(curwin->w_s)[idx].sp_type == SPTYPE_SKIP) in syn_list_one()
4050 put_pattern("skip", '=', &SYN_ITEMS(curwin->w_s)[idx++], attr); in syn_list_one()
4051 while (idx < curwin->w_s->b_syn_patterns.ga_len in syn_list_one()
4052 && SYN_ITEMS(curwin->w_s)[idx].sp_type == SPTYPE_END) in syn_list_one()
4053 put_pattern("end", '=', &SYN_ITEMS(curwin->w_s)[idx++], attr); in syn_list_one()
4054 --idx; in syn_list_one()
4947 int idx; in syn_cmd_match() local
4992 idx = curwin->w_s->b_syn_patterns.ga_len; in syn_cmd_match()
4993 SYN_ITEMS(curwin->w_s)[idx] = item; in syn_cmd_match()
4994 SYN_ITEMS(curwin->w_s)[idx].sp_syncing = syncing; in syn_cmd_match()
4995 SYN_ITEMS(curwin->w_s)[idx].sp_type = SPTYPE_MATCH; in syn_cmd_match()
4996 SYN_ITEMS(curwin->w_s)[idx].sp_syn.id = syn_id; in syn_cmd_match()
4997 SYN_ITEMS(curwin->w_s)[idx].sp_syn.inc_tag = current_syn_inc_tag; in syn_cmd_match()
4998 SYN_ITEMS(curwin->w_s)[idx].sp_flags = syn_opt_arg.flags; in syn_cmd_match()
4999 SYN_ITEMS(curwin->w_s)[idx].sp_sync_idx = sync_idx; in syn_cmd_match()
5000 SYN_ITEMS(curwin->w_s)[idx].sp_cont_list = syn_opt_arg.cont_list; in syn_cmd_match()
5001 SYN_ITEMS(curwin->w_s)[idx].sp_syn.cont_in_list = in syn_cmd_match()
5004 SYN_ITEMS(curwin->w_s)[idx].sp_cchar = conceal_char; in syn_cmd_match()
5008 SYN_ITEMS(curwin->w_s)[idx].sp_next_list = syn_opt_arg.next_list; in syn_cmd_match()
5073 int idx; in syn_cmd_region() local
5232 idx = curwin->w_s->b_syn_patterns.ga_len; in syn_cmd_region()
5237 SYN_ITEMS(curwin->w_s)[idx] = *(ppp->pp_synp); in syn_cmd_region()
5238 SYN_ITEMS(curwin->w_s)[idx].sp_syncing = syncing; in syn_cmd_region()
5239 SYN_ITEMS(curwin->w_s)[idx].sp_type = in syn_cmd_region()
5242 SYN_ITEMS(curwin->w_s)[idx].sp_flags |= syn_opt_arg.flags; in syn_cmd_region()
5243 SYN_ITEMS(curwin->w_s)[idx].sp_syn.id = syn_id; in syn_cmd_region()
5244 SYN_ITEMS(curwin->w_s)[idx].sp_syn.inc_tag = in syn_cmd_region()
5246 SYN_ITEMS(curwin->w_s)[idx].sp_syn_match_id = in syn_cmd_region()
5249 SYN_ITEMS(curwin->w_s)[idx].sp_cchar = conceal_char; in syn_cmd_region()
5253 SYN_ITEMS(curwin->w_s)[idx].sp_cont_list = in syn_cmd_region()
5255 SYN_ITEMS(curwin->w_s)[idx].sp_syn.cont_in_list = in syn_cmd_region()
5259 SYN_ITEMS(curwin->w_s)[idx].sp_next_list = in syn_cmd_region()
5263 ++idx; in syn_cmd_region()
5654 int idx; in get_syn_pattern() local
5690 for (idx = SPO_COUNT; --idx >= 0; ) in get_syn_pattern()
5691 if (STRNCMP(end, spo_name_tab[idx], 3) == 0) in get_syn_pattern()
5693 if (idx >= 0) in get_syn_pattern()
5695 p = &(ci->sp_offsets[idx]); in get_syn_pattern()
5696 if (idx != SPO_LC_OFF) in get_syn_pattern()
5701 case 'e': idx += SPO_COUNT; break; in get_syn_pattern()
5702 default: idx = -1; break; in get_syn_pattern()
5704 if (idx >= 0) in get_syn_pattern()
5706 ci->sp_off_flags |= (1 << idx); in get_syn_pattern()
5707 if (idx == SPO_LC_OFF) // lc=99 in get_syn_pattern()
5738 } while (idx >= 0); in get_syn_pattern()
6451 get_syntax_name(expand_T *xp UNUSED, int idx) in get_syntax_name() argument
6456 return (char_u *)subcommands[idx].name; in get_syntax_name()
6460 return (char_u *)case_args[idx]; in get_syntax_name()
6466 return (char_u *)spell_args[idx]; in get_syntax_name()
6474 return (char_u *)sync_args[idx]; in get_syntax_name()
6653 int idx; in syntime_clear() local
6661 for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len; ++idx) in syntime_clear()
6663 spp = &(SYN_ITEMS(curwin->w_s)[idx]); in syntime_clear()
6673 get_syntime_arg(expand_T *xp UNUSED, int idx) in get_syntime_arg() argument
6675 switch (idx) in get_syntime_arg()
6711 int idx; in syntime_report() local
6730 for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len; ++idx) in syntime_report()
6732 spp = &(SYN_ITEMS(curwin->w_s)[idx]); in syntime_report()
6761 for (idx = 0; idx < ga.ga_len && !got_int; ++idx) in syntime_report()
6763 p = ((time_entry_T *)ga.ga_data) + idx; in syntime_report()