gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] libboard and board.h


From: Gunnar Farneback
Subject: Re: [gnugo-devel] libboard and board.h
Date: Tue, 05 Aug 2003 20:17:28 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Arend wrote:
> The so-called board library is a separate layer independant of the
> engine. It consists of the code of board.c, globals.c, hash.c,
> printutils.c, sgffile.c, showbord.c.
> 
> At the moment, it is forced at link time that this remains separate
> (otherwise, patterns/joseki doesn't link). What I suggest to do is to force
> this at compile: Instead of including liberty.h, these files should
> include a new header file board.h. This should declare all public
> functions of these 5 files. liberty.h will then include board.h.
> 
> This should make these layers more transparent (I was pretty
> confused when I stumble over the enforcement at link time). Also, if
> someone wanted to use the board library in his own program, he would
> have a clear-defined interface by including board.h.
> 
> Objections?

It's fine with me. However, you also need, or at least should, split
off (or move into board.c) the board relevant parts of globals.c.

/Gunnar




reply via email to

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