[Freeciv-Dev] Re: [PATCH] convert save_options() to secfile (PR#1097)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Dec 07, 2001 at 08:57:47AM +0100, Daniel Sjölie wrote:
> On 2001-12-06 17:20:40, Mike Kaufman wrote:
> > here's another patch...
> >
> > currently the client uses fprintf() to put options into .civclientrc
> > this patch changes this to secfile_insert_* etc, and does away with
> > open_option_file() to boot.
> >
> > pros: consistency (somewhat lame, but alright)
> > reduces code (a bit)
> > allows one to easily save global worklists to file (good)
> >
> > this last one is mainly what I'm aiming for. I personally think that
> > it's silly to have to create new global worklists every time I play.
> > It's almost not worth doing. Saving worklists to file would allow me to
> > do it once and then forget about it. More on this when I have code to
> > show.
> >
> > oh yeah, there's a con with this patch:
> >
> > con:
> > current code puts a nice comment beside the message options.
> > secfile_insert can't do this (if it can somebody show me how)
> > so there's a kludge to make a comment. It gets the job done,
> > but its not pretty. I don't think that the patch should be
> > rejected for this however.
>
> I like it...
> Perhaps there is a better way to solve the problem though?
> How about adding a "secfile_insert_comment"?? Or something similar...
I agree. Add secfile_insert_int_comment, secfile_insert_str_comment
and a "char *comment" to struct entry. This field doesn't have to be
set during the read.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
(On the statement print "42 monkeys"+"1 snake"): BTW, both perl and Python
get this wrong. Perl gives 43 and Python gives "42 monkeys1 snake", when
the answer is clearly "41 monkeys and 1 fat snake".
-- Jim Fulton, 10 Aug 1999
- [Freeciv-Dev] Re: [PATCH] convert save_options() to secfile (PR#1097),
Raimar Falke <=
|
|