1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Compiler warnings for shadowed variables.
12 Solution: Remove or rename the variables.
13 Files: src/charset.c, src/digraph.c, src/edit.c, src/eval.c, src/fold.c,
14 src/getchar.c, src/message.c, src/misc2.c, src/move.c,
15 src/netbeans.c, src/option.c, src/os_unix.c, src/screen.c,
16 src/search.c, src/spell.c, src/syntax.c, src/tag.c, src/window.c
19 *** ../vim-7.3.399/src/charset.c 2010-08-15 21:57:25.000000000 +0200
20 --- src/charset.c 2012-01-10 21:55:50.000000000 +0100
25 int c = utf_ptr2char(STR_PTR(i));
26 ! int ol = utf_ptr2len(STR_PTR(i));
27 int lc = utf_tolower(c);
29 /* Only replace the character when it is not an invalid
30 * sequence (ASCII character or more than one byte) and
31 * utf_tolower() doesn't return the original character. */
32 ! if ((c < 0x80 || ol > 1) && c != lc)
34 ! int nl = utf_char2len(lc);
36 /* If the byte length changes need to shift the following
37 * characters forward or backward. */
42 ! if (buf == NULL ? ga_grow(&ga, nl - ol + 1) == FAIL
43 ! : len + nl - ol >= buflen)
45 /* out of memory, keep old char */
54 ! STRMOVE(GA_PTR(i) + nl, GA_PTR(i) + ol);
55 ! ga.ga_len += nl - ol;
59 ! STRMOVE(buf + i + nl, buf + i + ol);
67 int c = utf_ptr2char(STR_PTR(i));
68 ! int olen = utf_ptr2len(STR_PTR(i));
69 int lc = utf_tolower(c);
71 /* Only replace the character when it is not an invalid
72 * sequence (ASCII character or more than one byte) and
73 * utf_tolower() doesn't return the original character. */
74 ! if ((c < 0x80 || olen > 1) && c != lc)
76 ! int nlen = utf_char2len(lc);
78 /* If the byte length changes need to shift the following
79 * characters forward or backward. */
85 ! ? ga_grow(&ga, nlen - olen + 1) == FAIL
86 ! : len + nlen - olen >= buflen)
88 /* out of memory, keep old char */
97 ! STRMOVE(GA_PTR(i) + nlen, GA_PTR(i) + olen);
98 ! ga.ga_len += nlen - olen;
102 ! STRMOVE(buf + i + nlen, buf + i + olen);
103 ! len += nlen - olen;
107 *** ../vim-7.3.399/src/digraph.c 2010-08-15 21:57:28.000000000 +0200
108 --- src/digraph.c 2012-01-10 21:57:16.000000000 +0100
112 * Lookup the pair "char1", "char2" in the digraph tables.
113 * If no match, return "char2".
114 ! * If "meta" is TRUE and "char1" is a space, return "char2" | 0x80.
117 ! getexactdigraph(char1, char2, meta)
126 * Lookup the pair "char1", "char2" in the digraph tables.
127 * If no match, return "char2".
128 ! * If "meta_char" is TRUE and "char1" is a space, return "char2" | 0x80.
131 ! getexactdigraph(char1, char2, meta_char)
141 if (retval == 0) /* digraph deleted or not found */
143 ! if (char1 == ' ' && meta) /* <space> <char> --> meta-char */
144 return (char2 | 0x80);
149 if (retval == 0) /* digraph deleted or not found */
151 ! if (char1 == ' ' && meta_char) /* <space> <char> --> meta-char */
152 return (char2 | 0x80);
157 * Allow for both char1-char2 and char2-char1
160 ! getdigraph(char1, char2, meta)
167 ! if (((retval = getexactdigraph(char1, char2, meta)) == char2)
169 ! && ((retval = getexactdigraph(char2, char1, meta)) == char1))
174 * Allow for both char1-char2 and char2-char1
177 ! getdigraph(char1, char2, meta_char)
184 ! if (((retval = getexactdigraph(char1, char2, meta_char)) == char2)
186 ! && ((retval = getexactdigraph(char2, char1, meta_char)) == char1))
190 *** ../vim-7.3.399/src/edit.c 2011-12-23 13:14:58.000000000 +0100
191 --- src/edit.c 2012-01-10 21:58:28.000000000 +0100
194 ins_compl_add_dict(dict)
197 ! dictitem_T *refresh;
200 /* Check for optional "refresh" item. */
201 compl_opt_refresh_always = FALSE;
202 ! refresh = dict_find(dict, (char_u *)"refresh", 7);
203 ! if (refresh != NULL && refresh->di_tv.v_type == VAR_STRING)
205 ! char_u *v = refresh->di_tv.vval.v_string;
207 if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
208 compl_opt_refresh_always = TRUE;
211 /* Add completions from a "words" list. */
212 ! words = dict_find(dict, (char_u *)"words", 5);
213 ! if (words != NULL && words->di_tv.v_type == VAR_LIST)
214 ! ins_compl_add_list(words->di_tv.vval.v_list);
219 ins_compl_add_dict(dict)
222 ! dictitem_T *di_refresh;
223 ! dictitem_T *di_words;
225 /* Check for optional "refresh" item. */
226 compl_opt_refresh_always = FALSE;
227 ! di_refresh = dict_find(dict, (char_u *)"refresh", 7);
228 ! if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING)
230 ! char_u *v = di_refresh->di_tv.vval.v_string;
232 if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
233 compl_opt_refresh_always = TRUE;
236 /* Add completions from a "words" list. */
237 ! di_words = dict_find(dict, (char_u *)"words", 5);
238 ! if (di_words != NULL && di_words->di_tv.v_type == VAR_LIST)
239 ! ins_compl_add_list(di_words->di_tv.vval.v_list);
243 *** ../vim-7.3.399/src/eval.c 2012-01-04 14:35:31.000000000 +0100
244 --- src/eval.c 2012-01-10 22:00:50.000000000 +0100
249 * Join list "l" into a string in "*gap", using separator "sep".
250 ! * When "echo" is TRUE use String as echoed, otherwise as inside a List.
254 ! list_join(gap, l, sep, echo, copyID)
265 * Join list "l" into a string in "*gap", using separator "sep".
266 ! * When "echo_style" is TRUE use String as echoed, otherwise as inside a List.
270 ! list_join(gap, l, sep, echo_style, copyID)
284 s = echo_string(&item->li_tv, &tofree, numbuf, copyID);
286 s = tv2string(&item->li_tv, &tofree, numbuf, copyID);
292 s = echo_string(&item->li_tv, &tofree, numbuf, copyID);
294 s = tv2string(&item->li_tv, &tofree, numbuf, copyID);
314 char_u buf2[NUMBUFLEN];
317 ! instr = get_tv_string(&argvars[0]);
318 fromstr = get_tv_string_buf_chk(&argvars[1], buf);
319 tostr = get_tv_string_buf_chk(&argvars[2], buf2);
322 char_u buf2[NUMBUFLEN];
325 ! in_str = get_tv_string(&argvars[0]);
326 fromstr = get_tv_string_buf_chk(&argvars[1], buf);
327 tostr = get_tv_string_buf_chk(&argvars[2], buf2);
333 /* fromstr and tostr have to contain the same number of chars */
334 ! while (*instr != NUL)
339 ! inlen = (*mb_ptr2len)(instr);
343 for (p = fromstr; *p != NUL; p += fromlen)
345 fromlen = (*mb_ptr2len)(p);
346 ! if (fromlen == inlen && STRNCMP(instr, p, inlen) == 0)
348 for (p = tostr; *p != NUL; p += tolen)
353 /* fromstr and tostr have to contain the same number of chars */
354 ! while (*in_str != NUL)
359 ! inlen = (*mb_ptr2len)(in_str);
363 for (p = fromstr; *p != NUL; p += fromlen)
365 fromlen = (*mb_ptr2len)(p);
366 ! if (fromlen == inlen && STRNCMP(in_str, p, inlen) == 0)
368 for (p = tostr; *p != NUL; p += tolen)
375 ! if (first && cpstr == instr)
377 /* Check that fromstr and tostr have the same number of
378 * (multi-byte) characters. Done only once when a character
379 ! * of instr doesn't appear in fromstr. */
381 for (p = tostr; *p != NUL; p += tolen)
387 ! if (first && cpstr == in_str)
389 /* Check that fromstr and tostr have the same number of
390 * (multi-byte) characters. Done only once when a character
391 ! * of in_str doesn't appear in fromstr. */
393 for (p = tostr; *p != NUL; p += tolen)
397 mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen);
405 /* When not using multi-byte chars we can do it faster. */
406 ! p = vim_strchr(fromstr, *instr);
408 ga_append(&ga, tostr[p - fromstr]);
410 ! ga_append(&ga, *instr);
416 mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen);
424 /* When not using multi-byte chars we can do it faster. */
425 ! p = vim_strchr(fromstr, *in_str);
427 ga_append(&ga, tostr[p - fromstr]);
429 ! ga_append(&ga, *in_str);
434 *** ../vim-7.3.399/src/fold.c 2011-08-26 16:12:55.000000000 +0200
435 --- src/fold.c 2012-01-10 22:01:26.000000000 +0100
438 * Init the fold info in a new window.
441 ! foldInitWin(newwin)
444 ! ga_init2(&newwin->w_folds, (int)sizeof(fold_T), 10);
447 /* find_wl_entry() {{{2 */
449 * Init the fold info in a new window.
452 ! foldInitWin(new_win)
455 ! ga_init2(&new_win->w_folds, (int)sizeof(fold_T), 10);
458 /* find_wl_entry() {{{2 */
459 *** ../vim-7.3.399/src/getchar.c 2011-12-23 14:54:01.000000000 +0100
460 --- src/getchar.c 2012-01-10 22:02:30.000000000 +0100
465 * Remove the contents of the stuff buffer and the mapped characters in the
466 ! * typeahead buffer (used in case of an error). If 'typeahead' is true,
467 * flush all typeahead characters (used when interrupted by a CTRL-C).
470 ! flush_buffers(typeahead)
478 * Remove the contents of the stuff buffer and the mapped characters in the
479 ! * typeahead buffer (used in case of an error). If "flush_typeahead" is true,
480 * flush all typeahead characters (used when interrupted by a CTRL-C).
483 ! flush_buffers(flush_typeahead)
484 ! int flush_typeahead;
490 while (read_stuff(TRUE) != NUL)
493 ! if (typeahead) /* remove all typeahead */
496 * We have to get all characters, because we may delete the first part
498 while (read_stuff(TRUE) != NUL)
501 ! if (flush_typeahead) /* remove all typeahead */
504 * We have to get all characters, because we may delete the first part
505 *** ../vim-7.3.399/src/message.c 2011-12-30 14:14:16.000000000 +0100
506 --- src/message.c 2012-01-10 22:03:56.000000000 +0100
509 #ifdef FEAT_CON_DIALOG
513 msgchunk_T *mp_last = NULL;
517 #ifdef FEAT_CON_DIALOG
521 msgchunk_T *mp_last = NULL;
532 case BS: /* scroll one line back */
539 case CAR: /* one extra line */
546 case 'u': /* Up half a page */
547 ! scroll = -(Rows / 2);
550 case 'd': /* Down half a page */
554 case 'b': /* one page back */
556 ! scroll = -(Rows - 1);
559 case ' ': /* one extra page */
566 case 'g': /* all the way back to the start */
570 case 'G': /* all the way to the end */
582 case BS: /* scroll one line back */
589 case CAR: /* one extra line */
596 case 'u': /* Up half a page */
597 ! toscroll = -(Rows / 2);
600 case 'd': /* Down half a page */
601 ! toscroll = Rows / 2;
604 case 'b': /* one page back */
606 ! toscroll = -(Rows - 1);
609 case ' ': /* one extra page */
613 ! toscroll = Rows - 1;
616 case 'g': /* all the way back to the start */
617 ! toscroll = -999999;
620 case 'G': /* all the way to the end */
634 /* go to start of last line */
644 /* go to start of last line */
648 if (mp != NULL && mp->sb_prev != NULL)
650 /* Find line to be displayed at top. */
651 ! for (i = 0; i > scroll; --i)
653 if (mp == NULL || mp->sb_prev == NULL)
656 if (mp != NULL && mp->sb_prev != NULL)
658 /* Find line to be displayed at top. */
659 ! for (i = 0; i > toscroll; --i)
661 if (mp == NULL || mp->sb_prev == NULL)
665 mp_last = msg_sb_start(mp_last->sb_prev);
668 ! if (scroll == -1 && screen_ins_lines(0, 0, 1,
669 (int)Rows, NULL) == OK)
671 /* display line at top */
673 mp_last = msg_sb_start(mp_last->sb_prev);
676 ! if (toscroll == -1 && screen_ins_lines(0, 0, 1,
677 (int)Rows, NULL) == OK)
679 /* display line at top */
690 /* First display any text that we scrolled back. */
691 ! while (scroll > 0 && mp_last != NULL)
693 /* scroll up, display line at bottom */
704 /* First display any text that we scrolled back. */
705 ! while (toscroll > 0 && mp_last != NULL)
707 /* scroll up, display line at bottom */
711 screen_fill((int)Rows - 2, (int)Rows - 1, 0,
712 (int)Columns, ' ', ' ', 0);
713 mp_last = disp_sb_line((int)Rows - 2, mp_last);
720 /* displayed the requested text, more prompt again */
721 screen_fill((int)Rows - 1, (int)Rows, 0,
723 screen_fill((int)Rows - 2, (int)Rows - 1, 0,
724 (int)Columns, ' ', ' ', 0);
725 mp_last = disp_sb_line((int)Rows - 2, mp_last);
732 /* displayed the requested text, more prompt again */
733 screen_fill((int)Rows - 1, (int)Rows, 0,
738 /* display more text, return to caller */
739 ! lines_left = scroll;
746 /* display more text, return to caller */
747 ! lines_left = toscroll;
751 *** ../vim-7.3.399/src/misc2.c 2012-01-10 16:28:41.000000000 +0100
752 --- src/misc2.c 2012-01-10 22:04:25.000000000 +0100
772 /* Reallocate string when byte count changes. This is rare,
773 * thus it's OK to do another malloc()/free(). */
775 ! nl = utf_char2len(uc);
778 ! s = alloc((unsigned)STRLEN(res) + 1 + nl - l);
781 mch_memmove(s, res, p - res);
782 ! STRCPY(s + (p - res) + nl, p + l);
788 utf_char2bytes(uc, p);
791 else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
792 p += l; /* skip multi-byte character */
794 /* Reallocate string when byte count changes. This is rare,
795 * thus it's OK to do another malloc()/free(). */
797 ! newl = utf_char2len(uc);
800 ! s = alloc((unsigned)STRLEN(res) + 1 + newl - l);
803 mch_memmove(s, res, p - res);
804 ! STRCPY(s + (p - res) + newl, p + l);
810 utf_char2bytes(uc, p);
813 else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
814 p += l; /* skip multi-byte character */
815 *** ../vim-7.3.399/src/move.c 2011-02-01 18:01:06.000000000 +0100
816 --- src/move.c 2012-01-10 22:05:22.000000000 +0100
819 * Also updates curwin->w_leftcol.
822 ! curs_columns(scroll)
823 ! int scroll; /* when TRUE, may scroll horizontally */
826 int extra; /* offset for first screen line */
828 * Also updates curwin->w_leftcol.
831 ! curs_columns(may_scroll)
832 ! int may_scroll; /* when TRUE, may scroll horizontally */
835 int extra; /* offset for first screen line */
838 /* No line wrapping: compute curwin->w_leftcol if scrolling is on and line
840 * If scrolling is off, curwin->w_leftcol is assumed to be 0 */
843 && !curwin->w_cline_folded
846 /* No line wrapping: compute curwin->w_leftcol if scrolling is on and line
848 * If scrolling is off, curwin->w_leftcol is assumed to be 0 */
849 ! else if (may_scroll
851 && !curwin->w_cline_folded
853 *** ../vim-7.3.399/src/netbeans.c 2011-10-20 21:58:20.000000000 +0200
854 --- src/netbeans.c 2012-01-10 22:16:26.000000000 +0100
858 char_u *args) /* points to space before arguments or NUL */
862 nbbuf_T *buf = nb_get_buf(bufno);
866 char_u *args) /* points to space before arguments or NUL */
870 nbbuf_T *buf = nb_get_buf(bufno);
874 last.lnum, last.col));
875 del_from_lnum = first.lnum;
876 del_to_lnum = last.lnum;
879 /* Get the position of the first byte after the deleted
880 * section. "next" is NULL when deleting to the end of the
882 last.lnum, last.col));
883 del_from_lnum = first.lnum;
884 del_to_lnum = last.lnum;
887 /* Get the position of the first byte after the deleted
888 * section. "next" is NULL when deleting to the end of the
893 /* Loop over the "\n" separated lines of the argument. */
897 nl = vim_strchr(args, '\n');
901 /* Loop over the "\n" separated lines of the argument. */
905 nl = vim_strchr(args, '\n');
908 EMSG("E640: invalid buffer identifier in initDone");
912 buf->initDone = TRUE;
913 nb_set_curbuf(buf->bufp);
914 #if defined(FEAT_AUTOCMD)
916 EMSG("E640: invalid buffer identifier in initDone");
920 buf->initDone = TRUE;
921 nb_set_curbuf(buf->bufp);
922 #if defined(FEAT_AUTOCMD)
925 ECMD_HIDE + ECMD_OLDBUF, curwin);
927 buf->initDone = TRUE;
929 #if defined(FEAT_TITLE)
933 ECMD_HIDE + ECMD_OLDBUF, curwin);
935 buf->initDone = TRUE;
937 #if defined(FEAT_TITLE)
942 exarg.forceit = FALSE;
944 goto_buffer(&exarg, DOBUF_FIRST, FORWARD, buf->bufp->b_fnum);
946 dosetvisible = FALSE;
950 exarg.forceit = FALSE;
952 goto_buffer(&exarg, DOBUF_FIRST, FORWARD, buf->bufp->b_fnum);
954 dosetvisible = FALSE;
959 buf->bufp->b_fnum, TRUE);
961 buf->initDone = FALSE;
963 /* =====================================================================*/
965 else if (streq((char *)cmd, "setStyle")) /* obsolete... */
967 buf->bufp->b_fnum, TRUE);
969 buf->initDone = FALSE;
971 /* =====================================================================*/
973 else if (streq((char *)cmd, "setStyle")) /* obsolete... */
982 serNum = strtol(cp, &cp, 10);
990 serNum = strtol(cp, &cp, 10);
993 nbdebug((" invalid buffer identifier in removeAnno\n"));
998 serNum = strtol(cp, &cp, 10);
1001 nbdebug((" invalid buffer identifier in removeAnno\n"));
1006 serNum = strtol(cp, &cp, 10);
1007 args = (char_u *)cp;
1010 len = strtol(cp, NULL, 10);
1011 args = (char_u *)cp;
1012 pos = off2pos(buf->bufp, off);
1015 nbdebug((" no such start pos in %s, %ld\n", cmd, off));
1018 len = strtol(cp, NULL, 10);
1019 args = (char_u *)cp;
1020 pos = off2pos(buf->bufp, off);
1023 nbdebug((" no such start pos in %s, %ld\n", cmd, off));
1033 /* =====================================================================*/
1041 /* =====================================================================*/
1044 * Unrecognized command is ignored.
1047 ! if (inAtomic && doupdate)
1054 * Is this needed? I moved the netbeans_Xt_connect() later during startup
1055 * and it may no longer be necessary. If its not needed then needupdate
1056 ! * and doupdate can also be removed.
1058 ! if (buf != NULL && buf->initDone && doupdate)
1060 update_screen(NOT_VALID);
1063 * Unrecognized command is ignored.
1066 ! if (inAtomic && do_update)
1073 * Is this needed? I moved the netbeans_Xt_connect() later during startup
1074 * and it may no longer be necessary. If its not needed then needupdate
1075 ! * and do_update can also be removed.
1077 ! if (buf != NULL && buf->initDone && do_update)
1079 update_screen(NOT_VALID);
1081 *** ../vim-7.3.399/src/option.c 2012-01-04 19:34:32.000000000 +0100
1082 --- src/option.c 2012-01-10 22:06:03.000000000 +0100
1087 /* Careful: P_RCLR and P_RALL are a combination of other P_ flags */
1088 ! int clear = (flags & P_RCLR) == P_RCLR;
1089 ! int all = ((flags & P_RALL) == P_RALL || clear);
1092 if ((flags & P_RSTAT) || all) /* mark all status lines dirty */
1096 /* Careful: P_RCLR and P_RALL are a combination of other P_ flags */
1097 ! int doclear = (flags & P_RCLR) == P_RCLR;
1098 ! int all = ((flags & P_RALL) == P_RALL || doclear);
1101 if ((flags & P_RSTAT) || all) /* mark all status lines dirty */
1104 changed_window_setting();
1106 redraw_curbuf_later(NOT_VALID);
1108 redraw_all_later(CLEAR);
1110 redraw_all_later(NOT_VALID);
1112 changed_window_setting();
1114 redraw_curbuf_later(NOT_VALID);
1116 redraw_all_later(CLEAR);
1118 redraw_all_later(NOT_VALID);
1119 *** ../vim-7.3.399/src/os_unix.c 2011-10-20 21:09:25.000000000 +0200
1120 --- src/os_unix.c 2012-01-10 21:48:49.000000000 +0100
1123 char_u *p_shcf_copy = NULL;
1128 int pty_master_fd = -1; /* for pty's */
1139 if (extra_shell_arg != NULL)
1140 argv[argc++] = (char *)extra_shell_arg;
1144 linenr_T lnum = curbuf->b_op_start.lnum;
1146 char_u *lp = ml_get(lnum);
1150 close(fromshell_fd);
1154 len = write(toshell_fd, "", (size_t)1);
1157 ! s = vim_strchr(lp + written, NL);
1158 len = write(toshell_fd, (char *)lp + written,
1160 : (size_t)(s - (lp + written)));
1162 len = write(toshell_fd, "", (size_t)1);
1165 ! char_u *s = vim_strchr(lp + written, NL);
1167 len = write(toshell_fd, (char *)lp + written,
1169 : (size_t)(s - (lp + written)));
1170 *** ../vim-7.3.399/src/screen.c 2012-01-10 12:42:05.000000000 +0100
1171 --- src/screen.c 2012-01-10 22:06:51.000000000 +0100
1176 * screen_valid - allocate screen buffers if size changed
1177 ! * If "clear" is TRUE: clear screen if it has been resized.
1178 * Returns TRUE if there is a valid screen to write to.
1179 * Returns FALSE when starting up and screen not initialized yet.
1182 ! screen_valid(clear)
1185 ! screenalloc(clear); /* allocate screen buffers if size changed */
1186 return (ScreenLines != NULL);
1192 * screen_valid - allocate screen buffers if size changed
1193 ! * If "doclear" is TRUE: clear screen if it has been resized.
1194 * Returns TRUE if there is a valid screen to write to.
1195 * Returns FALSE when starting up and screen not initialized yet.
1198 ! screen_valid(doclear)
1201 ! screenalloc(doclear); /* allocate screen buffers if size changed */
1202 return (ScreenLines != NULL);
1207 * final size of the shell is needed.
1210 ! screenalloc(clear)
1213 int new_row, old_row;
1216 * final size of the shell is needed.
1219 ! screenalloc(doclear)
1222 int new_row, old_row;
1226 * (used when resizing the window at the "--more--" prompt or when
1227 * executing an external command, for the GUI).
1231 (void)vim_memset(new_ScreenLines + new_row * Columns,
1232 ' ', (size_t)Columns * sizeof(schar_T));
1234 * (used when resizing the window at the "--more--" prompt or when
1235 * executing an external command, for the GUI).
1239 (void)vim_memset(new_ScreenLines + new_row * Columns,
1240 ' ', (size_t)Columns * sizeof(schar_T));
1243 screen_Columns = Columns;
1245 must_redraw = CLEAR; /* need to clear the screen later */
1251 screen_Columns = Columns;
1253 must_redraw = CLEAR; /* need to clear the screen later */
1258 *** ../vim-7.3.399/src/search.c 2011-10-04 17:00:13.000000000 +0200
1259 --- src/search.c 2012-01-10 22:07:16.000000000 +0100
1263 if (vim_strchr(p, ';') != NULL) /* there may be comments */
1265 ! int instr = FALSE; /* inside of string */
1267 p = line; /* scan from start */
1268 while ((p = vim_strpbrk(p, (char_u *)"\";")) != NULL)
1274 if (*(p - 1) != '\\') /* skip escaped quote */
1277 else if (p == line || ((p - line) >= 2
1279 && *(p - 1) != '\\' && *(p - 2) != '#'))
1282 ! else if (!instr && ((p - line) < 2
1283 || (*(p - 1) != '\\' && *(p - 2) != '#')))
1288 if (vim_strchr(p, ';') != NULL) /* there may be comments */
1290 ! int in_str = FALSE; /* inside of string */
1292 p = line; /* scan from start */
1293 while ((p = vim_strpbrk(p, (char_u *)"\";")) != NULL)
1299 if (*(p - 1) != '\\') /* skip escaped quote */
1302 else if (p == line || ((p - line) >= 2
1304 && *(p - 1) != '\\' && *(p - 2) != '#'))
1307 ! else if (!in_str && ((p - line) < 2
1308 || (*(p - 1) != '\\' && *(p - 2) != '#')))
1311 *** ../vim-7.3.399/src/spell.c 2012-01-10 16:28:41.000000000 +0100
1312 --- src/spell.c 2012-01-10 22:09:23.000000000 +0100
1315 static int offset2bytes __ARGS((int nr, char_u *buf));
1316 static int bytes2offset __ARGS((char_u **pp));
1317 static void sug_write __ARGS((spellinfo_T *spin, char_u *fname));
1318 ! static void mkspell __ARGS((int fcount, char_u **fnames, int ascii, int overwrite, int added_word));
1319 static void spell_message __ARGS((spellinfo_T *spin, char_u *str));
1320 static void init_spellfile __ARGS((void));
1323 static int offset2bytes __ARGS((int nr, char_u *buf));
1324 static int bytes2offset __ARGS((char_u **pp));
1325 static void sug_write __ARGS((spellinfo_T *spin, char_u *fname));
1326 ! static void mkspell __ARGS((int fcount, char_u **fnames, int ascii, int over_write, int added_word));
1327 static void spell_message __ARGS((spellinfo_T *spin, char_u *str));
1328 static void init_spellfile __ARGS((void));
1332 * and ".spl" is appended to make the output file name.
1335 ! mkspell(fcount, fnames, ascii, overwrite, added_word)
1338 int ascii; /* -ascii argument given */
1339 ! int overwrite; /* overwrite existing output file */
1340 int added_word; /* invoked through "zg" */
1342 char_u *fname = NULL;
1344 * and ".spl" is appended to make the output file name.
1347 ! mkspell(fcount, fnames, ascii, over_write, added_word)
1350 int ascii; /* -ascii argument given */
1351 ! int over_write; /* overwrite existing output file */
1352 int added_word; /* invoked through "zg" */
1354 char_u *fname = NULL;
1358 /* Check for overwriting before doing things that may take a lot of
1360 ! if (!overwrite && mch_stat((char *)wfname, &st) >= 0)
1366 /* Check for overwriting before doing things that may take a lot of
1368 ! if (!over_write && mch_stat((char *)wfname, &st) >= 0)
1372 *** ../vim-7.3.399/src/syntax.c 2011-06-19 04:54:17.000000000 +0200
1373 --- src/syntax.c 2012-01-10 22:10:23.000000000 +0100
1379 ! syn_list_flags(nl, flags, attr)
1380 ! struct name_list *nl;
1386 ! for (i = 0; nl[i].flag != 0; ++i)
1387 ! if (flags & nl[i].flag)
1389 ! msg_puts_attr((char_u *)nl[i].name, attr);
1397 ! syn_list_flags(nlist, flags, attr)
1398 ! struct name_list *nlist;
1404 ! for (i = 0; nlist[i].flag != 0; ++i)
1405 ! if (flags & nlist[i].flag)
1407 ! msg_puts_attr((char_u *)nlist[i].name, attr);
1411 *** ../vim-7.3.399/src/tag.c 2011-12-14 14:15:12.000000000 +0100
1412 --- src/tag.c 2012-01-10 21:51:05.000000000 +0100
1415 int match_count = 0; /* number of matches found */
1420 #ifdef FEAT_MULTI_LANG
1427 if (ga_grow(&ga_match[mtt], 1) == OK)
1433 #ifdef FEAT_MULTI_LANG
1434 *** ../vim-7.3.399/src/window.c 2011-12-30 15:01:55.000000000 +0100
1435 --- src/window.c 2012-01-10 22:11:41.000000000 +0100
1441 ! * When "newwin" is NULL: split the current window in two.
1442 ! * When "newwin" is not NULL: insert this window at the far
1443 * top/left/right/bottom.
1444 * return FAIL for failure, OK otherwise
1447 ! win_split_ins(size, flags, newwin, dir)
1453 ! win_T *wp = newwin;
1455 int new_size = size;
1461 ! * When "new_wp" is NULL: split the current window in two.
1462 ! * When "new_wp" is not NULL: insert this window at the far
1463 * top/left/right/bottom.
1464 * return FAIL for failure, OK otherwise
1467 ! win_split_ins(size, flags, new_wp, dir)
1473 ! win_T *wp = new_wp;
1475 int new_size = size;
1479 /* add a status line when p_ls == 1 and splitting the first window */
1480 if (lastwin == firstwin && p_ls == 1 && oldwin->w_status_height == 0)
1482 ! if (oldwin->w_height <= p_wmh && newwin == NULL)
1487 /* add a status line when p_ls == 1 and splitting the first window */
1488 if (lastwin == firstwin && p_ls == 1 && oldwin->w_status_height == 0)
1490 ! if (oldwin->w_height <= p_wmh && new_wp == NULL)
1498 available = oldwin->w_width;
1499 ! if (available < needed && newwin == NULL)
1506 available = oldwin->w_width;
1507 ! if (available < needed && new_wp == NULL)
1513 available = oldwin->w_height;
1516 ! if (available < needed && newwin == NULL)
1521 available = oldwin->w_height;
1524 ! if (available < needed && new_wp == NULL)
1532 /* new window below/right of current one */
1533 ! if (newwin == NULL)
1534 wp = win_alloc(oldwin, FALSE);
1536 win_append(oldwin, wp);
1540 ! if (newwin == NULL)
1541 wp = win_alloc(oldwin->w_prev, FALSE);
1543 win_append(oldwin->w_prev, wp);
1546 ! if (newwin == NULL)
1553 /* new window below/right of current one */
1554 ! if (new_wp == NULL)
1555 wp = win_alloc(oldwin, FALSE);
1557 win_append(oldwin, wp);
1561 ! if (new_wp == NULL)
1562 wp = win_alloc(oldwin->w_prev, FALSE);
1564 win_append(oldwin->w_prev, wp);
1567 ! if (new_wp == NULL)
1573 frp->fr_parent = curfrp;
1576 ! if (newwin == NULL)
1579 ! frp = newwin->w_frame;
1580 frp->fr_parent = curfrp->fr_parent;
1582 /* Insert the new frame at the right place in the frame list. */
1584 frp->fr_parent = curfrp;
1587 ! if (new_wp == NULL)
1590 ! frp = new_wp->w_frame;
1591 frp->fr_parent = curfrp->fr_parent;
1593 /* Insert the new frame at the right place in the frame list. */
1596 win_T *after UNUSED;
1602 * allocate window structure and linesizes arrays
1604 ! newwin = (win_T *)alloc_clear((unsigned)sizeof(win_T));
1605 ! if (newwin != NULL && win_alloc_lines(newwin) == FAIL)
1611 ! if (newwin != NULL)
1614 /* Don't execute autocommands while the window is not properly
1616 win_T *after UNUSED;
1622 * allocate window structure and linesizes arrays
1624 ! new_wp = (win_T *)alloc_clear((unsigned)sizeof(win_T));
1625 ! if (new_wp != NULL && win_alloc_lines(new_wp) == FAIL)
1631 ! if (new_wp != NULL)
1634 /* Don't execute autocommands while the window is not properly
1640 ! win_append(after, newwin);
1642 #ifdef FEAT_VERTSPLIT
1643 ! newwin->w_wincol = 0;
1644 ! newwin->w_width = Columns;
1647 /* position the display and the cursor at the top of the file. */
1648 ! newwin->w_topline = 1;
1650 ! newwin->w_topfill = 0;
1652 ! newwin->w_botline = 2;
1653 ! newwin->w_cursor.lnum = 1;
1654 #ifdef FEAT_SCROLLBIND
1655 ! newwin->w_scbind_pos = 1;
1658 /* We won't calculate w_fraction until resizing the window */
1659 ! newwin->w_fraction = 0;
1660 ! newwin->w_prev_fraction_row = -1;
1665 ! gui_create_scrollbar(&newwin->w_scrollbars[SBAR_LEFT],
1666 ! SBAR_LEFT, newwin);
1667 ! gui_create_scrollbar(&newwin->w_scrollbars[SBAR_RIGHT],
1668 ! SBAR_RIGHT, newwin);
1672 /* init w: variables */
1673 ! init_var_dict(&newwin->w_vars, &newwin->w_winvar);
1676 ! foldInitWin(newwin);
1681 #ifdef FEAT_SEARCH_EXTRA
1682 ! newwin->w_match_head = NULL;
1683 ! newwin->w_next_match_id = 4;
1689 #if defined(FEAT_WINDOWS) || defined(PROTO)
1694 ! win_append(after, new_wp);
1696 #ifdef FEAT_VERTSPLIT
1697 ! new_wp->w_wincol = 0;
1698 ! new_wp->w_width = Columns;
1701 /* position the display and the cursor at the top of the file. */
1702 ! new_wp->w_topline = 1;
1704 ! new_wp->w_topfill = 0;
1706 ! new_wp->w_botline = 2;
1707 ! new_wp->w_cursor.lnum = 1;
1708 #ifdef FEAT_SCROLLBIND
1709 ! new_wp->w_scbind_pos = 1;
1712 /* We won't calculate w_fraction until resizing the window */
1713 ! new_wp->w_fraction = 0;
1714 ! new_wp->w_prev_fraction_row = -1;
1719 ! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_LEFT],
1720 ! SBAR_LEFT, new_wp);
1721 ! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_RIGHT],
1722 ! SBAR_RIGHT, new_wp);
1726 /* init w: variables */
1727 ! init_var_dict(&new_wp->w_vars, &new_wp->w_winvar);
1730 ! foldInitWin(new_wp);
1735 #ifdef FEAT_SEARCH_EXTRA
1736 ! new_wp->w_match_head = NULL;
1737 ! new_wp->w_next_match_id = 4;
1743 #if defined(FEAT_WINDOWS) || defined(PROTO)
1744 *** ../vim-7.3.399/src/version.c 2012-01-10 18:37:53.000000000 +0100
1745 --- src/version.c 2012-01-10 22:23:10.000000000 +0100
1749 { /* Add new patch number below this line */
1755 A parent can be arrested if his child cannot hold back a burp during a church
1757 [real standing law in Nebraska, United States of America]
1759 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
1760 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1761 \\\ an exciting new programming language -- http://www.Zimbu.org ///
1762 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///