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