[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Stdout
- From: "Nick Trout" <nick@...>
- Date: Tue, 23 Jan 2001 17:55:45 -0000
> With respect to the output stream problem on Windows. ie. you cannot
> redirect stdout easily to catch Lua output.
>>See previous messages. There are very few functions that use _OUTPUT:
and write are the only ones that spring to mind. You can trap these. Ditto
for _INPUT and read. If you want to use the handles directly in your own
routines it's admittedly trickier.
>>This is all be done within Lua already: _STDOUT, _STDIN and _STDERR.
so if i have a wrapped funtion say, (I'm using toLua) :
void tprint(char *p)
and I redirect stdout to this,
lua_dostring(state,"_STDOUT = tprint");
All stdout should be redirected to tprint()? It doesnt appear to be (I may
have made a mistake somewhere?!).