blob: 99e279dadf7b051f571432b59ab9385acd3d0cde [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001/* search.c */
Rob Pillinge86190e2022-12-23 19:06:04 +00002int search_regcomp(char_u *pat, char_u **used_pat, int pat_save, int pat_use, int options, regmmatch_T *regmatch);
Bram Moolenaaref269542016-01-19 13:22:12 +01003char_u *get_search_pat(void);
Bram Moolenaaref269542016-01-19 13:22:12 +01004void save_re_pat(int idx, char_u *pat, int magic);
5void save_search_patterns(void);
6void restore_search_patterns(void);
Bram Moolenaarb1c91982018-05-17 17:04:55 +02007void free_search_patterns(void);
Bram Moolenaar2e51d9a2017-10-29 16:40:30 +01008void save_last_search_pattern(void);
9void restore_last_search_pattern(void);
Bram Moolenaard0480092017-11-16 22:20:39 +010010char_u *last_search_pattern(void);
Bram Moolenaaref269542016-01-19 13:22:12 +010011int ignorecase(char_u *pat);
Bram Moolenaar66e29d72016-08-20 16:57:02 +020012int ignorecase_opt(char_u *pat, int ic_in, int scs);
Bram Moolenaaref269542016-01-19 13:22:12 +010013int pat_has_uppercase(char_u *pat);
14char_u *last_csearch(void);
15int last_csearch_forward(void);
16int last_csearch_until(void);
17void set_last_csearch(int c, char_u *s, int len);
18void set_csearch_direction(int cdir);
19void set_csearch_until(int t_cmd);
20char_u *last_search_pat(void);
21void reset_search_dir(void);
22void set_last_search_pat(char_u *s, int idx, int magic, int setlast);
23void last_pat_prog(regmmatch_T *regmatch);
Bram Moolenaar92ea26b2019-10-18 20:53:34 +020024int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, int dir, char_u *pat, long count, int options, int pat_use, searchit_arg_T *extra_arg);
Bram Moolenaaref269542016-01-19 13:22:12 +010025void set_search_direction(int cdir);
Bram Moolenaarc036e872020-02-21 21:30:52 +010026int do_search(oparg_T *oap, int dirc, int search_delim, char_u *pat, long count, int options, searchit_arg_T *sia);
Bram Moolenaaref269542016-01-19 13:22:12 +010027int search_for_exact_line(buf_T *buf, pos_T *pos, int dir, char_u *pat);
28int searchc(cmdarg_T *cap, int t_cmd);
29pos_T *findmatch(oparg_T *oap, int initc);
30pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int maxtravel);
Bram Moolenaar6e371ec2021-12-12 14:16:39 +000031int check_linecomment(char_u *line);
Bram Moolenaaref269542016-01-19 13:22:12 +010032void showmatch(int c);
Bram Moolenaaref269542016-01-19 13:22:12 +010033int current_search(long count, int forward);
34int linewhite(linenr_T lnum);
35void 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);
Bram Moolenaar92ea26b2019-10-18 20:53:34 +020036spat_T *get_spat(int idx);
Bram Moolenaarc3328162019-07-23 22:15:25 +020037int get_spat_last_idx(void);
Bram Moolenaare8f5ec02020-06-01 17:28:35 +020038void f_searchcount(typval_T *argvars, typval_T *rettv);
Yegappan Lakshmananbb01a1e2021-04-26 21:17:52 +020039int fuzzy_match(char_u *str, char_u *pat_arg, int matchseq, int *outScore, int_u *matches, int maxMatches);
Bram Moolenaar635414d2020-09-11 22:25:15 +020040void f_matchfuzzy(typval_T *argvars, typval_T *rettv);
Bram Moolenaar4f73b8e2020-09-22 20:33:50 +020041void f_matchfuzzypos(typval_T *argvars, typval_T *rettv);
Yegappan Lakshmanan38b85cb2022-02-24 13:28:41 +000042int fuzzy_match_str(char_u *str, char_u *pat);
Bram Moolenaarc6e0a5e2022-04-10 18:09:06 +010043void fuzmatch_str_free(fuzmatch_str_T *fuzmatch, int count);
44int fuzzymatches_to_strmatches(fuzmatch_str_T *fuzmatch, char_u ***matches, int count, int funcsort);
Bram Moolenaar071d4272004-06-13 20:20:40 +000045/* vim: set ft=c : */