Greetings,
> > are there already Lua equivalents for ReadMode(), ReadKey()
> > and GetTerminalSize() that I missed ?);
> Not exactly sure what those do,
ReadMode MODE [, Filehandle]
Takes an integer argument, one of the following values:
0 Restore original settings.
1 Change to cooked mode.
2 Change to cooked mode with echo off. (Good for passwords)
3 Change to cbreak mode.
4 Change to raw mode.
5 Change to ultra-raw mode. (LF to CR/LF translation turned off)
so that's basically what stty did, except portable...
ReadKey MODE [, Filehandle]
0 Perform a normal read using getc
-1 Perform a non-blocked read
>0 Perform a timed read
GetTerminalSize [Filehandle]
Returns either an empty array if this operation is unsupported,
or a four element array containing: the width of the terminal
in characters, the height of the terminal in character, the
width in pixels, and the height in pixels. (The pixel size will
only be valid in some environments.)
Under Windows, this function must be called with an "output"
filehandle, such as STDOUT, or a handle opened to CONOUT$.
so that's like xwininfo -size -id $WINDOWID; or resize
> but I guess you could have equivalent functionality
> from the curses module from luaposix?
Not really, I don't want curses, I don't want to clear the screen.
> (or, looking at the rocks repo, perhaps ltermbox)
Same problem. There is a function tb_select_input_mode(int mode)
but it only chooses how the <Esc> key is handled.
> > Is any of this Configure.pm functionality already in luarocks?
> No, there is no autoconf-style functionality to detect symbols and
> perform any detection more advanced than trying to find library
> files and headers.
I've wandered alarmingly close to the "system specific flags" thread...
Thanks for your clear prompt answers!
Regards, Peter Billam
http://www.pjb.com.au [email protected] (03) 6278 9410
"Follow the charge, not the particle." -- Richard Feynman
from The Theory of Positrons, Physical Review, 1949
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers