Skip to content

Commit 984a3aa

Browse files
committed
[css2] Added option -l.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401949
1 parent 267d040 commit 984a3aa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

css2/bin/mkpropidx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/local/bin/perl
22
# Index of property names.
33
# Arnaud Le Hors lehors@w3.org/Ian Jacobs ij@w3.org
4-
# $Id: mkpropidx,v 2.7 2002-07-25 20:28:24 bbos Exp $
4+
# $Id: mkpropidx,v 2.8 2002-08-21 11:44:43 bbos Exp $
55
use English;
66

77

@@ -23,7 +23,7 @@ while ($ARGV[0] =~ /^-/) {
2323
$PROGNAME = substr($0, rindex($0, "/") + 1);
2424

2525
if (!$ARGV[1]) {
26-
print "Usage: $PROGNAME [-r realpath] indexfile dbase\n";
26+
print "Usage: $PROGNAME [-r realpath] [-l level] indexfile dbase\n";
2727
exit 1;
2828
} else {
2929
$indexf = $ARGV[0];
@@ -47,7 +47,7 @@ sub readdb {
4747
}
4848
$INPUT_RECORD_SEPARATOR="/*";
4949
$buf = "";
50-
$indexes = ();
50+
@indexes = ();
5151
while ($buf = <DBASE>) {
5252
$INPUT_RECORD_SEPARATOR="*/";
5353
unless (eof(DBASE)) {
@@ -58,7 +58,7 @@ sub readdb {
5858
$key = $2;
5959
# Newlines and tabs-> space
6060
$data =~ s/[\n\t]+/ /gs;
61-
$indexes{$key} = $data;
61+
push(@indexes, ($data));
6262
} else {
6363
warn "Bad syntax: $entry\n";
6464
}
@@ -163,8 +163,8 @@ sub table_head {
163163
}
164164

165165
sub table_body {
166-
foreach $key (sort (keys %indexes)) {
167-
($name, $val, $init, $app, $inh, $perc, $media, $csslevels) = split(/;;/, $indexes{$key});
166+
foreach $x (sort @indexes) {
167+
($name, $val, $init, $app, $inh, $perc, $media, $csslevels) = split(/;;/, $x);
168168
if (! defined $level || $csslevels =~ /\b$level\b/) {
169169
print OUTPUT "<tr>";
170170
format_name($name);

0 commit comments

Comments
 (0)