summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-16 21:54:23 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-16 21:54:23 +0000
commitf27ffc4a6f879c06b35c4ce682db4c638250041b (patch)
tree2bc8a15343102d4d0b833b588df5a52dc1656012 /toke.c
parentafe37c7d6a8905e6a383ca079ae3daa3025fd5e9 (diff)
downloadperl-f27ffc4a6f879c06b35c4ce682db4c638250041b.tar.gz
[win32] merge changes#996,998,999 from maintbranch
p4raw-link: @999 on //depot/maint-5.004/perl: 52d674631edd5d1237df7203efc4396c3b77f8e7 p4raw-link: @998 on //depot/maint-5.004/perl: 8eaf12205a772c0a833cee734c82473643013f95 p4raw-link: @996 on //depot/maint-5.004/perl: 44110adace3111d6546fef417a9c88b22157bba2 p4raw-id: //depot/win32/perl@1006
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/toke.c b/toke.c
index 10b2a6af0e..4a21941926 100644
--- a/toke.c
+++ b/toke.c
@@ -411,8 +411,6 @@ skipspace(register char *s)
PerlIO_clearerr(rsfp);
else
(void)PerlIO_close(rsfp);
- if (e_fp == rsfp)
- e_fp = Nullfp;
rsfp = Nullfp;
return s;
}
@@ -1076,7 +1074,7 @@ intuit_more(register char *s)
else {
int weight = 2; /* let's weigh the evidence */
char seen[256];
- unsigned char un_char = 0, last_un_char;
+ unsigned char un_char = 255, last_un_char;
char *send = strchr(s,']');
char tmpbuf[sizeof tokenbuf * 4];
@@ -1142,6 +1140,8 @@ intuit_more(register char *s)
weight += 30;
if (strchr("zZ79~",s[1]))
weight += 30;
+ if (last_un_char == 255 && (isDIGIT(s[1]) || s[1] == '$'))
+ weight -= 5; /* cope with negative subscript */
break;
default:
if (!isALNUM(last_un_char) && !strchr("$@&",last_un_char) &&
@@ -1791,8 +1791,6 @@ yylex(void)
PerlIO_clearerr(rsfp);
else
(void)PerlIO_close(rsfp);
- if (e_fp == rsfp)
- e_fp = Nullfp;
rsfp = Nullfp;
}
if (!in_eval && (minus_n || minus_p)) {