xref: /vim-8.2.3635/src/proto/userfunc.pro (revision 32b3f820)
1a9b579f3SBram Moolenaar/* userfunc.c */
2a9b579f3SBram Moolenaarvoid func_init(void);
3660a10adSBram Moolenaarhashtab_T *func_tbl_get(void);
404b12697SBram Moolenaarchar_u *get_lambda_name(void);
5e40fbc2cSBram Moolenaarchar_u *register_cfunc(cfunc_T cb, cfunc_free_T cb_free, void *state);
6b4d16cb1SBram Moolenaarint get_lambda_tv(char_u **arg, typval_T *rettv, int types_optional, evalarg_T *evalarg);
7*32b3f820SBram Moolenaarchar_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, type_T **type, int no_autoload);
84c054e9fSBram Moolenaarvoid emsg_funcname(char *ermsg, char_u *name);
9e6b5324eSBram Moolenaarint get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, evalarg_T *evalarg, funcexe_T *funcexe);
105cab73f8SBram Moolenaarchar_u *fname_trans_sid(char_u *name, char_u *fname_buf, char_u **tofree, int *error);
11ce658356SBram Moolenaarufunc_T *find_func_even_dead(char_u *name, int is_global, cctx_T *cctx);
124c17ad94SBram Moolenaarufunc_T *find_func(char_u *name, int is_global, cctx_T *cctx);
130f769815SBram Moolenaarint func_is_global(ufunc_T *ufunc);
14a05e524fSBram Moolenaarint func_name_refcount(char_u *name);
15cd45ed03SBram Moolenaarint copy_func(char_u *lambda, char_u *global, ectx_T *ectx);
160ba48e8cSBram Moolenaarint funcdepth_increment(void);
170ba48e8cSBram Moolenaarvoid funcdepth_decrement(void);
180ba48e8cSBram Moolenaarint funcdepth_get(void);
190ba48e8cSBram Moolenaarvoid funcdepth_restore(int depth);
205082471fSBram Moolenaarint check_user_func_argcount(ufunc_T *fp, int argcount);
218a7d6542SBram Moolenaarint call_user_func_check(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, funcexe_T *funcexe, dict_T *selfdict);
22c447d8d3SBram Moolenaarvoid save_funccal(funccal_entry_T *entry);
23c447d8d3SBram Moolenaarvoid restore_funccal(void);
24fa55cfc6SBram Moolenaarfunccall_T *get_current_funccal(void);
254c17ad94SBram Moolenaarvoid delete_script_functions(int sid);
26a9b579f3SBram Moolenaarvoid free_all_functions(void);
278a7d6542SBram Moolenaarint builtin_function(char_u *name, int len);
28a9b579f3SBram Moolenaarint func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
290e57dd85SBram Moolenaarint get_callback_depth(void);
30c6538bccSBram Moolenaarint call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars);
318a7d6542SBram Moolenaarvoid user_func_error(int error, char_u *name);
32c6538bccSBram Moolenaarint call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, funcexe_T *funcexe);
33682d0a15SBram Moolenaarchar_u *printable_func_name(ufunc_T *fp);
34*32b3f820SBram Moolenaarchar_u *trans_function_name(char_u **pp, int *is_global, int skip, int flags, funcdict_T *fdp, partial_T **partial, type_T **type);
35a26b9700SBram Moolenaarchar_u *untrans_function_name(char_u *name);
366abdcf82SBram Moolenaarvoid list_functions(regmatch_T *regmatch);
37fbbcd003SBram Moolenaarufunc_T *define_function(exarg_T *eap, char_u *name_arg);
38a9b579f3SBram Moolenaarvoid ex_function(exarg_T *eap);
39822ba247SBram Moolenaarvoid ex_defcompile(exarg_T *eap);
40a9b579f3SBram Moolenaarint eval_fname_script(char_u *p);
414c17ad94SBram Moolenaarint translated_function_exists(char_u *name, int is_global);
428a7d6542SBram Moolenaarint has_varargs(ufunc_T *ufunc);
43b54c3ff3SBram Moolenaarint function_exists(char_u *name, int no_deref);
44a9b579f3SBram Moolenaarchar_u *get_expanded_name(char_u *name, int check);
45a9b579f3SBram Moolenaarchar_u *get_user_func_name(expand_T *xp, int idx);
46a9b579f3SBram Moolenaarvoid ex_delfunction(exarg_T *eap);
47a9b579f3SBram Moolenaarvoid func_unref(char_u *name);
48437bafe4SBram Moolenaarvoid func_ptr_unref(ufunc_T *fp);
49a9b579f3SBram Moolenaarvoid func_ref(char_u *name);
50437bafe4SBram Moolenaarvoid func_ptr_ref(ufunc_T *fp);
51a9b579f3SBram Moolenaarvoid ex_return(exarg_T *eap);
52a9b579f3SBram Moolenaarvoid ex_call(exarg_T *eap);
53a9b579f3SBram Moolenaarint do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv);
54a9b579f3SBram Moolenaarvoid discard_pending_return(void *rettv);
55a9b579f3SBram Moolenaarchar_u *get_return_cmd(void *rettv);
5666250c93SBram Moolenaarchar_u *get_func_line(int c, void *cookie, int indent, getline_opt_T options);
57a9b579f3SBram Moolenaarint func_has_ended(void *cookie);
58a9b579f3SBram Moolenaarint func_has_abort(void *cookie);
59a9b579f3SBram Moolenaardict_T *make_partial(dict_T *selfdict_in, typval_T *rettv);
60a9b579f3SBram Moolenaarchar_u *func_name(void *cookie);
61a9b579f3SBram Moolenaarlinenr_T *func_breakpoint(void *cookie);
62a9b579f3SBram Moolenaarint *func_dbg_tick(void *cookie);
63a9b579f3SBram Moolenaarint func_level(void *cookie);
64a9b579f3SBram Moolenaarint current_func_returned(void);
65a9b579f3SBram Moolenaarint free_unref_funccal(int copyID, int testing);
66a9b579f3SBram Moolenaarhashtab_T *get_funccal_local_ht(void);
67a9b579f3SBram Moolenaardictitem_T *get_funccal_local_var(void);
68a9b579f3SBram Moolenaarhashtab_T *get_funccal_args_ht(void);
69a9b579f3SBram Moolenaardictitem_T *get_funccal_args_var(void);
70a9b579f3SBram Moolenaarvoid list_func_vars(int *first);
71a9b579f3SBram Moolenaardict_T *get_current_funccal_dict(hashtab_T *ht);
72ba96e9afSBram Moolenaarhashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht);
73ba96e9afSBram Moolenaardictitem_T *find_var_in_scoped_ht(char_u *name, int no_autoload);
74a9b579f3SBram Moolenaarint set_ref_in_previous_funccal(int copyID);
75a9b579f3SBram Moolenaarint set_ref_in_call_stack(int copyID);
76bc7ce675SBram Moolenaarint set_ref_in_functions(int copyID);
77a9b579f3SBram Moolenaarint set_ref_in_func_args(int copyID);
78437bafe4SBram Moolenaarint set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID);
79a9b579f3SBram Moolenaar/* vim: set ft=c : */
80