diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-17 14:57:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-17 14:57:05 +0200 |
commit | cd52459c387785796713826c63174cdeed295dd4 (patch) | |
tree | f2c964f83534a80d539b44826baea085a41fa595 /src/proto | |
parent | 42ebd066422d73cdb7bda6a1dc828a3dd022dec8 (diff) | |
download | vim-git-cd52459c387785796713826c63174cdeed295dd4.tar.gz |
patch 7.4.2055v7.4.2055
Problem: eval.c is too big.
Solution: Move Dictionary functions to dict.c.
Diffstat (limited to 'src/proto')
-rw-r--r-- | src/proto/dict.pro | 24 | ||||
-rw-r--r-- | src/proto/eval.pro | 23 |
2 files changed, 33 insertions, 14 deletions
diff --git a/src/proto/dict.pro b/src/proto/dict.pro new file mode 100644 index 000000000..10a5b6bf1 --- /dev/null +++ b/src/proto/dict.pro @@ -0,0 +1,24 @@ +/* dict.c */ +dict_T *dict_alloc(void); +int rettv_dict_alloc(typval_T *rettv); +void dict_unref(dict_T *d); +int dict_free_nonref(int copyID); +void dict_free_items(int copyID); +dictitem_T *dictitem_alloc(char_u *key); +void dictitem_remove(dict_T *dict, dictitem_T *item); +void dictitem_free(dictitem_T *item); +dict_T *dict_copy(dict_T *orig, int deep, int copyID); +int dict_add(dict_T *d, dictitem_T *item); +int dict_add_nr_str(dict_T *d, char *key, varnumber_T nr, char_u *str); +int dict_add_list(dict_T *d, char *key, list_T *list); +long dict_len(dict_T *d); +dictitem_T *dict_find(dict_T *d, char_u *key, int len); +char_u *get_dict_string(dict_T *d, char_u *key, int save); +varnumber_T get_dict_number(dict_T *d, char_u *key); +char_u *dict2string(typval_T *tv, int copyID, int restore_copyID); +int get_dict_tv(char_u **arg, typval_T *rettv, int evaluate); +void dict_extend(dict_T *d1, dict_T *d2, char_u *action); +dictitem_T *dict_lookup(hashitem_T *hi); +int dict_equal(dict_T *d1, dict_T *d2, int ic, int recursive); +void dict_list(typval_T *argvars, typval_T *rettv, int what); +/* vim: set ft=c : */ diff --git a/src/proto/eval.pro b/src/proto/eval.pro index 6d1144776..78288e630 100644 --- a/src/proto/eval.pro +++ b/src/proto/eval.pro @@ -45,6 +45,7 @@ void ex_lockvar(exarg_T *eap); int do_unlet(char_u *name, int forceit); void del_menutrans_vars(void); char_u *get_user_var_name(expand_T *xp, int idx); +int eval1(char_u **arg, typval_T *rettv, int evaluate); void partial_unref(partial_T *pt); list_T *list_alloc(void); int rettv_list_alloc(typval_T *rettv); @@ -53,7 +54,7 @@ void list_free(list_T *l); listitem_T *listitem_alloc(void); void listitem_free(listitem_T *item); void listitem_remove(list_T *l, listitem_T *item); -dictitem_T *dict_lookup(hashitem_T *hi); +int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive); listitem_T *list_find(list_T *l, long n); char_u *list_find_str(list_T *l, long idx); void list_append(list_T *l, listitem_T *item); @@ -69,19 +70,9 @@ int garbage_collect(int testing); int set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack); int set_ref_in_list(list_T *l, int copyID, ht_stack_T **ht_stack); int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack); -dict_T *dict_alloc(void); -int rettv_dict_alloc(typval_T *rettv); -void dict_unref(dict_T *d); -void dict_free(dict_T *d); -dictitem_T *dictitem_alloc(char_u *key); -void dictitem_free(dictitem_T *item); -int dict_add(dict_T *d, dictitem_T *item); -int dict_add_nr_str(dict_T *d, char *key, varnumber_T nr, char_u *str); -int dict_add_list(dict_T *d, char *key, list_T *list); -dictitem_T *dict_find(dict_T *d, char_u *key, int len); -char_u *get_dict_string(dict_T *d, char_u *key, int save); -varnumber_T get_dict_number(dict_T *d, char_u *key); +char_u *echo_string_core(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int dict_val); char_u *tv2string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID); +char_u *string_quote(char_u *str, int function); int string2float(char_u *text, float_T *value); char_u *get_function_name(expand_T *xp, int idx); char_u *get_expr_name(expand_T *xp, int idx); @@ -89,7 +80,6 @@ int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typva buf_T *buflist_find_by_name(char_u *name, int curtab_only); int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv); void execute_redir_str(char_u *value, int value_len); -void dict_extend(dict_T *d1, dict_T *d2, char_u *action); void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv); float_T vim_round(float_T f); long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, char_u *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit); @@ -122,7 +112,12 @@ void new_script_vars(scid_T id); void init_var_dict(dict_T *dict, dictitem_T *dict_var, int scope); void unref_var_dict(dict_T *dict); void vars_clear(hashtab_T *ht); +int var_check_ro(int flags, char_u *name, int use_gettext); +int var_check_func_name(char_u *name, int new_var); +int valid_varname(char_u *varname); +int tv_check_lock(int lock, char_u *name, int use_gettext); void copy_tv(typval_T *from, typval_T *to); +int item_copy(typval_T *from, typval_T *to, int deep, int copyID); void ex_echo(exarg_T *eap); void ex_echohl(exarg_T *eap); void ex_execute(exarg_T *eap); |