Lines Matching refs:state
1004 static int do_match(int key, struct match_state *state, int *ans) in do_match() argument
1009 if (key == '/' || (state->in_search && key == 27)) { in do_match()
1013 state->in_search = 1-state->in_search; in do_match()
1014 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1015 state->match_direction = MATCH_TINKER_PATTERN_DOWN; in do_match()
1017 } else if (!state->in_search) in do_match()
1021 state->pattern[strlen(state->pattern)] = c; in do_match()
1022 state->pattern[strlen(state->pattern)] = '\0'; in do_match()
1023 adj_match_dir(&state->match_direction); in do_match()
1024 *ans = get_mext_match(state->pattern, in do_match()
1025 state->match_direction); in do_match()
1027 state->match_direction = FIND_NEXT_MATCH_DOWN; in do_match()
1028 *ans = get_mext_match(state->pattern, in do_match()
1029 state->match_direction); in do_match()
1031 state->match_direction = FIND_NEXT_MATCH_UP; in do_match()
1032 *ans = get_mext_match(state->pattern, in do_match()
1033 state->match_direction); in do_match()
1035 state->pattern[strlen(state->pattern)-1] = '\0'; in do_match()
1036 adj_match_dir(&state->match_direction); in do_match()
1041 state->in_search = 0; in do_match()
1042 bzero(state->pattern, sizeof(state->pattern)); in do_match()