As I was annoyed by it, I fixxed it; though it's probably a dirty fix
:p
Version used is varaq-010201, the current stable version.
Changes in my source:
- naqmoH -> naQmoH
- the vangqa' if ($escv = 1) { -> if ($escv == 1) {
And of course the vangqa fix, accomplished this way:
Added a counter for which loop is executed; $cval and $block are now
arrays: $cval[] and $blocka[]. The counter is $vangqacount ("vangqa-
count").
execblock now takes $block as an argument; syntax: &execblock($block)
Note that there probably are some more $block interference problems,
I
will fix them if I find them (or mail them to me :))
Diff: (which contains some weird thingt, but I'm not into diffs
enough
to fix them, probably just some enters added?)
13,14c13,14
< # and general plumbing) under terms of the Mozilla Public License
(see
< # http://www.mozilla.org for details).
---
> # and general plumbing) under terms of the Mozilla Public License
(see
> # http://www.mozilla.org for details).
127c127
< {
---
> {
151,152c151,154
< for($i = 0; $i <= $#{$block}; $i++) {
< execute($block->[$i]); # recursively exec defined
procedure
---
>
> my $blok = shift;
> for($i = 0; $i <= $#{$blok}; $i++) {
> execute($blok->[$i]); # recursively exec defined
procedure
183c185
<
---
>
221c223
<
---
>
235c237
< push @{$stack}, $temp;
---
> push @{$stack}, $temp;
253c255
<
---
>
257c259
< $pval = 'mk';
---
> $pval = 'mk';
341c343
<
---
>
373c375
<
---
>
418c420
< }
---
> }
469c471
<
---
>
483c485
< } elsif ($cmd eq 'naqmoH') {
---
> } elsif ($cmd eq 'naQmoH') {
503c505
< execblock();
---
> &execblock($block);
516c518
< execblock();
---
> &execblock($block);
519,520d520
< $block = pop @{$stack};
< $cval = pop @{$stack};
522c522,528
< if (ref($block) ne 'ARRAY') # better safe than sorry
---
> $vangqacount++;
> ##print "\nvcount: ".$vangqacount;
> $blocka[$vangqacount] = pop @{$stack};
> $cval[$vangqacount] = pop @{$stack};
>
>
> if (ref($blocka[$vangqacount]) ne 'ARRAY') # better
safe than sorry
527,530c533,538
< while ($cval > 0) {
< execblock();
< if ($escv = 1) {
< $cval = 1;
---
> while ($cval[$vangqacount] > 0) {
> print "\ncval: ".$cval[$vangqacount];
> &execblock($blocka[$vangqacount]);
>
> if ($escv == 1) {
> $cval[$vangqacount] = 1;
533c541,542
< $cval--;
---
> $cval[$vangqacount]--;
>
534a544
> $vangqacount--;
545c555
< execblock();
---
> &execblock($block);
558,560c568,570
< # (j proctor) Perl makes escaping easy: if it encounters this in
the
middle of
< # executing a proc, it'll jump immediately to the end of it. If
< # there's nothing next, well, it's done.
---
> # (j proctor) Perl makes escaping easy: if it encounters this in
the
middle of
> # executing a proc, it'll jump immediately to the end of it. If
> # there's nothing next, well, it's done.
567c577
<
---
>
571c581
<
---
>