4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Splint complains about a lot of things.
12 Solution: Add type casts, #ifdefs and other changes to avoid warnings.
13 Change colnr_T from unsigned to int. Avoids mistakes with
15 Files: src/cleanlint.vim, src/diff.c, src/edit.c, src/ex_cmds.c,
16 src/ex_cmds2.c, src/ex_docmd.c, src/proto/ex_cmds.pro,
17 src/proto/spell.pro, src/quickfix.c, src/spell.c, src/structs.h,
21 *** ../vim-7.2.168/src/cleanlint.vim 2009-05-13 12:46:36.000000000 +0200
22 --- src/cleanlint.vim 2009-05-13 18:03:11.000000000 +0200
25 " Vim tool: Filter output of splint
27 " Maintainer: Bram Moolenaar <Bram@vim.org>
28 ! " Last Change: 2009 May 05
30 " Usage: redirect output of "make lint" to a file, edit that file with Vim and
32 " This deletes irrelevant messages. What remains might be valid warnings.
35 - g/^ Types are incompatible/lockmarks d
36 g/Assignment of dev_t to __dev_t:/lockmarks d
37 g/Assignment of __dev_t to dev_t:/lockmarks d
38 g/Operands of == have incompatible types (__dev_t, dev_t): /lockmarks d
39 ! g/Operands of == have incompatible types (unsigned int, int): /lockmarks d
40 g/Assignment of char to char_u: /lockmarks d
41 g/Assignment of unsigned int to int: /lockmarks d
42 ! g/Assignment of colnr_T to int: /lockmarks d
43 g/Assignment of int to char_u: /lockmarks d
44 g/Function .* expects arg . to be wint_t gets int: /lockmarks d
45 ! g/^digraph.c.*digraphdefault.*is type char, expects char_u:/lockmarks d
46 g/^digraph.c.*Additional initialization errors for digraphdefault not reported/lockmarks d
47 g/Function strncasecmp expects arg 3 to be int gets size_t: /lockmarks d
48 g/ To ignore signs in type comparisons use +ignoresigns/lockmarks d
49 g/ To allow arbitrary integral types to match any integral type, use +matchanyintegral./lockmarks d
50 g/ To allow arbitrary integral types to match long unsigned, use +longintegral./lockmarks d
53 " Vim tool: Filter output of splint
55 " Maintainer: Bram Moolenaar <Bram@vim.org>
56 ! " Last Change: 2009 May 13
58 " Usage: redirect output of "make lint" to a file, edit that file with Vim and
60 " This deletes irrelevant messages. What remains might be valid warnings.
63 g/Assignment of dev_t to __dev_t:/lockmarks d
64 g/Assignment of __dev_t to dev_t:/lockmarks d
65 g/Operands of == have incompatible types (__dev_t, dev_t): /lockmarks d
66 ! g/Operands of == have incompatible types (char_u, int): /lockmarks d
67 g/Assignment of char to char_u: /lockmarks d
68 g/Assignment of unsigned int to int: /lockmarks d
69 ! g/Assignment of int to unsigned int: /lockmarks d
70 ! g/Assignment of unsigned int to long int: /lockmarks d
71 g/Assignment of int to char_u: /lockmarks d
72 g/Function .* expects arg . to be wint_t gets int: /lockmarks d
73 ! g/Function .* expects arg . to be size_t gets int: /lockmarks d
74 ! g/Initial value of .* is type char, expects char_u: /lockmarks d
75 ! g/^ex_cmds.h:.* Function types are inconsistent. Parameter 1 is implicitly temp, but unqualified in assigned function:/lockmarks d
76 ! g/^ex_docmd.c:.* nospec_str/lockmarks d
77 g/^digraph.c.*Additional initialization errors for digraphdefault not reported/lockmarks d
78 g/Function strncasecmp expects arg 3 to be int gets size_t: /lockmarks d
79 + g/^ Types are incompatible/lockmarks d
80 g/ To ignore signs in type comparisons use +ignoresigns/lockmarks d
81 g/ To allow arbitrary integral types to match any integral type, use +matchanyintegral./lockmarks d
82 g/ To allow arbitrary integral types to match long unsigned, use +longintegral./lockmarks d
83 + g+ A variable is declared but never used. Use /.@unused@./ in front of declaration to suppress message.+lockmarks d
85 *** ../vim-7.2.168/src/diff.c 2009-03-11 12:45:44.000000000 +0100
86 --- src/diff.c 2009-05-13 16:16:11.000000000 +0200
102 ! cmd = alloc((unsigned)(STRLEN(tmp_orig) + STRLEN(tmp_new)
103 ! + STRLEN(tmp_diff) + STRLEN(p_srr) + 27));
106 /* We don't want $DIFF_OPTIONS to get in the way. */
111 ! len = STRLEN(tmp_orig) + STRLEN(tmp_new)
112 ! + STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
113 ! cmd = alloc((unsigned)len);
116 /* We don't want $DIFF_OPTIONS to get in the way. */
119 /* Build the diff command and execute it. Always use -a, binary
120 * differences are of no use. Ignore errors, diff returns
121 * non-zero when differences have been found. */
122 ! sprintf((char *)cmd, "diff %s%s%s%s%s %s",
123 diff_a_works == FALSE ? "" : "-a ",
124 #if defined(MSWIN) || defined(MSDOS)
125 diff_bin_works == TRUE ? "--binary " : "",
127 /* Build the diff command and execute it. Always use -a, binary
128 * differences are of no use. Ignore errors, diff returns
129 * non-zero when differences have been found. */
130 ! vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
131 diff_a_works == FALSE ? "" : "-a ",
132 #if defined(MSWIN) || defined(MSDOS)
133 diff_bin_works == TRUE ? "--binary " : "",
136 (diff_flags & DIFF_IWHITE) ? "-b " : "",
137 (diff_flags & DIFF_ICASE) ? "-i " : "",
139 ! append_redir(cmd, p_srr, tmp_diff);
141 block_autocmds(); /* Avoid ShellCmdPost stuff */
144 (diff_flags & DIFF_IWHITE) ? "-b " : "",
145 (diff_flags & DIFF_ICASE) ? "-i " : "",
147 ! append_redir(cmd, (int)len, p_srr, tmp_diff);
149 block_autocmds(); /* Avoid ShellCmdPost stuff */
154 char_u *tmp_orig; /* name of original temp file */
155 char_u *tmp_new; /* name of patched temp file */
158 win_T *old_curwin = curwin;
159 char_u *newname = NULL; /* name of patched file buffer */
163 /* Get the absolute path of the patchfile, changing directory below. */
164 fullname = FullName_save(eap->arg, FALSE);
166 ! buf = alloc((unsigned)(STRLEN(tmp_orig) + (
168 fullname != NULL ? STRLEN(fullname) :
170 ! STRLEN(eap->arg)) + STRLEN(tmp_new) + 16));
175 /* Get the absolute path of the patchfile, changing directory below. */
176 fullname = FullName_save(eap->arg, FALSE);
178 ! buflen = STRLEN(tmp_orig) + (
180 fullname != NULL ? STRLEN(fullname) :
182 ! STRLEN(eap->arg)) + STRLEN(tmp_new) + 16;
183 ! buf = alloc((unsigned)buflen);
190 /* Build the patch command and execute it. Ignore errors. Switch to
191 * cooked mode to allow the user to respond to prompts. */
192 ! sprintf((char *)buf, "patch -o %s %s < \"%s\"", tmp_new, tmp_orig,
194 fullname != NULL ? fullname :
198 /* Build the patch command and execute it. Ignore errors. Switch to
199 * cooked mode to allow the user to respond to prompts. */
200 ! vim_snprintf((char *)buf, buflen, "patch -o %s %s < \"%s\"",
203 fullname != NULL ? fullname :
205 *** ../vim-7.2.168/src/edit.c 2009-05-13 12:46:36.000000000 +0200
206 --- src/edit.c 2009-05-13 18:29:21.000000000 +0200
209 static int ins_compl_key2count __ARGS((int c));
210 static int ins_compl_use_match __ARGS((int c));
211 static int ins_complete __ARGS((int c));
212 ! static int quote_meta __ARGS((char_u *dest, char_u *str, int len));
213 #endif /* FEAT_INS_EXPAND */
215 #define BACKSPACE_CHAR 1
217 static int ins_compl_key2count __ARGS((int c));
218 static int ins_compl_use_match __ARGS((int c));
219 static int ins_complete __ARGS((int c));
220 ! static unsigned quote_meta __ARGS((char_u *dest, char_u *str, int len));
221 #endif /* FEAT_INS_EXPAND */
223 #define BACKSPACE_CHAR 1
226 * there is nothing to add, CTRL-L works like CTRL-P then. */
228 && (ctrl_x_mode != CTRL_X_WHOLE_LINE
229 ! || STRLEN(compl_shown_match->cp_str)
230 > curwin->w_cursor.col - compl_col))
232 ins_compl_addfrommatch();
234 * there is nothing to add, CTRL-L works like CTRL-P then. */
236 && (ctrl_x_mode != CTRL_X_WHOLE_LINE
237 ! || (int)STRLEN(compl_shown_match->cp_str)
238 > curwin->w_cursor.col - compl_col))
240 ins_compl_addfrommatch();
247 + #ifdef S_SPLINT_S /* splint doesn't parse array of pointers correctly */
250 char_u *(cptext[CPT_COUNT]);
253 if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
257 else if (*e_cpt == ']' || *e_cpt == 't')
260 ! sprintf((char*)IObuff, _("Scanning tags."));
261 (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
265 else if (*e_cpt == ']' || *e_cpt == 't')
268 ! vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
269 (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
276 num_matches = expand_spelling(first_match_pos.lnum,
277 ! first_match_pos.col, compl_pattern, &matches);
279 ins_compl_add_matches(num_matches, matches, p_ic);
284 num_matches = expand_spelling(first_match_pos.lnum,
285 ! compl_pattern, &matches);
287 ins_compl_add_matches(num_matches, matches, p_ic);
292 char_u *prefix = (char_u *)"\\<";
294 ! /* we need 3 extra chars, 1 for the NUL and
295 ! * 2 >= strlen(prefix) -- Acevedo */
296 compl_pattern = alloc(quote_meta(NULL, line + compl_col,
297 ! compl_length) + 3);
298 if (compl_pattern == NULL)
300 if (!vim_iswordp(line + compl_col)
303 char_u *prefix = (char_u *)"\\<";
305 ! /* we need up to 2 extra chars for the prefix */
306 compl_pattern = alloc(quote_meta(NULL, line + compl_col,
307 ! compl_length) + 2);
308 if (compl_pattern == NULL)
310 if (!vim_iswordp(line + compl_col)
315 compl_pattern = alloc(quote_meta(NULL, line + compl_col,
316 ! compl_length) + 3);
317 if (compl_pattern == NULL)
319 STRCPY((char *)compl_pattern, "\\<");
323 compl_pattern = alloc(quote_meta(NULL, line + compl_col,
324 ! compl_length) + 2);
325 if (compl_pattern == NULL)
327 STRCPY((char *)compl_pattern, "\\<");
333 ! if ((colnr_T)compl_col > curs_col)
334 compl_col = curs_col;
336 /* Setup variables for completion. Need to obtain "line" again,
341 ! if (compl_col > curs_col)
342 compl_col = curs_col;
344 /* Setup variables for completion. Need to obtain "line" again,
347 * a backslash) the metachars, and dest would be NUL terminated.
348 * Returns the length (needed) of dest
351 quote_meta(dest, src, len)
358 ! for (m = len; --len >= 0; src++)
363 * a backslash) the metachars, and dest would be NUL terminated.
364 * Returns the length (needed) of dest
367 quote_meta(dest, src, len)
372 ! unsigned m = (unsigned)len + 1; /* one extra for the NUL */
374 ! for ( ; --len >= 0; src++)
380 * in 'formatoptions' and there is a single character before the cursor.
381 * Otherwise the line would be broken and when typing another non-white
382 * next they are not joined back together. */
383 ! wasatend = (pos.col == STRLEN(old));
384 if (*old != NUL && !trailblank && wasatend)
388 * in 'formatoptions' and there is a single character before the cursor.
389 * Otherwise the line would be broken and when typing another non-white
390 * next they are not joined back together. */
391 ! wasatend = (pos.col == (colnr_T)STRLEN(old));
392 if (*old != NUL && !trailblank && wasatend)
400 ! sprintf((char *)buf, "%03d", c);
401 AppendToRedobuff(buf);
408 ! vim_snprintf((char *)buf, sizeof(buf), "%03d", c);
409 AppendToRedobuff(buf);
414 * deleted characters. */
415 if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum)
417 ! cc = (int)STRLEN(ml_get_curline());
418 ! if (VIsual.col > (colnr_T)cc)
421 # ifdef FEAT_VIRTUALEDIT
425 * deleted characters. */
426 if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum)
428 ! int len = (int)STRLEN(ml_get_curline());
430 ! if (VIsual.col > len)
433 # ifdef FEAT_VIRTUALEDIT
441 int temp = 0; /* init for GCC */
444 int did_backspace = FALSE;
451 ! temp = curwin->w_cursor.col;
453 mb_replace_pop_ins(cc);
457 ! curwin->w_cursor.col = temp;
460 /* restore the characters that NL replaced */
465 ! save_col = curwin->w_cursor.col;
467 mb_replace_pop_ins(cc);
471 ! curwin->w_cursor.col = save_col;
474 /* restore the characters that NL replaced */
480 ! temp = curwin->w_cursor.col;
482 if (curwin->w_cursor.col < (colnr_T)temp)
483 mincol = curwin->w_cursor.col;
484 ! curwin->w_cursor.col = temp;
492 ! save_col = curwin->w_cursor.col;
494 if (curwin->w_cursor.col < (colnr_T)temp)
495 mincol = curwin->w_cursor.col;
496 ! curwin->w_cursor.col = save_col;
500 *** ../vim-7.2.168/src/ex_cmds.c 2009-05-13 12:46:36.000000000 +0200
501 --- src/ex_cmds.c 2009-05-13 18:24:18.000000000 +0200
506 transchar_nonprint(buf3, c);
507 ! sprintf(buf1, " <%s>", (char *)buf3);
513 ! sprintf(buf2, " <M-%s>", transchar(c & 0x7f));
520 transchar_nonprint(buf3, c);
521 ! vim_snprintf(buf1, sizeof(buf1), " <%s>", (char *)buf3);
527 ! vim_snprintf(buf2, sizeof(buf2), " <M-%s>",
528 ! (char *)transchar(c & 0x7f));
537 ! size_t count = eap->line2 - eap->line1 + 1;
545 ! size_t count = (size_t)(eap->line2 - eap->line1 + 1);
552 len += (int)STRLEN(prevcmd);
554 ! if ((t = alloc(len)) == NULL)
560 len += (int)STRLEN(prevcmd);
562 ! if ((t = alloc((unsigned)len)) == NULL)
568 * redirecting input and/or output.
570 if (itmp != NULL || otmp != NULL)
571 ! sprintf((char *)buf, "(%s)", (char *)cmd);
576 * redirecting input and/or output.
578 if (itmp != NULL || otmp != NULL)
579 ! vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
588 ! append_redir(buf, p_srr, otmp);
594 ! * Append output redirection for file "fname" to the end of string buffer "buf"
595 * Works with the 'shellredir' and 'shellpipe' options.
596 * The caller should make sure that there is enough room:
597 * STRLEN(opt) + STRLEN(fname) + 3
600 ! append_redir(buf, opt, fname)
607 ! buf += STRLEN(buf);
608 /* find "%s", skipping "%%" */
609 for (p = opt; (p = vim_strchr(p, '%')) != NULL; ++p)
614 ! *buf = ' '; /* not really needed? Not with sh, ksh or bash */
615 ! sprintf((char *)buf + 1, (char *)opt, (char *)fname);
618 ! sprintf((char *)buf,
621 opt != p_sp ? " %s%s" :
626 ! append_redir(buf, (int)len, p_srr, otmp);
632 ! * Append output redirection for file "fname" to the end of string buffer
634 * Works with the 'shellredir' and 'shellpipe' options.
635 * The caller should make sure that there is enough room:
636 * STRLEN(opt) + STRLEN(fname) + 3
639 ! append_redir(buf, buflen, opt, fname)
648 ! end = buf + STRLEN(buf);
649 /* find "%s", skipping "%%" */
650 for (p = opt; (p = vim_strchr(p, '%')) != NULL; ++p)
655 ! *end = ' '; /* not really needed? Not with sh, ksh or bash */
656 ! vim_snprintf((char *)end + 1, (size_t)(buflen - (end + 1 - buf)),
657 ! (char *)opt, (char *)fname);
660 ! vim_snprintf((char *)end, (size_t)(buflen - (end - buf)),
663 opt != p_sp ? " %s%s" :
667 if (curwin->w_p_nu || use_number)
669 ! sprintf((char *)numbuf, "%*ld ", number_width(curwin), (long)lnum);
670 msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */
672 msg_prt_line(ml_get(lnum), list);
675 if (curwin->w_p_nu || use_number)
677 ! vim_snprintf((char *)numbuf, sizeof(numbuf),
678 ! "%*ld ", number_width(curwin), (long)lnum);
679 msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */
681 msg_prt_line(ml_get(lnum), list);
687 ! unsigned len, needed_len;
688 long nmatch_tl = 0; /* nr of lines matched below lnum */
689 int do_again; /* do it again after joining lines */
690 int skip_match = FALSE;
695 ! int len, copy_len, needed_len;
696 long nmatch_tl = 0; /* nr of lines matched below lnum */
697 int do_again; /* do it again after joining lines */
698 int skip_match = FALSE;
707 /* change State to CONFIRM, so that the mouse works
712 resp = getexmodeline('?', NULL, 0);
720 resp = getexmodeline('?', NULL, 0);
730 ++no_mapping; /* don't map this key */
731 ++allow_keys; /* allow special keys */
738 ++no_mapping; /* don't map this key */
739 ++allow_keys; /* allow special keys */
740 ! typed = plain_vgetc();
748 need_wait_return = FALSE; /* no hit-return prompt */
749 ! if (i == 'q' || i == ESC || i == Ctrl_C
764 /* last: replace and then stop */
774 #ifdef FEAT_INS_EXPAND
777 ! else if (i == Ctrl_Y)
784 need_wait_return = FALSE; /* no hit-return prompt */
785 ! if (typed == 'q' || typed == ESC || typed == Ctrl_C
787 ! || typed == intr_char
800 /* last: replace and then stop */
810 #ifdef FEAT_INS_EXPAND
811 ! if (typed == Ctrl_E)
813 ! else if (typed == Ctrl_Y)
819 if (vim_strchr(p_cpo, CPO_UNDO) != NULL)
824 /* For a multi-line match, put matchcol at the NUL at
825 * the end of the line and set nmatch to one, so that
827 if (vim_strchr(p_cpo, CPO_UNDO) != NULL)
832 /* For a multi-line match, put matchcol at the NUL at
833 * the end of the line and set nmatch to one, so that
836 p1 = ml_get(sub_firstlnum + nmatch - 1);
837 nmatch_tl += nmatch - 1;
839 ! i = regmatch.startpos[0].col - copycol;
840 ! needed_len = i + ((unsigned)STRLEN(p1) - regmatch.endpos[0].col)
842 if (new_start == NULL)
846 p1 = ml_get(sub_firstlnum + nmatch - 1);
847 nmatch_tl += nmatch - 1;
849 ! copy_len = regmatch.startpos[0].col - copycol;
850 ! needed_len = copy_len + ((unsigned)STRLEN(p1)
851 ! - regmatch.endpos[0].col) + sublen + 1;
852 if (new_start == NULL)
858 len = (unsigned)STRLEN(new_start);
860 ! if (needed_len > new_start_len)
862 new_start_len = needed_len + 50;
863 if ((p1 = alloc_check(new_start_len)) == NULL)
866 len = (unsigned)STRLEN(new_start);
868 ! if (needed_len > (int)new_start_len)
870 new_start_len = needed_len + 50;
871 if ((p1 = alloc_check(new_start_len)) == NULL)
875 * copy the text up to the part that matched
877 ! mch_memmove(new_end, sub_firstline + copycol, (size_t)i);
880 (void)vim_regsub_multi(®match,
881 sub_firstlnum - regmatch.startpos[0].lnum,
884 * copy the text up to the part that matched
886 ! mch_memmove(new_end, sub_firstline + copycol, (size_t)copy_len);
887 ! new_end += copy_len;
889 (void)vim_regsub_multi(®match,
890 sub_firstlnum - regmatch.startpos[0].lnum,
897 + #ifdef S_SPLINT_S /* splint doesn't understand array of pointers */
898 + static char **mtable;
899 + static char **rtable;
901 static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
902 "/*", "/\\*", "\"*", "**",
907 "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
908 "\\[count]", "\\[quotex]", "\\[range]",
909 "\\[pattern]", "\\\\bar", "/\\\\%\\$"};
913 d = IObuff; /* assume IObuff is long enough! */
916 * Recognize a few exceptions to the rule. Some strings that contain '*'
917 * with "star". Otherwise '*' is recognized as a wildcard.
919 ! for (i = sizeof(mtable) / sizeof(char *); --i >= 0; )
920 if (STRCMP(arg, mtable[i]) == 0)
922 STRCPY(d, rtable[i]);
924 * Recognize a few exceptions to the rule. Some strings that contain '*'
925 * with "star". Otherwise '*' is recognized as a wildcard.
927 ! for (i = (int)(sizeof(mtable) / sizeof(char *)); --i >= 0; )
928 if (STRCMP(arg, mtable[i]) == 0)
930 STRCPY(d, rtable[i]);
931 *** ../vim-7.2.168/src/ex_cmds2.c 2009-02-05 20:47:14.000000000 +0100
932 --- src/ex_cmds2.c 2009-05-13 16:22:33.000000000 +0200
935 p = skipwhite(sp->nextline);
938 ! s = alloc((int)(STRLEN(line) + STRLEN(p)));
939 if (s == NULL) /* out of memory */
943 p = skipwhite(sp->nextline);
946 ! s = alloc((unsigned)(STRLEN(line) + STRLEN(p)));
947 if (s == NULL) /* out of memory */
950 *** ../vim-7.2.168/src/ex_docmd.c 2009-04-29 18:44:38.000000000 +0200
951 --- src/ex_docmd.c 2009-05-13 17:56:44.000000000 +0200
956 for (i = 0; cmd[i] != NUL; ++i)
957 ! if (cmd[i] != (*pp)[i])
959 if (i >= len && !isalpha((*pp)[i]))
964 for (i = 0; cmd[i] != NUL; ++i)
965 ! if (((char_u *)cmd)[i] != (*pp)[i])
967 if (i >= len && !isalpha((*pp)[i]))
971 /* Check for ":dl", ":dell", etc. to ":deletel": that's
972 * :delete with the 'l' flag. Same for 'p'. */
973 for (i = 0; i < len; ++i)
974 ! if (eap->cmd[i] != "delete"[i])
979 /* Check for ":dl", ":dell", etc. to ":deletel": that's
980 * :delete with the 'l' flag. Same for 'p'. */
981 for (i = 0; i < len; ++i)
982 ! if (eap->cmd[i] != ((char_u *)"delete")[i])
989 int *ctx; /* pointer to xp_context or NULL */
993 while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;", *cmd) != NULL)
997 int *ctx; /* pointer to xp_context or NULL */
1001 while (vim_strchr((char_u *)" \t0123456789.$%'/?-+,;", *cmd) != NULL)
1008 ! static char *(spec_str[]) = {
1016 ! #ifdef S_SPLINT_S /* splint can't handle array of pointers */
1017 ! static char **spec_str;
1018 ! static char *(nospec_str[])
1020 ! static char *(spec_str[])
1028 # define SPEC_CLIENT 9
1031 - #define SPEC_COUNT (sizeof(spec_str) / sizeof(char *))
1033 ! for (i = 0; i < SPEC_COUNT; ++i)
1035 len = (int)STRLEN(spec_str[i]);
1036 if (STRNCMP(src, spec_str[i], len) == 0)
1038 # define SPEC_CLIENT 9
1042 ! for (i = 0; i < (int)(sizeof(spec_str) / sizeof(char *)); ++i)
1044 len = (int)STRLEN(spec_str[i]);
1045 if (STRNCMP(src, spec_str[i], len) == 0)
1050 /* allocate memory */
1051 ! retval = alloc(len + 1);
1058 /* allocate memory */
1059 ! retval = alloc((unsigned)len + 1);
1063 *** ../vim-7.2.168/src/proto/ex_cmds.pro 2009-04-29 18:44:38.000000000 +0200
1064 --- src/proto/ex_cmds.pro 2009-05-13 15:53:39.000000000 +0200
1067 void do_bang __ARGS((int addr_count, exarg_T *eap, int forceit, int do_in, int do_out));
1068 void do_shell __ARGS((char_u *cmd, int flags));
1069 char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
1070 ! void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname));
1071 int viminfo_error __ARGS((char *errnum, char *message, char_u *line));
1072 int read_viminfo __ARGS((char_u *file, int flags));
1073 void write_viminfo __ARGS((char_u *file, int forceit));
1075 void do_bang __ARGS((int addr_count, exarg_T *eap, int forceit, int do_in, int do_out));
1076 void do_shell __ARGS((char_u *cmd, int flags));
1077 char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
1078 ! void append_redir __ARGS((char_u *buf, int buflen, char_u *opt, char_u *fname));
1079 int viminfo_error __ARGS((char *errnum, char *message, char_u *line));
1080 int read_viminfo __ARGS((char_u *file, int flags));
1081 void write_viminfo __ARGS((char_u *file, int forceit));
1082 *** ../vim-7.2.168/src/proto/spell.pro 2007-05-05 19:19:19.000000000 +0200
1083 --- src/proto/spell.pro 2009-05-13 16:43:13.000000000 +0200
1086 char_u *spell_to_word_end __ARGS((char_u *start, buf_T *buf));
1087 int spell_word_start __ARGS((int startcol));
1088 void spell_expand_check_cap __ARGS((colnr_T col));
1089 ! int expand_spelling __ARGS((linenr_T lnum, int col, char_u *pat, char_u ***matchp));
1090 /* vim: set ft=c : */
1092 char_u *spell_to_word_end __ARGS((char_u *start, buf_T *buf));
1093 int spell_word_start __ARGS((int startcol));
1094 void spell_expand_check_cap __ARGS((colnr_T col));
1095 ! int expand_spelling __ARGS((linenr_T lnum, char_u *pat, char_u ***matchp));
1096 /* vim: set ft=c : */
1097 *** ../vim-7.2.168/src/quickfix.c 2009-04-29 11:49:57.000000000 +0200
1098 --- src/quickfix.c 2009-05-13 15:53:18.000000000 +0200
1101 sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)eap->arg,
1104 ! append_redir(cmd, p_sp, fname);
1106 * Output a newline if there's something else than the :make command that
1107 * was typed (in which case the cursor is in column 0).
1109 sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)eap->arg,
1112 ! append_redir(cmd, len, p_sp, fname);
1114 * Output a newline if there's something else than the :make command that
1115 * was typed (in which case the cursor is in column 0).
1116 *** ../vim-7.2.168/src/spell.c 2009-02-11 17:57:43.000000000 +0100
1117 --- src/spell.c 2009-05-13 16:31:15.000000000 +0200
1119 *** 16151,16161 ****
1120 * Returns the number of matches. The matches are in "matchp[]", array of
1121 * allocated strings.
1125 ! expand_spelling(lnum, col, pat, matchp)
1131 --- 16151,16159 ----
1132 * Returns the number of matches. The matches are in "matchp[]", array of
1133 * allocated strings.
1136 ! expand_spelling(lnum, pat, matchp)
1141 *** ../vim-7.2.168/src/structs.h 2009-05-13 12:46:36.000000000 +0200
1142 --- src/structs.h 2009-05-13 16:45:51.000000000 +0200
1146 #if defined(SASC) && SASC < 658
1147 typedef long linenr_T;
1148 ! typedef unsigned colnr_T;
1149 typedef unsigned short short_u;
1154 #if defined(SASC) && SASC < 658
1155 typedef long linenr_T;
1156 ! typedef int colnr_T;
1157 typedef unsigned short short_u;
1160 *** ../vim-7.2.168/src/term.h 2005-03-16 10:53:56.000000000 +0100
1161 --- src/term.h 2009-05-13 17:27:41.000000000 +0200
1165 * - there should be code in term.c to obtain the value from the termcap
1168 + #ifdef S_SPLINT_S /* splint doesn't understand array of pointers */
1169 + extern char_u **term_strings; /* current terminal strings */
1171 extern char_u *(term_strings[]); /* current terminal strings */
1175 * strings used for terminal
1176 *** ../vim-7.2.168/src/vim.h 2009-04-29 18:44:38.000000000 +0200
1177 --- src/vim.h 2009-05-13 16:45:39.000000000 +0200
1180 # define PERROR(msg) perror(msg)
1183 ! typedef long linenr_T; /* line number type */
1184 ! typedef unsigned colnr_T; /* column number type */
1185 typedef unsigned short disptick_T; /* display tick type */
1187 #define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */
1189 # define PERROR(msg) perror(msg)
1192 ! typedef long linenr_T; /* line number type */
1193 ! typedef int colnr_T; /* column number type */
1194 typedef unsigned short disptick_T; /* display tick type */
1196 #define MAXLNUM (0x7fffffffL) /* maximum (invalid) line number */
1197 *** ../vim-7.2.168/src/version.c 2009-05-13 14:48:55.000000000 +0200
1198 --- src/version.c 2009-05-13 18:44:28.000000000 +0200
1202 { /* Add new patch number below this line */
1208 Females are strictly forbidden to appear unshaven in public.
1209 [real standing law in New Mexico, United States of America]
1211 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
1212 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1213 \\\ download, build and distribute -- http://www.A-A-P.org ///
1214 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///