Mercurial > vim
comparison src/list.c @ 15211:de63593896b3 v8.1.0615
patch 8.1.0615: get_tv function names are not consistent
commit https://github.com/vim/vim/commit/d155d7a8519987361169459b8d464ae1caef5e9c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 21 16:04:21 2018 +0100
patch 8.1.0615: get_tv function names are not consistent
Problem: Get_tv function names are not consistent.
Solution: Rename to tv_get.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 Dec 2018 16:15:06 +0100 |
parents | 3a99b2e6d136 |
children | 55ccc2d353bd |
comparison
equal
deleted
inserted
replaced
15210:fbb2936c39b6 | 15211:de63593896b3 |
---|---|
401 { | 401 { |
402 if (errorp != NULL) | 402 if (errorp != NULL) |
403 *errorp = TRUE; | 403 *errorp = TRUE; |
404 return -1L; | 404 return -1L; |
405 } | 405 } |
406 return (long)get_tv_number_chk(&li->li_tv, errorp); | 406 return (long)tv_get_number_chk(&li->li_tv, errorp); |
407 } | 407 } |
408 | 408 |
409 /* | 409 /* |
410 * Get list item "l[idx - 1]" as a string. Returns NULL for failure. | 410 * Get list item "l[idx - 1]" as a string. Returns NULL for failure. |
411 */ | 411 */ |
418 if (li == NULL) | 418 if (li == NULL) |
419 { | 419 { |
420 EMSGN(_(e_listidx), idx); | 420 EMSGN(_(e_listidx), idx); |
421 return NULL; | 421 return NULL; |
422 } | 422 } |
423 return get_tv_string(&li->li_tv); | 423 return tv_get_string(&li->li_tv); |
424 } | 424 } |
425 | 425 |
426 /* | 426 /* |
427 * Locate "item" list "l" and return its index. | 427 * Locate "item" list "l" and return its index. |
428 * Returns -1 when "item" is not in the list. | 428 * Returns -1 when "item" is not in the list. |
947 int ret = OK; | 947 int ret = OK; |
948 char_u *s; | 948 char_u *s; |
949 | 949 |
950 for (li = list->lv_first; li != NULL; li = li->li_next) | 950 for (li = list->lv_first; li != NULL; li = li->li_next) |
951 { | 951 { |
952 for (s = get_tv_string(&li->li_tv); *s != NUL; ++s) | 952 for (s = tv_get_string(&li->li_tv); *s != NUL; ++s) |
953 { | 953 { |
954 if (*s == '\n') | 954 if (*s == '\n') |
955 c = putc(NUL, fd); | 955 c = putc(NUL, fd); |
956 else | 956 else |
957 c = putc(*s, fd); | 957 c = putc(*s, fd); |