blob: c673db3872efa26d4c91febe4eed0c5d508d31a0 [file] [log] [blame]
Bram Moolenaar367d59e2020-05-30 17:06:14 +02001/* typval.c */
2typval_T *alloc_tv(void);
3typval_T *alloc_string_tv(char_u *s);
4void free_tv(typval_T *varp);
5void clear_tv(typval_T *varp);
6void init_tv(typval_T *varp);
Bram Moolenaar367d59e2020-05-30 17:06:14 +02007varnumber_T tv_get_number(typval_T *varp);
8varnumber_T tv_get_number_chk(typval_T *varp, int *denote);
Bram Moolenaar36967b32020-08-17 21:41:02 +02009varnumber_T tv_get_bool(typval_T *varp);
Bram Moolenaare15eebd2020-08-18 19:11:38 +020010varnumber_T tv_get_bool_chk(typval_T *varp, int *denote);
Bram Moolenaar367d59e2020-05-30 17:06:14 +020011float_T tv_get_float(typval_T *varp);
Bram Moolenaar32105ae2021-03-27 18:59:25 +010012int check_for_string_arg(typval_T *args, int idx);
13int check_for_nonempty_string_arg(typval_T *args, int idx);
Yegappan Lakshmanan83494b42021-07-20 17:51:51 +020014int check_for_opt_string_arg(typval_T *args, int idx);
Yegappan Lakshmanan1a71d312021-07-15 12:49:58 +020015int check_for_number_arg(typval_T *args, int idx);
Yegappan Lakshmanan83494b42021-07-20 17:51:51 +020016int check_for_opt_number_arg(typval_T *args, int idx);
Yegappan Lakshmanana9a7c0c2021-07-17 19:11:07 +020017int check_for_bool_arg(typval_T *args, int idx);
Yegappan Lakshmanan83494b42021-07-20 17:51:51 +020018int check_for_opt_bool_arg(typval_T *args, int idx);
Yegappan Lakshmanana9a7c0c2021-07-17 19:11:07 +020019int check_for_list_arg(typval_T *args, int idx);
Yegappan Lakshmanan83494b42021-07-20 17:51:51 +020020int check_for_opt_list_arg(typval_T *args, int idx);
Yegappan Lakshmanan5b739922021-07-10 13:15:41 +020021int check_for_dict_arg(typval_T *args, int idx);
Yegappan Lakshmanan83494b42021-07-20 17:51:51 +020022int check_for_opt_dict_arg(typval_T *args, int idx);
23int check_for_blob_arg(typval_T *args, int idx);
24int check_for_chan_or_job_arg(typval_T *args, int idx);
25int check_for_job_arg(typval_T *args, int idx);
26int check_for_string_or_number_arg(typval_T *args, int idx);
27int check_for_buffer_arg(typval_T *args, int idx);
28int check_for_lnum_arg(typval_T *args, int idx);
29int check_for_opt_lnum_arg(typval_T *args, int idx);
30int check_for_opt_string_or_number_arg(typval_T *args, int idx);
31int check_for_string_or_blob_arg(typval_T *args, int idx);
Bram Moolenaar367d59e2020-05-30 17:06:14 +020032char_u *tv_get_string(typval_T *varp);
Bram Moolenaarf2b26bc2021-01-30 23:05:11 +010033char_u *tv_get_string_strict(typval_T *varp);
Bram Moolenaar367d59e2020-05-30 17:06:14 +020034char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
35char_u *tv_get_string_chk(typval_T *varp);
36char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf);
Bram Moolenaarf2b26bc2021-01-30 23:05:11 +010037char_u *tv_get_string_buf_chk_strict(typval_T *varp, char_u *buf, int strict);
Bram Moolenaar9a78e6d2020-07-01 18:29:55 +020038char_u *tv_stringify(typval_T *varp, char_u *buf);
39int tv_check_lock(typval_T *tv, char_u *name, int use_gettext);
40void copy_tv(typval_T *from, typval_T *to);
Bram Moolenaar657137c2021-01-09 15:45:23 +010041int typval_compare(typval_T *typ1, typval_T *typ2, exprtype_T type, int ic);
Bram Moolenaar34453202021-01-31 13:08:38 +010042char_u *typval_tostring(typval_T *arg, int quotes);
Bram Moolenaar9a78e6d2020-07-01 18:29:55 +020043int tv_islocked(typval_T *tv);
44int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive);
45int eval_option(char_u **arg, typval_T *rettv, int evaluate);
46int eval_number(char_u **arg, typval_T *rettv, int evaluate, int want_string);
47int eval_string(char_u **arg, typval_T *rettv, int evaluate);
48int eval_lit_string(char_u **arg, typval_T *rettv, int evaluate);
49char_u *tv2string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
50int eval_env_var(char_u **arg, typval_T *rettv, int evaluate);
Bram Moolenaar367d59e2020-05-30 17:06:14 +020051linenr_T tv_get_lnum(typval_T *argvars);
52linenr_T tv_get_lnum_buf(typval_T *argvars, buf_T *buf);
53buf_T *tv_get_buf(typval_T *tv, int curtab_only);
Bram Moolenaar3767e3a2020-09-01 23:06:01 +020054buf_T *tv_get_buf_from_arg(typval_T *tv);
Bram Moolenaar367d59e2020-05-30 17:06:14 +020055/* vim: set ft=c : */