Patch 9.0.0063

9 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 23, 2022, 4:53:00 AM7/23/22
to vim...@googlegroups.com

Patch 9.0.0063
Problem: Too many type casts for dict_get functions.
Solution: Change the key argument from "char_u *" to "char *".
Files: src/dict.c, src/proto/dict.pro, src/autocmd.c, src/change.c,
src/evalbuffer.c, src/evalfunc.c, src/evalwindow.c, src/fileio.c,
src/filepath.c, src/highlight.c, src/insexpand.c, src/gui_w32.c,
src/map.c, src/match.c, src/popupwin.c, src/quickfix.c,
src/search.c, src/sign.c, src/tag.c, src/terminal.c,
src/testing.c, src/textprop.c, src/time.c


*** ../vim-9.0.0062/src/dict.c 2022-06-14 13:39:28.000000000 +0100
--- src/dict.c 2022-07-23 09:45:42.021708123 +0100
***************
*** 662,672 ****
* Returns FAIL if the entry doesn't exist or out of memory.
*/
int
! dict_get_tv(dict_T *d, char_u *key, typval_T *rettv)
{
dictitem_T *di;

! di = dict_find(d, key, -1);
if (di == NULL)
return FAIL;
copy_tv(&di->di_tv, rettv);
--- 662,672 ----
* Returns FAIL if the entry doesn't exist or out of memory.
*/
int
! dict_get_tv(dict_T *d, char *key, typval_T *rettv)
{
dictitem_T *di;

! di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return FAIL;
copy_tv(&di->di_tv, rettv);
***************
*** 680,691 ****
* Returns NULL if the entry doesn't exist or out of memory.
*/
char_u *
! dict_get_string(dict_T *d, char_u *key, int save)
{
dictitem_T *di;
char_u *s;

! di = dict_find(d, key, -1);
if (di == NULL)
return NULL;
s = tv_get_string(&di->di_tv);
--- 680,691 ----
* Returns NULL if the entry doesn't exist or out of memory.
*/
char_u *
! dict_get_string(dict_T *d, char *key, int save)
{
dictitem_T *di;
char_u *s;

! di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return NULL;
s = tv_get_string(&di->di_tv);
***************
*** 699,705 ****
* Returns 0 if the entry doesn't exist.
*/
varnumber_T
! dict_get_number(dict_T *d, char_u *key)
{
return dict_get_number_def(d, key, 0);
}
--- 699,705 ----
* Returns 0 if the entry doesn't exist.
*/
varnumber_T
! dict_get_number(dict_T *d, char *key)
{
return dict_get_number_def(d, key, 0);
}
***************
*** 709,719 ****
* Returns "def" if the entry doesn't exist.
*/
varnumber_T
! dict_get_number_def(dict_T *d, char_u *key, int def)
{
dictitem_T *di;

! di = dict_find(d, key, -1);
if (di == NULL)
return def;
return tv_get_number(&di->di_tv);
--- 709,719 ----
* Returns "def" if the entry doesn't exist.
*/
varnumber_T
! dict_get_number_def(dict_T *d, char *key, int def)
{
dictitem_T *di;

! di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return def;
return tv_get_number(&di->di_tv);
***************
*** 745,755 ****
* Returns "def" if the entry doesn't exist.
*/
varnumber_T
! dict_get_bool(dict_T *d, char_u *key, int def)
{
dictitem_T *di;

! di = dict_find(d, key, -1);
if (di == NULL)
return def;
return tv_get_bool(&di->di_tv);
--- 745,755 ----
* Returns "def" if the entry doesn't exist.
*/
varnumber_T
! dict_get_bool(dict_T *d, char *key, int def)
{
dictitem_T *di;

! di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return def;
return tv_get_bool(&di->di_tv);
*** ../vim-9.0.0062/src/proto/dict.pro 2022-06-27 23:15:00.000000000 +0100
--- src/proto/dict.pro 2022-07-23 09:49:17.817767276 +0100
***************
*** 28,39 ****
long dict_len(dict_T *d);
dictitem_T *dict_find(dict_T *d, char_u *key, int len);
int dict_has_key(dict_T *d, char *key);
! int dict_get_tv(dict_T *d, char_u *key, typval_T *rettv);
! char_u *dict_get_string(dict_T *d, char_u *key, int save);
! varnumber_T dict_get_number(dict_T *d, char_u *key);
! varnumber_T dict_get_number_def(dict_T *d, char_u *key, int def);
varnumber_T dict_get_number_check(dict_T *d, char_u *key);
! varnumber_T dict_get_bool(dict_T *d, char_u *key, int def);
char_u *dict2string(typval_T *tv, int copyID, int restore_copyID);
char_u *get_literal_key(char_u **arg);
int eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal);
--- 28,39 ----
long dict_len(dict_T *d);
dictitem_T *dict_find(dict_T *d, char_u *key, int len);
int dict_has_key(dict_T *d, char *key);
! int dict_get_tv(dict_T *d, char *key, typval_T *rettv);
! char_u *dict_get_string(dict_T *d, char *key, int save);
! varnumber_T dict_get_number(dict_T *d, char *key);
! varnumber_T dict_get_number_def(dict_T *d, char *key, int def);
varnumber_T dict_get_number_check(dict_T *d, char_u *key);
! varnumber_T dict_get_bool(dict_T *d, char *key, int def);
char_u *dict2string(typval_T *tv, int copyID, int restore_copyID);
char_u *get_literal_key(char_u **arg);
int eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal);
*** ../vim-9.0.0062/src/autocmd.c 2022-07-23 09:06:23.620970749 +0100
--- src/autocmd.c 2022-07-23 09:49:32.665771494 +0100
***************
*** 2833,2839 ****
}
}

! group_name = dict_get_string(event_dict, (char_u *)"group", TRUE);
if (group_name == NULL || *group_name == NUL)
// if the autocmd group name is not specified, then use the current
// autocmd group
--- 2833,2839 ----
}
}

! group_name = dict_get_string(event_dict, "group", TRUE);
if (group_name == NULL || *group_name == NUL)
// if the autocmd group name is not specified, then use the current
// autocmd group
***************
*** 2868,2874 ****
{
varnumber_T bnum;

! bnum = dict_get_number_def(event_dict, (char_u *)"bufnr", -1);
if (bnum == -1)
continue;

--- 2868,2874 ----
{
varnumber_T bnum;

! bnum = dict_get_number_def(event_dict, "bufnr", -1);
if (bnum == -1)
continue;

***************
*** 2908,2920 ****
pat = (char_u *)"";
}

! once = dict_get_bool(event_dict, (char_u *)"once", FALSE);
! nested = dict_get_bool(event_dict, (char_u *)"nested", FALSE);
// if 'replace' is true, then remove all the commands associated with
// this autocmd event/group and add the new command.
! replace = dict_get_bool(event_dict, (char_u *)"replace", FALSE);

! cmd = dict_get_string(event_dict, (char_u *)"cmd", TRUE);
if (cmd == NULL)
{
if (delete)
--- 2908,2920 ----
pat = (char_u *)"";
}

! once = dict_get_bool(event_dict, "once", FALSE);
! nested = dict_get_bool(event_dict, "nested", FALSE);
// if 'replace' is true, then remove all the commands associated with
// this autocmd event/group and add the new command.
! replace = dict_get_bool(event_dict, "replace", FALSE);

! cmd = dict_get_string(event_dict, "cmd", TRUE);
if (cmd == NULL)
{
if (delete)
***************
*** 3076,3083 ****
// return only the autocmds in the specified group
if (dict_has_key(argvars[0].vval.v_dict, "group"))
{
! name = dict_get_string(argvars[0].vval.v_dict,
! (char_u *)"group", TRUE);
if (name == NULL)
return;

--- 3076,3082 ----
// return only the autocmds in the specified group
if (dict_has_key(argvars[0].vval.v_dict, "group"))
{
! name = dict_get_string(argvars[0].vval.v_dict, "group", TRUE);
if (name == NULL)
return;

***************
*** 3101,3108 ****
{
int i;

! name = dict_get_string(argvars[0].vval.v_dict,
! (char_u *)"event", TRUE);
if (name == NULL)
return;

--- 3100,3106 ----
{
int i;

! name = dict_get_string(argvars[0].vval.v_dict, "event", TRUE);
if (name == NULL)
return;

***************
*** 3127,3134 ****
// return only the autocmds for the specified pattern
if (dict_has_key(argvars[0].vval.v_dict, "pattern"))
{
! pat = dict_get_string(argvars[0].vval.v_dict,
! (char_u *)"pattern", TRUE);
if (pat == NULL)
return;
}
--- 3125,3131 ----
// return only the autocmds for the specified pattern
if (dict_has_key(argvars[0].vval.v_dict, "pattern"))
{
! pat = dict_get_string(argvars[0].vval.v_dict, "pattern", TRUE);
if (pat == NULL)
return;
}
*** ../vim-9.0.0062/src/change.c 2022-06-30 22:13:56.208846322 +0100
--- src/change.c 2022-07-23 09:30:59.421563972 +0100
***************
*** 172,180 ****
FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li)
{
prev_lnum = (linenr_T)dict_get_number(
! li->li_tv.vval.v_dict, (char_u *)"lnum");
prev_lnume = (linenr_T)dict_get_number(
! li->li_tv.vval.v_dict, (char_u *)"end");
if (prev_lnum >= lnum || prev_lnum > lnume || prev_lnume >= lnum)
{
// the current change is going to make the line number in
--- 172,180 ----
FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li)
{
prev_lnum = (linenr_T)dict_get_number(
! li->li_tv.vval.v_dict, "lnum");
prev_lnume = (linenr_T)dict_get_number(
! li->li_tv.vval.v_dict, "end");
if (prev_lnum >= lnum || prev_lnum > lnume || prev_lnume >= lnum)
{
// the current change is going to make the line number in
***************
*** 384,396 ****
{
varnumber_T lnum;

! lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"lnum");
if (start > lnum)
start = lnum;
! lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"end");
if (end < lnum)
end = lnum;
! added += dict_get_number(li->li_tv.vval.v_dict, (char_u *)"added");
}
argv[1].v_type = VAR_NUMBER;
argv[1].vval.v_number = start;
--- 384,396 ----
{
varnumber_T lnum;

! lnum = dict_get_number(li->li_tv.vval.v_dict, "lnum");
if (start > lnum)
start = lnum;
! lnum = dict_get_number(li->li_tv.vval.v_dict, "end");
if (end < lnum)
end = lnum;
! added += dict_get_number(li->li_tv.vval.v_dict, "added");
}
argv[1].v_type = VAR_NUMBER;
argv[1].vval.v_number = start;
*** ../vim-9.0.0062/src/evalbuffer.c 2022-06-16 11:27:01.000000000 +0100
--- src/evalbuffer.c 2022-07-23 09:46:06.953714733 +0100
***************
*** 695,703 ****
if (sel_d != NULL)
{
filtered = TRUE;
! sel_buflisted = dict_get_bool(sel_d, (char_u *)"buflisted", FALSE);
! sel_bufloaded = dict_get_bool(sel_d, (char_u *)"bufloaded", FALSE);
! sel_bufmodified = dict_get_bool(sel_d, (char_u *)"bufmodified",
FALSE);
}
}
--- 695,703 ----
if (sel_d != NULL)
{
filtered = TRUE;
! sel_buflisted = dict_get_bool(sel_d, "buflisted", FALSE);
! sel_bufloaded = dict_get_bool(sel_d, "bufloaded", FALSE);
! sel_bufmodified = dict_get_bool(sel_d, "bufmodified",
FALSE);
}
}
*** ../vim-9.0.0062/src/evalfunc.c 2022-07-18 20:48:43.428351586 +0100
--- src/evalfunc.c 2022-07-23 09:46:25.881719782 +0100
***************
*** 4217,4224 ****
return;

if (argvars[1].v_type == VAR_DICT
! && dict_get_bool(argvars[1].vval.v_dict, (char_u *)"errmsg",
! VVAL_FALSE))
emsgoff = FALSE;

rettv->v_type = VAR_STRING;
--- 4217,4223 ----
return;

if (argvars[1].v_type == VAR_DICT
! && dict_get_bool(argvars[1].vval.v_dict, "errmsg", VVAL_FALSE))
emsgoff = FALSE;

rettv->v_type = VAR_STRING;
***************
*** 9172,9178 ****

if ((d = argvars[0].vval.v_dict) != NULL)
{
! csearch = dict_get_string(d, (char_u *)"char", FALSE);
if (csearch != NULL)
{
if (enc_utf8)
--- 9171,9177 ----

if ((d = argvars[0].vval.v_dict) != NULL)
{
! csearch = dict_get_string(d, "char", FALSE);
if (csearch != NULL)
{
if (enc_utf8)
***************
*** 9368,9374 ****
if (di != NULL)
regcontents = &di->di_tv;

! stropt = dict_get_string(d, (char_u *)"regtype", FALSE);
if (stropt != NULL)
{
int ret = get_yank_type(&stropt, &yank_type, &block_len);
--- 9367,9373 ----
if (di != NULL)
regcontents = &di->di_tv;

! stropt = dict_get_string(d, "regtype", FALSE);
if (stropt != NULL)
{
int ret = get_yank_type(&stropt, &yank_type, &block_len);
***************
*** 9382,9395 ****

if (regname == '"')
{
! stropt = dict_get_string(d, (char_u *)"points_to", FALSE);
if (stropt != NULL)
{
pointreg = *stropt;
regname = pointreg;
}
}
! else if (dict_get_bool(d, (char_u *)"isunnamed", -1) > 0)
pointreg = regname;
}
else
--- 9381,9394 ----

if (regname == '"')
{
! stropt = dict_get_string(d, "points_to", FALSE);
if (stropt != NULL)
{
pointreg = *stropt;
regname = pointreg;
}
}
! else if (dict_get_bool(d, "isunnamed", -1) > 0)
pointreg = regname;
}
else
*** ../vim-9.0.0062/src/evalwindow.c 2022-06-16 11:31:00.000000000 +0100
--- src/evalwindow.c 2022-07-23 09:46:37.093722793 +0100
***************
*** 1016,1026 ****
}

d = argvars[2].vval.v_dict;
! if (dict_get_bool(d, (char_u *)"vertical", FALSE))
flags |= WSP_VERT;
if ((di = dict_find(d, (char_u *)"rightbelow", -1)) != NULL)
flags |= tv_get_bool(&di->di_tv) ? WSP_BELOW : WSP_ABOVE;
! size = (int)dict_get_number(d, (char_u *)"size");
}

win_move_into_split(wp, targetwin, size, flags);
--- 1016,1026 ----
}

d = argvars[2].vval.v_dict;
! if (dict_get_bool(d, "vertical", FALSE))
flags |= WSP_VERT;
if ((di = dict_find(d, (char_u *)"rightbelow", -1)) != NULL)
flags |= tv_get_bool(&di->di_tv) ? WSP_BELOW : WSP_ABOVE;
! size = (int)dict_get_number(d, "size");
}

win_move_into_split(wp, targetwin, size, flags);
***************
*** 1236,1262 ****
else
{
if (dict_has_key(dict, "lnum"))
! curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, (char_u *)"lnum");
if (dict_has_key(dict, "col"))
! curwin->w_cursor.col = (colnr_T)dict_get_number(dict, (char_u *)"col");
if (dict_has_key(dict, "coladd"))
! curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, (char_u *)"coladd");
if (dict_has_key(dict, "curswant"))
{
! curwin->w_curswant = (colnr_T)dict_get_number(dict, (char_u *)"curswant");
curwin->w_set_curswant = FALSE;
}

if (dict_has_key(dict, "topline"))
! set_topline(curwin, (linenr_T)dict_get_number(dict, (char_u *)"topline"));
#ifdef FEAT_DIFF
if (dict_has_key(dict, "topfill"))
! curwin->w_topfill = (int)dict_get_number(dict, (char_u *)"topfill");
#endif
if (dict_has_key(dict, "leftcol"))
! curwin->w_leftcol = (colnr_T)dict_get_number(dict, (char_u *)"leftcol");
if (dict_has_key(dict, "skipcol"))
! curwin->w_skipcol = (colnr_T)dict_get_number(dict, (char_u *)"skipcol");

check_cursor();
win_new_height(curwin, curwin->w_height);
--- 1236,1262 ----
else
{
if (dict_has_key(dict, "lnum"))
! curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, "lnum");
if (dict_has_key(dict, "col"))
! curwin->w_cursor.col = (colnr_T)dict_get_number(dict, "col");
if (dict_has_key(dict, "coladd"))
! curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, "coladd");
if (dict_has_key(dict, "curswant"))
{
! curwin->w_curswant = (colnr_T)dict_get_number(dict, "curswant");
curwin->w_set_curswant = FALSE;
}

if (dict_has_key(dict, "topline"))
! set_topline(curwin, (linenr_T)dict_get_number(dict, "topline"));
#ifdef FEAT_DIFF
if (dict_has_key(dict, "topfill"))
! curwin->w_topfill = (int)dict_get_number(dict, "topfill");
#endif
if (dict_has_key(dict, "leftcol"))
! curwin->w_leftcol = (colnr_T)dict_get_number(dict, "leftcol");
if (dict_has_key(dict, "skipcol"))
! curwin->w_skipcol = (colnr_T)dict_get_number(dict, "skipcol");

check_cursor();
win_new_height(curwin, curwin->w_height);
*** ../vim-9.0.0062/src/fileio.c 2022-06-08 15:08:03.000000000 +0100
--- src/fileio.c 2022-07-23 09:39:09.113616539 +0100
***************
*** 4746,4753 ****
{
char_u *name1, *name2;

! name1 = dict_get_string(*(dict_T**)p1, (char_u*)"name", FALSE);
! name2 = dict_get_string(*(dict_T**)p2, (char_u*)"name", FALSE);
if (readdirex_sort == READDIR_SORT_BYTE)
return STRCMP(name1, name2);
else if (readdirex_sort == READDIR_SORT_IC)
--- 4746,4753 ----
{
char_u *name1, *name2;

! name1 = dict_get_string(*(dict_T**)p1, "name", FALSE);
! name2 = dict_get_string(*(dict_T**)p2, "name", FALSE);
if (readdirex_sort == READDIR_SORT_BYTE)
return STRCMP(name1, name2);
else if (readdirex_sort == READDIR_SORT_IC)
*** ../vim-9.0.0062/src/filepath.c 2022-07-02 17:36:27.332515941 +0100
--- src/filepath.c 2022-07-23 09:39:17.961618275 +0100
***************
*** 1619,1625 ****
}

if (dict_has_key(tv->vval.v_dict, "sort"))
! compare = dict_get_string(tv->vval.v_dict, (char_u *)"sort", FALSE);
else
{
semsg(_(e_dictionary_key_str_required), "sort");
--- 1619,1625 ----
}

if (dict_has_key(tv->vval.v_dict, "sort"))
! compare = dict_get_string(tv->vval.v_dict, "sort", FALSE);
else
{
semsg(_(e_dictionary_key_str_required), "sort");
*** ../vim-9.0.0062/src/highlight.c 2022-06-29 18:39:05.015841419 +0100
--- src/highlight.c 2022-07-23 09:47:27.585736522 +0100
***************
*** 4317,4324 ****
p = attr_str;
for (i = 0; i < (int)ARRAY_LENGTH(hl_name_table); i++)
{
! if (dict_get_bool(attrdict, (char_u *)hl_name_table[i],
! VVAL_FALSE) == VVAL_TRUE)
{
if (p != attr_str && (size_t)(p - attr_str + 2) < len)
STRCPY(p, (char_u *)",");
--- 4317,4323 ----
p = attr_str;
for (i = 0; i < (int)ARRAY_LENGTH(hl_name_table); i++)
{
! if (dict_get_bool(attrdict, hl_name_table[i], VVAL_FALSE) == VVAL_TRUE)
{
if (p != attr_str && (size_t)(p - attr_str + 2) < len)
STRCPY(p, (char_u *)",");
***************
*** 4398,4407 ****
if (name == NULL || *name == NUL || error)
return FALSE;

! if (dict_get_bool(dict, (char_u *)"force", VVAL_FALSE) == VVAL_TRUE)
forceit = TRUE;

! if (dict_get_bool(dict, (char_u *)"default", VVAL_FALSE) == VVAL_TRUE)
dodefault = TRUE;

if (dict_has_key(dict, "cleared"))
--- 4397,4406 ----
if (name == NULL || *name == NUL || error)
return FALSE;

! if (dict_get_bool(dict, "force", VVAL_FALSE) == VVAL_TRUE)
forceit = TRUE;

! if (dict_get_bool(dict, "default", VVAL_FALSE) == VVAL_TRUE)
dodefault = TRUE;

if (dict_has_key(dict, "cleared"))
***************
*** 4409,4415 ****
varnumber_T cleared;

// clear a highlight group
! cleared = dict_get_bool(dict, (char_u *)"cleared", FALSE);
if (cleared == TRUE)
{
vim_snprintf((char *)hlsetBuf, HLSETBUFSZ, "clear %s", name);
--- 4408,4414 ----
varnumber_T cleared;

// clear a highlight group
! cleared = dict_get_bool(dict, "cleared", FALSE);
if (cleared == TRUE)
{
vim_snprintf((char *)hlsetBuf, HLSETBUFSZ, "clear %s", name);
*** ../vim-9.0.0062/src/insexpand.c 2022-07-23 06:53:01.097648234 +0100
--- src/insexpand.c 2022-07-23 09:44:24.817688178 +0100
***************
*** 2767,2791 ****
user_data.v_type = VAR_UNKNOWN;
if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
{
! word = dict_get_string(tv->vval.v_dict, (char_u *)"word", FALSE);
! cptext[CPT_ABBR] = dict_get_string(tv->vval.v_dict,
! (char_u *)"abbr", FALSE);
! cptext[CPT_MENU] = dict_get_string(tv->vval.v_dict,
! (char_u *)"menu", FALSE);
! cptext[CPT_KIND] = dict_get_string(tv->vval.v_dict,
! (char_u *)"kind", FALSE);
! cptext[CPT_INFO] = dict_get_string(tv->vval.v_dict,
! (char_u *)"info", FALSE);
! dict_get_tv(tv->vval.v_dict, (char_u *)"user_data", &user_data);
! if (dict_get_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL
! && dict_get_number(tv->vval.v_dict, (char_u *)"icase"))
flags |= CP_ICASE;
! if (dict_get_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
! dup = dict_get_number(tv->vval.v_dict, (char_u *)"dup");
! if (dict_get_string(tv->vval.v_dict, (char_u *)"empty", FALSE) != NULL)
! empty = dict_get_number(tv->vval.v_dict, (char_u *)"empty");
! if (dict_get_string(tv->vval.v_dict, (char_u *)"equal", FALSE) != NULL
! && dict_get_number(tv->vval.v_dict, (char_u *)"equal"))
flags |= CP_EQUAL;
}
else
--- 2767,2787 ----
user_data.v_type = VAR_UNKNOWN;
if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
{
! word = dict_get_string(tv->vval.v_dict, "word", FALSE);
! cptext[CPT_ABBR] = dict_get_string(tv->vval.v_dict, "abbr", FALSE);
! cptext[CPT_MENU] = dict_get_string(tv->vval.v_dict, "menu", FALSE);
! cptext[CPT_KIND] = dict_get_string(tv->vval.v_dict, "kind", FALSE);
! cptext[CPT_INFO] = dict_get_string(tv->vval.v_dict, "info", FALSE);
! dict_get_tv(tv->vval.v_dict, "user_data", &user_data);
! if (dict_get_string(tv->vval.v_dict, "icase", FALSE) != NULL
! && dict_get_number(tv->vval.v_dict, "icase"))
flags |= CP_ICASE;
! if (dict_get_string(tv->vval.v_dict, "dup", FALSE) != NULL)
! dup = dict_get_number(tv->vval.v_dict, "dup");
! if (dict_get_string(tv->vval.v_dict, "empty", FALSE) != NULL)
! empty = dict_get_number(tv->vval.v_dict, "empty");
! if (dict_get_string(tv->vval.v_dict, "equal", FALSE) != NULL
! && dict_get_number(tv->vval.v_dict, "equal"))
flags |= CP_EQUAL;
}
else
*** ../vim-9.0.0062/src/gui_w32.c 2022-07-23 09:22:42.409420798 +0100
--- src/gui_w32.c 2022-07-23 09:39:33.461621345 +0100
***************
*** 8549,8555 ****
char_u *event;
INPUT inputs[1];

! event = dict_get_string(args, (char_u *)"event", TRUE);
if (event == NULL)
return FALSE;

--- 8549,8555 ----
char_u *event;
INPUT inputs[1];

! event = dict_get_string(args, "event", TRUE);
if (event == NULL)
return FALSE;

***************
*** 8559,8565 ****
{
WORD vkCode;

! vkCode = dict_get_number_def(args, (char_u *)"keycode", 0);
if (vkCode <= 0 || vkCode >= 0xFF)
{
semsg(_(e_invalid_argument_nr), (long)vkCode);
--- 8559,8565 ----
{
WORD vkCode;

! vkCode = dict_get_number_def(args, "keycode", 0);
if (vkCode <= 0 || vkCode >= 0xFF)
{
semsg(_(e_invalid_argument_nr), (long)vkCode);
*** ../vim-9.0.0062/src/map.c 2022-06-29 10:37:14.938302547 +0100
--- src/map.c 2022-07-23 09:47:48.021742136 +0100
***************
*** 2621,2628 ****
if (dict_only)
{
d = argvars[0].vval.v_dict;
! which = dict_get_string(d, (char_u *)"mode", FALSE);
! is_abbr = dict_get_bool(d, (char_u *)"abbr", -1);
if (which == NULL || is_abbr < 0)
{
emsg(_(e_entries_missing_in_mapset_dict_argument));
--- 2621,2628 ----
if (dict_only)
{
d = argvars[0].vval.v_dict;
! which = dict_get_string(d, "mode", FALSE);
! is_abbr = dict_get_bool(d, "abbr", -1);
if (which == NULL || is_abbr < 0)
{
emsg(_(e_entries_missing_in_mapset_dict_argument));
***************
*** 2652,2661 ****


// Get the values in the same order as above in get_maparg().
! lhs = dict_get_string(d, (char_u *)"lhs", FALSE);
! lhsraw = dict_get_string(d, (char_u *)"lhsraw", FALSE);
! lhsrawalt = dict_get_string(d, (char_u *)"lhsrawalt", FALSE);
! rhs = dict_get_string(d, (char_u *)"rhs", FALSE);
if (lhs == NULL || lhsraw == NULL || rhs == NULL)
{
emsg(_(e_entries_missing_in_mapset_dict_argument));
--- 2652,2661 ----


// Get the values in the same order as above in get_maparg().
! lhs = dict_get_string(d, "lhs", FALSE);
! lhsraw = dict_get_string(d, "lhsraw", FALSE);
! lhsrawalt = dict_get_string(d, "lhsrawalt", FALSE);
! rhs = dict_get_string(d, "rhs", FALSE);
if (lhs == NULL || lhsraw == NULL || rhs == NULL)
{
emsg(_(e_entries_missing_in_mapset_dict_argument));
***************
*** 2665,2680 ****
rhs = replace_termcodes(rhs, &arg_buf,
REPTERM_DO_LT | REPTERM_SPECIAL, NULL);

! noremap = dict_get_number(d, (char_u *)"noremap") ? REMAP_NONE: 0;
! if (dict_get_number(d, (char_u *)"script") != 0)
noremap = REMAP_SCRIPT;
! expr = dict_get_number(d, (char_u *)"expr") != 0;
! silent = dict_get_number(d, (char_u *)"silent") != 0;
! sid = dict_get_number(d, (char_u *)"sid");
! scriptversion = dict_get_number(d, (char_u *)"scriptversion");
! lnum = dict_get_number(d, (char_u *)"lnum");
! buffer = dict_get_number(d, (char_u *)"buffer");
! nowait = dict_get_number(d, (char_u *)"nowait") != 0;
// mode from the dict is not used

if (buffer)
--- 2665,2680 ----
rhs = replace_termcodes(rhs, &arg_buf,
REPTERM_DO_LT | REPTERM_SPECIAL, NULL);

! noremap = dict_get_number(d, "noremap") ? REMAP_NONE: 0;
! if (dict_get_number(d, "script") != 0)
noremap = REMAP_SCRIPT;
! expr = dict_get_number(d, "expr") != 0;
! silent = dict_get_number(d, "silent") != 0;
! sid = dict_get_number(d, "sid");
! scriptversion = dict_get_number(d, "scriptversion");
! lnum = dict_get_number(d, "lnum");
! buffer = dict_get_number(d, "buffer");
! nowait = dict_get_number(d, "nowait") != 0;
// mode from the dict is not used

if (buffer)
*** ../vim-9.0.0062/src/match.c 2022-06-06 10:05:11.000000000 +0100
--- src/match.c 2022-07-23 09:41:11.969642179 +0100
***************
*** 961,968 ****
}

if (dict_has_key(tv->vval.v_dict, "conceal"))
! *conceal_char = dict_get_string(tv->vval.v_dict,
! (char_u *)"conceal", FALSE);

if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL)
{
--- 961,967 ----
}

if (dict_has_key(tv->vval.v_dict, "conceal"))
! *conceal_char = dict_get_string(tv->vval.v_dict, "conceal", FALSE);

if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL)
{
***************
*** 1161,1176 ****
}
}

! group = dict_get_string(d, (char_u *)"group", TRUE);
! priority = (int)dict_get_number(d, (char_u *)"priority");
! id = (int)dict_get_number(d, (char_u *)"id");
conceal = dict_has_key(d, "conceal")
! ? dict_get_string(d, (char_u *)"conceal", TRUE)
: NULL;
if (i == 0)
{
match_add(win, group,
! dict_get_string(d, (char_u *)"pattern", FALSE),
priority, id, NULL, conceal);
}
else
--- 1160,1175 ----
}
}

! group = dict_get_string(d, "group", TRUE);
! priority = (int)dict_get_number(d, "priority");
! id = (int)dict_get_number(d, "id");
conceal = dict_has_key(d, "conceal")
! ? dict_get_string(d, "conceal", TRUE)
: NULL;
if (i == 0)
{
match_add(win, group,
! dict_get_string(d, "pattern", FALSE),
priority, id, NULL, conceal);
}
else
*** ../vim-9.0.0062/src/popupwin.c 2022-06-16 11:32:51.000000000 +0100
--- src/popupwin.c 2022-07-23 09:48:21.885751550 +0100
***************
*** 433,439 ****
static poppos_T
get_pos_entry(dict_T *d, int give_error)
{
! char_u *str = dict_get_string(d, (char_u *)"pos", FALSE);
int nr;

if (str == NULL)
--- 433,439 ----
static poppos_T
get_pos_entry(dict_T *d, int give_error)
{
! char_u *str = dict_get_string(d, "pos", FALSE);
int nr;

if (str == NULL)
***************
*** 458,470 ****
char_u *str;
dictitem_T *di;

! if ((nr = dict_get_number_def(d, (char_u *)"minwidth", -1)) >= 0)
wp->w_minwidth = nr;
! if ((nr = dict_get_number_def(d, (char_u *)"minheight", -1)) >= 0)
wp->w_minheight = nr;
! if ((nr = dict_get_number_def(d, (char_u *)"maxwidth", -1)) >= 0)
wp->w_maxwidth = nr;
! if ((nr = dict_get_number_def(d, (char_u *)"maxheight", -1)) >= 0)
wp->w_maxheight = nr;

nr = popup_options_one(d, (char_u *)"line");
--- 458,470 ----
char_u *str;
dictitem_T *di;

! if ((nr = dict_get_number_def(d, "minwidth", -1)) >= 0)
wp->w_minwidth = nr;
! if ((nr = dict_get_number_def(d, "minheight", -1)) >= 0)
wp->w_minheight = nr;
! if ((nr = dict_get_number_def(d, "maxwidth", -1)) >= 0)
wp->w_maxwidth = nr;
! if ((nr = dict_get_number_def(d, "maxheight", -1)) >= 0)
wp->w_maxheight = nr;

nr = popup_options_one(d, (char_u *)"line");
***************
*** 475,481 ****
wp->w_wantcol = nr;


! nr = dict_get_bool(d, (char_u *)"fixed", -1);
if (nr != -1)
wp->w_popup_fixed = nr != 0;

--- 475,481 ----
wp->w_wantcol = nr;


! nr = dict_get_bool(d, "fixed", -1);
if (nr != -1)
wp->w_popup_fixed = nr != 0;

***************
*** 486,492 ****
wp->w_popup_pos = ppt;
}

! str = dict_get_string(d, (char_u *)"textprop", FALSE);
if (str != NULL)
{
wp->w_popup_prop_type = 0;
--- 486,492 ----
wp->w_popup_pos = ppt;
}

! str = dict_get_string(d, "textprop", FALSE);
if (str != NULL)
{
wp->w_popup_prop_type = 0;
***************
*** 513,519 ****

di = dict_find(d, (char_u *)"textpropid", -1);
if (di != NULL)
! wp->w_popup_prop_id = dict_get_number(d, (char_u *)"textpropid");
}

/*
--- 513,519 ----

di = dict_find(d, (char_u *)"textpropid", -1);
if (di != NULL)
! wp->w_popup_prop_id = dict_get_number(d, "textpropid");
}

/*
***************
*** 696,722 ****
di = dict_find(dict, (char_u *)"firstline", -1);
if (di != NULL)
{
! wp->w_firstline = dict_get_number(dict, (char_u *)"firstline");
if (wp->w_firstline < 0)
wp->w_firstline = -1;
}

! nr = dict_get_bool(dict, (char_u *)"scrollbar", -1);
if (nr != -1)
wp->w_want_scrollbar = nr;

! str = dict_get_string(dict, (char_u *)"title", FALSE);
if (str != NULL)
{
vim_free(wp->w_popup_title);
wp->w_popup_title = vim_strsave(str);
}

! nr = dict_get_bool(dict, (char_u *)"wrap", -1);
if (nr != -1)
wp->w_p_wrap = nr != 0;

! nr = dict_get_bool(dict, (char_u *)"drag", -1);
if (nr != -1)
{
if (nr)
--- 696,722 ----
di = dict_find(dict, (char_u *)"firstline", -1);
if (di != NULL)
{
! wp->w_firstline = dict_get_number(dict, "firstline");
if (wp->w_firstline < 0)
wp->w_firstline = -1;
}

! nr = dict_get_bool(dict, "scrollbar", -1);
if (nr != -1)
wp->w_want_scrollbar = nr;

! str = dict_get_string(dict, "title", FALSE);
if (str != NULL)
{
vim_free(wp->w_popup_title);
wp->w_popup_title = vim_strsave(str);
}

! nr = dict_get_bool(dict, "wrap", -1);
if (nr != -1)
wp->w_p_wrap = nr != 0;

! nr = dict_get_bool(dict, "drag", -1);
if (nr != -1)
{
if (nr)
***************
*** 724,730 ****
else
wp->w_popup_flags &= ~POPF_DRAG;
}
! nr = dict_get_bool(dict, (char_u *)"dragall", -1);
if (nr != -1)
{
if (nr)
--- 724,730 ----
else
wp->w_popup_flags &= ~POPF_DRAG;
}
! nr = dict_get_bool(dict, "dragall", -1);
if (nr != -1)
{
if (nr)
***************
*** 733,739 ****
wp->w_popup_flags &= ~POPF_DRAGALL;
}

! nr = dict_get_bool(dict, (char_u *)"posinvert", -1);
if (nr != -1)
{
if (nr)
--- 733,739 ----
wp->w_popup_flags &= ~POPF_DRAGALL;
}

! nr = dict_get_bool(dict, "posinvert", -1);
if (nr != -1)
{
if (nr)
***************
*** 742,748 ****
wp->w_popup_flags &= ~POPF_POSINVERT;
}

! nr = dict_get_bool(dict, (char_u *)"resize", -1);
if (nr != -1)
{
if (nr)
--- 742,748 ----
wp->w_popup_flags &= ~POPF_POSINVERT;
}

! nr = dict_get_bool(dict, "resize", -1);
if (nr != -1)
{
if (nr)
***************
*** 775,781 ****
semsg(_(e_invalid_value_for_argument_str_str), "close", tv_get_string(&di->di_tv));
}

! str = dict_get_string(dict, (char_u *)"highlight", FALSE);
if (str != NULL)
{
set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
--- 775,781 ----
semsg(_(e_invalid_value_for_argument_str_str), "close", tv_get_string(&di->di_tv));
}

! str = dict_get_string(dict, "highlight", FALSE);
if (str != NULL)
{
set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
***************
*** 861,867 ****
di = dict_find(dict, (char_u *)"zindex", -1);
if (di != NULL)
{
! wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
if (wp->w_zindex < 1)
wp->w_zindex = POPUPWIN_DEFAULT_ZINDEX;
if (wp->w_zindex > 32000)
--- 861,867 ----
di = dict_find(dict, (char_u *)"zindex", -1);
if (di != NULL)
{
! wp->w_zindex = dict_get_number(dict, "zindex");
if (wp->w_zindex < 1)
wp->w_zindex = POPUPWIN_DEFAULT_ZINDEX;
if (wp->w_zindex > 32000)
***************
*** 903,909 ****

#if defined(FEAT_TIMERS)
// Add timer to close the popup after some time.
! nr = dict_get_number(dict, (char_u *)"time");
if (nr > 0)
popup_add_timeout(wp, nr);
#endif
--- 903,909 ----

#if defined(FEAT_TIMERS)
// Add timer to close the popup after some time.
! nr = dict_get_number(dict, "time");
if (nr > 0)
popup_add_timeout(wp, nr);
#endif
***************
*** 922,928 ****
handle_moved_argument(wp, di, TRUE);
}

! nr = dict_get_bool(dict, (char_u *)"cursorline", -1);
if (nr != -1)
{
if (nr != 0)
--- 922,928 ----
handle_moved_argument(wp, di, TRUE);
}

! nr = dict_get_bool(dict, "cursorline", -1);
if (nr != -1)
{
if (nr != 0)
***************
*** 942,948 ****
set_callback(&wp->w_filter_cb, &callback);
}
}
! nr = dict_get_bool(dict, (char_u *)"mapping", -1);
if (nr != -1)
{
if (nr)
--- 942,948 ----
set_callback(&wp->w_filter_cb, &callback);
}
}
! nr = dict_get_bool(dict, "mapping", -1);
if (nr != -1)
{
if (nr)
***************
*** 951,957 ****
wp->w_popup_flags &= ~POPF_MAPPING;
}

! str = dict_get_string(dict, (char_u *)"filtermode", FALSE);
if (str != NULL)
{
if (STRCMP(str, "a") == 0)
--- 951,957 ----
wp->w_popup_flags &= ~POPF_MAPPING;
}

! str = dict_get_string(dict, "filtermode", FALSE);
if (str != NULL)
{
if (STRCMP(str, "a") == 0)
***************
*** 990,996 ****

apply_general_options(wp, dict);

! nr = dict_get_bool(dict, (char_u *)"hidden", FALSE);
if (nr > 0)
wp->w_popup_flags |= POPF_HIDDEN | POPF_HIDDEN_FORCE;

--- 990,996 ----

apply_general_options(wp, dict);

! nr = dict_get_bool(dict, "hidden", FALSE);
if (nr > 0)
wp->w_popup_flags |= POPF_HIDDEN | POPF_HIDDEN_FORCE;

***************
*** 1051,1058 ****
return;
}
dict = li->li_tv.vval.v_dict;
! p = dict == NULL ? NULL
! : dict_get_string(dict, (char_u *)"text", FALSE);
ml_append_buf(buf, lnum++,
p == NULL ? (char_u *)"" : p, (colnr_T)0, TRUE);
}
--- 1051,1057 ----
return;
}
dict = li->li_tv.vval.v_dict;
! p = dict == NULL ? NULL : dict_get_string(dict, "text", FALSE);
ml_append_buf(buf, lnum++,
p == NULL ? (char_u *)"" : p, (colnr_T)0, TRUE);
}
***************
*** 1086,1092 ****
dict = pli->li_tv.vval.v_dict;
if (dict != NULL)
{
! int col = dict_get_number(dict, (char_u *)"col");

prop_add_common( lnum, col, dict, buf, NULL);
}
--- 1085,1091 ----
dict = pli->li_tv.vval.v_dict;
if (dict != NULL)
{
! int col = dict_get_number(dict, "col");

prop_add_common( lnum, col, dict, buf, NULL);
}
***************
*** 1975,1981 ****
if (d != NULL)
{
if (dict_has_key(d, "tabpage"))
! tabnr = (int)dict_get_number(d, (char_u *)"tabpage");
else if (type == TYPE_NOTIFICATION)
tabnr = -1; // notifications are global by default
else
--- 1974,1980 ----
if (d != NULL)
{
if (dict_has_key(d, "tabpage"))
! tabnr = (int)dict_get_number(d, "tabpage");
else if (type == TYPE_NOTIFICATION)
tabnr = -1; // notifications are global by default
else
*** ../vim-9.0.0062/src/quickfix.c 2022-06-05 13:46:55.000000000 +0100
--- src/quickfix.c 2022-07-23 09:48:34.249755004 +0100
***************
*** 7209,7226 ****
if (first_entry)
did_bufnr_emsg = FALSE;

! filename = dict_get_string(d, (char_u *)"filename", TRUE);
! module = dict_get_string(d, (char_u *)"module", TRUE);
! bufnum = (int)dict_get_number(d, (char_u *)"bufnr");
! lnum = (int)dict_get_number(d, (char_u *)"lnum");
! end_lnum = (int)dict_get_number(d, (char_u *)"end_lnum");
! col = (int)dict_get_number(d, (char_u *)"col");
! end_col = (int)dict_get_number(d, (char_u *)"end_col");
! vcol = (int)dict_get_number(d, (char_u *)"vcol");
! nr = (int)dict_get_number(d, (char_u *)"nr");
! type = dict_get_string(d, (char_u *)"type", TRUE);
! pattern = dict_get_string(d, (char_u *)"pattern", TRUE);
! text = dict_get_string(d, (char_u *)"text", TRUE);
if (text == NULL)
text = vim_strsave((char_u *)"");

--- 7209,7226 ----
if (first_entry)
did_bufnr_emsg = FALSE;

! filename = dict_get_string(d, "filename", TRUE);
! module = dict_get_string(d, "module", TRUE);
! bufnum = (int)dict_get_number(d, "bufnr");
! lnum = (int)dict_get_number(d, "lnum");
! end_lnum = (int)dict_get_number(d, "end_lnum");
! col = (int)dict_get_number(d, "col");
! end_col = (int)dict_get_number(d, "end_col");
! vcol = (int)dict_get_number(d, "vcol");
! nr = (int)dict_get_number(d, "nr");
! type = dict_get_string(d, "type", TRUE);
! pattern = dict_get_string(d, "pattern", TRUE);
! text = dict_get_string(d, "text", TRUE);
if (text == NULL)
text = vim_strsave((char_u *)"");

***************
*** 7243,7249 ****

// If the 'valid' field is present it overrules the detected value.
if (dict_has_key(d, "valid"))
! valid = (int)dict_get_bool(d, (char_u *)"valid", FALSE);

status = qf_add_entry(qfl,
NULL, // dir
--- 7243,7249 ----

// If the 'valid' field is present it overrules the detected value.
if (dict_has_key(d, "valid"))
! valid = (int)dict_get_bool(d, "valid", FALSE);

status = qf_add_entry(qfl,
NULL, // dir
***************
*** 7419,7425 ****
return FAIL;

vim_free(qfl->qf_title);
! qfl->qf_title = dict_get_string(what, (char_u *)"title", TRUE);
if (qf_idx == qi->qf_curlist)
qf_update_win_titlevar(qi);

--- 7419,7425 ----
return FAIL;

vim_free(qfl->qf_title);
! qfl->qf_title = dict_get_string(what, "title", TRUE);
if (qf_idx == qi->qf_curlist)
qf_update_win_titlevar(qi);

*** ../vim-9.0.0062/src/search.c 2022-07-06 13:31:25.299369947 +0100
--- src/search.c 2022-07-23 09:49:57.337778533 +0100
***************
*** 4115,4121 ****
if (error)
return;
}
! recompute = dict_get_bool(dict, (char_u *)"recompute", recompute);
di = dict_find(dict, (char_u *)"pattern", -1);
if (di != NULL)
{
--- 4115,4121 ----
if (error)
return;
}
! recompute = dict_get_bool(dict, "recompute", recompute);
di = dict_find(dict, (char_u *)"pattern", -1);
if (di != NULL)
{
***************
*** 4645,4651 ****
// For a dict, either use the specified key to lookup the string or
// use the specified callback function to get the string.
if (key != NULL)
! itemstr = dict_get_string(li->li_tv.vval.v_dict, key, FALSE);
else
{
typval_T argv[2];
--- 4645,4652 ----
// For a dict, either use the specified key to lookup the string or
// use the specified callback function to get the string.
if (key != NULL)
! itemstr = dict_get_string(li->li_tv.vval.v_dict,
! (char *)key, FALSE);
else
{
typval_T argv[2];
*** ../vim-9.0.0062/src/sign.c 2022-06-16 11:34:05.000000000 +0100
--- src/sign.c 2022-07-23 09:42:27.637659479 +0100
***************
*** 2267,2273 ****
{
if (dict == NULL)
return -1;
! name = dict_get_string(dict, (char_u *)"name", TRUE);
}
else
name = vim_strsave(name_arg);
--- 2267,2273 ----
{
if (dict == NULL)
return -1;
! name = dict_get_string(dict, "name", TRUE);
}
else
name = vim_strsave(name_arg);
***************
*** 2275,2286 ****
goto cleanup;
if (dict != NULL)
{
! icon = dict_get_string(dict, (char_u *)"icon", TRUE);
! linehl = dict_get_string(dict, (char_u *)"linehl", TRUE);
! text = dict_get_string(dict, (char_u *)"text", TRUE);
! texthl = dict_get_string(dict, (char_u *)"texthl", TRUE);
! culhl = dict_get_string(dict, (char_u *)"culhl", TRUE);
! numhl = dict_get_string(dict, (char_u *)"numhl", TRUE);
}

if (sign_define_by_name(name, icon, linehl, text, texthl, culhl, numhl) == OK)
--- 2275,2286 ----
goto cleanup;
if (dict != NULL)
{
! icon = dict_get_string(dict, "icon", TRUE);
! linehl = dict_get_string(dict, "linehl", TRUE);
! text = dict_get_string(dict, "text", TRUE);
! texthl = dict_get_string(dict, "texthl", TRUE);
! culhl = dict_get_string(dict, "culhl", TRUE);
! numhl = dict_get_string(dict, "numhl", TRUE);
}

if (sign_define_by_name(name, icon, linehl, text, texthl, culhl, numhl) == OK)
***************
*** 2765,2771 ****
if (group_tv != NULL)
group = tv_get_string(group_tv);
else
! group = dict_get_string(dict, (char_u *)"group", FALSE);
if (group != NULL)
{
if (group[0] == '\0') // global sign group
--- 2765,2771 ----
if (group_tv != NULL)
group = tv_get_string(group_tv);
else
! group = dict_get_string(dict, "group", FALSE);
if (group != NULL)
{
if (group[0] == '\0') // global sign group
***************
*** 2788,2794 ****
}
if (dict_has_key(dict, "id"))
{
! sign_id = dict_get_number(dict, (char_u *)"id");
if (sign_id <= 0)
{
emsg(_(e_invalid_argument));
--- 2788,2794 ----
}
if (dict_has_key(dict, "id"))
{
! sign_id = dict_get_number(dict, "id");
if (sign_id <= 0)
{
emsg(_(e_invalid_argument));
*** ../vim-9.0.0062/src/tag.c 2022-05-09 19:14:28.000000000 +0100
--- src/tag.c 2022-07-23 09:42:38.961662156 +0100
***************
*** 4589,4605 ****
continue;
if (list2fpos(&di->di_tv, &mark, &fnum, NULL, FALSE) != OK)
continue;
! if ((tagname =
! dict_get_string(itemdict, (char_u *)"tagname", TRUE)) == NULL)
continue;

if (mark.col > 0)
mark.col--;
tagstack_push_item(wp, tagname,
! (int)dict_get_number(itemdict, (char_u *)"bufnr"),
! (int)dict_get_number(itemdict, (char_u *)"matchnr") - 1,
mark, fnum,
! dict_get_string(itemdict, (char_u *)"user_data", TRUE));
}
}

--- 4589,4604 ----
continue;
if (list2fpos(&di->di_tv, &mark, &fnum, NULL, FALSE) != OK)
continue;
! if ((tagname = dict_get_string(itemdict, "tagname", TRUE)) == NULL)
continue;

if (mark.col > 0)
mark.col--;
tagstack_push_item(wp, tagname,
! (int)dict_get_number(itemdict, "bufnr"),
! (int)dict_get_number(itemdict, "matchnr") - 1,
mark, fnum,
! dict_get_string(itemdict, "user_data", TRUE));
}
}

*** ../vim-9.0.0062/src/terminal.c 2022-07-04 17:46:18.562074259 +0100
--- src/terminal.c 2022-07-23 09:43:14.433670682 +0100
***************
*** 4338,4346 ****
dict_T *dict = opt_item->li_tv.vval.v_dict;
char_u *p;

! p = dict_get_string(dict, (char_u *)"ff", FALSE);
if (p == NULL)
! p = dict_get_string(dict, (char_u *)"fileformat", FALSE);
if (p != NULL)
{
if (check_ff_value(p) == FAIL)
--- 4338,4346 ----
dict_T *dict = opt_item->li_tv.vval.v_dict;
char_u *p;

! p = dict_get_string(dict, "ff", FALSE);
if (p == NULL)
! p = dict_get_string(dict, "fileformat", FALSE);
if (p != NULL)
{
if (check_ff_value(p) == FAIL)
***************
*** 4348,4356 ****
else
ea.force_ff = *p;
}
! p = dict_get_string(dict, (char_u *)"enc", FALSE);
if (p == NULL)
! p = dict_get_string(dict, (char_u *)"encoding", FALSE);
if (p != NULL)
{
ea.cmd = alloc(STRLEN(p) + 12);
--- 4348,4356 ----
else
ea.force_ff = *p;
}
! p = dict_get_string(dict, "enc", FALSE);
if (p == NULL)
! p = dict_get_string(dict, "encoding", FALSE);
if (p != NULL)
{
ea.cmd = alloc(STRLEN(p) + 12);
***************
*** 4362,4368 ****
}
}

! p = dict_get_string(dict, (char_u *)"bad", FALSE);
if (p != NULL)
get_bad_opt(p, &ea);

--- 4362,4368 ----
}
}

! p = dict_get_string(dict, "bad", FALSE);
if (p != NULL)
get_bad_opt(p, &ea);

***************
*** 4995,5002 ****
d = argvars[2].vval.v_dict;
if (d != NULL)
{
! max_height = dict_get_number(d, (char_u *)"rows");
! max_width = dict_get_number(d, (char_u *)"columns");
}
}

--- 4995,5002 ----
d = argvars[2].vval.v_dict;
if (d != NULL)
{
! max_height = dict_get_number(d, "rows");
! max_width = dict_get_number(d, "columns");
}
}

*** ../vim-9.0.0062/src/testing.c 2022-07-23 05:04:07.580839529 +0100
--- src/testing.c 2022-07-23 09:48:57.677761587 +0100
***************
*** 1295,1304 ****
|| !dict_has_key(args, "modifiers"))
return FALSE;

! (void)dict_get_tv(args, (char_u *)"files", &t);
! row = (int)dict_get_number(args, (char_u *)"row");
! col = (int)dict_get_number(args, (char_u *)"col");
! mods = (int)dict_get_number(args, (char_u *)"modifiers");

if (t.v_type != VAR_LIST || list_len(t.vval.v_list) == 0)
return FALSE;
--- 1295,1304 ----
|| !dict_has_key(args, "modifiers"))
return FALSE;

! (void)dict_get_tv(args, "files", &t);
! row = (int)dict_get_number(args, "row");
! col = (int)dict_get_number(args, "col");
! mods = (int)dict_get_number(args, "modifiers");

if (t.v_type != VAR_LIST || list_len(t.vval.v_list) == 0)
return FALSE;
***************
*** 1351,1360 ****
|| !dict_has_key(args, "forward"))
return FALSE;

! find_text = dict_get_string(args, (char_u *)"find_text", TRUE);
! repl_text = dict_get_string(args, (char_u *)"repl_text", TRUE);
! flags = (int)dict_get_number(args, (char_u *)"flags");
! forward = (int)dict_get_number(args, (char_u *)"forward");

retval = gui_do_findrepl(flags, find_text, repl_text, forward);
vim_free(find_text);
--- 1351,1360 ----
|| !dict_has_key(args, "forward"))
return FALSE;

! find_text = dict_get_string(args, "find_text", TRUE);
! repl_text = dict_get_string(args, "repl_text", TRUE);
! flags = (int)dict_get_number(args, "flags");
! forward = (int)dict_get_number(args, "forward");

retval = gui_do_findrepl(flags, find_text, repl_text, forward);
vim_free(find_text);
***************
*** 1379,1397 ****
return FALSE;

// Note: "move" is optional, requires fewer arguments
! move = (int)dict_get_bool(args, (char_u *)"move", FALSE);

if (!move && (!dict_has_key(args, "button")
|| !dict_has_key(args, "multiclick")
|| !dict_has_key(args, "modifiers")))
return FALSE;

! row = (int)dict_get_number(args, (char_u *)"row");
! col = (int)dict_get_number(args, (char_u *)"col");

if (move)
{
! if (dict_get_bool(args, (char_u *)"cell", FALSE))
{
// click in the middle of the character cell
row = row * gui.char_height + gui.char_height / 2;
--- 1379,1397 ----
return FALSE;

// Note: "move" is optional, requires fewer arguments
! move = (int)dict_get_bool(args, "move", FALSE);

if (!move && (!dict_has_key(args, "button")
|| !dict_has_key(args, "multiclick")
|| !dict_has_key(args, "modifiers")))
return FALSE;

! row = (int)dict_get_number(args, "row");
! col = (int)dict_get_number(args, "col");

if (move)
{
! if (dict_get_bool(args, "cell", FALSE))
{
// click in the middle of the character cell
row = row * gui.char_height + gui.char_height / 2;
***************
*** 1401,1409 ****
}
else
{
! button = (int)dict_get_number(args, (char_u *)"button");
! repeated_click = (int)dict_get_number(args, (char_u *)"multiclick");
! mods = (int)dict_get_number(args, (char_u *)"modifiers");

// Reset the scroll values to known values.
// XXX: Remove this when/if the scroll step is made configurable.
--- 1401,1409 ----
}
else
{
! button = (int)dict_get_number(args, "button");
! repeated_click = (int)dict_get_number(args, "multiclick");
! mods = (int)dict_get_number(args, "modifiers");

// Reset the scroll values to known values.
// XXX: Remove this when/if the scroll step is made configurable.
***************
*** 1430,1438 ****
|| !dict_has_key(args, "dragging"))
return FALSE;

! which = dict_get_string(args, (char_u *)"which", FALSE);
! value = (long)dict_get_number(args, (char_u *)"value");
! dragging = (int)dict_get_number(args, (char_u *)"dragging");

if (STRCMP(which, "left") == 0)
sb = &curwin->w_scrollbars[SBAR_LEFT];
--- 1430,1438 ----
|| !dict_has_key(args, "dragging"))
return FALSE;

! which = dict_get_string(args, "which", FALSE);
! value = (long)dict_get_number(args, "value");
! dragging = (int)dict_get_number(args, "dragging");

if (STRCMP(which, "left") == 0)
sb = &curwin->w_scrollbars[SBAR_LEFT];
***************
*** 1463,1469 ****
if (!dict_has_key(args, "tabnr"))
return FALSE;

! tabnr = (int)dict_get_number(args, (char_u *)"tabnr");

return send_tabline_event(tabnr);
# else
--- 1463,1469 ----
if (!dict_has_key(args, "tabnr"))
return FALSE;

! tabnr = (int)dict_get_number(args, "tabnr");

return send_tabline_event(tabnr);
# else
***************
*** 1482,1489 ****
|| !dict_has_key(args, "item"))
return FALSE;

! tabnr = (int)dict_get_number(args, (char_u *)"tabnr");
! item = (int)dict_get_number(args, (char_u *)"item");

send_tabline_menu_event(tabnr, item);
# endif
--- 1482,1489 ----
|| !dict_has_key(args, "item"))
return FALSE;

! tabnr = (int)dict_get_number(args, "tabnr");
! item = (int)dict_get_number(args, "item");

send_tabline_menu_event(tabnr, item);
# endif
*** ../vim-9.0.0062/src/textprop.c 2022-06-30 22:13:56.204846337 +0100
--- src/textprop.c 2022-07-23 09:49:13.345766009 +0100
***************
*** 336,345 ****
emsg(_(e_missing_property_type_name));
return;
}
! type_name = dict_get_string(dict, (char_u *)"type", FALSE);

if (dict_has_key(dict, "id"))
! id = dict_get_number(dict, (char_u *)"id");

if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL)
return;
--- 336,345 ----
emsg(_(e_missing_property_type_name));
return;
}
! type_name = dict_get_string(dict, "type", FALSE);

if (dict_has_key(dict, "id"))
! id = dict_get_number(dict, "id");

if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL)
return;
***************
*** 399,409 ****
emsg(_(e_missing_property_type_name));
return;
}
! type_name = dict_get_string(dict, (char_u *)"type", FALSE);

if (dict_has_key(dict, "end_lnum"))
{
! end_lnum = dict_get_number(dict, (char_u *)"end_lnum");
if (end_lnum < start_lnum)
{
semsg(_(e_invalid_value_for_argument_str), "end_lnum");
--- 399,409 ----
emsg(_(e_missing_property_type_name));
return;
}
! type_name = dict_get_string(dict, "type", FALSE);

if (dict_has_key(dict, "end_lnum"))
{
! end_lnum = dict_get_number(dict, "end_lnum");
if (end_lnum < start_lnum)
{
semsg(_(e_invalid_value_for_argument_str), "end_lnum");
***************
*** 415,421 ****

if (dict_has_key(dict, "length"))
{
! long length = dict_get_number(dict, (char_u *)"length");

if (length < 0 || end_lnum > start_lnum)
{
--- 415,421 ----

if (dict_has_key(dict, "length"))
{
! long length = dict_get_number(dict, "length");

if (length < 0 || end_lnum > start_lnum)
{
***************
*** 426,432 ****
}
else if (dict_has_key(dict, "end_col"))
{
! end_col = dict_get_number(dict, (char_u *)"end_col");
if (end_col <= 0)
{
semsg(_(e_invalid_value_for_argument_str), "end_col");
--- 426,432 ----
}
else if (dict_has_key(dict, "end_col"))
{
! end_col = dict_get_number(dict, "end_col");
if (end_col <= 0)
{
semsg(_(e_invalid_value_for_argument_str), "end_col");
***************
*** 439,445 ****
end_col = 1;

if (dict_has_key(dict, "id"))
! id = dict_get_number(dict, (char_u *)"id");

if (dict_arg != NULL && get_bufnr_from_arg(dict_arg, &buf) == FAIL)
return;
--- 439,445 ----
end_col = 1;

if (dict_has_key(dict, "id"))
! id = dict_get_number(dict, "id");

if (dict_arg != NULL && get_bufnr_from_arg(dict_arg, &buf) == FAIL)
return;
***************
*** 784,806 ****
return;
}

! skipstart = dict_get_bool(dict, (char_u *)"skipstart", 0);

if (dict_has_key(dict, "id"))
{
! id = dict_get_number(dict, (char_u *)"id");
id_found = TRUE;
}
if (dict_has_key(dict, "type"))
{
! char_u *name = dict_get_string(dict, (char_u *)"type", FALSE);
proptype_T *type = lookup_prop_type(name, buf);

if (type == NULL)
return;
type_id = type->pt_id;
}
! both = dict_get_bool(dict, (char_u *)"both", FALSE);
if (!id_found && type_id == -1)
{
emsg(_(e_need_at_least_one_of_id_or_type));
--- 784,806 ----
return;
}

! skipstart = dict_get_bool(dict, "skipstart", 0);

if (dict_has_key(dict, "id"))
{
! id = dict_get_number(dict, "id");
id_found = TRUE;
}
if (dict_has_key(dict, "type"))
{
! char_u *name = dict_get_string(dict, "type", FALSE);
proptype_T *type = lookup_prop_type(name, buf);

if (type == NULL)
return;
type_id = type->pt_id;
}
! both = dict_get_bool(dict, "both", FALSE);
if (!id_found && type_id == -1)
{
emsg(_(e_need_at_least_one_of_id_or_type));
***************
*** 1213,1232 ****
if (buf->b_ml.ml_mfp == NULL)
return;

! do_all = dict_get_bool(dict, (char_u *)"all", FALSE);

if (dict_has_key(dict, "id"))
! id = dict_get_number(dict, (char_u *)"id");
if (dict_has_key(dict, "type"))
{
! char_u *name = dict_get_string(dict, (char_u *)"type", FALSE);
proptype_T *type = lookup_prop_type(name, buf);

if (type == NULL)
return;
type_id = type->pt_id;
}
! both = dict_get_bool(dict, (char_u *)"both", FALSE);

if (id == -1 && type_id == -1)
{
--- 1213,1232 ----
if (buf->b_ml.ml_mfp == NULL)
return;

! do_all = dict_get_bool(dict, "all", FALSE);

if (dict_has_key(dict, "id"))
! id = dict_get_number(dict, "id");
if (dict_has_key(dict, "type"))
{
! char_u *name = dict_get_string(dict, "type", FALSE);
proptype_T *type = lookup_prop_type(name, buf);

if (type == NULL)
return;
type_id = type->pt_id;
}
! both = dict_get_bool(dict, "both", FALSE);

if (id == -1 && type_id == -1)
{
***************
*** 1383,1389 ****
char_u *highlight;
int hl_id = 0;

! highlight = dict_get_string(dict, (char_u *)"highlight", FALSE);
if (highlight != NULL && *highlight != NUL)
hl_id = syn_name2id(highlight);
if (hl_id <= 0)
--- 1383,1389 ----
char_u *highlight;
int hl_id = 0;

! highlight = dict_get_string(dict, "highlight", FALSE);
if (highlight != NULL && *highlight != NUL)
hl_id = syn_name2id(highlight);
if (hl_id <= 0)
*** ../vim-9.0.0062/src/time.c 2022-06-16 11:34:51.000000000 +0100
--- src/time.c 2022-07-23 09:37:12.417595722 +0100
***************
*** 863,869 ****
return;
}
if (dict_has_key(dict, "repeat"))
! repeat = dict_get_number(dict, (char_u *)"repeat");
}

callback = get_callback(&argvars[1]);
--- 863,869 ----
return;
}
if (dict_has_key(dict, "repeat"))
! repeat = dict_get_number(dict, "repeat");
}

callback = get_callback(&argvars[1]);
*** ../vim-9.0.0062/src/version.c 2022-07-23 09:22:42.409420798 +0100
--- src/version.c 2022-07-23 09:51:20.625802615 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 63,
/**/

--
A meeting is an event at which the minutes are kept and the hours are lost.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages