I'm cc'ing both the GNU Go list and the GTP list because this is a protocol issue.
To summarize, Trevor Morris reports that the GNU Go regressions are broke on Visual C. The reason is that apparently printf on VC++ interprets \n as CRLF instead of just LF.
I think this is an issue which was discussed in the protocol list but I do not remember whether any conclusions were reached.
Trevor Morris wrote:
Do you mean that the gtp output is getting spurious CR's added by the DOS version of the program?
Yes, this is the problem. Spurious CR added by the DOS version of the program. An appropriate sed script to strip out the offending ^M characters should do it.
Perhaps the GTP needs to explicitly define what the end-of-line character(s) should be?
We can simulate this problem on Linux by replacing all occurrences of \n by \r\n in gtp.c. I just did that and found that regress.sh is broke but twogtp is not.
One difference between the two is that regress.sh is awkward where twogtp is perlward. Perhaps we should reimplement regress.sh in perl.
But without going so far, the patch at the end of this message should fix the problem. At least it fixes the broke version I made by adding \r's in gtp.c.
Trevor, could you try this?
Dan
diff -u -N -r -x *.info* -x *Makefile* ./regression/regress.awk ../gnugo-2.7.252/gnugo-2.7.251/regression/regress.awk --- ./regression/regress.awk Thu Apr 26 00:45:53 2001 +++ ../gnugo-2.7.252/gnugo-2.7.251/regression/regress.awk Sun Aug 19 15:12:50 2001 @@ -15,6 +15,7 @@ }
/^[=?][0-9]+ /{ + sub(/\r/, ""); sub(/^[=?]/, ""); num = $1; sub(/^[0-9]+ */, "");