[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: "Redirecting" stdout, stderr
- From: David Given <dg@...>
- Date: Thu, 2 Mar 2006 11:03:49 +0000
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.
| firstname.lastname@example.org | And the word was: Content-type: text/plain" ---
| (email@example.com) | Unknown sage
+- www.cowlark.com --+
Description: PGP signature