In my implementation of the GTP protocol, I execute the command once a carriage return or line feed is received. Empty lines are ignored. This makes GTP compatible with Unix, DOS/Windows and Macintosh platforms.
However, to be specific, I would recommend "\r" (or \012) for linefeed. I'll put this in the specification.
----- Original Message ----- From: "Daniel Bump" bump@match.Stanford.EDU To: dave.denholm@insignia.com Cc: gnugo@gnu.org; gtp@lists.lysator.liu.se Sent: Sunday, August 19, 2001 10:01 AM Subject: Re: [gtp] Re: VC regression failures
David Denholm wrote:
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.
That wouldn't help since on windows that would (may) give CRCRLF
The purpose of that change to gtp.c wasn't to fix anything but to break it. I wanted to see what the problem was. So I hacked in carriage returns to gtp.c, in order to see where they should be stripped in regress.awk.
And on mac, \n is CR
\012 is probably safest if you really mean a LF character
I wonder if it is possible to come to a consensus about newline policy in the gtp before we release 3.0.0.
Dan
gtp mailing list gtp@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/gtp