diff options
author | Chris Johns <chrisj@rtems.org> | 2008-04-03 03:13:24 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2008-04-03 03:13:24 +0000 |
commit | ea90df234adfede1d28070ec8aa1bbb75ca4c1cb (patch) | |
tree | fa2716a7a47602bbacb0865e97387bfe54abec7e /cpukit/libmisc/shell/shell.h | |
parent | gdb-6.8-rtems4.9-20080331.diff. (diff) | |
download | rtems-ea90df234adfede1d28070ec8aa1bbb75ca4c1cb.tar.bz2 |
2008-04-03 Chris Johns <chrisj@rtems.org>
* 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.
Diffstat (limited to 'cpukit/libmisc/shell/shell.h')
-rw-r--r-- | cpukit/libmisc/shell/shell.h | 31 |
1 files changed, 31 insertions, 0 deletions
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( |