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>, Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC PATCH] init_techs
From: Reinier Post <rp@xxxxxxxxxx>
Date: Mon, 24 Sep 2001 09:45:37 +0200

On Sun, Sep 23, 2001 at 05:54:37PM -0400, Justin Moore wrote:

[pass the command arguments to the callback]

> /set attribute nation.Greek.techs Alphabet,Iron Working
>  ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

An aside: a standard way to denote words with non-alphanumerics must
be picked.  I don't care what it is, but adding the ability to interpret
the command line above leads to problems.

> /easy
>  ^^^^
> 
> /hard Caesar
>  ^^^^ ^^^^^^

It would be better to write this as

  /set ailevel hard

and

  /set ailevel Caesar

I never added it because I didn't want to complicate the parsing in
set_command() any further.  After the cleanup it will be easy.

>    The first part in each of these is the command.  The second part is the
> "char *arg" that gets passed to the function.  These callbacks should be
> content-oblivious, and it should be up to the specific functions to
> interpret the data correctly.

Don't you think all commands should be parsed with standard functions that
perform typechecking?

> -jdm

-- 
Reinier


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