lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>I would like to claim write([filehandle, ] value1, ...) for buffering

You can redefine write to do this. See the lua-l archives, especially
	Message-Id: <200101051055.IAA25223@ibere.tecgraf.puc-rio.br>
	Message-Id: <200101291313.LAA10564@ibere.tecgraf.puc-rio.br>

>how is it possible to detect if filehandle is given?

	tag(arg[1]) == tag(_STDIN)

>Possible there exists output buffer functions/library?

lauxlib has buffer functions, but you'll be better off redefining write in Lua.
--lhf