gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]: gnokii_strsplit as in glib (was Re: [PATCH] gnokii gtk2 por


From: Bastien Nocera
Subject: Re: [PATCH]: gnokii_strsplit as in glib (was Re: [PATCH] gnokii gtk2 port)
Date: Wed, 10 Aug 2005 19:38:17 +0100

On Tue, 2005-08-09 at 21:38 +0200, Pawel Kot wrote:
> Hi Bastien,
> 
> 2005/8/4, Bastien Nocera <address@hidden>:
> > And here's a testcase and a patch to implement an undefined number of
> > tokens. Pass "-1" as the number of tokens, and you shall receive the
> > smallest possible array, with the maximum number of tokens it could
> > create out of it. Should also be greedier than the current
> > gnokii_strsplit when it comes to allocating memory.
> 
> And what for do you need this feature?

Not to be restricted by the number of lines in the output, and it's more
"correct", as it won't allocate superfluous memory to hold the array.
Most callers would actually call it with -1, rather than some magic
number.

---
Bastien Nocera <address@hidden> 






reply via email to

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