changeset 10:00510380663b misc

Moar data.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 26 Feb 2009 07:14:20 +0000
parents a3f1106a6dc9
children 4e05428b5327
files materials/parsematerial.pl
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/materials/parsematerial.pl	Thu Feb 26 06:50:22 2009 +0000
+++ b/materials/parsematerial.pl	Thu Feb 26 07:14:20 2009 +0000
@@ -128,13 +128,18 @@
   $str =~ s/\|/+/g;
   print "$str\n";
 } elsif ($opt_tf) {
+  print "/set gmat_names=".join(' ', @entries)."\n";
+  print "/set gmat_ntypes=".join(' ', map(lc($data{$_}{"type"}), @entries))."\n";
+
   my %types = ();
-  print "/set gmat_names=".join(' ', @entries)."\n";
-  print "/set gmat_types=".join(' ', map(lc($data{$_}{"type"}), @entries))."\n";
   foreach my $name (@entries) {
     push(@{$types{$data{$name}{"type"}}}, lc($name));
   }
-  foreach my $type (sort { $a cmp $b } keys %types) {
+
+  my @typet = sort { $a cmp $b } keys %types;
+  print "/set gmat_types=".join(' ', map(lc($_), @typet))."\n";
+  
+  foreach my $type (@typet) {
     print "/set gmat_type_".lc($type)."=".join('|', @{$types{$type}})."\n";
   }
 } else {