<?php
// no longer needed, now that the surplus list contains all details instead of
// being just a list of numbers

   $year=substr(file_get_contents("nargsyear"),0,4);
   $nl=file("nargslist");
   $xtra=file("nargs{$year}extra");
   $xtras=str_repeat(" ",5000);
   foreach ($xtra as $xl) {$id=trim($xl); $xtras{$id}="*";}
   rename("nargslist","nargslist.full");
   foreach ($nl as $i=>$nll) {
      $e=explode("\t",$nll);
      $id=$e[1];
      if ($xtras{$id}!="*") unset($nl[$i]);
   }
   file_put_contents("nargslist",join("",$nl));
?>