From 08e9d30fa292454beaa6e9c78955da3f19ac24e7 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 16 Dec 2017 21:45:18 +0100 Subject: [PATCH] tweaks: condense some debugging code, and rewrap a line --- src/winio.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/winio.c b/src/winio.c index 3afc0594..3a64cd14 100644 --- a/src/winio.c +++ b/src/winio.c @@ -243,8 +243,7 @@ void get_key_buffer(WINDOW *win) /* Otherwise, increment the length of the keystroke buffer, and * save the value of the keystroke at the end of it. */ key_buffer_len++; - key_buffer = (int *)nrealloc(key_buffer, key_buffer_len * - sizeof(int)); + key_buffer = (int *)nrealloc(key_buffer, key_buffer_len * sizeof(int)); key_buffer[key_buffer_len - 1] = input; } @@ -253,13 +252,10 @@ void get_key_buffer(WINDOW *win) nodelay(win, FALSE); #ifdef DEBUG - { - size_t i; - fprintf(stderr, "\nget_key_buffer(): the sequence of hex codes:"); - for (i = 0; i < key_buffer_len; i++) - fprintf(stderr, " %3x", key_buffer[i]); - fprintf(stderr, "\n"); - } + fprintf(stderr, "\nSequence of hex codes:"); + for (size_t i = 0; i < key_buffer_len; i++) + fprintf(stderr, " %3x", key_buffer[i]); + fprintf(stderr, "\n"); #endif }