fix debugging output in get_verbatim_kbinput()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
edc1ea4c16
commit
e1e7cb250e
|
@ -27,6 +27,11 @@ CVS code -
|
||||||
- Rename to nstristr() to avoid a potential conflict with an
|
- Rename to nstristr() to avoid a potential conflict with an
|
||||||
existing stristr() function, and move up to just after
|
existing stristr() function, and move up to just after
|
||||||
nstrnicmp(). (DLR) David Benbennick: Tweak for efficiency.
|
nstrnicmp(). (DLR) David Benbennick: Tweak for efficiency.
|
||||||
|
- winio.c:
|
||||||
|
get_verbatim_kbinput()
|
||||||
|
- Refactor the output in the DEBUG #ifdef. It didn't work
|
||||||
|
properly ever since this function was changed to use an int*
|
||||||
|
instead of a char*. (DLR)
|
||||||
|
|
||||||
GNU nano 1.3.2 - 2004.03.31
|
GNU nano 1.3.2 - 2004.03.31
|
||||||
- General:
|
- General:
|
||||||
|
|
10
src/winio.c
10
src/winio.c
|
@ -96,10 +96,16 @@ int *get_verbatim_kbinput(WINDOW *win, int *kbinput_len, int
|
||||||
verbatim_kbinput[0] = get_ascii_kbinput(win, kbinput);
|
verbatim_kbinput[0] = get_ascii_kbinput(win, kbinput);
|
||||||
else {
|
else {
|
||||||
nodelay(win, TRUE);
|
nodelay(win, TRUE);
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "get_verbatim_kbinput(): kbinput = %d\n", kbinput);
|
||||||
|
#endif
|
||||||
while ((kbinput = wgetch(win)) != ERR) {
|
while ((kbinput = wgetch(win)) != ERR) {
|
||||||
(*kbinput_len)++;
|
(*kbinput_len)++;
|
||||||
verbatim_kbinput = realloc(verbatim_kbinput, *kbinput_len * sizeof(int));
|
verbatim_kbinput = realloc(verbatim_kbinput, *kbinput_len * sizeof(int));
|
||||||
verbatim_kbinput[*kbinput_len - 1] = kbinput;
|
verbatim_kbinput[*kbinput_len - 1] = kbinput;
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "get_verbatim_kbinput(): kbinput = %d\n", kbinput);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
nodelay(win, FALSE);
|
nodelay(win, FALSE);
|
||||||
}
|
}
|
||||||
|
@ -111,10 +117,6 @@ int *get_verbatim_kbinput(WINDOW *win, int *kbinput_len, int
|
||||||
#endif
|
#endif
|
||||||
keypad(win, TRUE);
|
keypad(win, TRUE);
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf(stderr, "get_verbatim_kbinput(): verbatim_kbinput = %s\n", verbatim_kbinput);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
allow_pending_sigwinch(FALSE);
|
allow_pending_sigwinch(FALSE);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue