Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [RFC PATCH] init_techs
Home

[Freeciv-Dev] Re: [RFC PATCH] init_techs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Justin Moore <justin@xxxxxxxxxxx>
Cc: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [RFC PATCH] init_techs
From: Arien Malec <arien_malec@xxxxxxxxx>
Date: Thu, 20 Sep 2001 12:33:34 -0700 (PDT)

Perhaps you could look at unifying section file lookup with command-line
parsing. The current secfile_lookup_[int|str]_vec functions are, IMHO:

1) Confusing
2) Inefficient

I'd expect the implementation of secfile_lookup_str_vec to function something
like this:

a) Find the label mentioned
b) Grab the field
c) Split the field
d) Return the split field

Instead it does repeating really clever stuff that I don't understand.

Arien

--- Justin Moore <justin@xxxxxxxxxxx> wrote:
> 
> > Ben Webb's implementation would be the place to hang something like this
> on. It
> > would have to be giveciv Civ Tech, or (better)
> >
> > set nation.Greek.init_techs = "Explosives,Railroad".
> >
> > If/when we manage to unify server commands and rulesets, and if Ben Webb
> > submits the nation init tech patch, we could do this.
> >
> > I don't believe FC has the ability to parse a list of strings on the
> command
> > line, so we couldn't do either nation specific or global init techs until
> the
> > command line parsing infrastucture is there.
> 
>    I posted a perl-like split a little while back, but got very little
> response other than, "Boy, that's kind of neat."  Is there interest in
> someone (or me) rewriting some of the parsing code?  I don't think I have
> anything better to do this weekend. :)
> 
> -jdm
> 
> Department of Computer Science, Duke University, Durham, NC 27708-0129
> Email:  justin@xxxxxxxxxxx
> 
> 


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/


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