comparison src/evalfunc.c @ 15146:7903dce131d4 v8.1.0583

patch 8.1.0583: using illogical name for get_dict_number()/get_dict_string() commit https://github.com/vim/vim/commit/8f66717a1f835b8194139d158c1e2df8b30c3ef3 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 14 15:38:31 2018 +0100 patch 8.1.0583: using illogical name for get_dict_number()/get_dict_string() Problem: Using illogical name for get_dict_number()/get_dict_string(). Solution: Rename to start with dict_.
author Bram Moolenaar <Bram@vim.org>
date Fri, 14 Dec 2018 15:45:06 +0100
parents 9df130fd5e0d
children 3a99b2e6d136
comparison
equal deleted inserted replaced
15145:14de49f92ace 15146:7903dce131d4
8070 EMSG(_(e_dictreq)); 8070 EMSG(_(e_dictreq));
8071 return FAIL; 8071 return FAIL;
8072 } 8072 }
8073 8073
8074 if (dict_find(tv->vval.v_dict, (char_u *)"conceal", -1) != NULL) 8074 if (dict_find(tv->vval.v_dict, (char_u *)"conceal", -1) != NULL)
8075 *conceal_char = get_dict_string(tv->vval.v_dict, 8075 *conceal_char = dict_get_string(tv->vval.v_dict,
8076 (char_u *)"conceal", FALSE); 8076 (char_u *)"conceal", FALSE);
8077 8077
8078 if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL) 8078 if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL)
8079 { 8079 {
8080 *win = find_win_by_nr_or_id(&di->di_tv); 8080 *win = find_win_by_nr_or_id(&di->di_tv);
10666 return; 10666 return;
10667 } 10667 }
10668 10668
10669 if ((d = argvars[0].vval.v_dict) != NULL) 10669 if ((d = argvars[0].vval.v_dict) != NULL)
10670 { 10670 {
10671 csearch = get_dict_string(d, (char_u *)"char", FALSE); 10671 csearch = dict_get_string(d, (char_u *)"char", FALSE);
10672 if (csearch != NULL) 10672 if (csearch != NULL)
10673 { 10673 {
10674 #ifdef FEAT_MBYTE 10674 #ifdef FEAT_MBYTE
10675 if (enc_utf8) 10675 if (enc_utf8)
10676 { 10676 {
10920 else 10920 else
10921 break; 10921 break;
10922 } 10922 }
10923 } 10923 }
10924 10924
10925 group = get_dict_string(d, (char_u *)"group", TRUE); 10925 group = dict_get_string(d, (char_u *)"group", TRUE);
10926 priority = (int)get_dict_number(d, (char_u *)"priority"); 10926 priority = (int)dict_get_number(d, (char_u *)"priority");
10927 id = (int)get_dict_number(d, (char_u *)"id"); 10927 id = (int)dict_get_number(d, (char_u *)"id");
10928 conceal = dict_find(d, (char_u *)"conceal", -1) != NULL 10928 conceal = dict_find(d, (char_u *)"conceal", -1) != NULL
10929 ? get_dict_string(d, (char_u *)"conceal", TRUE) 10929 ? dict_get_string(d, (char_u *)"conceal", TRUE)
10930 : NULL; 10930 : NULL;
10931 if (i == 0) 10931 if (i == 0)
10932 { 10932 {
10933 match_add(curwin, group, 10933 match_add(curwin, group,
10934 get_dict_string(d, (char_u *)"pattern", FALSE), 10934 dict_get_string(d, (char_u *)"pattern", FALSE),
10935 priority, id, NULL, conceal); 10935 priority, id, NULL, conceal);
10936 } 10936 }
10937 else 10937 else
10938 { 10938 {
10939 match_add(curwin, group, NULL, priority, id, s, conceal); 10939 match_add(curwin, group, NULL, priority, id, s, conceal);
13527 { 13527 {
13528 EMSG2(_(e_invarg2), get_tv_string(&argvars[2])); 13528 EMSG2(_(e_invarg2), get_tv_string(&argvars[2]));
13529 return; 13529 return;
13530 } 13530 }
13531 if (dict_find(dict, (char_u *)"repeat", -1) != NULL) 13531 if (dict_find(dict, (char_u *)"repeat", -1) != NULL)
13532 repeat = get_dict_number(dict, (char_u *)"repeat"); 13532 repeat = dict_get_number(dict, (char_u *)"repeat");
13533 } 13533 }
13534 13534
13535 callback = get_callback(&argvars[1], &partial); 13535 callback = get_callback(&argvars[1], &partial);
13536 if (callback == NULL) 13536 if (callback == NULL)
13537 return; 13537 return;
14078 || (dict = argvars[0].vval.v_dict) == NULL) 14078 || (dict = argvars[0].vval.v_dict) == NULL)
14079 EMSG(_(e_invarg)); 14079 EMSG(_(e_invarg));
14080 else 14080 else
14081 { 14081 {
14082 if (dict_find(dict, (char_u *)"lnum", -1) != NULL) 14082 if (dict_find(dict, (char_u *)"lnum", -1) != NULL)
14083 curwin->w_cursor.lnum = (linenr_T)get_dict_number(dict, (char_u *)"lnum"); 14083 curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, (char_u *)"lnum");
14084 if (dict_find(dict, (char_u *)"col", -1) != NULL) 14084 if (dict_find(dict, (char_u *)"col", -1) != NULL)
14085 curwin->w_cursor.col = (colnr_T)get_dict_number(dict, (char_u *)"col"); 14085 curwin->w_cursor.col = (colnr_T)dict_get_number(dict, (char_u *)"col");
14086 #ifdef FEAT_VIRTUALEDIT 14086 #ifdef FEAT_VIRTUALEDIT
14087 if (dict_find(dict, (char_u *)"coladd", -1) != NULL) 14087 if (dict_find(dict, (char_u *)"coladd", -1) != NULL)
14088 curwin->w_cursor.coladd = (colnr_T)get_dict_number(dict, (char_u *)"coladd"); 14088 curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, (char_u *)"coladd");
14089 #endif 14089 #endif
14090 if (dict_find(dict, (char_u *)"curswant", -1) != NULL) 14090 if (dict_find(dict, (char_u *)"curswant", -1) != NULL)
14091 { 14091 {
14092 curwin->w_curswant = (colnr_T)get_dict_number(dict, (char_u *)"curswant"); 14092 curwin->w_curswant = (colnr_T)dict_get_number(dict, (char_u *)"curswant");
14093 curwin->w_set_curswant = FALSE; 14093 curwin->w_set_curswant = FALSE;
14094 } 14094 }
14095 14095
14096 if (dict_find(dict, (char_u *)"topline", -1) != NULL) 14096 if (dict_find(dict, (char_u *)"topline", -1) != NULL)
14097 set_topline(curwin, (linenr_T)get_dict_number(dict, (char_u *)"topline")); 14097 set_topline(curwin, (linenr_T)dict_get_number(dict, (char_u *)"topline"));
14098 #ifdef FEAT_DIFF 14098 #ifdef FEAT_DIFF
14099 if (dict_find(dict, (char_u *)"topfill", -1) != NULL) 14099 if (dict_find(dict, (char_u *)"topfill", -1) != NULL)
14100 curwin->w_topfill = (int)get_dict_number(dict, (char_u *)"topfill"); 14100 curwin->w_topfill = (int)dict_get_number(dict, (char_u *)"topfill");
14101 #endif 14101 #endif
14102 if (dict_find(dict, (char_u *)"leftcol", -1) != NULL) 14102 if (dict_find(dict, (char_u *)"leftcol", -1) != NULL)
14103 curwin->w_leftcol = (colnr_T)get_dict_number(dict, (char_u *)"leftcol"); 14103 curwin->w_leftcol = (colnr_T)dict_get_number(dict, (char_u *)"leftcol");
14104 if (dict_find(dict, (char_u *)"skipcol", -1) != NULL) 14104 if (dict_find(dict, (char_u *)"skipcol", -1) != NULL)
14105 curwin->w_skipcol = (colnr_T)get_dict_number(dict, (char_u *)"skipcol"); 14105 curwin->w_skipcol = (colnr_T)dict_get_number(dict, (char_u *)"skipcol");
14106 14106
14107 check_cursor(); 14107 check_cursor();
14108 win_new_height(curwin, curwin->w_height); 14108 win_new_height(curwin, curwin->w_height);
14109 win_new_width(curwin, curwin->w_width); 14109 win_new_width(curwin, curwin->w_width);
14110 changed_window_setting(); 14110 changed_window_setting();