size_t (was Re: [AD] Unicode (3))

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 23 Jun 2001, Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
[string functions]
> The new API is in the CVS tree

Yay!

> What has changed:
> 
> - the 'n' formal parameter always mean number of actual (non-zero)
> characters, not bytes (ustrncpy, ustrzncpy, ustrncat, ustrzncat, ustrncmp),
> 
> - the 'size' formal parameter always mean *total* size in bytes, *including*
> the terminating NULL character

I wonder if we should start using `size_t' where it makes sense.  
In this case, we could use `size_t' for the size parameters, and use
`int' for the `n' parameters.  I think it helps readability, like
`const' (even if "AL_CONST" is particularly ugly ;-)

(P.S.  I don't have a mobile.)



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/