Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | /* search.c */ |
John Marriott | 8c85a2a | 2024-05-20 19:18:26 +0200 | [diff] [blame] | 2 | int search_regcomp(char_u *pat, size_t patlen, char_u **used_pat, int pat_save, int pat_use, int options, regmmatch_T *regmatch); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 3 | char_u *get_search_pat(void); |
John Marriott | 8c85a2a | 2024-05-20 19:18:26 +0200 | [diff] [blame] | 4 | void save_re_pat(int idx, char_u *pat, size_t patlen, int magic); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 5 | void save_search_patterns(void); |
| 6 | void restore_search_patterns(void); |
Bram Moolenaar | b1c9198 | 2018-05-17 17:04:55 +0200 | [diff] [blame] | 7 | void free_search_patterns(void); |
Bram Moolenaar | 2e51d9a | 2017-10-29 16:40:30 +0100 | [diff] [blame] | 8 | void save_last_search_pattern(void); |
| 9 | void restore_last_search_pattern(void); |
Bram Moolenaar | d048009 | 2017-11-16 22:20:39 +0100 | [diff] [blame] | 10 | char_u *last_search_pattern(void); |
John Marriott | ccf8907 | 2024-10-07 21:40:39 +0200 | [diff] [blame] | 11 | size_t last_search_pattern_len(void); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 12 | int ignorecase(char_u *pat); |
Bram Moolenaar | 66e29d7 | 2016-08-20 16:57:02 +0200 | [diff] [blame] | 13 | int ignorecase_opt(char_u *pat, int ic_in, int scs); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 14 | int pat_has_uppercase(char_u *pat); |
| 15 | char_u *last_csearch(void); |
| 16 | int last_csearch_forward(void); |
| 17 | int last_csearch_until(void); |
| 18 | void set_last_csearch(int c, char_u *s, int len); |
| 19 | void set_csearch_direction(int cdir); |
| 20 | void set_csearch_until(int t_cmd); |
| 21 | char_u *last_search_pat(void); |
| 22 | void reset_search_dir(void); |
| 23 | void set_last_search_pat(char_u *s, int idx, int magic, int setlast); |
| 24 | void last_pat_prog(regmmatch_T *regmatch); |
John Marriott | 8c85a2a | 2024-05-20 19:18:26 +0200 | [diff] [blame] | 25 | int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, int dir, char_u *pat, size_t patlen, long count, int options, int pat_use, searchit_arg_T *extra_arg); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 26 | void set_search_direction(int cdir); |
John Marriott | 8c85a2a | 2024-05-20 19:18:26 +0200 | [diff] [blame] | 27 | int do_search(oparg_T *oap, int dirc, int search_delim, char_u *pat, size_t patlen, long count, int options, searchit_arg_T *sia); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 28 | int search_for_exact_line(buf_T *buf, pos_T *pos, int dir, char_u *pat); |
| 29 | int searchc(cmdarg_T *cap, int t_cmd); |
| 30 | pos_T *findmatch(oparg_T *oap, int initc); |
| 31 | pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int maxtravel); |
Bram Moolenaar | 6e371ec | 2021-12-12 14:16:39 +0000 | [diff] [blame] | 32 | int check_linecomment(char_u *line); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 33 | void showmatch(int c); |
Bram Moolenaar | ef26954 | 2016-01-19 13:22:12 +0100 | [diff] [blame] | 34 | int current_search(long count, int forward); |
| 35 | int linewhite(linenr_T lnum); |
Colin Kennedy | 2157035 | 2024-03-03 16:16:47 +0100 | [diff] [blame] | 36 | void find_pattern_in_path(char_u *ptr, int dir, int len, int whole, int skip_comments, int type, long count, int action, linenr_T start_lnum, linenr_T end_lnum, int forceit); |
Bram Moolenaar | 92ea26b | 2019-10-18 20:53:34 +0200 | [diff] [blame] | 37 | spat_T *get_spat(int idx); |
Bram Moolenaar | c332816 | 2019-07-23 22:15:25 +0200 | [diff] [blame] | 38 | int get_spat_last_idx(void); |
Bram Moolenaar | e8f5ec0 | 2020-06-01 17:28:35 +0200 | [diff] [blame] | 39 | void f_searchcount(typval_T *argvars, typval_T *rettv); |
Yegappan Lakshmanan | bb01a1e | 2021-04-26 21:17:52 +0200 | [diff] [blame] | 40 | int fuzzy_match(char_u *str, char_u *pat_arg, int matchseq, int *outScore, int_u *matches, int maxMatches); |
Bram Moolenaar | 635414d | 2020-09-11 22:25:15 +0200 | [diff] [blame] | 41 | void f_matchfuzzy(typval_T *argvars, typval_T *rettv); |
Bram Moolenaar | 4f73b8e | 2020-09-22 20:33:50 +0200 | [diff] [blame] | 42 | void f_matchfuzzypos(typval_T *argvars, typval_T *rettv); |
Yegappan Lakshmanan | 38b85cb | 2022-02-24 13:28:41 +0000 | [diff] [blame] | 43 | int fuzzy_match_str(char_u *str, char_u *pat); |
glepnir | 40c1c33 | 2024-06-11 19:37:04 +0200 | [diff] [blame] | 44 | garray_T *fuzzy_match_str_with_pos(char_u *str, char_u *pat); |
glepnir | f31cfa2 | 2025-03-06 21:59:13 +0100 | [diff] [blame] | 45 | int search_for_fuzzy_match(buf_T *buf, pos_T *pos, char_u *pattern, int dir, pos_T *start_pos, int *len, char_u **ptr, int *score); |
Bram Moolenaar | c6e0a5e | 2022-04-10 18:09:06 +0100 | [diff] [blame] | 46 | void fuzmatch_str_free(fuzmatch_str_T *fuzmatch, int count); |
| 47 | int fuzzymatches_to_strmatches(fuzmatch_str_T *fuzmatch, char_u ***matches, int count, int funcsort); |
glepnir | f31cfa2 | 2025-03-06 21:59:13 +0100 | [diff] [blame] | 48 | int fuzzy_match_str_in_line(char_u **ptr, char_u *pat, int *len, pos_T *current_pos, int *score); |
| 49 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 50 | /* vim: set ft=c : */ |