Lines Matching refs:state
1019 static int do_match(int key, struct match_state *state, int *ans) in do_match() argument
1024 if (key == '/' || (state->in_search && key == 27)) { in do_match()
1028 state->in_search = 1-state->in_search; in do_match()
1029 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1030 state->match_direction = MATCH_TINKER_PATTERN_DOWN; in do_match()
1032 } else if (!state->in_search) in do_match()
1036 state->pattern[strlen(state->pattern)] = c; in do_match()
1037 state->pattern[strlen(state->pattern)] = '\0'; in do_match()
1038 adj_match_dir(&state->match_direction); in do_match()
1039 *ans = get_mext_match(state->pattern, in do_match()
1040 state->match_direction); in do_match()
1042 state->match_direction = FIND_NEXT_MATCH_DOWN; in do_match()
1043 *ans = get_mext_match(state->pattern, in do_match()
1044 state->match_direction); in do_match()
1046 state->match_direction = FIND_NEXT_MATCH_UP; in do_match()
1047 *ans = get_mext_match(state->pattern, in do_match()
1048 state->match_direction); in do_match()
1050 state->pattern[strlen(state->pattern)-1] = '\0'; in do_match()
1051 adj_match_dir(&state->match_direction); in do_match()
1056 state->in_search = 0; in do_match()
1057 bzero(state->pattern, sizeof(state->pattern)); in do_match()