| Markus Mayer 2007-10-25, 1:24 pm |
| Am 24.10.2007 18:01 postulierte Stephane CHAZELAS folgendes:
> 2007-10-24, 16:23(+02), Markus Mayer:
> [...]
> [...]
>
> tcgetattr(3) to fetch the previous terminal attributes.
> tcsetattr(3) to clear the ICANON, ISIG and ECHO bits and set the VMIN
> and VTIME and to restore the previous settings afterwards.
> write(1, "\033[6n", 4); to send the escape sequence.
> read(0, &c, 1); to read characters one at a time until you find
> 'R'
> sscanf to extract the coordinates from \e[y;xR string.
>
> But it looks like what you really want is to use ncurses that
> provides with all the functions to createt visual applications on
> a terminal.
>
Already heard about ncurses, unfortunately I'm currently not allowed to
use it. It's also more interesting to do it manually. 
Thank you very much!
Markus
|