lua-users home
lua-l archive

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


Thanks so much for the response.

I'll start looking into learning about how to extend or integrate Lua.
I suppose I probably have two choices? ...

a) extend Lua with C functions that return binary-mode file handles for
stdin and stdout

b) call my Lua program from C and pass in binary-mode stdin and stdout

I'm assuming that when i crack open the lua header files I'll find the
typedef for lua file handles, yes?

Sorry for the newbie questions.

Best Regards,

Gavin.

 
On Mon, 23 Oct 2006 18:50:08 -0300, "Luiz Henrique de Figueiredo"
<lhf@tecgraf.puc-rio.br> said:
> >   _setmode(fileno(stdin), O_BINARY);
> >   _setmode(fileno(stdout), O_BINARY);
> > 
> > So...I'm looking for a way to access stdin and stdout in binary mode. 
> > Is there any way to make this happen in Lua?
> 
> Not from stock Lua. You need to add external C code that provides this.
> A simple C library built as a DLL suffice if you cannot build your own
> Lua interpreter that has those two lines.
> --lhf