4 if(/\[CALLPERL\s+(.*)\s+left\]/ ... /\[CALLPERL end\]/) {
6 $code .= $_ if(!/CALLPERL/);
7 $name = $1 if(/.flash.*name=([^&][^ ]*)/);
8 $name = $1 if(/.flash.*name="([^&]*)"/);
11 elsif(/\[CALLPERL .*right\]/ ... /\[CALLPERL end\]/) {
12 $highlight .= $_ if(!/CALLPERL/);
14 elsif ($code ne "" && ($lang eq "swfc" || $lang eq "sc")) {
15 $code =~ s/"/"/g;
17 # print stderr "Warning: ttf->swf\n" if($code =~ s/Arial.ttf/Arial.swf/g);
19 open(fi, ">tmp.sc");print fi $code;close(fi);
20 print stderr "[$lang] swfc tmp.sc ($name)\n";
21 system("../src/swfc tmp.sc >&2");
22 ($embed = `swfdump -e $name`) =~ /WIDTH="([^"]*)"/;
23 system("cp $name data");
25 print "<td bgcolor=\"#ffffff\" width=\"$width\">";
32 elsif ($code ne "" && ($lang eq "python" or $lang eq "shell")) {
33 $code =~ s/"/"/g;
34 if($lang eq "python") {
35 open(fi, ">$nr.py");print fi $code;close(fi);
38 print "<td bgcolor=\"#ffffff\" width=\"$width\">";
47 elsif ($highlight ne "") {
48 $highlight =~ s/^\n\s*//g;
49 $highlight =~ s/\s*\n$//g;
51 # todo: apply syntax highlighting.
52 print $highlight."\n";