Mercurial > vim
comparison src/quickfix.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 | e95e8b356a65 |
children | a413374825dd |
comparison
equal
deleted
inserted
replaced
15145:14de49f92ace | 15146:7903dce131d4 |
---|---|
6256 long lnum; | 6256 long lnum; |
6257 | 6257 |
6258 if (first_entry) | 6258 if (first_entry) |
6259 did_bufnr_emsg = FALSE; | 6259 did_bufnr_emsg = FALSE; |
6260 | 6260 |
6261 filename = get_dict_string(d, (char_u *)"filename", TRUE); | 6261 filename = dict_get_string(d, (char_u *)"filename", TRUE); |
6262 module = get_dict_string(d, (char_u *)"module", TRUE); | 6262 module = dict_get_string(d, (char_u *)"module", TRUE); |
6263 bufnum = (int)get_dict_number(d, (char_u *)"bufnr"); | 6263 bufnum = (int)dict_get_number(d, (char_u *)"bufnr"); |
6264 lnum = (int)get_dict_number(d, (char_u *)"lnum"); | 6264 lnum = (int)dict_get_number(d, (char_u *)"lnum"); |
6265 col = (int)get_dict_number(d, (char_u *)"col"); | 6265 col = (int)dict_get_number(d, (char_u *)"col"); |
6266 vcol = (int)get_dict_number(d, (char_u *)"vcol"); | 6266 vcol = (int)dict_get_number(d, (char_u *)"vcol"); |
6267 nr = (int)get_dict_number(d, (char_u *)"nr"); | 6267 nr = (int)dict_get_number(d, (char_u *)"nr"); |
6268 type = get_dict_string(d, (char_u *)"type", TRUE); | 6268 type = dict_get_string(d, (char_u *)"type", TRUE); |
6269 pattern = get_dict_string(d, (char_u *)"pattern", TRUE); | 6269 pattern = dict_get_string(d, (char_u *)"pattern", TRUE); |
6270 text = get_dict_string(d, (char_u *)"text", TRUE); | 6270 text = dict_get_string(d, (char_u *)"text", TRUE); |
6271 if (text == NULL) | 6271 if (text == NULL) |
6272 text = vim_strsave((char_u *)""); | 6272 text = vim_strsave((char_u *)""); |
6273 | 6273 |
6274 valid = TRUE; | 6274 valid = TRUE; |
6275 if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL)) | 6275 if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL)) |
6288 bufnum = 0; | 6288 bufnum = 0; |
6289 } | 6289 } |
6290 | 6290 |
6291 // If the 'valid' field is present it overrules the detected value. | 6291 // If the 'valid' field is present it overrules the detected value. |
6292 if ((dict_find(d, (char_u *)"valid", -1)) != NULL) | 6292 if ((dict_find(d, (char_u *)"valid", -1)) != NULL) |
6293 valid = (int)get_dict_number(d, (char_u *)"valid"); | 6293 valid = (int)dict_get_number(d, (char_u *)"valid"); |
6294 | 6294 |
6295 status = qf_add_entry(qi, | 6295 status = qf_add_entry(qi, |
6296 qf_idx, | 6296 qf_idx, |
6297 NULL, // dir | 6297 NULL, // dir |
6298 filename, | 6298 filename, |
6454 | 6454 |
6455 if (di->di_tv.v_type != VAR_STRING) | 6455 if (di->di_tv.v_type != VAR_STRING) |
6456 return FAIL; | 6456 return FAIL; |
6457 | 6457 |
6458 vim_free(qfl->qf_title); | 6458 vim_free(qfl->qf_title); |
6459 qfl->qf_title = get_dict_string(what, (char_u *)"title", TRUE); | 6459 qfl->qf_title = dict_get_string(what, (char_u *)"title", TRUE); |
6460 if (qf_idx == qi->qf_curlist) | 6460 if (qf_idx == qi->qf_curlist) |
6461 qf_update_win_titlevar(qi); | 6461 qf_update_win_titlevar(qi); |
6462 | 6462 |
6463 return OK; | 6463 return OK; |
6464 } | 6464 } |