2016-07-17 18:29:19 +02:00
|
|
|
/* userfunc.c */
|
|
|
|
|
void func_init(void);
|
2019-07-14 15:48:38 +02:00
|
|
|
hashtab_T *func_tbl_get(void);
|
2022-03-31 20:02:56 +01:00
|
|
|
char_u *make_ufunc_name_readable(char_u *name, char_u *buf, size_t bufsize);
|
2020-05-04 23:24:44 +02:00
|
|
|
char_u *get_lambda_name(void);
|
2020-06-27 18:06:45 +02:00
|
|
|
char_u *register_cfunc(cfunc_T cb, cfunc_free_T cb_free, void *state);
|
2020-11-05 18:45:46 +01:00
|
|
|
int get_lambda_tv(char_u **arg, typval_T *rettv, int types_optional, evalarg_T *evalarg);
|
2022-01-19 17:21:29 +00:00
|
|
|
char_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, type_T **type, int no_autoload, int new_function, int *found_var);
|
2019-11-10 00:13:50 +01:00
|
|
|
void emsg_funcname(char *ermsg, char_u *name);
|
2020-07-01 17:28:33 +02:00
|
|
|
int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, evalarg_T *evalarg, funcexe_T *funcexe);
|
2020-02-06 19:25:19 +01:00
|
|
|
char_u *fname_trans_sid(char_u *name, char_u *fname_buf, char_u **tofree, int *error);
|
2022-03-30 21:12:27 +01:00
|
|
|
void func_name_with_sid(char_u *name, int sid, char_u *buffer);
|
2022-01-24 13:54:45 +00:00
|
|
|
ufunc_T *find_func_even_dead(char_u *name, int flags);
|
2022-01-13 21:15:21 +00:00
|
|
|
ufunc_T *find_func(char_u *name, int is_global);
|
2020-09-12 18:32:34 +02:00
|
|
|
int func_is_global(ufunc_T *ufunc);
|
2022-01-30 15:28:30 +00:00
|
|
|
int func_requires_g_prefix(ufunc_T *ufunc);
|
2020-09-19 18:19:19 +02:00
|
|
|
int func_name_refcount(char_u *name);
|
2021-12-06 15:06:54 +00:00
|
|
|
void func_clear_free(ufunc_T *fp, int force);
|
2020-12-22 17:35:54 +01:00
|
|
|
int copy_func(char_u *lambda, char_u *global, ectx_T *ectx);
|
2020-11-17 18:23:19 +01:00
|
|
|
int funcdepth_increment(void);
|
|
|
|
|
void funcdepth_decrement(void);
|
|
|
|
|
int funcdepth_get(void);
|
|
|
|
|
void funcdepth_restore(int depth);
|
2020-12-20 21:10:17 +01:00
|
|
|
int check_user_func_argcount(ufunc_T *fp, int argcount);
|
2020-01-26 15:56:19 +01:00
|
|
|
int call_user_func_check(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, funcexe_T *funcexe, dict_T *selfdict);
|
2018-12-18 21:56:28 +01:00
|
|
|
void save_funccal(funccal_entry_T *entry);
|
|
|
|
|
void restore_funccal(void);
|
2019-07-14 15:48:38 +02:00
|
|
|
funccall_T *get_current_funccal(void);
|
2022-02-12 19:52:25 +00:00
|
|
|
int at_script_level(void);
|
2020-04-27 22:47:51 +02:00
|
|
|
void delete_script_functions(int sid);
|
2016-07-17 18:29:19 +02:00
|
|
|
void free_all_functions(void);
|
2020-01-26 15:56:19 +01:00
|
|
|
int builtin_function(char_u *name, int len);
|
2016-07-17 18:29:19 +02:00
|
|
|
int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
|
2019-09-16 22:56:03 +02:00
|
|
|
int get_callback_depth(void);
|
2019-08-03 18:17:11 +02:00
|
|
|
int call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars);
|
2021-12-03 11:09:29 +00:00
|
|
|
varnumber_T call_callback_retnr(callback_T *callback, int argcount, typval_T *argvars);
|
2021-12-11 16:14:07 +00:00
|
|
|
void user_func_error(int error, char_u *name, funcexe_T *funcexe);
|
2019-08-03 18:17:11 +02:00
|
|
|
int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, funcexe_T *funcexe);
|
2020-07-19 20:48:59 +02:00
|
|
|
char_u *printable_func_name(ufunc_T *fp);
|
2021-01-06 21:59:39 +01:00
|
|
|
char_u *trans_function_name(char_u **pp, int *is_global, int skip, int flags, funcdict_T *fdp, partial_T **partial, type_T **type);
|
2021-12-24 20:47:38 +00:00
|
|
|
char_u *get_scriptlocal_funcname(char_u *funcname);
|
2022-02-21 13:13:50 +00:00
|
|
|
char_u *alloc_printable_func_name(char_u *fname);
|
2021-11-30 18:25:08 +00:00
|
|
|
char_u *save_function_name(char_u **name, int *is_global, int skip, int flags, funcdict_T *fudi);
|
2020-11-22 18:15:44 +01:00
|
|
|
void list_functions(regmatch_T *regmatch);
|
2022-01-08 15:39:39 +00:00
|
|
|
ufunc_T *define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free);
|
2016-07-17 18:29:19 +02:00
|
|
|
void ex_function(exarg_T *eap);
|
2022-05-21 15:39:02 +01:00
|
|
|
ufunc_T *find_func_by_name(char_u *name, compiletype_T *compile_type);
|
2020-05-24 23:00:18 +02:00
|
|
|
void ex_defcompile(exarg_T *eap);
|
2016-07-17 18:29:19 +02:00
|
|
|
int eval_fname_script(char_u *p);
|
2020-04-27 22:47:51 +02:00
|
|
|
int translated_function_exists(char_u *name, int is_global);
|
2020-01-26 15:56:19 +01:00
|
|
|
int has_varargs(ufunc_T *ufunc);
|
2016-07-31 14:11:58 +02:00
|
|
|
int function_exists(char_u *name, int no_deref);
|
2016-07-17 18:29:19 +02:00
|
|
|
char_u *get_expanded_name(char_u *name, int check);
|
|
|
|
|
char_u *get_user_func_name(expand_T *xp, int idx);
|
|
|
|
|
void ex_delfunction(exarg_T *eap);
|
|
|
|
|
void func_unref(char_u *name);
|
2016-08-01 15:40:54 +02:00
|
|
|
void func_ptr_unref(ufunc_T *fp);
|
2016-07-17 18:29:19 +02:00
|
|
|
void func_ref(char_u *name);
|
2016-08-01 15:40:54 +02:00
|
|
|
void func_ptr_ref(ufunc_T *fp);
|
2016-07-17 18:29:19 +02:00
|
|
|
void ex_return(exarg_T *eap);
|
2022-09-04 15:40:36 +01:00
|
|
|
int add_defer(char_u *name, int argcount_arg, typval_T *argvars);
|
2022-09-03 21:35:53 +01:00
|
|
|
void handle_defer(void);
|
2016-07-17 18:29:19 +02:00
|
|
|
void ex_call(exarg_T *eap);
|
|
|
|
|
int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv);
|
|
|
|
|
void discard_pending_return(void *rettv);
|
|
|
|
|
char_u *get_return_cmd(void *rettv);
|
2020-08-20 15:02:42 +02:00
|
|
|
char_u *get_func_line(int c, void *cookie, int indent, getline_opt_T options);
|
2016-07-17 18:29:19 +02:00
|
|
|
int func_has_ended(void *cookie);
|
|
|
|
|
int func_has_abort(void *cookie);
|
|
|
|
|
dict_T *make_partial(dict_T *selfdict_in, typval_T *rettv);
|
|
|
|
|
char_u *func_name(void *cookie);
|
|
|
|
|
linenr_T *func_breakpoint(void *cookie);
|
|
|
|
|
int *func_dbg_tick(void *cookie);
|
|
|
|
|
int func_level(void *cookie);
|
|
|
|
|
int current_func_returned(void);
|
|
|
|
|
int free_unref_funccal(int copyID, int testing);
|
|
|
|
|
hashtab_T *get_funccal_local_ht(void);
|
|
|
|
|
dictitem_T *get_funccal_local_var(void);
|
|
|
|
|
hashtab_T *get_funccal_args_ht(void);
|
|
|
|
|
dictitem_T *get_funccal_args_var(void);
|
|
|
|
|
void list_func_vars(int *first);
|
|
|
|
|
dict_T *get_current_funccal_dict(hashtab_T *ht);
|
2016-08-01 17:10:20 +02:00
|
|
|
hashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht);
|
|
|
|
|
dictitem_T *find_var_in_scoped_ht(char_u *name, int no_autoload);
|
2016-07-17 18:29:19 +02:00
|
|
|
int set_ref_in_previous_funccal(int copyID);
|
|
|
|
|
int set_ref_in_call_stack(int copyID);
|
2016-08-01 22:49:22 +02:00
|
|
|
int set_ref_in_functions(int copyID);
|
2016-07-17 18:29:19 +02:00
|
|
|
int set_ref_in_func_args(int copyID);
|
2016-08-01 15:40:54 +02:00
|
|
|
int set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID);
|
2016-07-17 18:29:19 +02:00
|
|
|
/* vim: set ft=c : */
|