Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8720) Dynamtext
Home

[Freeciv-Dev] Re: (PR#8720) Dynamtext

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8720) Dynamtext
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 May 2004 23:58:26 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8720 >

Raimar Falke wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8720 >
> 
> On Fri, May 21, 2004 at 11:19:10PM -0700, Jason Short wrote:
> 
>>OK but I don't like the implementation.
>>
>>- It shouldn't go in shared.h just because there's nowhere better to put it.
> 
> What place you suggest?

astring.h?

>>- It should be an extension to astring (astring_add()) rather than
>>its own implementation.
> 
> You mean:
>   void astring_add(struct astring *astr, const char *format, ...);
> ? I think I could like this.

Yes, and with other functions as you need them.

Astring already has the realloc properties so there's no need to 
reimplement that.

>>- DYNAMTEXT_INIT is absolutely too ugly to be global.  Not only is
>>it unclear what it does but you can only have one per function.
> 
> So you want to split this into two? One for the declaration of astring
> and for the setting it to ""? This is IMHO bad since it just screams
> for forgetting the second one.

It's still better than the alternative.  astring_clear() should be 
obvious enough.

> The issue of why and how it should be used can be fixed with some
> docu.

This argument works both ways.

jason




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