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
}
#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. */
}
#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;
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;
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. */
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. */