ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/Requirements.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/Requirements.pm (file contents):
Revision 1.1.2.2 by williamc, Wed Apr 19 14:14:32 2000 UTC vs.
Revision 1.1.2.3 by williamc, Tue Apr 25 14:07:39 2000 UTC

# Line 22 | Line 22 | sub new {
22          bless $self, $class;
23          $self->{file}=shift;
24          $self->{Arch}=1;
25 <        push @{$self->{ARCHBLOCK}}, $Arch;
25 >        push @{$self->{ARCHBLOCK}}, $self->{Arch};
26          $self->init($self->{file});
27          return $self;
28   }
# Line 61 | Line 61 | sub init {
61          my $switch=ActiveDoc::SimpleDoc->new();
62          $switch->filetoparse($file);
63          $switch->newparse("ordering");
64 +        $switch->addtag("ordering","Architecture",
65 +                                        \&Arch_Start,$self,
66 +                                        "", $self,
67 +                                        \&Arch_End, $self);
68 +        $switch->grouptag("Architecture","ordering");
69          $switch->addtag("ordering","require",
70                                          \&require_start,$self,
71                                          "", $self,
# Line 96 | Line 101 | sub require_start {
101            $self->{url}{$$hashref{'name'}}=$$hashref{'file'};
102          }
103   }
104 +
105 + sub Arch_Start {
106 +        my $self=shift;
107 +        my $name=shift;
108 +        my $hashref=shift;
109 +
110 +        $self->{switch}->checktag($name, $hashref,'name');
111 +        ( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($self->{Arch}=1)
112 +                                                : ($self->{Arch}=0);
113 +        push @{$self->{ARCHBLOCK}}, $self->{Arch};
114 + }
115 +
116 + sub Arch_End {
117 +        my $self=shift;
118 +        my $name=shift;
119 +
120 +        pop @{$self->{ARCHBLOCK}};
121 +        $self->{Arch}=$self->{ARCHBLOCK}[$#{$self->{ARCHBLOCK}}];
122 + }
123 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines