blob: 3b11bb9af884d74e3c940f822583cd5370704dcf [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 Moolenaarc6538bc2019-08-03 18:17:11 +020013int call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars);
14int 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 +020015char_u *trans_function_name(char_u **pp, int skip, int flags, funcdict_T *fdp, partial_T **partial);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020016void ex_function(exarg_T *eap);
17int eval_fname_script(char_u *p);
18int translated_function_exists(char_u *name);
Bram Moolenaarb54c3ff2016-07-31 14:11:58 +020019int function_exists(char_u *name, int no_deref);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020020char_u *get_expanded_name(char_u *name, int check);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020021char_u *get_user_func_name(expand_T *xp, int idx);
22void ex_delfunction(exarg_T *eap);
23void func_unref(char_u *name);
Bram Moolenaar437bafe2016-08-01 15:40:54 +020024void func_ptr_unref(ufunc_T *fp);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020025void func_ref(char_u *name);
Bram Moolenaar437bafe2016-08-01 15:40:54 +020026void func_ptr_ref(ufunc_T *fp);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020027void ex_return(exarg_T *eap);
28void ex_call(exarg_T *eap);
29int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv);
30void discard_pending_return(void *rettv);
31char_u *get_return_cmd(void *rettv);
Bram Moolenaare96a2492019-06-25 04:12:16 +020032char_u *get_func_line(int c, void *cookie, int indent, int do_concat);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020033int func_has_ended(void *cookie);
34int func_has_abort(void *cookie);
35dict_T *make_partial(dict_T *selfdict_in, typval_T *rettv);
36char_u *func_name(void *cookie);
37linenr_T *func_breakpoint(void *cookie);
38int *func_dbg_tick(void *cookie);
39int func_level(void *cookie);
40int current_func_returned(void);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020041int free_unref_funccal(int copyID, int testing);
42hashtab_T *get_funccal_local_ht(void);
43dictitem_T *get_funccal_local_var(void);
44hashtab_T *get_funccal_args_ht(void);
45dictitem_T *get_funccal_args_var(void);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020046void list_func_vars(int *first);
47dict_T *get_current_funccal_dict(hashtab_T *ht);
Bram Moolenaarba96e9a2016-08-01 17:10:20 +020048hashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht);
49dictitem_T *find_var_in_scoped_ht(char_u *name, int no_autoload);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020050int set_ref_in_previous_funccal(int copyID);
51int set_ref_in_call_stack(int copyID);
Bram Moolenaarbc7ce672016-08-01 22:49:22 +020052int set_ref_in_functions(int copyID);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020053int set_ref_in_func_args(int copyID);
Bram Moolenaar437bafe2016-08-01 15:40:54 +020054int set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID);
Bram Moolenaara9b579f2016-07-17 18:29:19 +020055/* vim: set ft=c : */