Ticket #145: printutils.c.patch

File printutils.c.patch, 1.5 kB (added by draqo, 2 years ago)
  • gnugo/engine/printutils.c

    RCS file: /sources/gnugo/gnugo/engine/printutils.c,v
    retrieving revision 1.56
    diff -u -r1.56 printutils.c
     
    222222  int color; 
    223223  int k; 
    224224 
    225   for (pos = BOARDMIN; pos < BOARDMAX; pos++) 
    226     if (ON_BOARD(pos)) 
    227       initial_colors_found |= initial_board[pos]; 
     225  scan_board(pos, 
     226    initial_colors_found |= initial_board[pos]; 
     227  ) 
    228228   
    229229  fprintf(stderr, "(;GM[1]FF[4]SZ[%d]KM[%.1f]HA[%d]GN[GNU Go %s stepped on a bug]\n", 
    230230          board_size, komi, handicap, gg_version()); 
     
    232232  for (color = WHITE; color <= BLACK; color++) { 
    233233    if (initial_colors_found & color) { 
    234234      fprintf(stderr, "A%s", color == WHITE ? "W" : "B"); 
    235       for (k = 0, pos = BOARDMIN; pos < BOARDMAX; pos++) { 
    236         if (ON_BOARD(pos) && initial_board[pos] == color) { 
     235          k = 0; 
     236          scan_board(pos, 
     237        if (initial_board[pos] == color) { 
    237238          fprintf(stderr, "[%c%c]", 'a' + J(pos), 'a' + I(pos)); 
    238239          k++; 
    239240          if (k % 16 == 0) 
    240241            fprintf(stderr, "\n"); 
    241242        } 
    242       } 
     243          ) 
    243244      if (k % 16 != 0) 
    244245        fprintf(stderr, "\n"); 
    245     } 
     246        } 
    246247  } 
    247248 
    248249  if (move_history_pointer > 0) { 
     
    523524    return; 
    524525  node = sgftreeNodeCheck(sgf_dumptree); 
    525526 
    526   for (pos = BOARDMIN; pos < BOARDMAX; pos++) 
    527     if (ON_BOARD(pos) && goal[pos]) 
     527  scan_board(pos, 
     528    if (goal[pos]) 
    528529      sgfSquare(node, I(pos), J(pos)); 
     530  ) 
    529531} 
    530532 
    531533