{
for (lnum = start->lnum + 1; lnum < end->lnum; lnum++)
{
+ int linelen;
+
line = ml_get(lnum);
- if (ga_grow(&ga, ml_get_len(lnum) + 2) != OK)
+ linelen = (int)ml_get_len(lnum);
+ if (ga_grow(&ga, linelen + 2) != OK)
return FAIL;
- ga_concat(&ga, line);
+ ga_concat_len(&ga, line, linelen);
if (exacttext)
ga_concat_len(&ga, (char_u *)"\\n", 2);
else
if (first)
first = FALSE;
else
- ga_concat(&ga, (char_u *)", ");
+ ga_concat_len(&ga, (char_u *)", ", 2);
tofree = string_quote(hi->hi_key, FALSE);
if (tofree != NULL)
ga_concat(&ga, tofree);
vim_free(tofree);
}
- ga_concat(&ga, (char_u *)": ");
+ ga_concat_len(&ga, (char_u *)": ", 2);
s = echo_string_core(&HI2DI(hi)->di_tv, &tofree, numbuf, copyID,
FALSE, restore_copyID, TRUE);
if (s != NULL)
}
else if (c1 == K_SNR)
{
- ga_concat(&line_ga, (char_u *)"<SNR>");
+ ga_concat_len(&line_ga, (char_u *)"<SNR>", 5);
}
else
{
if (WindowValid(dpy, (Window)w))
{
ga_concat(&ga, p + 1);
- ga_concat(&ga, (char_u *)"\n");
+ ga_concat_len(&ga, (char_u *)"\n", 1);
}
while (*p != 0)
p++;
ga_concat(&reply,
(char_u *)_(e_invalid_expression_received));
ga_append(&reply, 0);
- ga_concat(&reply, (char_u *)"-c 1");
+ ga_concat_len(&reply, (char_u *)"-c 1", 4);
}
ga_append(&reply, NUL);
(void)AppendPropCarefully(dpy, resWindow, commProperty,
for (i = 0; i < argc; ++i)
{
if (i > 0)
- ga_concat(&ga, (char_u *)" ");
+ ga_concat_len(&ga, (char_u *)" ", 2);
ga_concat(&ga, (char_u *)argv[i]);
}
ga_append(&ga, NUL);
// Add the name to the list
ga_concat(ga, (char_u *)server);
- ga_concat(ga, (char_u *)"\n");
+ ga_concat_len(ga, (char_u *)"\n", 1);
return TRUE;
}
// grow indent for state->out
indent->ga_len -= 1;
if (state->out1)
- ga_concat(indent, (char_u *)"| ");
+ ga_concat_len(indent, (char_u *)"| ", 2);
else
- ga_concat(indent, (char_u *)" ");
+ ga_concat_len(indent, (char_u *)" ", 2);
ga_append(indent, NUL);
nfa_print_state2(debugf, state->out, indent);
// replace last part of indent for state->out1
indent->ga_len -= 3;
- ga_concat(indent, (char_u *)" ");
+ ga_concat_len(indent, (char_u *)" ", 2);
ga_append(indent, NUL);
nfa_print_state2(debugf, state->out1, indent);
ga_concat(&ga, p + 1);
else if (*p == '|')
{
- ga_concat(&ga, (char_u *)" ");
+ ga_concat_len(&ga, (char_u *)" ", 1);
ga_concat(&ga, p);
}
for (;;)
ga_concat(&ga, p + 1);
else
{
- ga_concat(&ga, (char_u *)" ");
+ ga_concat_len(&ga, (char_u *)" ", 1);
ga_concat(&ga, p);
}
}
// For a :def function "python << EOF" concatenates all the lines,
// to be used for the instruction later.
ga_concat(&heredoc_ga, theline);
- ga_concat(&heredoc_ga, (char_u *)"\n");
+ ga_concat_len(&heredoc_ga, (char_u *)"\n", 1);
p = vim_strnsave((char_u *)"", 0);
}
else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2030,
/**/
2029,
/**/
if (p != NULL)
{
ga_concat(&ga, p);
- ga_concat(&ga, (char_u *)" ");
+ ga_concat_len(&ga, (char_u *)" ", 1);
vim_free(p);
}
s = e + 1;