1/* userfunc.c */ 2void func_init(void); 3hashtab_T *func_tbl_get(void); 4int get_function_args(char_u **argp, char_u endchar, garray_T *newargs, garray_T *argtypes, int *varargs, garray_T *default_args, int skip, exarg_T *eap, char_u **line_to_free); 5char_u *get_lambda_name(void); 6char_u *register_cfunc(cfunc_T cb, cfunc_free_T cb_free, void *state); 7int get_lambda_tv(char_u **arg, typval_T *rettv, evalarg_T *evalarg); 8char_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, int no_autoload); 9void emsg_funcname(char *ermsg, char_u *name); 10int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, evalarg_T *evalarg, funcexe_T *funcexe); 11char_u *fname_trans_sid(char_u *name, char_u *fname_buf, char_u **tofree, int *error); 12ufunc_T *find_func(char_u *name, int is_global, cctx_T *cctx); 13int call_user_func_check(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, funcexe_T *funcexe, dict_T *selfdict); 14void save_funccal(funccal_entry_T *entry); 15void restore_funccal(void); 16funccall_T *get_current_funccal(void); 17void delete_script_functions(int sid); 18void free_all_functions(void); 19int builtin_function(char_u *name, int len); 20int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv); 21int get_callback_depth(void); 22int call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars); 23void user_func_error(int error, char_u *name); 24int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, funcexe_T *funcexe); 25char_u *printable_func_name(ufunc_T *fp); 26char_u *trans_function_name(char_u **pp, int *is_global, int skip, int flags, funcdict_T *fdp, partial_T **partial); 27char_u *untrans_function_name(char_u *name); 28ufunc_T *def_function(exarg_T *eap, char_u *name_arg); 29void ex_function(exarg_T *eap); 30void ex_defcompile(exarg_T *eap); 31int eval_fname_script(char_u *p); 32int translated_function_exists(char_u *name, int is_global); 33int has_varargs(ufunc_T *ufunc); 34int function_exists(char_u *name, int no_deref); 35char_u *get_expanded_name(char_u *name, int check); 36char_u *get_user_func_name(expand_T *xp, int idx); 37void ex_delfunction(exarg_T *eap); 38void func_unref(char_u *name); 39void func_ptr_unref(ufunc_T *fp); 40void func_ref(char_u *name); 41void func_ptr_ref(ufunc_T *fp); 42void ex_return(exarg_T *eap); 43void ex_call(exarg_T *eap); 44int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv); 45void discard_pending_return(void *rettv); 46char_u *get_return_cmd(void *rettv); 47char_u *get_func_line(int c, void *cookie, int indent, int do_concat); 48int func_has_ended(void *cookie); 49int func_has_abort(void *cookie); 50dict_T *make_partial(dict_T *selfdict_in, typval_T *rettv); 51char_u *func_name(void *cookie); 52linenr_T *func_breakpoint(void *cookie); 53int *func_dbg_tick(void *cookie); 54int func_level(void *cookie); 55int current_func_returned(void); 56int free_unref_funccal(int copyID, int testing); 57hashtab_T *get_funccal_local_ht(void); 58dictitem_T *get_funccal_local_var(void); 59hashtab_T *get_funccal_args_ht(void); 60dictitem_T *get_funccal_args_var(void); 61void list_func_vars(int *first); 62dict_T *get_current_funccal_dict(hashtab_T *ht); 63hashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht); 64dictitem_T *find_var_in_scoped_ht(char_u *name, int no_autoload); 65int set_ref_in_previous_funccal(int copyID); 66int set_ref_in_call_stack(int copyID); 67int set_ref_in_functions(int copyID); 68int set_ref_in_func_args(int copyID); 69int set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID); 70/* vim: set ft=c : */ 71