gnugo-devel
[Top][All Lists]
Advanced

[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: Paul Pogonyshev
Subject: Re: [gnugo-devel] Re: GTP issue in GNU Go 3.5.5?
Date: Fri, 23 Apr 2004 01:05:21 +0300
User-agent: KMail/1.6.51

Gunnar 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.

Oops.  Since this is my fault, I have to fix it.  Sorry.

Paul


--- main.c      24 Feb 2004 19:53:07 +0200      1.93
+++ main.c      23 Apr 2004 01:02:54 +0300      
@@ -55,7 +55,7 @@
 #include "random.h"
 
 static void show_copyright(FILE *where);
-static void show_version(void);
+static void show_version(FILE *where);
 static void show_help(void);
 static void show_debug_help(void);
 static void show_debug_flags(void);
@@ -925,12 +925,12 @@ main(int argc, char *argv[])
         break;
 
       case 'v':
-       show_version();
+       show_version(stdout);
        return EXIT_SUCCESS;
        break;
        
       case 'h': 
-       show_version();
+       show_version(stdout);
        if (gg_optarg) {
          /* In the default behavior of getopt_long with optional args
           * you need to type "-hdebug"
@@ -978,7 +978,7 @@ main(int argc, char *argv[])
   /* Display copyright message unless --quiet option used. */
   if (!quiet) {
     fprintf(stderr, "\n");
-    show_version();
+    show_version(stderr);
     show_copyright(stderr);
   }
   
@@ -1385,9 +1385,9 @@ main(int argc, char *argv[])
 
 
 static void
-show_version(void)
+show_version(FILE *where)
 {
-  printf("GNU Go Version %s\n", VERSION);
+  fprintf(where, "GNU Go Version %s\n", VERSION);
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]