packages: vim/7.3.400 (NEW) - new
adamg
adamg at pld-linux.org
Sun Jan 15 02:27:42 CET 2012
Author: adamg Date: Sun Jan 15 01:27:42 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- new
---- Files affected:
packages/vim:
7.3.400 (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/vim/7.3.400
diff -u /dev/null packages/vim/7.3.400:1.1
--- /dev/null Sun Jan 15 02:27:42 2012
+++ packages/vim/7.3.400 Sun Jan 15 02:27:37 2012
@@ -0,0 +1,1762 @@
+To: vim_dev at googlegroups.com
+Subject: Patch 7.3.400
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.3.400
+Problem: Compiler warnings for shadowed variables.
+Solution: Remove or rename the variables.
+Files: src/charset.c, src/digraph.c, src/edit.c, src/eval.c, src/fold.c,
+ src/getchar.c, src/message.c, src/misc2.c, src/move.c,
+ src/netbeans.c, src/option.c, src/os_unix.c, src/screen.c,
+ src/search.c, src/spell.c, src/syntax.c, src/tag.c, src/window.c
+
+
+*** ../vim-7.3.399/src/charset.c 2010-08-15 21:57:25.000000000 +0200
+--- src/charset.c 2012-01-10 21:55:50.000000000 +0100
+***************
+*** 463,503 ****
+ if (enc_utf8)
+ {
+ int c = utf_ptr2char(STR_PTR(i));
+! int ol = utf_ptr2len(STR_PTR(i));
+ int lc = utf_tolower(c);
+
+ /* Only replace the character when it is not an invalid
+ * sequence (ASCII character or more than one byte) and
+ * utf_tolower() doesn't return the original character. */
+! if ((c < 0x80 || ol > 1) && c != lc)
+ {
+! int nl = utf_char2len(lc);
+
+ /* If the byte length changes need to shift the following
+ * characters forward or backward. */
+! if (ol != nl)
+ {
+! if (nl > ol)
+ {
+! if (buf == NULL ? ga_grow(&ga, nl - ol + 1) == FAIL
+! : len + nl - ol >= buflen)
+ {
+ /* out of memory, keep old char */
+ lc = c;
+! nl = ol;
+ }
+ }
+! if (ol != nl)
+ {
+ if (buf == NULL)
+ {
+! STRMOVE(GA_PTR(i) + nl, GA_PTR(i) + ol);
+! ga.ga_len += nl - ol;
+ }
+ else
+ {
+! STRMOVE(buf + i + nl, buf + i + ol);
+! len += nl - ol;
+ }
+ }
+ }
+--- 463,504 ----
+ if (enc_utf8)
+ {
+ int c = utf_ptr2char(STR_PTR(i));
+! int olen = utf_ptr2len(STR_PTR(i));
+ int lc = utf_tolower(c);
+
+ /* Only replace the character when it is not an invalid
+ * sequence (ASCII character or more than one byte) and
+ * utf_tolower() doesn't return the original character. */
+! if ((c < 0x80 || olen > 1) && c != lc)
+ {
+! int nlen = utf_char2len(lc);
+
+ /* If the byte length changes need to shift the following
+ * characters forward or backward. */
+! if (olen != nlen)
+ {
+! if (nlen > olen)
+ {
+! if (buf == NULL
+! ? ga_grow(&ga, nlen - olen + 1) == FAIL
+! : len + nlen - olen >= buflen)
+ {
+ /* out of memory, keep old char */
+ lc = c;
+! nlen = olen;
+ }
+ }
+! if (olen != nlen)
+ {
+ if (buf == NULL)
+ {
+! STRMOVE(GA_PTR(i) + nlen, GA_PTR(i) + olen);
+! ga.ga_len += nlen - olen;
+ }
+ else
+ {
+! STRMOVE(buf + i + nlen, buf + i + olen);
+! len += nlen - olen;
+ }
+ }
+ }
+*** ../vim-7.3.399/src/digraph.c 2010-08-15 21:57:28.000000000 +0200
+--- src/digraph.c 2012-01-10 21:57:16.000000000 +0100
+***************
+*** 2080,2092 ****
+ /*
+ * Lookup the pair "char1", "char2" in the digraph tables.
+ * If no match, return "char2".
+! * If "meta" is TRUE and "char1" is a space, return "char2" | 0x80.
+ */
+ static int
+! getexactdigraph(char1, char2, meta)
+ int char1;
+ int char2;
+! int meta;
+ {
+ int i;
+ int retval = 0;
+--- 2080,2092 ----
+ /*
+ * Lookup the pair "char1", "char2" in the digraph tables.
+ * If no match, return "char2".
+! * If "meta_char" is TRUE and "char1" is a space, return "char2" | 0x80.
+ */
+ static int
+! getexactdigraph(char1, char2, meta_char)
+ int char1;
+ int char2;
+! int meta_char;
+ {
+ int i;
+ int retval = 0;
+***************
+*** 2159,2165 ****
+
+ if (retval == 0) /* digraph deleted or not found */
+ {
+! if (char1 == ' ' && meta) /* <space> <char> --> meta-char */
+ return (char2 | 0x80);
+ return char2;
+ }
+--- 2159,2165 ----
+
+ if (retval == 0) /* digraph deleted or not found */
+ {
+! if (char1 == ' ' && meta_char) /* <space> <char> --> meta-char */
+ return (char2 | 0x80);
+ return char2;
+ }
+***************
+*** 2171,2186 ****
+ * Allow for both char1-char2 and char2-char1
+ */
+ int
+! getdigraph(char1, char2, meta)
+ int char1;
+ int char2;
+! int meta;
+ {
+ int retval;
+
+! if (((retval = getexactdigraph(char1, char2, meta)) == char2)
+ && (char1 != char2)
+! && ((retval = getexactdigraph(char2, char1, meta)) == char1))
+ return char2;
+ return retval;
+ }
+--- 2171,2186 ----
+ * Allow for both char1-char2 and char2-char1
+ */
+ int
+! getdigraph(char1, char2, meta_char)
+ int char1;
+ int char2;
+! int meta_char;
+ {
+ int retval;
+
+! if (((retval = getexactdigraph(char1, char2, meta_char)) == char2)
+ && (char1 != char2)
+! && ((retval = getexactdigraph(char2, char1, meta_char)) == char1))
+ return char2;
+ return retval;
+ }
+*** ../vim-7.3.399/src/edit.c 2011-12-23 13:14:58.000000000 +0100
+--- src/edit.c 2012-01-10 21:58:28.000000000 +0100
+***************
+*** 4003,4026 ****
+ ins_compl_add_dict(dict)
+ dict_T *dict;
+ {
+! dictitem_T *refresh;
+! dictitem_T *words;
+
+ /* Check for optional "refresh" item. */
+ compl_opt_refresh_always = FALSE;
+! refresh = dict_find(dict, (char_u *)"refresh", 7);
+! if (refresh != NULL && refresh->di_tv.v_type == VAR_STRING)
+ {
+! char_u *v = refresh->di_tv.vval.v_string;
+
+ if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
+ compl_opt_refresh_always = TRUE;
+ }
+
+ /* Add completions from a "words" list. */
+! words = dict_find(dict, (char_u *)"words", 5);
+! if (words != NULL && words->di_tv.v_type == VAR_LIST)
+! ins_compl_add_list(words->di_tv.vval.v_list);
+ }
+
+ /*
+--- 4003,4026 ----
+ ins_compl_add_dict(dict)
+ dict_T *dict;
+ {
+! dictitem_T *di_refresh;
+! dictitem_T *di_words;
+
+ /* Check for optional "refresh" item. */
+ compl_opt_refresh_always = FALSE;
+! di_refresh = dict_find(dict, (char_u *)"refresh", 7);
+! if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING)
+ {
+! char_u *v = di_refresh->di_tv.vval.v_string;
+
+ if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
+ compl_opt_refresh_always = TRUE;
+ }
+
+ /* Add completions from a "words" list. */
+! di_words = dict_find(dict, (char_u *)"words", 5);
+! if (di_words != NULL && di_words->di_tv.v_type == VAR_LIST)
+! ins_compl_add_list(di_words->di_tv.vval.v_list);
+ }
+
+ /*
+*** ../vim-7.3.399/src/eval.c 2012-01-04 14:35:31.000000000 +0100
+--- src/eval.c 2012-01-10 22:00:50.000000000 +0100
+***************
+*** 6573,6587 ****
+
+ /*
+ * Join list "l" into a string in "*gap", using separator "sep".
+! * When "echo" is TRUE use String as echoed, otherwise as inside a List.
+ * Return FAIL or OK.
+ */
+ static int
+! list_join(gap, l, sep, echo, copyID)
+ garray_T *gap;
+ list_T *l;
+ char_u *sep;
+! int echo;
+ int copyID;
+ {
+ int first = TRUE;
+--- 6573,6587 ----
+
+ /*
+ * Join list "l" into a string in "*gap", using separator "sep".
+! * When "echo_style" is TRUE use String as echoed, otherwise as inside a List.
+ * Return FAIL or OK.
+ */
+ static int
+! list_join(gap, l, sep, echo_style, copyID)
+ garray_T *gap;
+ list_T *l;
+ char_u *sep;
+! int echo_style;
+ int copyID;
+ {
+ int first = TRUE;
+***************
+*** 6597,6603 ****
+ else
+ ga_concat(gap, sep);
+
+! if (echo)
+ s = echo_string(&item->li_tv, &tofree, numbuf, copyID);
+ else
+ s = tv2string(&item->li_tv, &tofree, numbuf, copyID);
+--- 6597,6603 ----
+ else
+ ga_concat(gap, sep);
+
+! if (echo_style)
+ s = echo_string(&item->li_tv, &tofree, numbuf, copyID);
+ else
+ s = tv2string(&item->li_tv, &tofree, numbuf, copyID);
+***************
+*** 17893,17899 ****
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+! char_u *instr;
+ char_u *fromstr;
+ char_u *tostr;
+ char_u *p;
+--- 17893,17899 ----
+ typval_T *argvars;
+ typval_T *rettv;
+ {
+! char_u *in_str;
+ char_u *fromstr;
+ char_u *tostr;
+ char_u *p;
+***************
+*** 17910,17916 ****
+ char_u buf2[NUMBUFLEN];
+ garray_T ga;
+
+! instr = get_tv_string(&argvars[0]);
+ fromstr = get_tv_string_buf_chk(&argvars[1], buf);
+ tostr = get_tv_string_buf_chk(&argvars[2], buf2);
+
+--- 17910,17916 ----
+ char_u buf2[NUMBUFLEN];
+ garray_T ga;
+
+! in_str = get_tv_string(&argvars[0]);
+ fromstr = get_tv_string_buf_chk(&argvars[1], buf);
+ tostr = get_tv_string_buf_chk(&argvars[2], buf2);
+
+***************
+*** 17936,17954 ****
+ }
+
+ /* fromstr and tostr have to contain the same number of chars */
+! while (*instr != NUL)
+ {
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+! inlen = (*mb_ptr2len)(instr);
+! cpstr = instr;
+ cplen = inlen;
+ idx = 0;
+ for (p = fromstr; *p != NUL; p += fromlen)
+ {
+ fromlen = (*mb_ptr2len)(p);
+! if (fromlen == inlen && STRNCMP(instr, p, inlen) == 0)
+ {
+ for (p = tostr; *p != NUL; p += tolen)
+ {
+--- 17936,17954 ----
+ }
+
+ /* fromstr and tostr have to contain the same number of chars */
+! while (*in_str != NUL)
+ {
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+! inlen = (*mb_ptr2len)(in_str);
+! cpstr = in_str;
+ cplen = inlen;
+ idx = 0;
+ for (p = fromstr; *p != NUL; p += fromlen)
+ {
+ fromlen = (*mb_ptr2len)(p);
+! if (fromlen == inlen && STRNCMP(in_str, p, inlen) == 0)
+ {
+ for (p = tostr; *p != NUL; p += tolen)
+ {
+***************
+*** 17967,17977 ****
+ ++idx;
+ }
+
+! if (first && cpstr == instr)
+ {
+ /* Check that fromstr and tostr have the same number of
+ * (multi-byte) characters. Done only once when a character
+! * of instr doesn't appear in fromstr. */
+ first = FALSE;
+ for (p = tostr; *p != NUL; p += tolen)
+ {
+--- 17967,17977 ----
+ ++idx;
+ }
+
+! if (first && cpstr == in_str)
+ {
+ /* Check that fromstr and tostr have the same number of
+ * (multi-byte) characters. Done only once when a character
+! * of in_str doesn't appear in fromstr. */
+ first = FALSE;
+ for (p = tostr; *p != NUL; p += tolen)
+ {
+***************
+*** 17986,18003 ****
+ mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen);
+ ga.ga_len += cplen;
+
+! instr += inlen;
+ }
+ else
+ #endif
+ {
+ /* When not using multi-byte chars we can do it faster. */
+! p = vim_strchr(fromstr, *instr);
+ if (p != NULL)
+ ga_append(&ga, tostr[p - fromstr]);
+ else
+! ga_append(&ga, *instr);
+! ++instr;
+ }
+ }
+
+--- 17986,18003 ----
+ mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen);
+ ga.ga_len += cplen;
+
+! in_str += inlen;
+ }
+ else
+ #endif
+ {
+ /* When not using multi-byte chars we can do it faster. */
+! p = vim_strchr(fromstr, *in_str);
+ if (p != NULL)
+ ga_append(&ga, tostr[p - fromstr]);
+ else
+! ga_append(&ga, *in_str);
+! ++in_str;
+ }
+ }
+
+*** ../vim-7.3.399/src/fold.c 2011-08-26 16:12:55.000000000 +0200
+--- src/fold.c 2012-01-10 22:01:26.000000000 +0100
+***************
+*** 1033,1042 ****
+ * Init the fold info in a new window.
+ */
+ void
+! foldInitWin(newwin)
+! win_T *newwin;
+ {
+! ga_init2(&newwin->w_folds, (int)sizeof(fold_T), 10);
+ }
+
+ /* find_wl_entry() {{{2 */
+--- 1033,1042 ----
+ * Init the fold info in a new window.
+ */
+ void
+! foldInitWin(new_win)
+! win_T *new_win;
+ {
+! ga_init2(&new_win->w_folds, (int)sizeof(fold_T), 10);
+ }
+
+ /* find_wl_entry() {{{2 */
+*** ../vim-7.3.399/src/getchar.c 2011-12-23 14:54:01.000000000 +0100
+--- src/getchar.c 2012-01-10 22:02:30.000000000 +0100
+***************
+*** 418,429 ****
+
+ /*
+ * Remove the contents of the stuff buffer and the mapped characters in the
+! * typeahead buffer (used in case of an error). If 'typeahead' is true,
+ * flush all typeahead characters (used when interrupted by a CTRL-C).
+ */
+ void
+! flush_buffers(typeahead)
+! int typeahead;
+ {
+ init_typebuf();
+
+--- 418,429 ----
+
+ /*
+ * Remove the contents of the stuff buffer and the mapped characters in the
+! * typeahead buffer (used in case of an error). If "flush_typeahead" is true,
+ * flush all typeahead characters (used when interrupted by a CTRL-C).
+ */
+ void
+! flush_buffers(flush_typeahead)
+! int flush_typeahead;
+ {
+ init_typebuf();
+
+***************
+*** 431,437 ****
+ while (read_stuff(TRUE) != NUL)
+ ;
+
+! if (typeahead) /* remove all typeahead */
+ {
+ /*
+ * We have to get all characters, because we may delete the first part
+--- 431,437 ----
+ while (read_stuff(TRUE) != NUL)
+ ;
+
+! if (flush_typeahead) /* remove all typeahead */
+ {
+ /*
+ * We have to get all characters, because we may delete the first part
+*** ../vim-7.3.399/src/message.c 2011-12-30 14:14:16.000000000 +0100
+--- src/message.c 2012-01-10 22:03:56.000000000 +0100
+***************
+*** 2487,2493 ****
+ #ifdef FEAT_CON_DIALOG
+ int retval = FALSE;
+ #endif
+! int scroll;
+ msgchunk_T *mp_last = NULL;
+ msgchunk_T *mp;
+ int i;
+--- 2487,2493 ----
+ #ifdef FEAT_CON_DIALOG
+ int retval = FALSE;
+ #endif
+! int toscroll;
+ msgchunk_T *mp_last = NULL;
+ msgchunk_T *mp;
+ int i;
+***************
+*** 2538,2586 ****
+ }
+ #endif
+
+! scroll = 0;
+ switch (c)
+ {
+ case BS: /* scroll one line back */
+ case K_BS:
+ case 'k':
+ case K_UP:
+! scroll = -1;
+ break;
+
+ case CAR: /* one extra line */
+ case NL:
+ case 'j':
+ case K_DOWN:
+! scroll = 1;
+ break;
+
+ case 'u': /* Up half a page */
+! scroll = -(Rows / 2);
+ break;
+
+ case 'd': /* Down half a page */
+! scroll = Rows / 2;
+ break;
+
+ case 'b': /* one page back */
+ case K_PAGEUP:
+! scroll = -(Rows - 1);
+ break;
+
+ case ' ': /* one extra page */
+ case 'f':
+ case K_PAGEDOWN:
+ case K_LEFTMOUSE:
+! scroll = Rows - 1;
+ break;
+
+ case 'g': /* all the way back to the start */
+! scroll = -999999;
+ break;
+
+ case 'G': /* all the way to the end */
+! scroll = 999999;
+ lines_left = 999999;
+ break;
+
+--- 2538,2586 ----
+ }
+ #endif
+
+! toscroll = 0;
+ switch (c)
+ {
+ case BS: /* scroll one line back */
+ case K_BS:
+ case 'k':
+ case K_UP:
+! toscroll = -1;
+ break;
+
+ case CAR: /* one extra line */
+ case NL:
+ case 'j':
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list