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