tweaks: move a bunch of comments to the lines that they refer to

master
Benno Schulenberg 2018-01-28 13:41:46 +01:00
parent d48f3e5e7b
commit 83c264939b
1 changed files with 16 additions and 32 deletions

View File

@ -625,21 +625,18 @@ int parse_kbinput(WINDOW *win)
#endif #endif
switch (retval) { switch (retval) {
#ifdef KEY_SLEFT #ifdef KEY_SLEFT /* Slang doesn't support KEY_SLEFT. */
/* Slang doesn't support KEY_SLEFT. */
case KEY_SLEFT: case KEY_SLEFT:
shift_held = TRUE; shift_held = TRUE;
return KEY_LEFT; return KEY_LEFT;
#endif #endif
#ifdef KEY_SRIGHT #ifdef KEY_SRIGHT /* Slang doesn't support KEY_SRIGHT. */
/* Slang doesn't support KEY_SRIGHT. */
case KEY_SRIGHT: case KEY_SRIGHT:
shift_held = TRUE; shift_held = TRUE;
return KEY_RIGHT; return KEY_RIGHT;
#endif #endif
#ifdef KEY_SR #ifdef KEY_SR
#ifdef KEY_SUP #ifdef KEY_SUP /* ncurses and Slang don't support KEY_SUP. */
/* ncurses and Slang don't support KEY_SUP. */
case KEY_SUP: case KEY_SUP:
#endif #endif
case KEY_SR: /* Scroll backward, on Xfce4-terminal. */ case KEY_SR: /* Scroll backward, on Xfce4-terminal. */
@ -647,24 +644,21 @@ int parse_kbinput(WINDOW *win)
return KEY_UP; return KEY_UP;
#endif #endif
#ifdef KEY_SF #ifdef KEY_SF
#ifdef KEY_SDOWN #ifdef KEY_SDOWN /* ncurses and Slang don't support KEY_SDOWN. */
/* ncurses and Slang don't support KEY_SDOWN. */
case KEY_SDOWN: case KEY_SDOWN:
#endif #endif
case KEY_SF: /* Scroll forward, on Xfce4-terminal. */ case KEY_SF: /* Scroll forward, on Xfce4-terminal. */
shift_held = TRUE; shift_held = TRUE;
return KEY_DOWN; return KEY_DOWN;
#endif #endif
#ifdef KEY_SHOME #ifdef KEY_SHOME /* HP-UX 10-11 and Slang don't support KEY_SHOME. */
/* HP-UX 10-11 and Slang don't support KEY_SHOME. */
case KEY_SHOME: case KEY_SHOME:
#endif #endif
case SHIFT_HOME: case SHIFT_HOME:
shift_held = TRUE; shift_held = TRUE;
case KEY_A1: /* Home (7) on keypad with NumLock off. */ case KEY_A1: /* Home (7) on keypad with NumLock off. */
return KEY_HOME; return KEY_HOME;
#ifdef KEY_SEND #ifdef KEY_SEND /* HP-UX 10-11 and Slang don't support KEY_SEND. */
/* HP-UX 10-11 and Slang don't support KEY_SEND. */
case KEY_SEND: case KEY_SEND:
#endif #endif
case SHIFT_END: case SHIFT_END:
@ -689,8 +683,7 @@ int parse_kbinput(WINDOW *win)
#endif #endif
case KEY_C3: /* PageDown (3) on keypad with NumLock off. */ case KEY_C3: /* PageDown (3) on keypad with NumLock off. */
return KEY_NPAGE; return KEY_NPAGE;
#ifdef KEY_SDC #ifdef KEY_SDC /* Slang doesn't support KEY_SDC. */
/* Slang doesn't support KEY_SDC. */
case KEY_SDC: case KEY_SDC:
#endif #endif
case DEL_CODE: case DEL_CODE:
@ -698,41 +691,33 @@ int parse_kbinput(WINDOW *win)
return the_code_for(do_delete, KEY_DC); return the_code_for(do_delete, KEY_DC);
else else
return KEY_BACKSPACE; return KEY_BACKSPACE;
#ifdef KEY_SIC #ifdef KEY_SIC /* Slang doesn't support KEY_SIC. */
/* Slang doesn't support KEY_SIC. */
case KEY_SIC: case KEY_SIC:
return the_code_for(do_insertfile_void, KEY_IC); return the_code_for(do_insertfile_void, KEY_IC);
#endif #endif
#ifdef KEY_SBEG #ifdef KEY_SBEG /* Slang doesn't support KEY_SBEG. */
/* Slang doesn't support KEY_SBEG. */
case KEY_SBEG: case KEY_SBEG:
#endif #endif
#ifdef KEY_BEG #ifdef KEY_BEG /* Slang doesn't support KEY_BEG. */
/* Slang doesn't support KEY_BEG. */
case KEY_BEG: case KEY_BEG:
#endif #endif
case KEY_B2: /* Center (5) on keypad with NumLock off. */ case KEY_B2: /* Center (5) on keypad with NumLock off. */
return ERR; return ERR;
#ifdef KEY_CANCEL #ifdef KEY_CANCEL /* Slang doesn't support KEY_CANCEL. */
#ifdef KEY_SCANCEL #ifdef KEY_SCANCEL /* Slang doesn't support KEY_SCANCEL. */
/* Slang doesn't support KEY_SCANCEL. */
case KEY_SCANCEL: case KEY_SCANCEL:
#endif #endif
/* Slang doesn't support KEY_CANCEL. */
case KEY_CANCEL: case KEY_CANCEL:
return the_code_for(do_cancel, 0x03); return the_code_for(do_cancel, 0x03);
#endif #endif
#ifdef KEY_SUSPEND #ifdef KEY_SUSPEND /* Slang doesn't support KEY_SUSPEND. */
#ifdef KEY_SSUSPEND #ifdef KEY_SSUSPEND /* Slang doesn't support KEY_SSUSPEND. */
/* Slang doesn't support KEY_SSUSPEND. */
case KEY_SSUSPEND: case KEY_SSUSPEND:
#endif #endif
/* Slang doesn't support KEY_SUSPEND. */
case KEY_SUSPEND: case KEY_SUSPEND:
return the_code_for(do_suspend_void, KEY_SUSPEND); return the_code_for(do_suspend_void, KEY_SUSPEND);
#endif #endif
#ifdef KEY_BTAB #ifdef KEY_BTAB /* Slang doesn't support KEY_BTAB. */
/* Slang doesn't support KEY_BTAB. */
case KEY_BTAB: case KEY_BTAB:
return SHIFT_TAB; return SHIFT_TAB;
#endif #endif
@ -745,8 +730,7 @@ int parse_kbinput(WINDOW *win)
case KEY_ALT_R: case KEY_ALT_R:
return ERR; return ERR;
#endif #endif
#ifdef KEY_RESIZE #ifdef KEY_RESIZE /* Slang and SunOS 5.7-5.9 don't support KEY_RESIZE. */
/* Slang and SunOS 5.7-5.9 don't support KEY_RESIZE. */
case KEY_RESIZE: case KEY_RESIZE:
#endif #endif
#if defined(USE_SLANG) && defined(ENABLE_UTF8) #if defined(USE_SLANG) && defined(ENABLE_UTF8)