[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] no line buffering on stdout for ascii and gtp mode.
From: |
Teun Burgers |
Subject: |
[gnugo-devel] no line buffering on stdout for ascii and gtp mode. |
Date: |
Wed, 13 Aug 2003 21:38:10 +0200 |
Current CVS does not display a prompt when expected
in both gtp and ascii mode, for both cygwin and mingw.
The prompt only comes after commands have been entered.
I suspect this is because the prompt does not contain a newline and
hence linebuffering does not display the prompt.
For ascii mode this is fixed by setting buffering
to _IONBF. For gtp mode this does not help.
- No buffering on stdout in ascii and gtp mode.
Teun
diff -u -r1.42 play_ascii.c
--- play_ascii.c 2 Aug 2003 14:17:52 -0000 1.42
+++ play_ascii.c 13 Aug 2003 19:30:06 -0000
@@ -579,7 +579,7 @@
char *tmpstring;
int state = 1;
- setvbuf(stdout, (char *)NULL, _IOLBF, 0); /* Set line buffering. */
+ setvbuf(stdout, (char *)NULL, _IONBF, 0); /* No buffering. */
sgftree = *tree;
diff -u -r1.129 play_gtp.c
--- play_gtp.c 12 Aug 2003 21:26:48 -0000 1.129
+++ play_gtp.c 13 Aug 2003 19:30:14 -0000
@@ -321,7 +321,7 @@
play_gtp(FILE *gtp_input, int gtp_initial_orientation)
{
/* Set line buffering of stdout. */
- setvbuf(stdout, (char *)NULL, _IOLBF, 0);
+ setvbuf(stdout, (char *)NULL, _IONBF, 0);
/* Inform the GTP utility functions about the board size. */
gtp_internal_set_boardsize(board_size);
- [gnugo-devel] no line buffering on stdout for ascii and gtp mode.,
Teun Burgers <=