lua-users home
lua-l archive

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


On Thursday 02 March 2006 08:04, Matias Guijarro wrote:
[...]
> I would like to know if it is possible to replace
> standard output and error streams in Lua, in
> order to redirect output from Lua internals and
> from Lua scripts.

For a project I'm doing, I actually had to do something similar; I have an 
embedded system with no stdio (not even FILE*), so had to hack all that stuff 
out of the Lua core. It was non-trivial. I ended up #defining printf, fprintf 
etc to my own debug functions, and them #ifdefing out the various pieces of 
code that read and write to files.

If I were to clean this up, would it be worth submitting back to the 
maintainers? (This is for 5.1.)

-- 
+- David Given --McQ-+ "In the beginning was the word.
|  dg@cowlark.com    | And the word was: Content-type: text/plain" ---
| (dg@tao-group.com) | Unknown sage
+- www.cowlark.com --+ 

Attachment: pgp_eADyEA4x2.pgp
Description: PGP signature