summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2009-05-13 16:56:33 +0000
committervimboss <devnull@localhost>2009-05-13 16:56:33 +0000
commitf27a19bd868e3181c48a63684dbbb3f6a5fc3ff9 (patch)
treec08cc30b9a1fc6d2f5a0f9434af0de6cc9b1f1ab
parentb64d3d1884706e083d25b50bc2b36f4189f30c0d (diff)
downloadvim-f27a19bd868e3181c48a63684dbbb3f6a5fc3ff9.tar.gz
updated for version 7.2-169v7.2.169v7-2-169
-rw-r--r--src/cleanlint.vim15
-rw-r--r--src/diff.c19
-rw-r--r--src/edit.c47
-rw-r--r--src/ex_cmds.c77
-rw-r--r--src/ex_cmds2.c2
-rw-r--r--src/ex_docmd.c19
-rw-r--r--src/proto/ex_cmds.pro2
-rw-r--r--src/proto/spell.pro2
-rw-r--r--src/quickfix.c2
-rw-r--r--src/spell.c4
-rw-r--r--src/structs.h2
-rw-r--r--src/term.h4
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h4
14 files changed, 119 insertions, 82 deletions
diff --git a/src/cleanlint.vim b/src/cleanlint.vim
index 116a9e15..e1199a15 100644
--- a/src/cleanlint.vim
+++ b/src/cleanlint.vim
@@ -1,27 +1,32 @@
" Vim tool: Filter output of splint
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2009 May 05
+" Last Change: 2009 May 13
" Usage: redirect output of "make lint" to a file, edit that file with Vim and
" :call CleanLint()
" This deletes irrelevant messages. What remains might be valid warnings.
fun! CleanLint()
- g/^ Types are incompatible/lockmarks d
g/Assignment of dev_t to __dev_t:/lockmarks d
g/Assignment of __dev_t to dev_t:/lockmarks d
g/Operands of == have incompatible types (__dev_t, dev_t): /lockmarks d
- g/Operands of == have incompatible types (unsigned int, int): /lockmarks d
+ g/Operands of == have incompatible types (char_u, int): /lockmarks d
g/Assignment of char to char_u: /lockmarks d
g/Assignment of unsigned int to int: /lockmarks d
- g/Assignment of colnr_T to int: /lockmarks d
+ g/Assignment of int to unsigned int: /lockmarks d
+ g/Assignment of unsigned int to long int: /lockmarks d
g/Assignment of int to char_u: /lockmarks d
g/Function .* expects arg . to be wint_t gets int: /lockmarks d
- g/^digraph.c.*digraphdefault.*is type char, expects char_u:/lockmarks d
+ g/Function .* expects arg . to be size_t gets int: /lockmarks d
+ g/Initial value of .* is type char, expects char_u: /lockmarks d
+ g/^ex_cmds.h:.* Function types are inconsistent. Parameter 1 is implicitly temp, but unqualified in assigned function:/lockmarks d
+ g/^ex_docmd.c:.* nospec_str/lockmarks d
g/^digraph.c.*Additional initialization errors for digraphdefault not reported/lockmarks d
g/Function strncasecmp expects arg 3 to be int gets size_t: /lockmarks d
+ g/^ Types are incompatible/lockmarks d
g/ To ignore signs in type comparisons use +ignoresigns/lockmarks d
g/ To allow arbitrary integral types to match any integral type, use +matchanyintegral./lockmarks d
g/ To allow arbitrary integral types to match long unsigned, use +longintegral./lockmarks d
+ g+ A variable is declared but never used. Use /.@unused@./ in front of declaration to suppress message.+lockmarks d
endfun
diff --git a/src/diff.c b/src/diff.c
index 34e78b6d..b7f0a101 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -827,6 +827,7 @@ diff_file(tmp_orig, tmp_new, tmp_diff)
char_u *tmp_diff;
{
char_u *cmd;
+ size_t len;
#ifdef FEAT_EVAL
if (*p_dex != NUL)
@@ -835,8 +836,9 @@ diff_file(tmp_orig, tmp_new, tmp_diff)
else
#endif
{
- cmd = alloc((unsigned)(STRLEN(tmp_orig) + STRLEN(tmp_new)
- + STRLEN(tmp_diff) + STRLEN(p_srr) + 27));
+ len = STRLEN(tmp_orig) + STRLEN(tmp_new)
+ + STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
+ cmd = alloc((unsigned)len);
if (cmd != NULL)
{
/* We don't want $DIFF_OPTIONS to get in the way. */
@@ -846,7 +848,7 @@ diff_file(tmp_orig, tmp_new, tmp_diff)
/* Build the diff command and execute it. Always use -a, binary
* differences are of no use. Ignore errors, diff returns
* non-zero when differences have been found. */
- sprintf((char *)cmd, "diff %s%s%s%s%s %s",
+ vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
diff_a_works == FALSE ? "" : "-a ",
#if defined(MSWIN) || defined(MSDOS)
diff_bin_works == TRUE ? "--binary " : "",
@@ -856,7 +858,7 @@ diff_file(tmp_orig, tmp_new, tmp_diff)
(diff_flags & DIFF_IWHITE) ? "-b " : "",
(diff_flags & DIFF_ICASE) ? "-i " : "",
tmp_orig, tmp_new);
- append_redir(cmd, p_srr, tmp_diff);
+ append_redir(cmd, (int)len, p_srr, tmp_diff);
#ifdef FEAT_AUTOCMD
block_autocmds(); /* Avoid ShellCmdPost stuff */
#endif
@@ -881,6 +883,7 @@ ex_diffpatch(eap)
char_u *tmp_orig; /* name of original temp file */
char_u *tmp_new; /* name of patched temp file */
char_u *buf = NULL;
+ size_t buflen;
win_T *old_curwin = curwin;
char_u *newname = NULL; /* name of patched file buffer */
#ifdef UNIX
@@ -920,11 +923,12 @@ ex_diffpatch(eap)
/* Get the absolute path of the patchfile, changing directory below. */
fullname = FullName_save(eap->arg, FALSE);
#endif
- buf = alloc((unsigned)(STRLEN(tmp_orig) + (
+ buflen = STRLEN(tmp_orig) + (
# ifdef UNIX
fullname != NULL ? STRLEN(fullname) :
# endif
- STRLEN(eap->arg)) + STRLEN(tmp_new) + 16));
+ STRLEN(eap->arg)) + STRLEN(tmp_new) + 16;
+ buf = alloc((unsigned)buflen);
if (buf == NULL)
goto theend;
@@ -961,7 +965,8 @@ ex_diffpatch(eap)
{
/* Build the patch command and execute it. Ignore errors. Switch to
* cooked mode to allow the user to respond to prompts. */
- sprintf((char *)buf, "patch -o %s %s < \"%s\"", tmp_new, tmp_orig,
+ vim_snprintf((char *)buf, buflen, "patch -o %s %s < \"%s\"",
+ tmp_new, tmp_orig,
# ifdef UNIX
fullname != NULL ? fullname :
# endif
diff --git a/src/edit.c b/src/edit.c
index 65a94a2b..2aec2260 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -169,7 +169,7 @@ static int ins_compl_pum_key __ARGS((int c));
static int ins_compl_key2count __ARGS((int c));
static int ins_compl_use_match __ARGS((int c));
static int ins_complete __ARGS((int c));
-static int quote_meta __ARGS((char_u *dest, char_u *str, int len));
+static unsigned quote_meta __ARGS((char_u *dest, char_u *str, int len));
#endif /* FEAT_INS_EXPAND */
#define BACKSPACE_CHAR 1
@@ -757,7 +757,7 @@ edit(cmdchar, startln, count)
* there is nothing to add, CTRL-L works like CTRL-P then. */
if (c == Ctrl_L
&& (ctrl_x_mode != CTRL_X_WHOLE_LINE
- || STRLEN(compl_shown_match->cp_str)
+ || (int)STRLEN(compl_shown_match->cp_str)
> curwin->w_cursor.col - compl_col))
{
ins_compl_addfrommatch();
@@ -3837,7 +3837,11 @@ ins_compl_add_tv(tv, dir)
char_u *word;
int icase = FALSE;
int adup = FALSE;
+#ifdef S_SPLINT_S /* splint doesn't parse array of pointers correctly */
+ char_u **cptext;
+#else
char_u *(cptext[CPT_COUNT]);
+#endif
if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
{
@@ -3994,7 +3998,7 @@ ins_compl_get_exp(ini)
else if (*e_cpt == ']' || *e_cpt == 't')
{
type = CTRL_X_TAGS;
- sprintf((char*)IObuff, _("Scanning tags."));
+ vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
}
else
@@ -4093,7 +4097,7 @@ ins_compl_get_exp(ini)
case CTRL_X_SPELL:
#ifdef FEAT_SPELL
num_matches = expand_spelling(first_match_pos.lnum,
- first_match_pos.col, compl_pattern, &matches);
+ compl_pattern, &matches);
if (num_matches > 0)
ins_compl_add_matches(num_matches, matches, p_ic);
#endif
@@ -4803,10 +4807,9 @@ ins_complete(c)
{
char_u *prefix = (char_u *)"\\<";
- /* we need 3 extra chars, 1 for the NUL and
- * 2 >= strlen(prefix) -- Acevedo */
+ /* we need up to 2 extra chars for the prefix */
compl_pattern = alloc(quote_meta(NULL, line + compl_col,
- compl_length) + 3);
+ compl_length) + 2);
if (compl_pattern == NULL)
return FAIL;
if (!vim_iswordp(line + compl_col)
@@ -4881,7 +4884,7 @@ ins_complete(c)
else
{
compl_pattern = alloc(quote_meta(NULL, line + compl_col,
- compl_length) + 3);
+ compl_length) + 2);
if (compl_pattern == NULL)
return FAIL;
STRCPY((char *)compl_pattern, "\\<");
@@ -4963,7 +4966,7 @@ ins_complete(c)
if (col < 0)
col = curs_col;
compl_col = col;
- if ((colnr_T)compl_col > curs_col)
+ if (compl_col > curs_col)
compl_col = curs_col;
/* Setup variables for completion. Need to obtain "line" again,
@@ -5236,15 +5239,15 @@ ins_complete(c)
* a backslash) the metachars, and dest would be NUL terminated.
* Returns the length (needed) of dest
*/
- static int
+ static unsigned
quote_meta(dest, src, len)
char_u *dest;
char_u *src;
int len;
{
- int m;
+ unsigned m = (unsigned)len + 1; /* one extra for the NUL */
- for (m = len; --len >= 0; src++)
+ for ( ; --len >= 0; src++)
{
switch (*src)
{
@@ -6073,7 +6076,7 @@ auto_format(trailblank, prev_line)
* in 'formatoptions' and there is a single character before the cursor.
* Otherwise the line would be broken and when typing another non-white
* next they are not joined back together. */
- wasatend = (pos.col == STRLEN(old));
+ wasatend = (pos.col == (colnr_T)STRLEN(old));
if (*old != NUL && !trailblank && wasatend)
{
dec_cursor();
@@ -6250,7 +6253,7 @@ redo_literal(c)
* three digits. */
if (VIM_ISDIGIT(c))
{
- sprintf((char *)buf, "%03d", c);
+ vim_snprintf((char *)buf, sizeof(buf), "%03d", c);
AppendToRedobuff(buf);
}
else
@@ -6453,10 +6456,11 @@ stop_insert(end_insert_pos, esc)
* deleted characters. */
if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum)
{
- cc = (int)STRLEN(ml_get_curline());
- if (VIsual.col > (colnr_T)cc)
+ int len = (int)STRLEN(ml_get_curline());
+
+ if (VIsual.col > len)
{
- VIsual.col = cc;
+ VIsual.col = len;
# ifdef FEAT_VIRTUALEDIT
VIsual.coladd = 0;
# endif
@@ -8315,6 +8319,7 @@ ins_bs(c, mode, inserted_space_p)
linenr_T lnum;
int cc;
int temp = 0; /* init for GCC */
+ colnr_T save_col;
colnr_T mincol;
int did_backspace = FALSE;
int in_indent;
@@ -8472,13 +8477,13 @@ ins_bs(c, mode, inserted_space_p)
*/
while (cc > 0)
{
- temp = curwin->w_cursor.col;
+ save_col = curwin->w_cursor.col;
#ifdef FEAT_MBYTE
mb_replace_pop_ins(cc);
#else
ins_char(cc);
#endif
- curwin->w_cursor.col = temp;
+ curwin->w_cursor.col = save_col;
cc = replace_pop();
}
/* restore the characters that NL replaced */
@@ -8510,11 +8515,11 @@ ins_bs(c, mode, inserted_space_p)
#endif
)
{
- temp = curwin->w_cursor.col;
+ save_col = curwin->w_cursor.col;
beginline(BL_WHITE);
if (curwin->w_cursor.col < (colnr_T)temp)
mincol = curwin->w_cursor.col;
- curwin->w_cursor.col = temp;
+ curwin->w_cursor.col = save_col;
}
/*
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index e83c6d62..c9174b2b 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -87,13 +87,14 @@ do_ascii(eap)
))
{
transchar_nonprint(buf3, c);
- sprintf(buf1, " <%s>", (char *)buf3);
+ vim_snprintf(buf1, sizeof(buf1), " <%s>", (char *)buf3);
}
else
buf1[0] = NUL;
#ifndef EBCDIC
if (c >= 0x80)
- sprintf(buf2, " <M-%s>", transchar(c & 0x7f));
+ vim_snprintf(buf2, sizeof(buf2), " <M-%s>",
+ (char *)transchar(c & 0x7f));
else
#endif
buf2[0] = NUL;
@@ -358,7 +359,7 @@ ex_sort(eap)
linenr_T lnum;
long maxlen = 0;
sorti_T *nrs;
- size_t count = eap->line2 - eap->line1 + 1;
+ size_t count = (size_t)(eap->line2 - eap->line1 + 1);
size_t i;
char_u *p;
char_u *s;
@@ -957,7 +958,7 @@ do_bang(addr_count, eap, forceit, do_in, do_out)
}
len += (int)STRLEN(prevcmd);
}
- if ((t = alloc(len)) == NULL)
+ if ((t = alloc((unsigned)len)) == NULL)
{
vim_free(newcmd);
return;
@@ -1548,7 +1549,7 @@ make_filter_cmd(cmd, itmp, otmp)
* redirecting input and/or output.
*/
if (itmp != NULL || otmp != NULL)
- sprintf((char *)buf, "(%s)", (char *)cmd);
+ vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
else
STRCPY(buf, cmd);
if (itmp != NULL)
@@ -1597,37 +1598,41 @@ make_filter_cmd(cmd, itmp, otmp)
}
#endif
if (otmp != NULL)
- append_redir(buf, p_srr, otmp);
+ append_redir(buf, (int)len, p_srr, otmp);
return buf;
}
/*
- * Append output redirection for file "fname" to the end of string buffer "buf"
+ * Append output redirection for file "fname" to the end of string buffer
+ * "buf[buflen]"
* Works with the 'shellredir' and 'shellpipe' options.
* The caller should make sure that there is enough room:
* STRLEN(opt) + STRLEN(fname) + 3
*/
void
-append_redir(buf, opt, fname)
+append_redir(buf, buflen, opt, fname)
char_u *buf;
+ int buflen;
char_u *opt;
char_u *fname;
{
char_u *p;
+ char_u *end;
- buf += STRLEN(buf);
+ end = buf + STRLEN(buf);
/* find "%s", skipping "%%" */
for (p = opt; (p = vim_strchr(p, '%')) != NULL; ++p)
if (p[1] == 's')
break;
if (p != NULL)
{
- *buf = ' '; /* not really needed? Not with sh, ksh or bash */
- sprintf((char *)buf + 1, (char *)opt, (char *)fname);
+ *end = ' '; /* not really needed? Not with sh, ksh or bash */
+ vim_snprintf((char *)end + 1, (size_t)(buflen - (end + 1 - buf)),
+ (char *)opt, (char *)fname);
}
else
- sprintf((char *)buf,
+ vim_snprintf((char *)end, (size_t)(buflen - (end - buf)),
#ifdef FEAT_QUICKFIX
# ifndef RISCOS
opt != p_sp ? " %s%s" :
@@ -2390,7 +2395,8 @@ print_line_no_prefix(lnum, use_number, list)
if (curwin->w_p_nu || use_number)
{
- sprintf((char *)numbuf, "%*ld ", number_width(curwin), (long)lnum);
+ vim_snprintf((char *)numbuf, sizeof(numbuf),
+ "%*ld ", number_width(curwin), (long)lnum);
msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */
}
msg_prt_line(ml_get(lnum), list);
@@ -4486,7 +4492,7 @@ do_sub(eap)
char_u *p1;
int did_sub = FALSE;
int lastone;
- unsigned len, needed_len;
+ int len, copy_len, needed_len;
long nmatch_tl = 0; /* nr of lines matched below lnum */
int do_again; /* do it again after joining lines */
int skip_match = FALSE;
@@ -4631,6 +4637,8 @@ do_sub(eap)
if (do_ask)
{
+ int typed;
+
/* change State to CONFIRM, so that the mouse works
* properly */
save_State = State;
@@ -4669,7 +4677,7 @@ do_sub(eap)
resp = getexmodeline('?', NULL, 0);
if (resp != NULL)
{
- i = *resp;
+ typed = *resp;
vim_free(resp);
}
}
@@ -4721,7 +4729,7 @@ do_sub(eap)
#endif
++no_mapping; /* don't map this key */
++allow_keys; /* allow special keys */
- i = plain_vgetc();
+ typed = plain_vgetc();
--allow_keys;
--no_mapping;
@@ -4732,35 +4740,35 @@ do_sub(eap)
}
need_wait_return = FALSE; /* no hit-return prompt */
- if (i == 'q' || i == ESC || i == Ctrl_C
+ if (typed == 'q' || typed == ESC || typed == Ctrl_C
#ifdef UNIX
- || i == intr_char
+ || typed == intr_char
#endif
)
{
got_quit = TRUE;
break;
}
- if (i == 'n')
+ if (typed == 'n')
break;
- if (i == 'y')
+ if (typed == 'y')
break;
- if (i == 'l')
+ if (typed == 'l')
{
/* last: replace and then stop */
do_all = FALSE;
line2 = lnum;
break;
}
- if (i == 'a')
+ if (typed == 'a')
{
do_ask = FALSE;
break;
}
#ifdef FEAT_INS_EXPAND
- if (i == Ctrl_E)
+ if (typed == Ctrl_E)
scrollup_clamp();
- else if (i == Ctrl_Y)
+ else if (typed == Ctrl_Y)
scrolldown_clamp();
#endif
}
@@ -4771,7 +4779,7 @@ do_sub(eap)
if (vim_strchr(p_cpo, CPO_UNDO) != NULL)
--no_u_sync;
- if (i == 'n')
+ if (typed == 'n')
{
/* For a multi-line match, put matchcol at the NUL at
* the end of the line and set nmatch to one, so that
@@ -4822,9 +4830,9 @@ do_sub(eap)
p1 = ml_get(sub_firstlnum + nmatch - 1);
nmatch_tl += nmatch - 1;
}
- i = regmatch.startpos[0].col - copycol;
- needed_len = i + ((unsigned)STRLEN(p1) - regmatch.endpos[0].col)
- + sublen + 1;
+ copy_len = regmatch.startpos[0].col - copycol;
+ needed_len = copy_len + ((unsigned)STRLEN(p1)
+ - regmatch.endpos[0].col) + sublen + 1;
if (new_start == NULL)
{
/*
@@ -4847,7 +4855,7 @@ do_sub(eap)
*/
len = (unsigned)STRLEN(new_start);
needed_len += len;
- if (needed_len > new_start_len)
+ if (needed_len > (int)new_start_len)
{
new_start_len = needed_len + 50;
if ((p1 = alloc_check(new_start_len)) == NULL)
@@ -4865,8 +4873,8 @@ do_sub(eap)
/*
* copy the text up to the part that matched
*/
- mch_memmove(new_end, sub_firstline + copycol, (size_t)i);
- new_end += i;
+ mch_memmove(new_end, sub_firstline + copycol, (size_t)copy_len);
+ new_end += copy_len;
(void)vim_regsub_multi(&regmatch,
sub_firstlnum - regmatch.startpos[0].lnum,
@@ -5768,6 +5776,10 @@ find_help_tags(arg, num_matches, matches, keep_lang)
{
char_u *s, *d;
int i;
+#ifdef S_SPLINT_S /* splint doesn't understand array of pointers */
+ static char **mtable;
+ static char **rtable;
+#else
static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
"/*", "/\\*", "\"*", "**",
"/\\(\\)",
@@ -5782,6 +5794,7 @@ find_help_tags(arg, num_matches, matches, keep_lang)
"/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
"\\[count]", "\\[quotex]", "\\[range]",
"\\[pattern]", "\\\\bar", "/\\\\%\\$"};
+#endif
int flags;
d = IObuff; /* assume IObuff is long enough! */
@@ -5790,7 +5803,7 @@ find_help_tags(arg, num_matches, matches, keep_lang)
* Recognize a few exceptions to the rule. Some strings that contain '*'
* with "star". Otherwise '*' is recognized as a wildcard.
*/
- for (i = sizeof(mtable) / sizeof(char *); --i >= 0; )
+ for (i = (int)(sizeof(mtable) / sizeof(char *)); --i >= 0; )
if (STRCMP(arg, mtable[i]) == 0)
{
STRCPY(d, rtable[i]);
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index a4f60c46..3599f225 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3373,7 +3373,7 @@ getsourceline(c, cookie, indent)
p = skipwhite(sp->nextline);
if (*p != '\\')
break;
- s = alloc((int)(STRLEN(line) + STRLEN(p)));
+ s = alloc((unsigned)(STRLEN(line) + STRLEN(p)));
if (s == NULL) /* out of memory */
break;
STRCPY(s, line);
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 3de87309..676e8184 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2737,7 +2737,7 @@ checkforcmd(pp, cmd, len)
int i;
for (i = 0; cmd[i] != NUL; ++i)
- if (cmd[i] != (*pp)[i])
+ if (((char_u *)cmd)[i] != (*pp)[i])
break;
if (i >= len && !isalpha((*pp)[i]))
{
@@ -2803,7 +2803,7 @@ find_command(eap, full)
/* Check for ":dl", ":dell", etc. to ":deletel": that's
* :delete with the 'l' flag. Same for 'p'. */
for (i = 0; i < len; ++i)
- if (eap->cmd[i] != "delete"[i])
+ if (eap->cmd[i] != ((char_u *)"delete")[i])
break;
if (i == len - 1)
{
@@ -3823,7 +3823,7 @@ skip_range(cmd, ctx)
char_u *cmd;
int *ctx; /* pointer to xp_context or NULL */
{
- int delim;
+ unsigned delim;
while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;", *cmd) != NULL)
{
@@ -9417,7 +9417,13 @@ find_cmdline_var(src, usedlen)
{
int len;
int i;
- static char *(spec_str[]) = {
+#ifdef S_SPLINT_S /* splint can't handle array of pointers */
+ static char **spec_str;
+ static char *(nospec_str[])
+#else
+ static char *(spec_str[])
+#endif
+ = {
"%",
#define SPEC_PERC 0
"#",
@@ -9443,9 +9449,8 @@ find_cmdline_var(src, usedlen)
# define SPEC_CLIENT 9
#endif
};
-#define SPEC_COUNT (sizeof(spec_str) / sizeof(char *))
- for (i = 0; i < SPEC_COUNT; ++i)
+ for (i = 0; i < (int)(sizeof(spec_str) / sizeof(char *)); ++i)
{
len = (int)STRLEN(spec_str[i]);
if (STRNCMP(src, spec_str[i], len) == 0)
@@ -9796,7 +9801,7 @@ arg_all()
}
/* allocate memory */
- retval = alloc(len + 1);
+ retval = alloc((unsigned)len + 1);
if (retval == NULL)
break;
}
diff --git a/src/proto/ex_cmds.pro b/src/proto/ex_cmds.pro
index 315b6bb5..ff868cae 100644
--- a/src/proto/ex_cmds.pro
+++ b/src/proto/ex_cmds.pro
@@ -9,7 +9,7 @@ void free_prev_shellcmd __ARGS((void));
void do_bang __ARGS((int addr_count, exarg_T *eap, int forceit, int do_in, int do_out));
void do_shell __ARGS((char_u *cmd, int flags));
char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
-void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname));
+void append_redir __ARGS((char_u *buf, int buflen, char_u *opt, char_u *fname));
int viminfo_error __ARGS((char *errnum, char *message, char_u *line));
int read_viminfo __ARGS((char_u *file, int flags));
void write_viminfo __ARGS((char_u *file, int forceit));
diff --git a/src/proto/spell.pro b/src/proto/spell.pro
index fecf4e05..f497dc61 100644
--- a/src/proto/spell.pro
+++ b/src/proto/spell.pro
@@ -22,5 +22,5 @@ void spell_dump_compl __ARGS((buf_T *buf, char_u *pat, int ic, int *dir, int dum
char_u *spell_to_word_end __ARGS((char_u *start, buf_T *buf));
int spell_word_start __ARGS((int startcol));
void spell_expand_check_cap __ARGS((colnr_T col));
-int expand_spelling __ARGS((linenr_T lnum, int col, char_u *pat, char_u ***matchp));
+int expand_spelling __ARGS((linenr_T lnum, char_u *pat, char_u ***matchp));
/* vim: set ft=c : */
diff --git a/src/quickfix.c b/src/quickfix.c
index e7f89827..e374694a 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2774,7 +2774,7 @@ ex_make(eap)
sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)eap->arg,
(char *)p_shq);
if (*p_sp != NUL)
- append_redir(cmd, p_sp, fname);
+ append_redir(cmd, len, p_sp, fname);
/*
* Output a newline if there's something else than the :make command that
* was typed (in which case the cursor is in column 0).
diff --git a/src/spell.c b/src/spell.c
index 51206812..5bfb2123 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -16151,11 +16151,9 @@ spell_expand_check_cap(col)
* Returns the number of matches. The matches are in "matchp[]", array of
* allocated strings.
*/
-/*ARGSUSED*/
int
-expand_spelling(lnum, col, pat, matchp)
+expand_spelling(lnum, pat, matchp)
linenr_T lnum;
- int col;
char_u *pat;
char_u ***matchp;
{
diff --git a/src/structs.h b/src/structs.h
index f4f1a877..7deb5abc 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -16,7 +16,7 @@
*/
#if defined(SASC) && SASC < 658
typedef long linenr_T;
-typedef unsigned colnr_T;
+typedef int colnr_T;
typedef unsigned short short_u;
#endif
diff --git a/src/term.h b/src/term.h
index cc9f8ac9..b1fde048 100644
--- a/src/term.h
+++ b/src/term.h
@@ -96,7 +96,11 @@ enum SpecialKey
* - there should be code in term.c to obtain the value from the termcap
*/
+#ifdef S_SPLINT_S /* splint doesn't understand array of pointers */
+extern char_u **term_strings; /* current terminal strings */
+#else
extern char_u *(term_strings[]); /* current terminal strings */
+#endif
/*
* strings used for terminal
diff --git a/src/version.c b/src/version.c
index 16502557..5a38f1ba 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 169,
+/**/
168,
/**/
167,
diff --git a/src/vim.h b/src/vim.h
index 483c97dd..a9a940bb 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1460,8 +1460,8 @@ typedef enum
# define PERROR(msg) perror(msg)
#endif
-typedef long linenr_T; /* line number type */
-typedef unsigned colnr_T; /* column number type */
+typedef long linenr_T; /* line number type */
+typedef int colnr_T; /* column number type */
typedef unsigned short disptick_T; /* display tick type */
#define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */