git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
adaae54
)
don't try to compile with lang!=swfc.
author
kramm
<kramm>
Sun, 24 Oct 2004 15:04:24 +0000
(15:04 +0000)
committer
kramm
<kramm>
Sun, 24 Oct 2004 15:04:24 +0000
(15:04 +0000)
doc/codebeautifier.pl
patch
|
blob
|
history
diff --git
a/doc/codebeautifier.pl
b/doc/codebeautifier.pl
index
8ecfc29
..
517bd69
100644
(file)
--- a/
doc/codebeautifier.pl
+++ b/
doc/codebeautifier.pl
@@
-1,6
+1,7
@@
while(<stdin>)
{
while(<stdin>)
{
- if(/\[CALLPERL .*left\]/ ... /\[CALLPERL end\]/) {
+ if(/\[CALLPERL\s+(.*)\s+left\]/ ... /\[CALLPERL end\]/) {
+ $lang = $1 if($1);
$code .= $_ if(!/CALLPERL/);
$name = $1 if(/.flash.*name=([^&][^ ]*)/);
$name = $1 if(/.flash.*name="([^&]*)"/);
$code .= $_ if(!/CALLPERL/);
$name = $1 if(/.flash.*name=([^&][^ ]*)/);
$name = $1 if(/.flash.*name="([^&]*)"/);
@@
-9,13
+10,13
@@
while(<stdin>)
elsif(/\[CALLPERL .*right\]/ ... /\[CALLPERL end\]/) {
$highlight .= $_ if(!/CALLPERL/);
}
elsif(/\[CALLPERL .*right\]/ ... /\[CALLPERL end\]/) {
$highlight .= $_ if(!/CALLPERL/);
}
- elsif ($code ne "") {
+ elsif ($code ne "" && ($lang eq "swfc" || $lang eq "sc")) {
$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);
$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);
- print stderr "swfc tmp.sc ($name)\n";
+ print stderr "[$lang] swfc tmp.sc ($name)\n";
system("../src/swfc tmp.sc >&2");
($embed = `swfdump -e $name`) =~ /WIDTH="([^"]*)"/;
system("cp $name data");
system("../src/swfc tmp.sc >&2");
($embed = `swfdump -e $name`) =~ /WIDTH="([^"]*)"/;
system("cp $name data");
@@
-27,6
+28,9
@@
while(<stdin>)
print;
unlink "tmp.sc";
}
print;
unlink "tmp.sc";
}
+ elsif ($code ne "") {
+ $code="";
+ }
elsif ($highlight ne "") {
$highlight =~ s/^\n\s*//g;
$highlight =~ s/\s*\n$//g;
elsif ($highlight ne "") {
$highlight =~ s/^\n\s*//g;
$highlight =~ s/\s*\n$//g;