X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=doc%2Fcodebeautifier.pl;h=de760261ed2adcae54577ae674f6b3f500457cb4;hb=cbb0e3fba6b522cf44e42a17d1631830cd0d590f;hp=094c523b216bd4a7222ce69b9587e38454c258c4;hpb=c2b431306dc202edd5c7d59cc8ddb784fe66caeb;p=swftools.git diff --git a/doc/codebeautifier.pl b/doc/codebeautifier.pl index 094c523..de76026 100644 --- a/doc/codebeautifier.pl +++ b/doc/codebeautifier.pl @@ -2,16 +2,21 @@ while() { if(/\[CALLPERL .*left\]/ ... /\[CALLPERL end\]/) { $code .= $_ if(!/CALLPERL/); - $name = $1 if(/.swf.*name=([^&][^ ]*)/); - $name = $1 if(/.swf.*name="([^&]*)"/); + $name = $1 if(/.flash.*name=([^&][^ ]*)/); + $name = $1 if(/.flash.*name="([^&]*)"/); + chomp $name; } elsif(/\[CALLPERL .*right\]/ ... /\[CALLPERL end\]/) { $highlight .= $_ if(!/CALLPERL/); } elsif ($code ne "") { $code =~ s/"/"/g; + +# print stderr "Warning: ttf->swf\n" if($code =~ s/Arial.ttf/Arial.swf/g); + open(fi, ">tmp.sc");print fi $code;close(fi); - system("swfc tmp.sc"); + print stderr "swfc tmp.sc ($name)\n"; + system("swfc tmp.sc >&2"); ($embed = `swfdump -e $name`) =~ /WIDTH="([^"]*)"/; $width = $1; print "";