blob: b97e5f69a1e74a1ba68920fb922ccd5afdecce6b [file] [log] [blame]
Bram Moolenaara9b579f2016-07-17 18:29:19 +02001/* userfunc.c */
2void func_init(void);
Bram Moolenaar660a10a2019-07-14 15:48:38 +02003hashtab_T *func_tbl_get(void);
Bram Moolenaara9b579f2016-07-17 18:29:19 +02004int get_lambda_tv(char_u **arg, typval_T *rettv, int evaluate);
5char_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, int no_autoload);
Bram Moolenaarc6538bc2019-08-03 18:17:11 +02006int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, funcexe_T *funcexe);
Bram Moolenaar437bafe2016-08-01 15:40:54 +02007ufunc_T *find_func(char_u *name);
Bram Moolenaarc447d8d2018-12-18 21:56:28 +01008void save_funccal(funccal_entry_T *entry);
9void restore_funccal(void);
Bram Moolenaar660a10a2019-07-14 15:48:38 +020010funccall_T *get_current_funccal(void);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020011void free_all_functions(void);
12int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
Bram Moolenaar0e57dd82019-09-16 22:56:03 +020013int get_callback_depth(void);
Bram Moolenaarc6538bc2019-08-03 18:17:11 +020014int call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars);
15int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, funcexe_T *funcexe);
Bram Moolenaar437bafe2016-08-01 15:40:54 +020016char_u *trans_function_name(char_u **pp, int skip, int flags, funcdict_T *fdp, partial_T **partial);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020017void ex_function(exarg_T *eap);
18int eval_fname_script(char_u *p);
19int translated_function_exists(char_u *name);
Bram Moolenaarb54c3ff2016-07-31 14:11:58 +020020int function_exists(char_u *name, int no_deref);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020021char_u *get_expanded_name(char_u *name, int check);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020022char_u *get_user_func_name(expand_T *xp, int idx);
23void ex_delfunction(exarg_T *eap);
24void func_unref(char_u *name);
Bram Moolenaar437bafe2016-08-01 15:40:54 +020025void func_ptr_unref(ufunc_T *fp);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020026void func_ref(char_u *name);
Bram Moolenaar437bafe2016-08-01 15:40:54 +020027void func_ptr_ref(ufunc_T *fp);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020028void ex_return(exarg_T *eap);
29void ex_call(exarg_T *eap);
30int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv);
31void discard_pending_return(void *rettv);
32char_u *get_return_cmd(void *rettv);
Bram Moolenaare96a2492019-06-25 04:12:16 +020033char_u *get_func_line(int c, void *cookie, int indent, int do_concat);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020034int func_has_ended(void *cookie);
35int func_has_abort(void *cookie);
36dict_T *make_partial(dict_T *selfdict_in, typval_T *rettv);
37char_u *func_name(void *cookie);
38linenr_T *func_breakpoint(void *cookie);
39int *func_dbg_tick(void *cookie);
40int func_level(void *cookie);
41int current_func_returned(void);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020042int free_unref_funccal(int copyID, int testing);
43hashtab_T *get_funccal_local_ht(void);
44dictitem_T *get_funccal_local_var(void);
45hashtab_T *get_funccal_args_ht(void);
46dictitem_T *get_funccal_args_var(void);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020047void list_func_vars(int *first);
48dict_T *get_current_funccal_dict(hashtab_T *ht);
Bram Moolenaarba96e9a2016-08-01 17:10:20 +020049hashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht);
50dictitem_T *find_var_in_scoped_ht(char_u *name, int no_autoload);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020051int set_ref_in_previous_funccal(int copyID);
52int set_ref_in_call_stack(int copyID);
Bram Moolenaarbc7ce672016-08-01 22:49:22 +020053int set_ref_in_functions(int copyID);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020054int set_ref_in_func_args(int copyID);
Bram Moolenaar437bafe2016-08-01 15:40:54 +020055int set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020056/* vim: set ft=c : */