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

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


On 12 May 2001, Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
> > We can make "file_select_ex(msg, path, ext, n, -1, -1)" do
> > what `file_select' does (i.e. no stretching).
> 
> Is that really necessary ? If the user wants automatic stretching, it passes
> (0, 0), otherwise he wants to control the dimensions and then passes ... the
> dimensions.

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.

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.  Either way, there would be strange
behaviour, but the user might be saving a file, and the truncated
path might overwrite something.

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.

-- 
tjaden@xxxxxxxxxx - http://www.alphalink.com.au/~tjaden/
OATAMATOPOIEA.  The sound that the cereal "Captain Crunch" makes when you
pour milk over it.  -- Rich Hall, "Sniglets"



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