add debug messages to get_shortcut() and get_toggle()

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-11-27 06:43:06 +00:00
parent e08765dca5
commit 08eab72517
2 changed files with 10 additions and 0 deletions

View File

@ -61,6 +61,8 @@ CVS code -
get_untranslated_kbinput() get_untranslated_kbinput()
- Make the ascii_digits variables ints instead of size_t's, - Make the ascii_digits variables ints instead of size_t's,
since they will only hold very small values. (DLR) since they will only hold very small values. (DLR)
get_shortcut(), get_toggle()
- Add debug messages. (DLR)
GNU nano 1.3.5 - 2004.11.22 GNU nano 1.3.5 - 2004.11.22
- General: - General:

View File

@ -1437,6 +1437,10 @@ const shortcut *get_shortcut(const shortcut *s_list, int kbinput, bool
const shortcut *s = s_list; const shortcut *s = s_list;
size_t slen = length_of_list(s_list); 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);
#endif
/* Check for shortcuts. */ /* Check for shortcuts. */
for (; slen > 0; slen--) { for (; slen > 0; slen--) {
/* We've found a shortcut if: /* We've found a shortcut if:
@ -1480,6 +1484,10 @@ const toggle *get_toggle(int kbinput, bool meta_key)
{ {
const toggle *t = toggles; const toggle *t = toggles;
#ifdef DEBUG
fprintf(stderr, "get_toggle(): kbinput = %d, meta_key = %d\n", kbinput, (int)meta_key);
#endif
/* Check for toggles. */ /* Check for toggles. */
for (; t != NULL; t = t->next) { for (; t != NULL; t = t->next) {
/* We've found a toggle if meta_key is TRUE and the key is in /* We've found a toggle if meta_key is TRUE and the key is in