[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Re: GTP issue in GNU Go 3.5.5?
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] Re: GTP issue in GNU Go 3.5.5? |
Date: |
Thu, 22 Apr 2004 23:03:01 +0200 (CEST) |
On Thu, 22 Apr 2004, Gunnar Farneb?ck wrote:
> The reason why you can't reproduce it is that you include the --quiet
> option. The patch help_5_5.1 from January 25 introduced a bug by
> always writing the version information to stdout, thereby breaking the
> gmp and gtp interfaces unless --quiet is used. Patch later unless
> someone beats me to it.
>
> This is pretty bad. I think we should release 3.5.6 once this has been
> fixed.
How about silencing the copyright message for all modes except of
ASCII-playing mode? GNU coding standards suggest it for interactive
programs, which gnugo is only in ascii mode; I also find it pretty annoying
in the sgf-decide modes. (And I don't see why we should by default
clobber the xterm in which someone started a GUI to play against gnugo;
I know of no other GNU program which does such a thing.)
Arend
Index: engine/globals.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/globals.c,v
retrieving revision 1.61
diff -u -p -r1.61 globals.c
--- engine/globals.c 24 Jan 2004 04:04:56 -0000 1.61
+++ engine/globals.c 22 Apr 2004 22:20:15 -0000
@@ -77,7 +77,7 @@ int mandated_owl_node_limit;
/* Miscellaneous. */
-int quiet = 0; /* minimal output */
+int quiet = 1; /* minimal output */
int showstatistics = 0; /* print statistics */
int profile_patterns = 0; /* print statistics of pattern usage */
int allpats = 0; /* generate all patterns, even small ones */
Index: interface/main.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/main.c,v
retrieving revision 1.93
diff -u -p -r1.93 main.c
--- interface/main.c 27 Feb 2004 21:18:10 -0000 1.93
+++ interface/main.c 22 Apr 2004 22:20:16 -0000
@@ -437,7 +437,7 @@ main(int argc, char *argv[])
break;
case OPT_QUIET:
- quiet = 1;
+ quiet = 2;
break;
case OPT_GTP_INPUT:
@@ -621,8 +621,11 @@ main(int argc, char *argv[])
break;
case OPT_MODE:
- if (strcmp(gg_optarg, "ascii") == 0)
+ if (strcmp(gg_optarg, "ascii") == 0) {
playmode = MODE_ASCII;
+ if (quiet == 1)
+ quiet = 0;
+ }
else if (strcmp(gg_optarg, "emacs") == 0)
playmode = MODE_ASCII_EMACS;
else if (strcmp(gg_optarg, "gtp") == 0)
@@ -975,7 +978,8 @@ main(int argc, char *argv[])
}
- /* Display copyright message unless --quiet option used. */
+
+ /* Display copyright message in ASCII mode unless --quiet option used. */
if (!quiet) {
fprintf(stderr, "\n");
show_version();
Re: [gnugo-devel] Re: GTP issue in GNU Go 3.5.5?, Paul Pogonyshev, 2004/04/22