[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] move_history_7_2.1
From: |
bump |
Subject: |
[gnugo-devel] move_history_7_2.1 |
Date: |
Tue, 7 Dec 2004 09:21:35 -0800 |
I mentioned before a problem with my hacked-up version
of gnugo.el, which improved sgf support but still had
problems with sgf files having AB and AW properties
but no B and W properties, such as owl10.sgf. This
was very hard to debug but I now have it fixed.
A part of the problem turned out to be that
gtp_move_history didn't return two newlines as
it should if the move history is empty. This
patch fixes that. It is now in the CVS.
There was also a change required in gnugo.el
by this problem, so another gnugo.el will be
coming along later.
Dan
Index: interface/play_gtp.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_gtp.c,v
retrieving revision 1.161
diff -u -r1.161 play_gtp.c
--- interface/play_gtp.c 7 Dec 2004 04:41:22 -0000 1.161
+++ interface/play_gtp.c 7 Dec 2004 17:11:15 -0000
@@ -1138,11 +1138,13 @@
UNUSED(s);
gtp_start_response(GTP_SUCCESS);
- for (k = move_history_pointer-1; k >= 0; k--) {
- color = move_history_color[k];
- pos = move_history_pos[k];
- gtp_mprintf("%C %m\n", color, I(pos), J(pos));
- }
+ if (move_history_pointer > 0)
+ for (k = move_history_pointer-1; k >= 0; k--) {
+ color = move_history_color[k];
+ pos = move_history_pos[k];
+ gtp_mprintf("%C %m\n", color, I(pos), J(pos));
+ }
+ else gtp_printf("\n");
gtp_printf("\n");
return GTP_OK;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] move_history_7_2.1,
bump <=