[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua5 PalmOS Port (Was: numerical approximations can suck!)
- From: "José dos Santos Machado" <jose@...>
- Date: Sun, 23 Nov 2003 17:36:57 -0200
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.
-- J. Machado