blob: 7a29ff3a03cec1c353fc94f025cf2ec70dee6685 [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);
4char_u *reverse_text(char_u *s);
5void save_re_pat(int idx, char_u *pat, int magic);
6void save_search_patterns(void);
7void restore_search_patterns(void);
Bram Moolenaarb1c91982018-05-17 17:04:55 +02008void free_search_patterns(void);
Bram Moolenaar2e51d9a2017-10-29 16:40:30 +01009void save_last_search_pattern(void);
10void restore_last_search_pattern(void);
Bram Moolenaard0480092017-11-16 22:20:39 +010011char_u *last_search_pattern(void);
Bram Moolenaaref269542016-01-19 13:22:12 +010012int ignorecase(char_u *pat);
Bram Moolenaar66e29d72016-08-20 16:57:02 +020013int ignorecase_opt(char_u *pat, int ic_in, int scs);
Bram Moolenaaref269542016-01-19 13:22:12 +010014int pat_has_uppercase(char_u *pat);
15char_u *last_csearch(void);
16int last_csearch_forward(void);
17int last_csearch_until(void);
18void set_last_csearch(int c, char_u *s, int len);
19void set_csearch_direction(int cdir);
20void set_csearch_until(int t_cmd);
21char_u *last_search_pat(void);
22void reset_search_dir(void);
23void set_last_search_pat(char_u *s, int idx, int magic, int setlast);
24void last_pat_prog(regmmatch_T *regmatch);
Bram Moolenaar92ea26b2019-10-18 20:53:34 +020025int 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 +010026void set_search_direction(int cdir);
Bram Moolenaarc036e872020-02-21 21:30:52 +010027int 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 +010028int search_for_exact_line(buf_T *buf, pos_T *pos, int dir, char_u *pat);
29int searchc(cmdarg_T *cap, int t_cmd);
30pos_T *findmatch(oparg_T *oap, int initc);
31pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int maxtravel);
Bram Moolenaar6e371ec2021-12-12 14:16:39 +000032int check_linecomment(char_u *line);
Bram Moolenaaref269542016-01-19 13:22:12 +010033void showmatch(int c);
Bram Moolenaaref269542016-01-19 13:22:12 +010034int current_search(long count, int forward);
35int linewhite(linenr_T lnum);
36void 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 +020037spat_T *get_spat(int idx);
Bram Moolenaarc3328162019-07-23 22:15:25 +020038int get_spat_last_idx(void);
Bram Moolenaare8f5ec02020-06-01 17:28:35 +020039void f_searchcount(typval_T *argvars, typval_T *rettv);
Yegappan Lakshmananbb01a1e2021-04-26 21:17:52 +020040int 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 +020041void f_matchfuzzy(typval_T *argvars, typval_T *rettv);
Bram Moolenaar4f73b8e2020-09-22 20:33:50 +020042void f_matchfuzzypos(typval_T *argvars, typval_T *rettv);
Yegappan Lakshmanan38b85cb2022-02-24 13:28:41 +000043int fuzzy_match_str(char_u *str, char_u *pat);
Bram Moolenaarc6e0a5e2022-04-10 18:09:06 +010044void fuzmatch_str_free(fuzmatch_str_T *fuzmatch, int count);
45int fuzzymatches_to_strmatches(fuzmatch_str_T *fuzmatch, char_u ***matches, int count, int funcsort);
Bram Moolenaar071d4272004-06-13 20:20:40 +000046/* vim: set ft=c : */