1 #include <boost/program_options.hpp> 
   25   osl::vector<osl::Move> 
moves;
 
   26   osl::vector<std::string> dummy1;
 
   27   osl::vector<int> time;
 
   28   osl::vector<osl::record::SearchInfo> info;
 
   31   osl::vector<MoveData> bad_indices;
 
   33   for (
size_t i = sente ? 0 : 1; i < info.size(); i += 2)
 
   36     if (time[i] == 1 && info[i].value == 0 && prev_value == 0)
 
   46         bad_indices.push_back(
MoveData(i - 2, prev_value, info[i].value));
 
   49     prev_value = info[i].value;
 
   52   for (
size_t i = 0, j = 0; i < moves.size() && j < bad_indices.size();
 
   55     if (bad_indices[j].index == i)
 
   58                 << 
"' " <<  i << 
": " << info[i].value << 
" -> " 
   59                 << info[i+2].value<< std::endl
 
   64       bool found_pass = 
false;
 
   65       for (
size_t k = 0; k < pv_moves.size(); k++)
 
   69         if (pv_moves[k].isPass())
 
   75           std::cout << 
"%PASS" << std::endl;
 
   84     state.makeMove(moves[i]);
 
   88 int main(
int argc, 
char **argv)
 
   91   boost::program_options::options_description command_line_options;
 
   92   command_line_options.add_options()
 
   94      boost::program_options::value<bool>(&sente)->default_value(
true),
 
   95      "Whether you want to check sente or gote moves")
 
   96     (
"input-file", boost::program_options::value< std::vector<std::string> >(),
 
   97      "input files in CSA format")
 
   98     (
"help", 
"Show help message");
 
   99   boost::program_options::variables_map 
vm;
 
  100   boost::program_options::positional_options_description p;
 
  101   p.add(
"input-file", -1);
 
  106       boost::program_options::command_line_parser(
 
  107         argc, argv).options(command_line_options).positional(p).
run(), vm);
 
  108     boost::program_options::notify(vm);
 
  109     if (vm.count(
"help"))
 
  111       std::cerr << 
"Usage: " << argv[0] << 
" [options] csa-file" 
  113       std::cout << command_line_options << std::endl;
 
  117   catch (std::exception &e)
 
  119     std::cerr << 
"error in parsing options" << std::endl
 
  120               << e.what() << std::endl;
 
  121     std::cerr << 
"Usage: " << argv[0] << 
" [options] csa-file" << std::endl;
 
  122     std::cerr << command_line_options << std::endl;
 
  126   const std::vector<std::string> 
files =
 
  127     vm[
"input-file"].as< std::vector<std::string> >();
 
  128   for (
size_t i = 0; i < files.size(); i++)