diff --git a/cngt/Makefile b/cngt/Makefile index 7cef50f..f0c9241 100644 --- a/cngt/Makefile +++ b/cngt/Makefile @@ -1,5 +1,5 @@ # -# Makefile - Makefile of drl2gp +# Makefile - Makefile of cngt # # Written 2010 by Werner Almesberger # Copyright 2010 by Werner Almesberger diff --git a/cngt/cngt.c b/cngt/cngt.c index 23e8365..74dfac9 100644 --- a/cngt/cngt.c +++ b/cngt/cngt.c @@ -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)) diff --git a/cngt/getkey.c b/cngt/getkey.c index bd59be7..71f4c59 100644 --- a/cngt/getkey.c +++ b/cngt/getkey.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);