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