Permalink
Browse files

updated for version 7.3.400

Problem:    Compiler warnings for shadowed variables.
Solution:   Remove or rename the variables.
  • Loading branch information...
1 parent 392d8e5 commit 8cba80c05b650333fd45e51baae980f62c8c8efa @brammool brammool committed Jan 10, 2012
Showing with 167 additions and 162 deletions.
  1. +14 −13 src/charset.c
  2. +8 −8 src/digraph.c
  3. +8 −8 src/edit.c
  4. +16 −16 src/eval.c
  5. +3 −3 src/fold.c
  6. +4 −4 src/getchar.c
  7. +19 −19 src/message.c
  8. +6 −6 src/misc2.c
  9. +3 −3 src/move.c
  10. +15 −15 src/netbeans.c
  11. +3 −3 src/option.c
  12. +4 −3 src/os_unix.c
  13. +8 −8 src/screen.c
  14. +5 −5 src/search.c
  15. +4 −4 src/spell.c
  16. +5 −5 src/syntax.c
  17. +2 −1 src/tag.c
  18. +2 −0 src/version.c
  19. +38 −38 src/window.c
View
@@ -463,41 +463,42 @@ str_foldcase(str, orglen, buf, buflen)
if (enc_utf8)
{
int c = utf_ptr2char(STR_PTR(i));
- int ol = utf_ptr2len(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 || ol > 1) && c != lc)
+ if ((c < 0x80 || olen > 1) && c != lc)
{
- int nl = utf_char2len(lc);
+ int nlen = utf_char2len(lc);
/* If the byte length changes need to shift the following
* characters forward or backward. */
- if (ol != nl)
+ if (olen != nlen)
{
- if (nl > ol)
+ if (nlen > olen)
{
- if (buf == NULL ? ga_grow(&ga, nl - ol + 1) == FAIL
- : len + nl - ol >= buflen)
+ if (buf == NULL
+ ? ga_grow(&ga, nlen - olen + 1) == FAIL
+ : len + nlen - olen >= buflen)
{
/* out of memory, keep old char */
lc = c;
- nl = ol;
+ nlen = olen;
}
}
- if (ol != nl)
+ if (olen != nlen)
{
if (buf == NULL)
{
- STRMOVE(GA_PTR(i) + nl, GA_PTR(i) + ol);
- ga.ga_len += nl - ol;
+ STRMOVE(GA_PTR(i) + nlen, GA_PTR(i) + olen);
+ ga.ga_len += nlen - olen;
}
else
{
- STRMOVE(buf + i + nl, buf + i + ol);
- len += nl - ol;
+ STRMOVE(buf + i + nlen, buf + i + olen);
+ len += nlen - olen;
}
}
}
View
@@ -2080,13 +2080,13 @@ get_digraph(cmdline)
/*
* 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.
+ * If "meta_char" is TRUE and "char1" is a space, return "char2" | 0x80.
*/
static int
-getexactdigraph(char1, char2, meta)
+getexactdigraph(char1, char2, meta_char)
int char1;
int char2;
- int meta;
+ int meta_char;
{
int i;
int retval = 0;
@@ -2159,7 +2159,7 @@ getexactdigraph(char1, char2, meta)
if (retval == 0) /* digraph deleted or not found */
{
- if (char1 == ' ' && meta) /* <space> <char> --> meta-char */
+ if (char1 == ' ' && meta_char) /* <space> <char> --> meta-char */
return (char2 | 0x80);
return char2;
}
@@ -2171,16 +2171,16 @@ getexactdigraph(char1, char2, meta)
* Allow for both char1-char2 and char2-char1
*/
int
-getdigraph(char1, char2, meta)
+getdigraph(char1, char2, meta_char)
int char1;
int char2;
- int meta;
+ int meta_char;
{
int retval;
- if (((retval = getexactdigraph(char1, char2, meta)) == char2)
+ if (((retval = getexactdigraph(char1, char2, meta_char)) == char2)
&& (char1 != char2)
- && ((retval = getexactdigraph(char2, char1, meta)) == char1))
+ && ((retval = getexactdigraph(char2, char1, meta_char)) == char1))
return char2;
return retval;
}
View
@@ -4003,24 +4003,24 @@ ins_compl_add_list(list)
ins_compl_add_dict(dict)
dict_T *dict;
{
- dictitem_T *refresh;
- dictitem_T *words;
+ dictitem_T *di_refresh;
+ dictitem_T *di_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)
+ di_refresh = dict_find(dict, (char_u *)"refresh", 7);
+ if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING)
{
- char_u *v = refresh->di_tv.vval.v_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. */
- 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);
+ 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);
}
/*
View
@@ -6573,15 +6573,15 @@ list2string(tv, copyID)
/*
* Join list "l" into a string in "*gap", using separator "sep".
- * When "echo" is TRUE use String as echoed, otherwise as inside a List.
+ * 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, copyID)
+list_join(gap, l, sep, echo_style, copyID)
garray_T *gap;
list_T *l;
char_u *sep;
- int echo;
+ int echo_style;
int copyID;
{
int first = TRUE;
@@ -6597,7 +6597,7 @@ list_join(gap, l, sep, echo, copyID)
else
ga_concat(gap, sep);
- if (echo)
+ if (echo_style)
s = echo_string(&item->li_tv, &tofree, numbuf, copyID);
else
s = tv2string(&item->li_tv, &tofree, numbuf, copyID);
@@ -17893,7 +17893,7 @@ f_tr(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
- char_u *instr;
+ char_u *in_str;
char_u *fromstr;
char_u *tostr;
char_u *p;
@@ -17910,7 +17910,7 @@ f_tr(argvars, rettv)
char_u buf2[NUMBUFLEN];
garray_T ga;
- instr = get_tv_string(&argvars[0]);
+ 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,19 +17936,19 @@ f_tr(argvars, rettv)
}
/* fromstr and tostr have to contain the same number of chars */
- while (*instr != NUL)
+ while (*in_str != NUL)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
{
- inlen = (*mb_ptr2len)(instr);
- cpstr = instr;
+ 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(instr, p, inlen) == 0)
+ if (fromlen == inlen && STRNCMP(in_str, p, inlen) == 0)
{
for (p = tostr; *p != NUL; p += tolen)
{
@@ -17967,11 +17967,11 @@ f_tr(argvars, rettv)
++idx;
}
- if (first && cpstr == instr)
+ 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 instr doesn't appear in fromstr. */
+ * of in_str doesn't appear in fromstr. */
first = FALSE;
for (p = tostr; *p != NUL; p += tolen)
{
@@ -17986,18 +17986,18 @@ f_tr(argvars, rettv)
mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen);
ga.ga_len += cplen;
- instr += inlen;
+ in_str += inlen;
}
else
#endif
{
/* When not using multi-byte chars we can do it faster. */
- p = vim_strchr(fromstr, *instr);
+ p = vim_strchr(fromstr, *in_str);
if (p != NULL)
ga_append(&ga, tostr[p - fromstr]);
else
- ga_append(&ga, *instr);
- ++instr;
+ ga_append(&ga, *in_str);
+ ++in_str;
}
}
View
@@ -1033,10 +1033,10 @@ foldMoveTo(updown, dir, count)
* Init the fold info in a new window.
*/
void
-foldInitWin(newwin)
- win_T *newwin;
+foldInitWin(new_win)
+ win_T *new_win;
{
- ga_init2(&newwin->w_folds, (int)sizeof(fold_T), 10);
+ ga_init2(&new_win->w_folds, (int)sizeof(fold_T), 10);
}
/* find_wl_entry() {{{2 */
View
@@ -418,20 +418,20 @@ typeahead_noflush(c)
/*
* 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,
+ * 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(typeahead)
- int typeahead;
+flush_buffers(flush_typeahead)
+ int flush_typeahead;
{
init_typebuf();
start_stuff();
while (read_stuff(TRUE) != NUL)
;
- if (typeahead) /* remove all typeahead */
+ if (flush_typeahead) /* remove all typeahead */
{
/*
* We have to get all characters, because we may delete the first part
Oops, something went wrong.

0 comments on commit 8cba80c

Please sign in to comment.