summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1996-01-12 02:05:06 +0000
committerAndy Dougherty <doughera.lafayette.edu>1996-01-12 02:05:06 +0000
commit91b7def858c29dac014df40946a128c06b3aa2ed (patch)
tree13105b0dab49112bd9aa24614b399d5293ddc9ec
parent2af9ad4a904b5dc5ce052f7b4ec3732ac53e73ab (diff)
downloadperl-91b7def858c29dac014df40946a128c06b3aa2ed.tar.gz
perl 5.002beta2 patch: toke.c
Chip's U8/STDCHAR patch. Tim's "add a ; after PERL5DB" patch.
-rw-r--r--toke.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index 118079c3a4..7b882faf18 100644
--- a/toke.c
+++ b/toke.c
@@ -678,8 +678,8 @@ char *start;
SvGROW(sv, SvLEN(sv) + 256);
d = SvPVX(sv) + i;
d -= 2;
- max = d[1] & 0377;
- for (i = (*d & 0377); i <= max; i++)
+ max = (U8)d[1];
+ for (i = (U8)*d; i <= max; i++)
*d++ = i;
dorange = FALSE;
continue;
@@ -1332,8 +1332,18 @@ yylex()
if (!in_eval && !preambled) {
preambled = TRUE;
sv_setpv(linestr,incl_perldb());
- if (autoboot_preamble)
- sv_catpv(linestr, autoboot_preamble);
+ if (SvCUR(linestr))
+ sv_catpv(linestr,";");
+ if (preambleav){
+ while(AvFILL(preambleav) >= 0) {
+ SV *tmpsv = av_shift(preambleav);
+ sv_catsv(linestr, tmpsv);
+ sv_catpv(linestr, ";");
+ sv_free(tmpsv);
+ }
+ sv_free((SV*)preambleav);
+ preambleav = NULL;
+ }
if (minus_n || minus_p) {
sv_catpv(linestr, "LINE: while (<>) {");
if (minus_l)