Diff for /processmail/collection.pl between versions 3.2 and 3.0

version 3.2, 2013/10/11 15:39:35 version 3.0, 2008/03/23 17:50:49
Line 1 Line 1
 #!/usr/bin/perl  #!/usr/local/bin/perl
 #  #
 #$Id$  #$Id$
 #  #
 # Собрание сочинений  # Собрание сочинений
 #  #
       use Getopt::Std; 
 use Getopt::Std;   
   
 $usage =   $usage = 
 "Usage: collection.pl [-d] [-s|-m] [-t table_file]  [-o results] \n";  "Usage: collection.pl [-d] [-t table_file]  [-o results] \n";
   
 require 'parameters.pl';  require 'parameters.pl';
 require 'subroutines.pl';  require 'subroutines.pl';
   
 die $usage unless getopts('t:o:dsm');  die $usage unless getopts('t:o:d');
   
 $DEBUG=$opt_d;  $DEBUG=$opt_d;
 $SHORT=$opt_s;  
 $MEDIUM=$opt_m;  
   
 # Находим максимальный вопрос  # Находим максимальный вопрос
 $MAXQUEST=1;  $MAXQUEST=1;
Line 45  if ($opt_t) Line 42  if ($opt_t)
 # Читаем ответы команд  # Читаем ответы команд
 #  #
 for (my $i=1; $i<=$ROUNDS; $i++) {  for (my $i=1; $i<=$ROUNDS; $i++) {
     foreach my $file ( @{$FILES[$i]} ) {      foreach my $file (split /\s+/, $FILES[$i]) {
         open (INFILE, $file);          open (INFILE, $file);
         readmail(\%teams);          readmail(\%teams);
         collect_answers(\%teams,\@answers);          collect_answers(\%teams,\@answers);
Line 53  for (my $i=1; $i<=$ROUNDS; $i++) { Line 50  for (my $i=1; $i<=$ROUNDS; $i++) {
     }      }
 }  }
   
 #  
 # Пишем измененную таблицу в файл.  # Пишем измененную таблицу в файл.
 #  #
 if ($opt_o)  if ($opt_o)
Line 64  if ($opt_o) Line 60  if ($opt_o)
 for ($i=1;$i<=$MAXQUEST;$i++)  for ($i=1;$i<=$MAXQUEST;$i++)
 {  {
     print "\nВОПРОС $i:\n";      print "\nВОПРОС $i:\n";
     if ( ! $SHORT || countanswers(\%teams,\@answers,$i,'+') ) {      print "\nЗАСЧИТАНО:\n";
         print "\nЗАСЧИТАНО:\n";      anondump(\%teams,\@answers,$i,'+');
         anondump(\%teams,\@answers,$i,'+');      print "\nНЕ ЗАСЧИТАНО:\n";
     }      anondump(\%teams,\@answers,$i,'-');
     if ( ! $SHORT || countanswers(\%teams,\@answers,$i,'+') ) {      print "\nНЕ ЯСНО:\n";
         print "\nНЕ ЗАСЧИТАНО:\n";      anondump(\%teams,\@answers,$i,'?');
         anondump(\%teams,\@answers,$i,'-');  
     }  
     if ( ! ($SHORT || $MEDIUM) || countanswers(\%teams,\@answers,$i,'?') ) {  
         print "\nНЕ ЯСНО:\n";  
         anondump(\%teams,\@answers,$i,'?');  
     }  
     print "\n";                         # Added by LG for better readability  
 }  }
 print "***\n";  print "***\n";
   
 #  
 # На всякий случай проверяем на наличие команд с дублирующимися номерами.  
 #  
 check_dup_numbers(\%teams);  
   
   

Removed from v.3.2  
changed lines
  Added in v.3.0


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>