From ea90df234adfede1d28070ec8aa1bbb75ca4c1cb Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 3 Apr 2008 03:13:24 +0000 Subject: 2008-04-03 Chris Johns * libfs/src/nfsclient/src/librtemsNfs.h, libfs/src/nfsclient/src/nfs.c: Remove CEXP references. CEXP is external to RTEMS and even if in the cpukit it should not cross reference in this way. * libmisc/shell/shell_getchar.c: New. Taken from the monitor. * libmisc/Makefile.am: Add shell_getchar.c and clean up a little in the shell area. * libmisc/shell/shell.c, libmisc/shell/shell.h: Add line editting support. --- cpukit/libmisc/shell/shell.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'cpukit/libmisc/shell/shell.h') diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h index 2aca183138..10b10bd6ff 100644 --- a/cpukit/libmisc/shell/shell.h +++ b/cpukit/libmisc/shell/shell.h @@ -29,6 +29,31 @@ extern "C" { #endif +/* + * Some key labels to define special keys. + */ + +#define RTEMS_SHELL_KEYS_EXTENDED (0x8000) +#define RTEMS_SHELL_KEYS_NORMAL_MASK (0x00ff) +#define RTEMS_SHELL_KEYS_INS (0) +#define RTEMS_SHELL_KEYS_DEL (1) +#define RTEMS_SHELL_KEYS_UARROW (2) +#define RTEMS_SHELL_KEYS_DARROW (3) +#define RTEMS_SHELL_KEYS_LARROW (4) +#define RTEMS_SHELL_KEYS_RARROW (5) +#define RTEMS_SHELL_KEYS_HOME (6) +#define RTEMS_SHELL_KEYS_END (7) +#define RTEMS_SHELL_KEYS_F1 (8) +#define RTEMS_SHELL_KEYS_F2 (9) +#define RTEMS_SHELL_KEYS_F3 (10) +#define RTEMS_SHELL_KEYS_F4 (11) +#define RTEMS_SHELL_KEYS_F5 (12) +#define RTEMS_SHELL_KEYS_F6 (13) +#define RTEMS_SHELL_KEYS_F7 (14) +#define RTEMS_SHELL_KEYS_F8 (15) +#define RTEMS_SHELL_KEYS_F9 (16) +#define RTEMS_SHELL_KEYS_F10 (17) + typedef int (*rtems_shell_command_t)(int argc,char * argv[]); struct rtems_shell_cmd_tt; @@ -48,6 +73,12 @@ typedef struct { char *alias; } rtems_shell_alias_t; +/* + * The return value has RTEMS_SHELL_KEYS_EXTENDED set if the key + * is extended, ie a special key. + */ +unsigned int rtems_shell_getchar(FILE *in); + rtems_shell_cmd_t * rtems_shell_lookup_cmd(char * cmd); rtems_shell_cmd_t *rtems_shell_add_cmd_struct( -- cgit v1.2.3