[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Trapping _OUTPUT
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 5 Jan 2001 08:55:48 -0200 (EDT)
>Hi. I'm wondering what the best way to trap writes to _OUTPUT would be. I don't want to just redirect output, I want to do something entirely different. I could, I suppose, just modify io_write, but I really don't want to do it that way.
How about redefining "write":
function write(...)
if arg[1]==_OUTPUT or tag(arg[1])~=tag(_OUTPUT) then
-- do something entirely different...
else
call(%write,arg)
end
end
--lhf