[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Windows console
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 23 Jun 1998 14:13:08 -0300
> You have to go through the Lua code and alter every
> printf, fprintf etc. to redirect the output to your buffer.
As lhf noticed, there are only two places to change: "print" and the
error handler. You can always set your own error handler. Moreover, you
can redefine function print to print somewhere else (notice that the hard
work of "print" is done by tostring, so it is very easy to redefine print).
So, you need only a few lines of code to redirect Lua output to a message
window or to a file, all through the official API.