eval: Move remaining get_tv_string* functions to eval/typval.c

This commit is contained in:
ZyX
2016-09-04 02:25:24 +03:00
parent 50ebd1dff5
commit c8e63a8db8
26 changed files with 1244 additions and 1055 deletions

View File

@@ -3419,15 +3419,18 @@ static char_u *set_chars_option(char_u **varp)
&& p[len] == ':'
&& p[len + 1] != NUL) {
s = p + len + 1;
c1 = mb_ptr2char_adv(&s);
if (mb_char2cells(c1) > 1)
c1 = mb_ptr2char_adv((const char_u **)&s);
if (mb_char2cells(c1) > 1) {
continue;
}
if (tab[i].cp == &lcs_tab2) {
if (*s == NUL)
if (*s == NUL) {
continue;
c2 = mb_ptr2char_adv(&s);
if (mb_char2cells(c2) > 1)
}
c2 = mb_ptr2char_adv((const char_u **)&s);
if (mb_char2cells(c2) > 1) {
continue;
}
}
if (*s == ',' || *s == NUL) {
if (round) {
@@ -6887,8 +6890,8 @@ void set_fileformat(int eol_style, int opt_flags)
need_maketitle = true; // Set window title later.
}
/// Skip to next part of an option argument: Skip space and comma.
char_u *skip_to_option_part(char_u *p)
/// Skip to next part of an option argument: skip space and comma
char_u *skip_to_option_part(const char_u *p)
{
if (*p == ',') {
p++;
@@ -6896,7 +6899,7 @@ char_u *skip_to_option_part(char_u *p)
while (*p == ' ') {
p++;
}
return p;
return (char_u *)p;
}
/// Isolate one part of a string option separated by `sep_chars`.