chiark / gitweb /
remove parser for ship info from notes file (@-thing)
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 18 May 2009 00:53:38 +0000 (01:53 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 18 May 2009 00:53:38 +0000 (01:53 +0100)
ypp-restock-rum

index b76d1c4..a879150 100755 (executable)
@@ -249,35 +249,6 @@ sub compute_restock_requirements () {
     if ($ship =~ m/^\d+/) {
        $need{Fine} = $ship;
     } else {
-       $ship =~ y/_/ /;
-       open F, "/home/ian/private/puzzle-pirates" or die $!;
-       my $this_ship= 0;
-       my $the_ship;
-       while (<F>) {
-           if (!m/\S/ || m/^\s*\#/) {
-               $this_ship= 0;
-               next;
-           }
-           if (!m/^\@/) {
-               next;
-           }
-           if (m/^\@(( [A-Z][-a-z]+){2,})\s*$/) {
-               $this_ship= (uc $1 eq uc " $ship" or
-                            uc $+ eq uc " $ship");
-               $the_ship= $1;
-               next;
-           }
-           next unless $this_ship;
-           if (m/^\@\s+(\d+)\s+fine\s*/) {
-               $need{Fine} = $1;
-               last;
-           }
-       }
-       die $! if F->error;
-       die "unknown ship $ship" unless defined $need{Fine};
-       if (defined $ship) {
-           pr1("vessel",$the_ship);
-       }
     }
 
     pr1('desired stock level', sprintf("%4d fine rum", $need{Fine}));