lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> vsprintf does far more than is necessary to convert a number
> to a string, and if this is the only place where *printf is
> used, then it is a waste and should be removed.

I agree. While porting Lua to PalmOS, I had to include a complete printf
module. Lua code compiled to 50kb and *printf alone took another 5kb. It was
a 10% memory increment that can only be justified if it is truly necessary.

I also took me quite some time to find a PalmOS compatible printf module.
So, porting would have been easier if Lua had no *printf references.

BTW, other porting difficulty I had was with the "strtod" function that also
misses PalmOS support. The solution, in that case, was much easier. I used
the old lua0_str2d routine. IMO, it would be better to leave Lua without the
strtod dependency too.

[]s,

Renato Crivano
Diretor de Tecnologia
Hands Mobile Solutions
Tel +55 21 2223-3399
renato@hands.com.br
www.hands.com.br