[Freeciv-Dev] Re: (PR#8720) Dynamtext
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8720 >
On Wed, May 12, 2004 at 10:23:51AM -0700, Jason Short wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8720 >
>
> Raimar Falke wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=8720 >
> >
> >
> > The attached patch extracts the basic functions from client/text.c and
> > moves them to utility/support.c. There are renamed to dynam(ic)text.
> >
> > While the reason for client/text.c was mainly concentrating the
> > functions in one place the main reason for this patch is that you
> > don't have to guess anylonger how much buffer you need to specify.
> >
> > The patch also adds a string_join function, removes some redundancy
> > and adds some consts.
>
> We should be using an astring here.
For what? Dynamstring? For the string_join function?
astring is a thing wrapper around realloc. I only see that with
astring the following code can be removed:
if (new_len > *buffer_size) {
size_t new_size = MAX(new_len, *buffer_size * 2);
*buffer_size = new_size;
*buffer = fc_realloc(*buffer, *buffer_size);
}
Or is there something I'm missing here?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
reality.sys corrupt. Reboot Universe? (y,n,q)
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Jason Short, 2004/05/12
- [Freeciv-Dev] Re: (PR#8720) Dynamtext,
Raimar Falke <=
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Mike Kaufman, 2004/05/12
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Jason Short, 2004/05/12
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Raimar Falke, 2004/05/13
- [Freeciv-Dev] (PR#8720) Dynamtext, Jason Short, 2004/05/22
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Raimar Falke, 2004/05/22
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Jason Short, 2004/05/22
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Raimar Falke, 2004/05/22
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Jason Short, 2004/05/23
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Raimar Falke, 2004/05/25
- [Freeciv-Dev] Re: (PR#8720) Dynamtext, Jason Short, 2004/05/25
|
|