lua-users home
lua-l archive

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


I got Lua 3.1 ported to Win32 with no difficulty.  Putting the engine 
into DLLs was also a trivial operation (the only source changes being 
required involving function exports).  At this stage I have Lua in a form 
perfect for embedding into Win32 applications with a very small overall 
footprint.

This is not the case for Windows CE, however.  There are a few too many 
assumptions built into Lua for it to be easily ported to that platform.  
The biggest assumption is that everyone will have access to FILE* 
operations (fopen, fclose, fprintf, etc.) on every platform.  This is sadly 
not the case.

Many of the things which use FILE* operations are trivially excised with 
conditional compilation and have adequate replacements which don't require 
FILE* functions.  For example I can always use Windows CE primitives to 
open a file and read it into a buffer and then execute the buffer.

Error reporting, however, is not so trivially patched up.  It makes heavy 
use of fprintf, and I have no access to that suite of functions in the 
Windows CE environment.

I'm going through and hacking in some replacements, even to the point of 
extending ZIO to allow Windows CE users to directly use files.  But it 
would be nice if future versions of Lua would use things like sprintf and a 
call to an easily overridden function for error reporting instead of 
using fprintf directly to minimize porting impact.
-- 
Michael T. Richter    <mtr@ottawa.com>    http://www.igs.net/~mtr/
          PGP Key: http://www.igs.net/~mtr/pgp-key.html
PGP Fingerprint: 40D1 33E0 F70B 6BB5 8353 4669 B4CC DD09 04ED 4FE8