1 | #ifndef DEFINE_FUNC_ATTRIBUTES |
2 | # define DEFINE_FUNC_ATTRIBUTES |
3 | #endif |
4 | #include "nvim/func_attr.h" |
5 | #undef DEFINE_FUNC_ATTRIBUTES |
6 | varnumber_T num_divide(varnumber_T n1, varnumber_T n2) FUNC_ATTR_CONST FUNC_ATTR_WARN_UNUSED_RESULT; |
7 | varnumber_T num_modulus(varnumber_T n1, varnumber_T n2) FUNC_ATTR_CONST FUNC_ATTR_WARN_UNUSED_RESULT; |
8 | void eval_init(void); |
9 | char_u *func_name(void *cookie); |
10 | linenr_T *func_breakpoint(void *cookie); |
11 | int *func_dbg_tick(void *cookie); |
12 | int func_level(void *cookie); |
13 | int current_func_returned(void); |
14 | void set_internal_string_var(char_u *name, char_u *value); |
15 | int var_redir_start(char_u *name, int append ); |
16 | void var_redir_str(char_u *value, int value_len); |
17 | void var_redir_stop(void); |
18 | int eval_charconvert(const char *const enc_from, const char *const enc_to, const char *const fname_from, const char *const fname_to); |
19 | int eval_printexpr(const char *const fname, const char *const args); |
20 | void eval_diff(const char *const origfile, const char *const newfile, const char *const outfile); |
21 | void eval_patch(const char *const origfile, const char *const difffile, const char *const outfile); |
22 | int eval_to_bool(char_u *arg, _Bool *error, char_u **nextcmd, int skip ); |
23 | char *eval_to_string_skip(const char *arg, const char **nextcmd, const _Bool skip) FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT; |
24 | int skip_expr(char_u **pp); |
25 | char_u *eval_to_string(char_u *arg, char_u **nextcmd, int convert); |
26 | char_u *eval_to_string_safe(char_u *arg, char_u **nextcmd, int use_sandbox); |
27 | varnumber_T eval_to_number(char_u *expr); |
28 | list_T *eval_spell_expr(char_u *badword, char_u *expr); |
29 | int get_spellword(list_T *const list, const char **ret_word); |
30 | int call_vim_function(const char_u *func, int argc, typval_T *argv, typval_T *rettv ) FUNC_ATTR_NONNULL_ALL; |
31 | varnumber_T call_func_retnr(const char_u *func, int argc, typval_T *argv) FUNC_ATTR_NONNULL_ALL; |
32 | char *call_func_retstr(const char *const func, int argc, typval_T *argv) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC; |
33 | void *call_func_retlist(const char_u *func, int argc, typval_T *argv) FUNC_ATTR_NONNULL_ALL; |
34 | void *save_funccal(void); |
35 | void restore_funccal(void *vfc); |
36 | void prof_child_enter(proftime_T *tm ); |
37 | void prof_child_exit(proftime_T *tm ); |
38 | int eval_foldexpr(char_u *arg, int *cp); |
39 | void ex_const(exarg_T *eap); |
40 | void ex_let(exarg_T *eap); |
41 | void *eval_for_line(const char_u *arg, _Bool *errp, char_u **nextcmdp, int skip); |
42 | _Bool next_for_item(void *fi_void, char_u *arg); |
43 | void free_for_info(void *fi_void); |
44 | void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx); |
45 | void ex_call(exarg_T *eap); |
46 | void ex_unlet(exarg_T *eap); |
47 | void ex_lockvar(exarg_T *eap); |
48 | int do_unlet(const char *const name, const size_t name_len, const int forceit) FUNC_ATTR_NONNULL_ALL; |
49 | void (void); |
50 | char_u *get_user_var_name(expand_T *xp, int idx); |
51 | int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate); |
52 | char_u *partial_name(partial_T *pt); |
53 | void partial_unref(partial_T *pt); |
54 | _Bool func_equal(typval_T *tv1, typval_T *tv2, _Bool ic ); |
55 | int get_copyID(void) FUNC_ATTR_WARN_UNUSED_RESULT; |
56 | _Bool garbage_collect(_Bool testing); |
57 | _Bool set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack) FUNC_ATTR_WARN_UNUSED_RESULT; |
58 | _Bool set_ref_in_list(list_T *l, int copyID, ht_stack_T **ht_stack) FUNC_ATTR_WARN_UNUSED_RESULT; |
59 | _Bool set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack) FUNC_ATTR_WARN_UNUSED_RESULT; |
60 | _Bool set_ref_in_functions(int copyID); |
61 | size_t string2float(const char *const text, float_T *const ret_value) FUNC_ATTR_NONNULL_ALL; |
62 | char_u *get_function_name(expand_T *xp, int idx); |
63 | char_u *get_expr_name(expand_T *xp, int idx); |
64 | _Bool set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID); |
65 | int call_func(const char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, ArgvFunc argv_func, linenr_T firstline, linenr_T lastline, int *doesrange, _Bool evaluate, partial_T *partial, dict_T *selfdict_in ) FUNC_ATTR_NONNULL_ARG(1, 3, 5, 9); |
66 | void assert_inrange(typval_T *argvars); |
67 | int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv); |
68 | win_T *find_win_by_nr_or_id(typval_T *vp); |
69 | void get_user_input(const typval_T *const argvars, typval_T *const rettv, const _Bool inputdialog) FUNC_ATTR_NONNULL_ALL; |
70 | void mapblock_fill_dict(dict_T *const dict, const mapblock_T *const mp, long buffer_value, _Bool compatible) FUNC_ATTR_NONNULL_ALL; |
71 | long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, const typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit ); |
72 | _Bool callback_from_typval(Callback *const callback, typval_T *const arg) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT; |
73 | _Bool callback_call(Callback *const callback, const int argcount_in, typval_T *const argvars_in, typval_T *const rettv) FUNC_ATTR_NONNULL_ALL; |
74 | void timer_teardown(void); |
75 | pos_T *var2fpos(const typval_T *const tv, const int dollar_lnum, int *const ret_fnum) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL; |
76 | int list2fpos(typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp); |
77 | varnumber_T get_vim_var_nr(int idx) FUNC_ATTR_PURE; |
78 | char_u *get_vim_var_str(int idx) FUNC_ATTR_PURE FUNC_ATTR_NONNULL_RET; |
79 | list_T *get_vim_var_list(int idx) FUNC_ATTR_PURE; |
80 | dict_T *get_vim_var_dict(int idx) FUNC_ATTR_PURE; |
81 | void set_vim_var_char(int c); |
82 | void set_vcount(long count, long count1, int set_prevcount); |
83 | void set_vim_var_nr(const VimVarIndex idx, const varnumber_T val); |
84 | void set_vim_var_special(const VimVarIndex idx, const SpecialVarValue val); |
85 | void set_vim_var_string(const VimVarIndex idx, const char *const val, const ptrdiff_t len); |
86 | void set_vim_var_list(const VimVarIndex idx, list_T *const val); |
87 | void set_vim_var_dict(const VimVarIndex idx, dict_T *const val); |
88 | void set_reg_var(int c); |
89 | char_u *v_exception(char_u *oldval); |
90 | char_u *v_throwpoint(char_u *oldval); |
91 | char_u *set_cmdarg(exarg_T *eap, char_u *oldarg); |
92 | void set_selfdict(typval_T *rettv, dict_T *selfdict); |
93 | char_u *get_var_value(const char *const name); |
94 | void new_script_vars(scid_T id); |
95 | void init_var_dict(dict_T *dict, ScopeDictDictItem *dict_var, int scope); |
96 | void unref_var_dict(dict_T *dict); |
97 | void vars_clear(hashtab_T *ht); |
98 | _Bool var_check_ro(const int flags, const char *name, size_t name_len) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL; |
99 | _Bool var_check_func_name(const char *const name, const _Bool new_var) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT; |
100 | _Bool valid_varname(const char *varname) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT; |
101 | int var_item_copy(const vimconv_T *const conv, typval_T *const from, typval_T *const to, const _Bool deep, const int copyID) FUNC_ATTR_NONNULL_ARG(2, 3); |
102 | void ex_echo(exarg_T *eap); |
103 | void ex_echohl(exarg_T *eap); |
104 | void ex_execute(exarg_T *eap); |
105 | void ex_function(exarg_T *eap); |
106 | _Bool translated_function_exists(const char *name); |
107 | void func_dump_profile(FILE *fd); |
108 | char_u *get_user_func_name(expand_T *xp, int idx); |
109 | void ex_delfunction(exarg_T *eap); |
110 | void func_unref(char_u *name); |
111 | void func_ptr_unref(ufunc_T *fp); |
112 | void func_ref(char_u *name); |
113 | void func_ptr_ref(ufunc_T *fp); |
114 | void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, linenr_T firstline, linenr_T lastline, dict_T *selfdict) FUNC_ATTR_NONNULL_ARG(1, 3, 4); |
115 | void ex_return(exarg_T *eap); |
116 | int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv); |
117 | char_u *get_return_cmd(void *rettv); |
118 | char_u *get_func_line(int c, void *cookie, int indent); |
119 | void func_line_start(void *cookie); |
120 | void func_line_exec(void *cookie); |
121 | void func_line_end(void *cookie); |
122 | int func_has_ended(void *cookie); |
123 | int func_has_abort(void *cookie); |
124 | hashitem_T *find_hi_in_scoped_ht(const char *name, hashtab_T **pht); |
125 | dictitem_T *find_var_in_scoped_ht(const char *name, const size_t namelen, int no_autoload); |
126 | const void *var_shada_iter(const void *const iter, const char **const name, typval_T *rettv, var_flavour_T flavour) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ARG(2, 3); |
127 | void var_set_global(const char *const name, typval_T vartv); |
128 | int store_session_globals(FILE *fd); |
129 | void last_set_msg(sctx_T script_ctx); |
130 | void option_last_set_msg(LastSet last_set); |
131 | void reset_v_option_vars(void); |
132 | int modify_fname(char_u *src, _Bool tilde_file, size_t *usedlen, char_u **fnamep, char_u **bufp, size_t *fnamelen ); |
133 | char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, typval_T *expr, char_u *flags); |
134 | typval_T eval_call_provider(char *provider, char *method, list_T *arguments); |
135 | _Bool eval_has_provider(const char *feat); |
136 | void eval_fmt_source_name_line(char *buf, size_t bufsize); |
137 | void ex_checkhealth(exarg_T *eap); |
138 | #include "nvim/func_attr.h" |
139 | |