lua-users home
lua-l archive

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


I'm trying to port Lua 4.0 over to Windows CE and have come across a few
problems.  These are mainly related to encapsulation issues.  Specifically,
file handling is mostly encapsulated within the ZIO library, but there's a
single location which does file handling without ZIO that's causing me some
grief.

The function parse_file in ldo.c makes use of raw buffered I/O (fopen,
freopen, etc.) instead of ZIO.  Worse, it makes use of freopen, a function
which only makes sense if you're in an environment which has consoles and
the like.  Windows CE, of course, being a handheld, pen-based device doesn't
have consoles.  Had the work in parse_file been through the ZIO library, I
could have mocked up stdin, stdout, stderr and abstracted them away behind a
hacked ZIO version.  Unfortunately the calls are made directly, thus
requiring me to hack up core Lua source code.

Would it be possible to persuade the powers that be to make use of ZIO only
when doing file I/O in future Lua versions?

--
Michael T. Richter
"Be seeing you."