Re: [AD] Unicode again

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


> I also think we should change `ustrncat' so we don't have to do the
> silly size calculation (sizeof dest - ucwidth(0)).  So here I agree
> with Vincent, but I want the change to be in the function, rather
> than in a macro.

I would agree with that: either the functions take a formal 'n' parameter
(like ustrncmp() for example) and 'n' is the number of characters, or they
take a 'size' parameter and 'size' is the actual upper limit in bytes.
The current prototype for ustrncpy() and ustrncat(), in which 'n' is a
number of bytes that may be... outnumbered, is IMHO very confusing.

But then we would throw away ANSI standard a little more.

> Basically, my view is that we should ignore ANSI if it is obviously
> broken.  "Obviously" here is obviously not subjective.[1]

I totally agree with you !
As the French Prime Minister said it some time ago (my translation):
"Doctrines are made in order not to be dogmatically applied ;-)"

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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