Complete.Org: Mailing Lists: Archives: freeciv-dev: March 1999:
Re: [Freeciv-Dev] two new patches
Home

Re: [Freeciv-Dev] two new patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: permath@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] two new patches
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 13 Mar 1999 23:44:51 +1100

Per Mathisen wrote:

> First, I've abstracted the building requirements of some improvements (ie
> University needs Library etc) into the rulesets. Patch attached. Note that
> it changes the buildings.ruleset file, so you may need a "make install" to
> make it work.

Shouldn't build_req in the ruleset file be a string with the
improvement name, rather than a number, to make them easier to
edit?  (Then in ruleset.c probably read the names in first, as for 
units ruleset, so can lookup name->id;  not sure if it would be best 
to have another "table" in the ruleset file (like in units.ruleset), 
to avoid awkwardly long lines.

> Second, I've made another version of my console patch, which now does
> rfcstyle correctly, and does not display the ">" prompt anymore. (A very
> simple solution to the "when should we print a new prompt" question.) This
> patch is available from http://ulven.ifi.ntnu.no/freeciv/cp.gz

It occured to be that wrapping the freelog calls via 
console_log is not sufficient, since there are freelog 
calls in common/ (which can't be wrapped since the client 
doesn't have console_stuff.  I still think the way to do this 
is to pass a printf-like (or vprintf, or something) function 
pointer to log_init(), to tell the log module how we want 
log messages which go to the "screen" to be printed.
(With that function pointer to be saved in a static var inside 
the log module, to be called from inside freelog().)

> Both should probably wait until after 1.8.0.

Heh, thanks for not making me say that :-)

Regards,
-- David

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