Difference for lib/adm/map_info from version 1.4 to 1.5


version 1.4 version 1.5
Line 111
 
Line 111
 }  }
 # return table containing all objects in the map  # return table containing all objects in the map
 sub readmap {  sub readmap {
     local ($m);      my ($m);
       my($last);
       my($parent);
     $last = "";      $last = "";
     $parent = "";      $parent = "";
          
Line 122
 
Line 124
     }      }
     $_ = <IN>;      $_ = <IN>;
     if (! /^arch map$/) {      if (! /^arch map$/) {
  print "Error: file $file isn't mapfile.\n";  # print "Error: file $file isn't mapfile.\n";
  return;   return;
     }      }
     if ($VERBOSE) {      if ($VERBOSE) {
Line 153
 
Line 155
  if (($m = (@_ = /^arch \S+\s*$/g)) > 1) {   if (($m = (@_ = /^arch \S+\s*$/g)) > 1) {
      $parent = /^arch (\S+)\s*$/;       $parent = /^arch (\S+)\s*$/;
      # object has inventory       # object has inventory
      local ($inv) = $_;       my ($inv) = $_;
      while (<IN>) {       while (<IN>) {
  if (/((.|\n)*end\n)(arch (.|\n)*\nend\n)/) {   if (/((.|\n)*end\n)(arch (.|\n)*\nend\n)/) {
      &check_obj ("$inv$1");       &check_obj ("$inv$1");
Line 164
 
Line 166
  } elsif (/^end$/) {   } elsif (/^end$/) {
      &check_obj ("$inv$_");       &check_obj ("$inv$_");
  } else {   } else {
      if ($printmap) { print "$mapname"; $printmap=0;}  #     if ($printmap) { print "$mapname"; $printmap=0;}
      print "  Error: Corrupted map file $file.\nSegment:\n$_\nLine: $.\n";  # This doesn't work right - it gets confused when objects are within
   # another object
   #     print "  Error: Corrupted map file $file.\nSegment:\n$_\nLine: $.\n";
  }   }
      }        }
      $parent="";       $parent="";
  } elsif (/^More$/ || $m == 1) {   } elsif (/^More$/ || $m == 1) {
      &check_obj ($_);       &check_obj ($_);
  } else {   } else {
      if ($printmap) { print "$mapname"; $printmap=0;}  #     if ($printmap) { print "$mapname"; $printmap=0;}
      print "  Error: Corrupted map file $file.\nSegment:\n$_\nLine: $.\n";   #     print "  Error: Corrupted map file $file.\nSegment:\n$_\nLine: $.\n";
  }   }
     }      }
     close (IN);      close (IN);
Line 308
 
Line 312
   
     opendir (DIR , $dir) || die "Can't open directory : $dir\n";      opendir (DIR , $dir) || die "Can't open directory : $dir\n";
     while ($file = readdir (DIR)) {      while ($file = readdir (DIR)) {
  next if ($file eq "." || $file eq ".." || $file eq "CVS");   next if ($file eq "." || $file eq ".." || $file eq "CVS" || $file eq "unlinked" || $file eq "editor");
  $file = "$dir/$file";   $file = "$dir/$file";
  next if (-l $file);   next if (-l $file);
  push (@dirs, $file) if (-d $file);   push (@dirs, $file) if (-d $file);


Legend:
line(s) removed in v.1.4 
line(s) changed
 line(s) added in v.1.5

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:06