colnr_T len = -1;
if (line != NULL)
- len = STRLEN(line);
+ len = (colnr_T)STRLEN(line);
return ml_replace_len(lnum, line, len, copy);
}
size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
// Need to copy over text properties, stored after the text.
- newline = alloc(len + 1 + textproplen);
+ newline = alloc(len + 1 + (int)textproplen);
if (newline != NULL)
{
mch_memmove(newline, line, len + 1);
mch_memmove(newline + len + 1, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen);
vim_free(line);
line = newline;
- len += textproplen;
+ len += (colnr_T)textproplen;
}
}
}
}
if (proplen > 0)
*props = text + textlen;
- return proplen / sizeof(textprop_T);
+ return (int)(proplen / sizeof(textprop_T));
}
static proptype_T *
buf->b_ml.ml_line_ptr = newtext;
buf->b_ml.ml_flags |= ML_LINE_DIRTY;
}
- buf->b_ml.ml_line_len = len;
+ buf->b_ml.ml_line_len = (int)len;
}
}
redraw_buf_later(buf, NOT_VALID);
{
char_u *text = ml_get_buf(buf, lnum, FALSE);
size_t textlen = STRLEN(text) + 1;
- int count = (buf->b_ml.ml_line_len - textlen)
- / sizeof(textprop_T);
+ int count = (int)((buf->b_ml.ml_line_len - textlen)
+ / sizeof(textprop_T));
int i;
textprop_T prop;
proptype_T *pt;
EMSG2(_("E969: Property type %s already defined"), name);
return;
}
- prop = (proptype_T *)alloc_clear(sizeof(proptype_T) + STRLEN(name));
+ prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
if (prop == NULL)
return;
STRCPY(prop->pt_name, name);