mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 23:43:00 +02:00
cngt: some small fixes
- Makefile: updated program name in title comment - cngt.c (do_key): "l" moved left, like "h" - cngt.c (main): when starting, immediately move to initial position - getkey.c (tty_open): open /dev/tty read-only, not write-only
This commit is contained in:
parent
154be2bada
commit
62152e2987
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Makefile - Makefile of drl2gp
|
||||
# Makefile - Makefile of cngt
|
||||
#
|
||||
# Written 2010 by Werner Almesberger
|
||||
# Copyright 2010 by Werner Almesberger
|
||||
|
@ -77,7 +77,7 @@ static int do_key(char c)
|
||||
break;
|
||||
case 'l':
|
||||
up();
|
||||
x -= STEP;
|
||||
x += STEP;
|
||||
move();
|
||||
break;
|
||||
case 'q':
|
||||
@ -124,6 +124,7 @@ int main(int argc, char **argv)
|
||||
x = pos_x[0];
|
||||
y = pos_y[0];
|
||||
z = z0+height;
|
||||
move();
|
||||
|
||||
while ((c = getkey()))
|
||||
if (do_key(c))
|
||||
|
@ -40,7 +40,7 @@ static void tty_open(void)
|
||||
{
|
||||
struct termios new;
|
||||
|
||||
tty = open(TTY_NAME, O_WRONLY | O_NOCTTY);
|
||||
tty = open(TTY_NAME, O_RDONLY | O_NOCTTY);
|
||||
if (tty < 0) {
|
||||
perror(TTY_NAME);
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user