Skip to content

Commit 33e40d9

Browse files
committed
[css2] Can now deal with more than one style sheet.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401930
1 parent b4fad77 commit 33e40d9

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

css2/bin/mkchain

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# numbering information
77
#
88
# Bert Bos <bert@w3.org>
9-
# $Id: mkchain,v 2.1 1998-05-19 20:47:48 ijacobs Exp $
9+
# $Id: mkchain,v 2.2 2002-08-02 18:59:42 bbos Exp $
1010

1111
use Getopt::Std;
1212
use lib 'bin';
@@ -39,9 +39,9 @@ while (<IN>) {
3939
/<\/title[^>]*>/io and do {
4040
print OUT $`;
4141
print OUT $&;
42-
if ($stylesheet ne '') {
43-
print OUT "\n<link rel=\"stylesheet\" href=\"$stylesheet\"";
44-
if ($styletype ne '') {print OUT " type=\"$styletype\"";}
42+
for ($i = 0; $i <= $#stylesheet; $i++) {
43+
print OUT "\n<link rel=\"stylesheet\" href=\"$stylesheet[$i]\"";
44+
if ($styletype[$i] ne '') {print OUT " type=\"$styletype[$i]\"";}
4545
print OUT ">";
4646
}
4747
if ($chapno > 0) {

css2/bin/utils.pm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# A few common routines -*-perl-*-
22
#
33
# Bert Bos <bert@w3.org>
4-
# $Id: utils.pm,v 2.2 1998-04-30 18:52:04 bbos Exp $
4+
# $Id: utils.pm,v 2.3 2002-08-02 18:59:42 bbos Exp $
55

66
package utils;
77
require Exporter;
88
@ISA = qw(Exporter);
9-
@EXPORT = qw(readfile writefile read_config $contents $stylesheet
10-
$styletype @chapter @resetnumber @format %lookup $chapno @relations
9+
@EXPORT = qw(readfile writefile read_config $contents @stylesheet
10+
@styletype @chapter @resetnumber @format %lookup $chapno @relations
1111
@links @tonavbar $src_ext);
1212

1313
# @EXPORT_OK = qw(parsewords);
1414

1515

1616

1717
$contents = ''; # File containing ToC
18-
$stylesheet = ''; # URL of style sheet
19-
$styletype = ''; # MIME type of style sheet
18+
@stylesheet = (); # URLs of style sheets
19+
@styletype = (); # MIME types of style sheets
2020
@chapter = (); # Array of chapter files
2121
@resetnumber = (); # For each chapter: the chapter number - 1
2222
@format = (); # For each chapter: list of number formats
@@ -65,8 +65,8 @@ sub read_config {
6565
last;
6666
};
6767
/^\@stylesheet$/o and do { # URL (and type) of style sheet
68-
$stylesheet = $words[1];
69-
if (defined $words[2]) {$styletype = $words[2];}
68+
push(@stylesheet, ($words[1]));
69+
if (defined $words[2]) {push(@styletype, ($words[2]));}
7070
last;
7171
};
7272
/^\@format$/o and do { # Set numbering style for next chapters

0 commit comments

Comments
 (0)