From: David Lawrence Ramsey Date: Thu, 13 Jul 2006 13:28:13 +0000 (+0000) Subject: improve the display of bools in debugging statements X-Git-Tag: v1.9.99pre1~72 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a5ad825f30a5b8f6b23f2bbe1bb8bb49247f8485;p=nano.git improve the display of bools in debugging statements git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3789 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 928f0671..25048dcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,10 @@ CVS code - rnano.1. (DLR, based on suggestions by Jordi) - Don't include sys/ioctl.h in nano.c when NANO_TINY is defined, as ioctl() is never used then. (DLR) + - Improve the display of bools in debugging statements. Changes + to parse_kbinput(), get_escape_seq_kbinput(), + parse_escape_seq_kbinput(), get_shortcut(), and get_toggle(). + (DLR) - browser.c: do_browser() - Refactor the mouse support, modeling it after do_mouse() for diff --git a/src/winio.c b/src/winio.c index 5e97f8cb..1cab1506 100644 --- a/src/winio.c +++ b/src/winio.c @@ -617,7 +617,7 @@ int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key) } #ifdef DEBUG - fprintf(stderr, "parse_kbinput(): kbinput = %d, meta_key = %d, func_key = %d, escapes = %d, byte_digits = %d, retval = %d\n", *kbinput, (int)*meta_key, (int)*func_key, escapes, byte_digits, retval); + fprintf(stderr, "parse_kbinput(): kbinput = %d, meta_key = %s, func_key = %s, escapes = %d, byte_digits = %d, retval = %d\n", *kbinput, (*meta_key == TRUE) ? "TRUE" : "FALSE", (*func_key == TRUE) ? "TRUE" : "FALSE", escapes, byte_digits, retval); #endif /* Return the result. */ @@ -1126,7 +1126,7 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len, bool } #ifdef DEBUG - fprintf(stderr, "get_escape_seq_kbinput(): retval = %d, ignore_seq = %d\n", retval, (int)*ignore_seq); + fprintf(stderr, "get_escape_seq_kbinput(): retval = %d, ignore_seq = %s\n", retval, (*ignore_seq == TRUE) ? "TRUE" : "FALSE"); #endif return retval; @@ -1172,7 +1172,7 @@ int parse_escape_seq_kbinput(int kbinput, bool *ignore_seq) free(seq); #ifdef DEBUG - fprintf(stderr, "parse_escape_seq_kbinput(): kbinput = %d, ignore_seq = %d, seq_len = %lu, retval = %d\n", kbinput, (int)*ignore_seq, (unsigned long)seq_len, retval); + fprintf(stderr, "parse_escape_seq_kbinput(): kbinput = %d, ignore_seq = %s, seq_len = %lu, retval = %d\n", kbinput, (*ignore_seq == TRUE) ? "TRUE" : "FALSE", (unsigned long)seq_len, retval); #endif return retval; @@ -1620,7 +1620,7 @@ const shortcut *get_shortcut(const shortcut *s_list, int *kbinput, bool size_t slen = length_of_list(s_list); #ifdef DEBUG - fprintf(stderr, "get_shortcut(): kbinput = %d, meta_key = %d, func_key = %d\n", *kbinput, (int)*meta_key, (int)*func_key); + fprintf(stderr, "get_shortcut(): kbinput = %d, meta_key = %s, func_key = %s\n", *kbinput, (*meta_key == TRUE) ? "TRUE" : "FALSE", (*func_key == TRUE) ? "TRUE" : "FALSE"); #endif /* Check for shortcuts. */ @@ -1673,7 +1673,7 @@ const toggle *get_toggle(int kbinput, bool meta_key) const toggle *t = toggles; #ifdef DEBUG - fprintf(stderr, "get_toggle(): kbinput = %d, meta_key = %d\n", kbinput, (int)meta_key); + fprintf(stderr, "get_toggle(): kbinput = %d, meta_key = %s\n", kbinput, meta_key ? "TRUE" : "FALSE"); #endif /* Check for toggles. */