comparison src/proto/eval.pro @ 20587:f502455965c0 v8.2.0847

patch 8.2.0847: typval related code is spread out Commit: https://github.com/vim/vim/commit/367d59e6ba65cf554d167933775fa17e40dcc6a7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 30 17:06:14 2020 +0200 patch 8.2.0847: typval related code is spread out Problem: Typval related code is spread out. Solution: Move code to new typval.c file. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6093)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 May 2020 17:15:03 +0200
parents 94eda51ba9ba
children ab27db64f1fb
comparison
equal deleted inserted replaced
20586:fed0050be1a1 20587:f502455965c0
27 int pattern_match(char_u *pat, char_u *text, int ic); 27 int pattern_match(char_u *pat, char_u *text, int ic);
28 int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate); 28 int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate);
29 int eval1(char_u **arg, typval_T *rettv, int evaluate); 29 int eval1(char_u **arg, typval_T *rettv, int evaluate);
30 void eval_addblob(typval_T *tv1, typval_T *tv2); 30 void eval_addblob(typval_T *tv1, typval_T *tv2);
31 int eval_addlist(typval_T *tv1, typval_T *tv2); 31 int eval_addlist(typval_T *tv1, typval_T *tv2);
32 int get_option_tv(char_u **arg, typval_T *rettv, int evaluate);
33 int get_number_tv(char_u **arg, typval_T *rettv, int evaluate, int want_string);
34 int get_string_tv(char_u **arg, typval_T *rettv, int evaluate);
35 int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
36 char_u *partial_name(partial_T *pt); 32 char_u *partial_name(partial_T *pt);
37 void partial_unref(partial_T *pt); 33 void partial_unref(partial_T *pt);
38 int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive);
39 int get_copyID(void); 34 int get_copyID(void);
40 int garbage_collect(int testing); 35 int garbage_collect(int testing);
41 int set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack); 36 int set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack);
42 int set_ref_in_dict(dict_T *d, int copyID); 37 int set_ref_in_dict(dict_T *d, int copyID);
43 int set_ref_in_list(list_T *ll, int copyID); 38 int set_ref_in_list(list_T *ll, int copyID);
44 int set_ref_in_list_items(list_T *l, int copyID, ht_stack_T **ht_stack); 39 int set_ref_in_list_items(list_T *l, int copyID, ht_stack_T **ht_stack);
45 int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack); 40 int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack);
46 char_u *echo_string_core(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val); 41 char_u *echo_string_core(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val);
47 char_u *echo_string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID); 42 char_u *echo_string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
48 char_u *tv2string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
49 char_u *string_quote(char_u *str, int function); 43 char_u *string_quote(char_u *str, int function);
50 int string2float(char_u *text, float_T *value); 44 int string2float(char_u *text, float_T *value);
51 int get_env_tv(char_u **arg, typval_T *rettv, int evaluate);
52 pos_T *var2fpos(typval_T *varp, int dollar_lnum, int *fnum); 45 pos_T *var2fpos(typval_T *varp, int dollar_lnum, int *fnum);
53 int list2fpos(typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp); 46 int list2fpos(typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp);
54 int get_env_len(char_u **arg); 47 int get_env_len(char_u **arg);
55 int get_id_len(char_u **arg); 48 int get_id_len(char_u **arg);
56 int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose); 49 int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose);
57 char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags); 50 char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags);
58 int eval_isnamec(int c); 51 int eval_isnamec(int c);
59 int eval_isnamec1(int c); 52 int eval_isnamec1(int c);
60 int handle_subscript(char_u **arg, typval_T *rettv, int evaluate, int verbose, char_u *start_leader, char_u **end_leaderp); 53 int handle_subscript(char_u **arg, typval_T *rettv, int evaluate, int verbose, char_u *start_leader, char_u **end_leaderp);
61 typval_T *alloc_tv(void);
62 typval_T *alloc_string_tv(char_u *s);
63 void free_tv(typval_T *varp);
64 void clear_tv(typval_T *varp);
65 void init_tv(typval_T *varp);
66 varnumber_T tv_get_number(typval_T *varp);
67 varnumber_T tv_get_number_chk(typval_T *varp, int *denote);
68 float_T tv_get_float(typval_T *varp);
69 char_u *tv_get_string(typval_T *varp);
70 char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
71 char_u *tv_get_string_chk(typval_T *varp);
72 char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf);
73 void copy_tv(typval_T *from, typval_T *to);
74 int item_copy(typval_T *from, typval_T *to, int deep, int copyID); 54 int item_copy(typval_T *from, typval_T *to, int deep, int copyID);
75 void echo_one(typval_T *rettv, int with_space, int *atstart, int *needclr); 55 void echo_one(typval_T *rettv, int with_space, int *atstart, int *needclr);
76 void ex_echo(exarg_T *eap); 56 void ex_echo(exarg_T *eap);
77 void ex_echohl(exarg_T *eap); 57 void ex_echohl(exarg_T *eap);
78 int get_echo_attr(void); 58 int get_echo_attr(void);
79 void ex_execute(exarg_T *eap); 59 void ex_execute(exarg_T *eap);
80 char_u *find_option_end(char_u **arg, int *opt_flags); 60 char_u *find_option_end(char_u **arg, int *opt_flags);
81 void last_set_msg(sctx_T script_ctx); 61 void last_set_msg(sctx_T script_ctx);
82 int typval_compare(typval_T *typ1, typval_T *typ2, exptype_T type, int ic);
83 char_u *typval_tostring(typval_T *arg);
84 char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, typval_T *expr, char_u *flags); 62 char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, typval_T *expr, char_u *flags);
85 /* vim: set ft=c : */ 63 /* vim: set ft=c : */