Re: [AD] 3 patches regarding unicode and buffer overfows (mostly)

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


> That's fine by me.  There should be a note in the docs saying that
> if people want the same dimensions as the old file selector, they
> should pass such-and-such values for w and h.

Then we should define two constants in allegro.h for this purpose, because
they depend upon the platform (having a dir list or not).

> The other thing is that Annie's patch makes the selection return
> non-zero if the path was truncated (and OK'd, obviously).  I'm not
> sure that's a good thing.

Neither am I. If the path was truncated, the selection is likely invalid.

> Maybe return -1 (overflow), 0 (cancel), 1 (ok)?  But people might be
> checking file_select() == TRUE (which == -1), and I definitely don't
> want `file_select' and `file_select_ex' to return different values.
> -1 (ok), 0 (cancel), 1 (overflow) is also possible, but feels
> strange to me.

Still this metaphysical discussion about return values ;-)
I wish Shawn had implemented a clean mechanism (AL_OK, AL_ERROR,
AL_BUFFER_OVERFLOW and so on) from the very beginning.
Why not simply return 0 ?

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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