From: David Lawrence Ramsey Date: Fri, 16 Jan 2004 19:12:46 +0000 (+0000) Subject: don't use "kbinput = wgetch(win)" as a switch value in X-Git-Tag: v1.3.2~69 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=250613665f3b0427e099846966771624308494a3;p=nano.git don't use "kbinput = wgetch(win)" as a switch value in get_accepted_kbinput() git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1629 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 3a0d97a4..c34b7c36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ CVS code - matches inside a line (e.g. replace the "b" in "abc" with anything). (David Benbennick) - winio.c: + get_accepted_kbinput() + - Don't use "kbinput = wgetch(win)" as a switch value. (DLR) do_credits() - Use nanosleep() instead of usleep(). The latter is only standard under BSD, whereas the former is POSIX compliant. diff --git a/src/winio.c b/src/winio.c index 6f6232cb..802626be 100644 --- a/src/winio.c +++ b/src/winio.c @@ -119,7 +119,8 @@ int get_accepted_kbinput(WINDOW *win, int kbinput, int *meta) switch (kbinput) { case NANO_CONTROL_3: /* Escape */ - switch (kbinput = wgetch(win)) { + kbinput = wgetch(win); + switch (kbinput) { case NANO_CONTROL_3: /* Escape */ kbinput = wgetch(win); /* Esc Esc [three-digit decimal ASCII code from