mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 14:20:46 +03:00
avoid having duplicate case values when some key values are missing
(assume ERR is -1 when doing so) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
13dfdb2493
commit
f6cf4a7d7c
@ -121,6 +121,9 @@ CVS code -
|
||||
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.
|
||||
|
16
src/nano.h
16
src/nano.h
@ -89,23 +89,27 @@
|
||||
#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
|
||||
@ -338,8 +342,8 @@ typedef struct historyheadtype {
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user