gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] gsnprintf


From: Gunnar Farneback
Subject: [gnugo-devel] gsnprintf
Date: Sun, 09 Dec 2001 22:28:46 +0100
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)

For trace messages we have the extremely useful function gprintf()
with relatives, which in particular can format moves (%m, %M, %1m,
%1M) and colors (%C). At the bottom of these functions is vgprintf(),
which is called in various ways to implement gprintf(), mprintf(),
TRACE(), DEBUG(), and a few more functions. All these can be found in
engine/printutils.c.

However, vgprintf() can't be used when we want to use its format
features to write into a string, e.g. for use in sgf traces (which are
stored in memory). It would be very useful to also have a function
gsnprintf(), which would work exactly like snprint() except having the
formatting power of gprintf() with relatives.

I could certainly do this myself, but it's not high enough in priority
to be done anytime soon. This could be a good project for someone who
wants to make a contribution without having to understand too much of
the GNU Go internals.

/Gunnar



reply via email to

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