";
print output "| Media:";
print output " | $fmedia\n";
}
sub format_compval {
$values = clean($_[0]);
$values =~ s/inherit/inherit<\/span>/g;
print output "";
print output "| Computed value:";
print output " | $values\n";
}
# extract every possible block
$_ = $buf;
while (/$blockst(?:.*?)$blocket/s) {
$placeholder = $';
my $h = $&;
if ($h =~ /$blockst$patt;;$patt;;$patt;;$patt;;$patt;;$patt;;$patt;;$patt$blocket/s) {
# Set parameters first (before any modifications)
my $props = $1;
my $values = $2;
my $init = $3;
my $applies = $4;
my $inherited = $5;
my $percentage = $6;
my $media = $7;
my $compval = $8;
my @names = split(/[, \t\n]+/, $props);
my $name = $names[0];
$output = "$path$name.srb";
print "\textracting $output\n";
open(output, "> $output");
&format_property($props, $values, $init, $applies, $inherited,
$percentage, $media, $compval);
close(output);
} else {
warn "Incorrect syntax for property definition: $h\n";
}
$_ = $placeholder;
}
| |