RE: [AD] to prefix or not to prefix (part 2)

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


Title: RE: [AD] to prefix or not to prefix (part 2)

> In reply to Peter Wang <tjaden@xxxxxxxxxx>:
> >void al_text_print(BITMAP *bmp, const FONT *fnt, int x, int y,
> >               int align, int color, int bgcolor, const char
> *string);
> >
> >void al_text_printf(BITMAP *bmp, const FONT *fnt, int x, int y,
> >               int align, int color, int bgcolor, const char
> *format, ...);
>
> What's the difference?

Removing the ability to do printf-like formatted output.
Personally, I like it. Unfortunately, this yet another place where
Allegro either truncates the string or buffer overflows (the former,
in this case). Trouble with printf-likes is to efficiently allocate
the memory while being 100% safe and not waste too much memory.
Therefore, this code ought to be handled better in user code, which
knows better (or, more appropriately, not worse) the max size of any
temporary buffer. It is quite convenient though to have that in
Allegro.

--
Vincent Penquerc'h



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