lua-users home
lua-l archive

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


Hi David,
It turns out that lua is very well organised to do this. Number to string and string to number conversion is handled by two macros lua_str2number defined in the file lobject.c
lua_number2str defined in the file lvm.c

Both of them are on the Lua5 core, but I don't think it's very useful to port just the Lua core, so I'm doing it to the Baselib, Strlib, Mathlib and others. I've already redefined these, and they're working fine by now.
Both of these can be redefined. Now all you need is good quality functions that do these conversion on PalmOS. Perhaps you have that base already covered? I believe the glibc functions to be adequate.

Like I said, that's already done. There are some others ANSI C functions not available to PalmOS, like strtod, memchr and strpbrk that I had to port from linux or from older versions of Codewarrior to make it work. I'd like to share the code to the community, so everyone can help and adjust my mistakes and help to improve the port itself. I'm working now to resolve my problem with sf.net cvs access. When it's resolved I'll put the source code there and announce it here. Cheers!
-- J. Machado
-- machado@palmcon.com.br