summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/shell_getchar.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-18 15:25:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-18 15:25:27 +0000
commite41eaa881a1a0ba6645d4a23d1313088c8ccfb7f (patch)
tree01edbddc5c654a1fb474fbccf56654bf35eadf1b /cpukit/libmisc/shell/shell_getchar.c
parent2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-e41eaa881a1a0ba6645d4a23d1313088c8ccfb7f.tar.bz2
2008-12-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h: Fixed incompatible return value. * libmisc/cpuuse/cpuusagereport.c: Changed output format. * libmisc/Makefile.am, libmisc/monitor/mon-editor.c: New file. * libmisc/capture/capture-cli.c, libmisc/monitor/mon-command.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-symbols.c, libmisc/monitor/monitor.h, libmisc/shell/cat_file.c, libmisc/shell/cmds.c, libmisc/shell/internal.h, libmisc/shell/main_help.c, libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/shell/shell_cmdset.c, libmisc/shell/shell_getchar.c, libmisc/shell/str2int.c: Various global data is now read only. Added 'const' qualifier to many pointer parameters. It is no longer possible to remove monitor commands. Moved monitor line editor into a separate file to avoid unnecessary dependencies.
Diffstat (limited to 'cpukit/libmisc/shell/shell_getchar.c')
-rw-r--r--cpukit/libmisc/shell/shell_getchar.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpukit/libmisc/shell/shell_getchar.c b/cpukit/libmisc/shell/shell_getchar.c
index 53b80dd953..b214a9511f 100644
--- a/cpukit/libmisc/shell/shell_getchar.c
+++ b/cpukit/libmisc/shell/shell_getchar.c
@@ -41,29 +41,29 @@
struct translation_table
{
char expecting;
- struct translation_table *branch;
+ const struct translation_table *branch;
unsigned int key;
};
-static struct translation_table trans_one[] =
+static const struct translation_table trans_one[] =
{
{ '\x7e', 0, RTEMS_SHELL_KEYS_HOME },
{ 0, 0, 0 }
};
-static struct translation_table trans_two[] =
+static const struct translation_table trans_two[] =
{
{ '~', 0, RTEMS_SHELL_KEYS_INS },
{ 0, 0, 0 }
};
-static struct translation_table trans_three[] =
+static const struct translation_table trans_three[] =
{
{ '~', 0, RTEMS_SHELL_KEYS_DEL },
{ 0, 0, 0 }
};
-static struct translation_table trans_tab_csi[] =
+static const struct translation_table trans_tab_csi[] =
{
{ '1', trans_one, 0 },
{ '2', trans_two, 0 },
@@ -77,7 +77,7 @@ static struct translation_table trans_tab_csi[] =
{ 0, 0, 0 }
};
-static struct translation_table trans_tab_O[] =
+static const struct translation_table trans_tab_O[] =
{
{ '1', 0, RTEMS_SHELL_KEYS_F1 },
{ '2', 0, RTEMS_SHELL_KEYS_F2 },
@@ -103,7 +103,7 @@ static struct translation_table trans_tab_O[] =
{ 0, 0, 0 }
};
-static struct translation_table trans_tab[] =
+static const struct translation_table trans_tab[] =
{
{ '[', trans_tab_csi, 0 }, /* CSI command sequences */
{ 'O', trans_tab_O, 0 }, /* O are the fuction keys */
@@ -120,7 +120,7 @@ static struct translation_table trans_tab[] =
unsigned int
rtems_shell_getchar (FILE *in)
{
- struct translation_table *translation = 0;
+ const struct translation_table *translation = 0;
for (;;)
{
int c = fgetc (in);