the curses library included with SunOS 5.7-5.9. Also define
KEY_SUSPEND as -1 if it isn't defined, in case it isn't in
more than just Slang. (DLR)
+ - Define all potentially missing keys as different negative
+ values (ERR is -1, so use -2, -3, etc.) so as to avoid having
+ duplicate case values when keys are missing. (DLR)
- move.c:
- Remove unneeded inclusion of stdio.h, make various cleanups,
and preserve the cursor's coordinates when paging up and down.
#define strncasecmp nstrnicmp
#endif
+/* Note: ERR is defined as -1, so to avoid duplicate case values when
+ some key definitions are missing, we have to set these all to
+ different negative values other than -1. */
+
/* HP-UX 10 & 11 do not seem to support KEY_HOME and KEY_END */
#ifndef KEY_HOME
-#define KEY_HOME -1
+#define KEY_HOME -2
#endif
#ifndef KEY_END
-#define KEY_END -1
+#define KEY_END -3
#endif
/* Slang and SunOS 5.7-5.9 do not seem to support KEY_RESIZE */
#ifndef KEY_RESIZE
-#define KEY_RESIZE -1
+#define KEY_RESIZE -4
#endif
/* Slang does not seem to support KEY_SUSPEND */
#ifndef KEY_SUSPEND
-#define KEY_SUSPEND -1
+#define KEY_SUSPEND -5
#endif
/* Snatch these out of the ncurses defs, so we can use them in search
#define NANO_ALT_BRACKET ']'
#define NANO_ALT_SPACE ' '
-/* Some semi-changeable keybindings; don't play with unless you're sure you
-know what you're doing */
+/* Some semi-changeable keybindings; don't play with unless you're sure
+ you know what you're doing */
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
#define NANO_INSERTFILE_FKEY KEY_F(5)