gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] quiet_5_6.2


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] quiet_5_6.2
Date: Sat, 22 May 2004 23:03:14 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Dan wrote (on April 23):
> (3) In any case it seems simplest just to explicitly
> call show_copyright(stderr) when it is wanted, which
> is what this revised patch does.

Actually this should go to stdout in all remaining cases.

> (4) As Gunnar pointed out, the GNU coding standards
> ask for the copyright notice to be printed when
> --verbose or -v is invoked.

I assume you meant --version rather than --verbose.

> (5) After looking at the GNU coding standards it
> seemed that the copyright string could be shortened.

Also the version output should be shortened it seems. According to the
coding standards "Version" shouldn't be printed.

- always write copyright string to stdout
- do not include "Version" in the --version output

/Gunnar

Index: interface/main.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/main.c,v
retrieving revision 1.98
diff -u -r1.98 main.c
--- interface/main.c    28 Apr 2004 16:37:44 -0000      1.98
+++ interface/main.c    22 May 2004 20:31:46 -0000
@@ -54,7 +54,7 @@
 #include "sgftree.h"
 #include "random.h"
 
-static void show_copyright(FILE *where);
+static void show_copyright(void);
 static void show_version(void);
 static void show_help(void);
 static void show_debug_help(void);
@@ -916,7 +916,7 @@
   break;
   
       case OPT_SHOWCOPYRIGHT: 
-      show_copyright(stdout);
+      show_copyright();
       return EXIT_SUCCESS;
       break;
       
@@ -942,7 +942,7 @@
 
       case 'v':
       show_version();
-      show_copyright(stderr);
+      show_copyright();
       return EXIT_SUCCESS;
       break;
       
@@ -1381,9 +1382,8 @@
 
   /* Display copyright message in ASCII mode unless --quiet option used. */
     if (!quiet) {
-      fprintf(stderr, "\n");
       show_version();
-      show_copyright(stderr);
+      show_copyright();
     }
   
     play_ascii(&sgftree, &gameinfo, infilename, untilstring);
@@ -1403,8 +1403,7 @@
 static void
 show_version(void)
 {
-  printf("GNU Go Version %s\n", VERSION);
-
+  printf("GNU Go %s\n", VERSION);
 }
 
 
@@ -1622,9 +1621,9 @@
 }
 
 static void
-show_copyright(FILE *where)
+show_copyright(void)
 {
-  fputs(COPYRIGHT, where);
+  printf(COPYRIGHT);
 }
 
 




reply via email to

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