xref: /vim-8.2.3635/src/proto/eval.pro (revision 94688b8a)
1/* eval.c */
2void eval_init(void);
3void eval_clear(void);
4void set_internal_string_var(char_u *name, char_u *value);
5int var_redir_start(char_u *name, int append);
6void var_redir_str(char_u *value, int value_len);
7void var_redir_stop(void);
8int eval_charconvert(char_u *enc_from, char_u *enc_to, char_u *fname_from, char_u *fname_to);
9int eval_printexpr(char_u *fname, char_u *args);
10void eval_diff(char_u *origfile, char_u *newfile, char_u *outfile);
11void eval_patch(char_u *origfile, char_u *difffile, char_u *outfile);
12int eval_to_bool(char_u *arg, int *error, char_u **nextcmd, int skip);
13int eval_expr_to_bool(typval_T *expr, int *error);
14char_u *eval_to_string_skip(char_u *arg, char_u **nextcmd, int skip);
15int skip_expr(char_u **pp);
16char_u *eval_to_string(char_u *arg, char_u **nextcmd, int convert);
17char_u *eval_to_string_safe(char_u *arg, char_u **nextcmd, int use_sandbox);
18varnumber_T eval_to_number(char_u *expr);
19list_T *eval_spell_expr(char_u *badword, char_u *expr);
20int get_spellword(list_T *list, char_u **pp);
21typval_T *eval_expr(char_u *arg, char_u **nextcmd);
22int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv);
23varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv);
24void *call_func_retstr(char_u *func, int argc, typval_T *argv);
25void *call_func_retlist(char_u *func, int argc, typval_T *argv);
26int eval_foldexpr(char_u *arg, int *cp);
27void ex_let(exarg_T *eap);
28void list_hashtable_vars(hashtab_T *ht, char *prefix, int empty, int *first);
29char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags);
30void clear_lval(lval_T *lp);
31void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip);
32int next_for_item(void *fi_void, char_u *arg);
33void free_for_info(void *fi_void);
34void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx);
35void ex_unlet(exarg_T *eap);
36void ex_lockvar(exarg_T *eap);
37int do_unlet(char_u *name, int forceit);
38void del_menutrans_vars(void);
39char_u *get_user_var_name(expand_T *xp, int idx);
40int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate);
41int eval1(char_u **arg, typval_T *rettv, int evaluate);
42int get_option_tv(char_u **arg, typval_T *rettv, int evaluate);
43char_u *partial_name(partial_T *pt);
44void partial_unref(partial_T *pt);
45int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive);
46int get_copyID(void);
47int garbage_collect(int testing);
48int set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack);
49int set_ref_in_list(list_T *l, int copyID, ht_stack_T **ht_stack);
50int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack);
51char_u *echo_string_core(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val);
52char_u *echo_string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
53char_u *tv2string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
54char_u *string_quote(char_u *str, int function);
55int string2float(char_u *text, float_T *value);
56pos_T *var2fpos(typval_T *varp, int dollar_lnum, int *fnum);
57int list2fpos(typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp);
58int get_id_len(char_u **arg);
59int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose);
60char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags);
61int eval_isnamec(int c);
62int eval_isnamec1(int c);
63void set_vim_var_nr(int idx, varnumber_T val);
64varnumber_T get_vim_var_nr(int idx);
65char_u *get_vim_var_str(int idx);
66list_T *get_vim_var_list(int idx);
67dict_T *get_vim_var_dict(int idx);
68void set_vim_var_char(int c);
69void set_vcount(long count, long count1, int set_prevcount);
70void save_vimvars(vimvars_save_T *vvsave);
71void restore_vimvars(vimvars_save_T *vvsave);
72void set_vim_var_string(int idx, char_u *val, int len);
73void set_vim_var_list(int idx, list_T *val);
74void set_vim_var_dict(int idx, dict_T *val);
75void set_reg_var(int c);
76char_u *v_exception(char_u *oldval);
77char_u *v_throwpoint(char_u *oldval);
78char_u *set_cmdarg(exarg_T *eap, char_u *oldarg);
79int get_var_tv(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload);
80int handle_subscript(char_u **arg, typval_T *rettv, int evaluate, int verbose);
81typval_T *alloc_tv(void);
82void free_tv(typval_T *varp);
83void clear_tv(typval_T *varp);
84void init_tv(typval_T *varp);
85varnumber_T tv_get_number(typval_T *varp);
86varnumber_T tv_get_number_chk(typval_T *varp, int *denote);
87float_T tv_get_float(typval_T *varp);
88char_u *tv_get_string(typval_T *varp);
89char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
90char_u *tv_get_string_chk(typval_T *varp);
91char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf);
92char_u *tv_stringify(typval_T *varp, char_u *buf);
93dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
94dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
95hashtab_T *find_var_ht(char_u *name, char_u **varname);
96char_u *get_var_value(char_u *name);
97void new_script_vars(scid_T id);
98void init_var_dict(dict_T *dict, dictitem_T *dict_var, int scope);
99void unref_var_dict(dict_T *dict);
100void vars_clear(hashtab_T *ht);
101void vars_clear_ext(hashtab_T *ht, int free_val);
102void set_var(char_u *name, typval_T *tv, int copy);
103int var_check_ro(int flags, char_u *name, int use_gettext);
104int var_check_fixed(int flags, char_u *name, int use_gettext);
105int var_check_func_name(char_u *name, int new_var);
106int valid_varname(char_u *varname);
107int tv_check_lock(int lock, char_u *name, int use_gettext);
108void copy_tv(typval_T *from, typval_T *to);
109int item_copy(typval_T *from, typval_T *to, int deep, int copyID);
110void get_user_input(typval_T *argvars, typval_T *rettv, int inputdialog, int secret);
111void ex_echo(exarg_T *eap);
112void ex_echohl(exarg_T *eap);
113void ex_execute(exarg_T *eap);
114win_T *find_win_by_nr(typval_T *vp, tabpage_T *tp);
115win_T *find_win_by_nr_or_id(typval_T *vp);
116win_T *find_tabwin(typval_T *wvp, typval_T *tvp);
117void getwinvar(typval_T *argvars, typval_T *rettv, int off);
118void setwinvar(typval_T *argvars, typval_T *rettv, int off);
119char_u *autoload_name(char_u *name);
120int script_autoload(char_u *name, int reload);
121int read_viminfo_varlist(vir_T *virp, int writing);
122void write_viminfo_varlist(FILE *fp);
123int store_session_globals(FILE *fd);
124void last_set_msg(sctx_T script_ctx);
125void reset_v_option_vars(void);
126void prepare_assert_error(garray_T *gap);
127void assert_error(garray_T *gap);
128int assert_equal_common(typval_T *argvars, assert_type_T atype);
129int assert_equalfile(typval_T *argvars);
130int assert_match_common(typval_T *argvars, assert_type_T atype);
131int assert_inrange(typval_T *argvars);
132int assert_bool(typval_T *argvars, int isTrue);
133int assert_report(typval_T *argvars);
134int assert_exception(typval_T *argvars);
135int assert_beeps(typval_T *argvars);
136int assert_fails(typval_T *argvars);
137void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv, char_u *exp_str, typval_T *exp_tv, typval_T *got_tv, assert_type_T atype);
138int typval_compare(typval_T *typ1, typval_T *typ2, exptype_T type, int type_is, int ic);
139char_u *typval_tostring(typval_T *arg);
140int var_exists(char_u *var);
141int modify_fname(char_u *src, int tilde_file, int *usedlen, char_u **fnamep, char_u **bufp, int *fnamelen);
142char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, typval_T *expr, char_u *flags);
143void filter_map(typval_T *argvars, typval_T *rettv, int map);
144/* vim: set ft=c : */
145