X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=doc%2Fcodebeautifier.pl;h=8ecfc29f325beea1fd09fceca12afa0905e42718;hb=a8f844bfc977266610e63963a62de232d18d8a1a;hp=6225c83ba1575763ddaf338ebe1ae947f2e0f1c5;hpb=038891d498de3a4069e1e16cdc0e9a36efc5c248;p=swftools.git diff --git a/doc/codebeautifier.pl b/doc/codebeautifier.pl index 6225c83..8ecfc29 100644 --- a/doc/codebeautifier.pl +++ b/doc/codebeautifier.pl @@ -4,15 +4,21 @@ while() $code .= $_ if(!/CALLPERL/); $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("../src/swfc tmp.sc >&2"); ($embed = `swfdump -e $name`) =~ /WIDTH="([^"]*)"/; + system("cp $name data"); $width = $1; print ""; print $embed;