[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua for PalmOS - Some questions
- From: David Jones <drj@...>
- Date: Fri, 5 Mar 2004 09:32:06 +0000
On Mar 04, 2004, at 16:19, Luiz Henrique de Figueiredo wrote:
I wrote a simple (public-domain) implementation of most of the
the standard C library that are needed by the Lua core. Unfortunately,
does not contain vsprinf, but there must be a public-domain or
implementation of it somewhere.
* functions from the standard C library that are needed by the Lua core
char *strncpy(char *d, const char *s, size_t n)
while (n-- && (*t++=*s++)) ;
The ISO C strncpy is required to always write exactly n chars into the
destination (null characters are appended). This fact is not nearly
well enough known. Presumably you know for sure, but I doubt that Lua
relies on this null padding.
Also, many of the prototypes are not C99 compliant, but that is really
the standard's fault, not yours.