summaryrefslogtreecommitdiffstats
path: root/src/charset.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-01-10 22:26:17 +0100
committerBram Moolenaar <Bram@vim.org>2012-01-10 22:26:17 +0100
commit70b2a56d5a8fd54f3d0707fa77dea86a4bd8195f (patch)
tree2144b21b49d79de16665fb585daf1e9cf66e85c0 /src/charset.c
parent1f5965b3c4d2b29e167a5dfecdf0ec59fe4c45c0 (diff)
updated for version 7.3.400v7.3.400
Problem: Compiler warnings for shadowed variables. Solution: Remove or rename the variables.
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/charset.c b/src/charset.c
index 21fb4e52c5..90cf06cebb 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -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;
}
}
}