Re: [AD] length-restricted text routines

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


On Sun, 2008-09-14 at 16:41 +1000, Peter Wang wrote:
> On 2008-09-13, Chris Robinson <chris.kcat@xxxxxxxxxx> wrote:
> > On Saturday 13 September 2008 09:24:39 pm Peter Wang wrote:
> > > Can anyone think of a good use for the _count versions of textprintf_*
> > > functions?
> > 
> > Some programming languages don't end strings with a NULL char and instead have 
> > a length value (like D). Those languages would potentially make a copy to 
> > pass to "normal" C string functions. Or if you only want to print a section 
> > of a string, you can just add the offset to the pointer and adjust the length 
> > accordingly, without having to copy. I could see it particularly being useful 
> > for handling multi-line text.
> 
> Yes, for the textout functions, but for textprintf?  I'm finding it hard
> to think of a use case.
> 

I agree. And if it was for me, we would completely get rid of all
al_textout* functions (as I said before). You can always use "%s" and
al_textprintf.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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