… | |
… | |
99 | |
99 | |
100 | if ($arch->{type} =~ s/^(bitmask)_(.*)/$1/) { |
100 | if ($arch->{type} =~ s/^(bitmask)_(.*)/$1/) { |
101 | $arch->{value} = $bitmask{$2} ||= {}; |
101 | $arch->{value} = $bitmask{$2} ||= {}; |
102 | } elsif ($arch->{type} =~ s/^(list)_(.*)/$1/) { |
102 | } elsif ($arch->{type} =~ s/^(list)_(.*)/$1/) { |
103 | $arch->{value} = $list{$2} ||= {}; |
103 | $arch->{value} = $list{$2} ||= {}; |
|
|
104 | } elsif ($arch->{type} eq "fixed") { |
|
|
105 | $arch->{value} = $e->attr ("value"); |
104 | } elsif ($arch->{type} =~ s/^bool_special$/bool/) { |
106 | } elsif ($arch->{type} =~ s/^bool_special$/bool/) { |
105 | $arch->{value} = [$e->attr ("false"), $e->attr ("true")]; |
107 | $arch->{value} = [$e->attr ("false"), $e->attr ("true")]; |
106 | } |
108 | } |
107 | |
109 | |
108 | $sect->{$e->attr ("arch") || $e->attr("arch_begin")} = $arch; |
110 | $sect->{$e->attr ("arch") || $e->attr("arch_begin")} = $arch; |
… | |
… | |
170 | my $type = $type{$e->attr ("name")} ||= {}; |
172 | my $type = $type{$e->attr ("name")} ||= {}; |
171 | |
173 | |
172 | $type->{name} = $e->attr ("name"); |
174 | $type->{name} = $e->attr ("name"); |
173 | |
175 | |
174 | parse_type $e, $type; |
176 | parse_type $e, $type; |
175 | #unshift @{$type->{import}}, \%default_attr; |
|
|
176 | |
177 | |
177 | if ($e->attr ("number") > 0) { |
178 | if ($e->attr ("number") > 0) { |
178 | $attr{$e->attr ("number")} = $type; |
179 | $attr{$e->attr ("number")} = $type; |
179 | } elsif ($e->attr ("name") eq "Misc") { |
180 | } elsif ($e->attr ("name") eq "Misc") { |
180 | delete $type->{required}; |
181 | delete $type->{required}; |