gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] gprintf("%r"...) (was: large_scale_5_1.1b)


From: Arend Bayer
Subject: Re: [gnugo-devel] gprintf("%r"...) (was: large_scale_5_1.1b)
Date: Wed, 2 Jun 2004 10:29:08 +0200 (CEST)


> > I think it would be useful to keep the board library separate. E.g. that 
> > way,
> > it can be used by other projects. So I would like to propose to revert
> > this as below.
> 
> It seems to me that the %r output is much more useful
> for debugging than the %s output. So I propose
> the following.

Well, if you had read my patch you would have noticed that it gives
identical output. The code below breaks automatically when someone changes
the result codes, and duplicates the function result_to_string() (which
my patch uses instead).

Arend

> Index: engine/printutils.c
> ===================================================================
> RCS file: /cvsroot/gnugo/gnugo/engine/printutils.c,v
> retrieving revision 1.45
> diff -u -r1.45 printutils.c
> --- engine/printutils.c       23 Apr 2004 03:06:36 -0000      1.45
> +++ engine/printutils.c       2 Jun 2004 12:49:01 -0000
> @@ -21,7 +21,6 @@
>  \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
>  
>  #include "board.h"
> -#include "gnugo.h"
>  #include "hash.h"
>  #include "gg_utils.h"
>  
> @@ -85,19 +84,19 @@
>       case 0:             
>         fprintf(outputfile, "%s", "0");
>         break;
> -     case KO_B:          
> +     case 1:          
>         fprintf(outputfile, "%s", "KO_B");
>         break;
> -     case LOSS:          
> +     case 2:          
>         fprintf(outputfile, "%s", "LOSS");
>         break;
> -     case GAIN:          
> +     case 3:          
>         fprintf(outputfile, "%s", "GAIN");
>         break;
> -     case KO_A:          
> +     case 4:          
>         fprintf(outputfile, "%s", "KO_A");
>         break;
> -     case WIN:           
> +     case 5:           
>         fprintf(outputfile, "%s", "WIN");
>         break;
>         
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> gnugo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnugo-devel
> 




reply via email to

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