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