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-d3aeb78583b8master
parent
13dfdb2493
commit
f6cf4a7d7c
|
@ -121,6 +121,9 @@ CVS code -
|
||||||
the curses library included with SunOS 5.7-5.9. Also define
|
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
|
KEY_SUSPEND as -1 if it isn't defined, in case it isn't in
|
||||||
more than just Slang. (DLR)
|
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:
|
- move.c:
|
||||||
- Remove unneeded inclusion of stdio.h, make various cleanups,
|
- Remove unneeded inclusion of stdio.h, make various cleanups,
|
||||||
and preserve the cursor's coordinates when paging up and down.
|
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
|
#define strncasecmp nstrnicmp
|
||||||
#endif
|
#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 */
|
/* HP-UX 10 & 11 do not seem to support KEY_HOME and KEY_END */
|
||||||
#ifndef KEY_HOME
|
#ifndef KEY_HOME
|
||||||
#define KEY_HOME -1
|
#define KEY_HOME -2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef KEY_END
|
#ifndef KEY_END
|
||||||
#define KEY_END -1
|
#define KEY_END -3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Slang and SunOS 5.7-5.9 do not seem to support KEY_RESIZE */
|
/* Slang and SunOS 5.7-5.9 do not seem to support KEY_RESIZE */
|
||||||
#ifndef KEY_RESIZE
|
#ifndef KEY_RESIZE
|
||||||
#define KEY_RESIZE -1
|
#define KEY_RESIZE -4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Slang does not seem to support KEY_SUSPEND */
|
/* Slang does not seem to support KEY_SUSPEND */
|
||||||
#ifndef KEY_SUSPEND
|
#ifndef KEY_SUSPEND
|
||||||
#define KEY_SUSPEND -1
|
#define KEY_SUSPEND -5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Snatch these out of the ncurses defs, so we can use them in search
|
/* 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_BRACKET ']'
|
||||||
#define NANO_ALT_SPACE ' '
|
#define NANO_ALT_SPACE ' '
|
||||||
|
|
||||||
/* Some semi-changeable keybindings; don't play with unless you're sure you
|
/* Some semi-changeable keybindings; don't play with unless you're sure
|
||||||
know what you're doing */
|
you know what you're doing */
|
||||||
|
|
||||||
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
|
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
|
||||||
#define NANO_INSERTFILE_FKEY KEY_F(5)
|
#define NANO_INSERTFILE_FKEY KEY_F(5)
|
||||||
|
|
Loading…
Reference in New Issue