summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-28 14:53:03 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-28 14:53:03 +0000
commitcd6cffa7b6b4828016f5ff0cffdde732a0548a92 (patch)
tree04c86fdc23977576a139f791eff5ed9795836089 /pack.c
parentf0221db4626bb589f230bf239a7f9df83d7e444f (diff)
* pack.c (pack_unpack): change names of local variables because their
names are overlapped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/pack.c b/pack.c
index 8e072c9..f1d9fd1 100644
--- a/pack.c
+++ b/pack.c
@@ -1491,8 +1491,8 @@ pack_unpack(str, fmt)
case 'u':
{
- VALUE str = infected_str_new(0, (send - s)*3/4, str);
- char *ptr = RSTRING(str)->ptr;
+ VALUE buf = infected_str_new(0, (send - s)*3/4, str);
+ char *ptr = RSTRING(buf)->ptr;
int total = 0;
while (s < send && *s > ' ' && *s < 'a') {
@@ -1502,9 +1502,9 @@ pack_unpack(str, fmt)
hunk[3] = '\0';
len = (*s++ - ' ') & 077;
total += len;
- if (total > RSTRING(str)->len) {
- len -= total - RSTRING(str)->len;
- total = RSTRING(str)->len;
+ if (total > RSTRING(buf)->len) {
+ len -= total - RSTRING(buf)->len;
+ total = RSTRING(buf)->len;
}
while (len > 0) {
@@ -1539,16 +1539,16 @@ pack_unpack(str, fmt)
s += 2; /* possible checksum byte */
}
- RSTRING(str)->ptr[total] = '\0';
- RSTRING(str)->len = total;
- rb_ary_push(ary, str);
+ RSTRING(buf)->ptr[total] = '\0';
+ RSTRING(buf)->len = total;
+ rb_ary_push(ary, buf);
}
break;
case 'm':
{
- VALUE str = infected_str_new(0, (send - s)*3/4, str);
- char *ptr = RSTRING(str)->ptr;
+ VALUE buf = infected_str_new(0, (send - s)*3/4, str);
+ char *ptr = RSTRING(buf)->ptr;
int a,b,c = 0,d;
static int first = 1;
static int b64_xtable[256];
@@ -1583,15 +1583,15 @@ pack_unpack(str, fmt)
*ptr++ = b << 4 | c >> 2;
}
*ptr = '\0';
- RSTRING(str)->len = ptr - RSTRING(str)->ptr;
- rb_ary_push(ary, str);
+ RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
+ rb_ary_push(ary, buf);
}
break;
case 'M':
{
- VALUE str = infected_str_new(0, send - s, str);
- char *ptr = RSTRING(str)->ptr;
+ VALUE buf = infected_str_new(0, send - s, str);
+ char *ptr = RSTRING(buf)->ptr;
int c1, c2;
while (s < send) {
@@ -1610,8 +1610,8 @@ pack_unpack(str, fmt)
s++;
}
*ptr = '\0';
- RSTRING(str)->len = ptr - RSTRING(str)->ptr;
- rb_ary_push(ary, str);
+ RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
+ rb_ary_push(ary, buf);
}
break;