[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: print and lua conf
- From: Sam Roberts <vieuxtech@...>
- Date: Mon, 16 Feb 2009 19:46:35 -0800
On Mon, Feb 16, 2009 at 7:27 PM, Wesley Smith <email@example.com> wrote:
> I was wondering what possible issues and solutions might be to change
> the FILE pointer Lua uses for functions like print and error at the
Why not freopen(STDOUT, ...)? freopen() exists for this purpose and
you don't have to change the lua library.
Does error() print anything? I didn't think so. The lua.exe wrapper
does, and you could add a "-O file" option to it to cause it to
freopen() stdout (and stderr).
Also, you can also redefine print() to do something else.