1#ifndef DEFINE_FUNC_ATTRIBUTES
2# define DEFINE_FUNC_ATTRIBUTES
3#endif
4#include "nvim/func_attr.h"
5#undef DEFINE_FUNC_ATTRIBUTES
6static int no_Magic(int x);
7static int toggle_Magic(int x);
8static int re_multi_type(int c);
9static int backslash_trans(int c);
10static int get_char_class(char_u **pp);
11static void init_class_tab(void);
12static int get_equi_class(char_u **pp);
13static void reg_equi_class(int c);
14static int get_coll_element(char_u **pp);
15static void get_cpo_flags(void);
16static char_u *skip_anyof(char_u *p);
17static int seen_endbrace(int refnum);
18static regprog_T *bt_regcomp(char_u *expr, int re_flags);
19static void bt_regfree(regprog_T *prog);
20static void regcomp_start(char_u *expr, int re_flags );
21static char_u *reg(int paren, int *flagp );
22static char_u *regbranch(int *flagp);
23static char_u *regconcat(int *flagp);
24static char_u *regpiece(int *flagp);
25static char_u *regatom(int *flagp);
26static _Bool re_mult_next(char *what);
27static int use_multibytecode(int c);
28static char_u *regnode(int op);
29static void regc(int b);
30static void regmbc(int c);
31static void reginsert(int op, char_u *opnd);
32static void reginsert_nr(int op, long val, char_u *opnd);
33static void reginsert_limits(int op, long minval, long maxval, char_u *opnd);
34static char_u *re_put_uint32(char_u *p, uint32_t val);
35static void regtail(char_u *p, char_u *val);
36static void regoptail(char_u *p, char_u *val);
37static void initchr(char_u *str);
38static void save_parse_state(parse_state_T *ps);
39static void restore_parse_state(parse_state_T *ps);
40static int peekchr(void);
41static void skipchr(void);
42static void skipchr_keepstart(void);
43static int getchr(void);
44static void ungetchr(void);
45static int64_t gethexchrs(int maxinputlen);
46static int64_t getdecchrs(void);
47static int64_t getoctchrs(void);
48static int coll_get_char(void);
49static int read_limits(long *minval, long *maxval);
50static char_u *reg_getline(linenr_T lnum);
51static int bt_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col, _Bool line_lbr );
52static inline char_u *cstrchr(const char_u *const s, const int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL FUNC_ATTR_ALWAYS_INLINE;
53static long bt_regexec_multi(regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm, int *timed_out);
54static long bt_regexec_both(char_u *line, colnr_T col, proftime_T *tm, int *timed_out);
55static reg_extmatch_T *make_extmatch(void);
56static long regtry(bt_regprog_T *prog, colnr_T col, proftime_T *tm, int *timed_out);
57static int reg_prev_class(void);
58static int reg_match_visual(void);
59static int regmatch(char_u *scan, proftime_T *tm, int *timed_out );
60static regitem_T *regstack_push(regstate_T state, char_u *scan);
61static void regstack_pop(char_u **scan);
62static int regrepeat(char_u *p, long maxcount );
63static char_u *regnext(char_u *p) FUNC_ATTR_NONNULL_ALL;
64static int prog_magic_wrong(void);
65static void cleanup_subexpr(void);
66static void cleanup_zsubexpr(void);
67static void save_subexpr(regbehind_T *bp);
68static void restore_subexpr(regbehind_T *bp);
69static void reg_nextline(void);
70static void reg_save(regsave_T *save, garray_T *gap);
71static void reg_restore(regsave_T *save, garray_T *gap);
72static int reg_save_equal(regsave_T *save);
73static void save_se_multi(save_se_T *savep, lpos_T *posp);
74static void save_se_one(save_se_T *savep, char_u **pp);
75static int re_num_cmp(uint32_t val, char_u *scan);
76static int match_with_backref(linenr_T start_lnum, colnr_T start_col, linenr_T end_lnum, colnr_T end_col, int *bytelen);
77static void mb_decompose(int c, int *c1, int *c2, int *c3);
78static int cstrncmp(char_u *s1, char_u *s2, int *n);
79static fptr_T do_upper(int *d, int c);
80static fptr_T do_Upper(int *d, int c);
81static fptr_T do_lower(int *d, int c);
82static fptr_T do_Lower(int *d, int c);
83static int fill_submatch_list(int argc, typval_T *argv, int argcount);
84static void clear_submatch_list(staticList10_T *sl);
85static int vim_regsub_both(char_u *source, typval_T *expr, char_u *dest, int copy, int magic, int backslash);
86static char_u *reg_getline_submatch(linenr_T lnum);
87static void report_re_switch(char_u *pat);
88static int vim_regexec_string(regmatch_T *rmp, char_u *line, colnr_T col, _Bool nl);
89#include "nvim/func_attr.h"
90