open (F91, "../f91");
open (CAL, ">f91.cal");

@Month = ('null', 'January', 'February', 'March', 'April', 'May', 'June',
          'July', 'August', 'September', 'October', 'November', 'December');

$Room{'26-100'} = '\\tsix';
$Room{'10-250'} = '\\ten';
$Room{'Kresge'} = '\\kresge';

while (<F91>)
{
  s/\s\s+/@/g;
  ($month, $date, $title, $room, $time) = m=^(.*)/(.*)@(.*)@(.*)@(.*)$=;
  $time =~ s= & =/=g;
#  print "on $date of $month at $time in $room is $title.\n";
  
  print CAL "\n\\newmonth   % $Month[$month]\n" if $month>$lastmonth;
  $lastmonth=$month;

  $title =~ s=&=\\&=;
  print CAL "\\ondate $date:" if $date>1;
  print CAL "\\movie\{$title\}\{$time\}\{$room\}\n";
}
