lua-users home
lua-l archive

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


>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.

ZIO is just a uniform interface for reading bytes transparently from files,
strings and byte arrays.
However, in the case of files, it ZIO them to be opened first and we left
this to the user. Moreover, in the case of Lua, we have to look into the files
to see whether they contain Lua source or Lua precompiled chunks. That's
why we need freopen and why parse_file in ldo.c is complicated.
How would you change parse_file?

I agree that stdin, stdout, stderr only make sense for environment that
have consoles. but not about freopen. Am I missing something?

Anyway, the bottom line is: does Windows CE implement stdio from ANSI C?
--lhf