Lines Matching refs:state
1018 static int do_match(int key, struct match_state *state, int *ans) in do_match() argument
1023 if (key == '/' || (state->in_search && key == 27)) { in do_match()
1027 state->in_search = 1-state->in_search; in do_match()
1028 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1029 state->match_direction = MATCH_TINKER_PATTERN_DOWN; in do_match()
1031 } else if (!state->in_search) in do_match()
1035 state->pattern[strlen(state->pattern)] = c; in do_match()
1036 state->pattern[strlen(state->pattern)] = '\0'; in do_match()
1037 adj_match_dir(&state->match_direction); in do_match()
1038 *ans = get_mext_match(state->pattern, in do_match()
1039 state->match_direction); in do_match()
1041 state->match_direction = FIND_NEXT_MATCH_DOWN; in do_match()
1042 *ans = get_mext_match(state->pattern, in do_match()
1043 state->match_direction); in do_match()
1045 state->match_direction = FIND_NEXT_MATCH_UP; in do_match()
1046 *ans = get_mext_match(state->pattern, in do_match()
1047 state->match_direction); in do_match()
1049 state->pattern[strlen(state->pattern)-1] = '\0'; in do_match()
1050 adj_match_dir(&state->match_direction); in do_match()
1055 state->in_search = 0; in do_match()
1056 bzero(state->pattern, sizeof(state->pattern)); in do_match()