mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/monitor/mon-editor.c: Eliminate RTEMS_UNIX.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2009-10-14 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* libmisc/monitor/mon-editor.c: Eliminate RTEMS_UNIX.
|
||||||
* libcsupport/include/rtems/libcsupport.h: Remove RTEMS_UNIX, hpux.
|
* libcsupport/include/rtems/libcsupport.h: Remove RTEMS_UNIX, hpux.
|
||||||
Fix extern "C" {}.
|
Fix extern "C" {}.
|
||||||
* libfs/src/imfs/ioman.c: Remove RTEMS_UNIX, __linux__.
|
* libfs/src/imfs/ioman.c: Remove RTEMS_UNIX, __linux__.
|
||||||
|
|||||||
@@ -65,23 +65,20 @@
|
|||||||
#define RTEMS_COMMAND_BUFFER_SIZE (75)
|
#define RTEMS_COMMAND_BUFFER_SIZE (75)
|
||||||
|
|
||||||
static char monitor_prompt[32];
|
static char monitor_prompt[32];
|
||||||
#ifndef RTEMS_UNIX
|
|
||||||
static char buffer[RTEMS_COMMAND_BUFFER_SIZE];
|
static char buffer[RTEMS_COMMAND_BUFFER_SIZE];
|
||||||
static int pos;
|
static int pos;
|
||||||
static int logged_in;
|
static int logged_in;
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* History data.
|
* History data.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define RTEMS_COMMAND_HISTORIES (20)
|
#define RTEMS_COMMAND_HISTORIES (20)
|
||||||
|
|
||||||
#ifndef RTEMS_UNIX
|
|
||||||
static char history_buffer[RTEMS_COMMAND_HISTORIES][RTEMS_COMMAND_BUFFER_SIZE];
|
static char history_buffer[RTEMS_COMMAND_HISTORIES][RTEMS_COMMAND_BUFFER_SIZE];
|
||||||
static int history_pos[RTEMS_COMMAND_HISTORIES];
|
static int history_pos[RTEMS_COMMAND_HISTORIES];
|
||||||
static int history;
|
static int history;
|
||||||
static int history_next;
|
static int history_next;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Translation tables. Not sure if this is the best way to
|
* Translation tables. Not sure if this is the best way to
|
||||||
@@ -97,7 +94,6 @@ struct translation_table
|
|||||||
unsigned int key;
|
unsigned int key;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef RTEMS_UNIX
|
|
||||||
static const struct translation_table trans_two[] =
|
static const struct translation_table trans_two[] =
|
||||||
{
|
{
|
||||||
{ '~', 0, KEYS_INS },
|
{ '~', 0, KEYS_INS },
|
||||||
@@ -154,7 +150,6 @@ static const struct translation_table trans_tab[] =
|
|||||||
{ 'O', trans_tab_O, 0 }, /* O are the fuction keys */
|
{ 'O', trans_tab_O, 0 }, /* O are the fuction keys */
|
||||||
{ 0, 0, 0 }
|
{ 0, 0, 0 }
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform a basic translation for some ANSI/VT100 key codes.
|
* Perform a basic translation for some ANSI/VT100 key codes.
|
||||||
@@ -163,7 +158,6 @@ static const struct translation_table trans_tab[] =
|
|||||||
* line editor below so considiered not worth the effort.
|
* line editor below so considiered not worth the effort.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RTEMS_UNIX
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
rtems_monitor_getchar (void)
|
rtems_monitor_getchar (void)
|
||||||
{
|
{
|
||||||
@@ -218,9 +212,7 @@ rtems_monitor_getchar (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef RTEMS_UNIX
|
|
||||||
/*
|
/*
|
||||||
* The line editor with history.
|
* The line editor with history.
|
||||||
*/
|
*/
|
||||||
@@ -453,7 +445,6 @@ rtems_monitor_line_editor (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* make_argv(cp): token-count
|
* make_argv(cp): token-count
|
||||||
@@ -513,15 +504,7 @@ rtems_monitor_command_read(char *command,
|
|||||||
sprintf (monitor_prompt, "%" PRId32 "-%s", rtems_monitor_node,
|
sprintf (monitor_prompt, "%" PRId32 "-%s", rtems_monitor_node,
|
||||||
(env_prompt == NULL) ? MONITOR_PROMPT : env_prompt);
|
(env_prompt == NULL) ? MONITOR_PROMPT : env_prompt);
|
||||||
|
|
||||||
#if defined(RTEMS_UNIX)
|
|
||||||
/* RTEMS on unix gets so many interrupt system calls this is hosed */
|
|
||||||
fprintf(stdout,"%s> ", monitor_prompt);
|
|
||||||
fflush (stdout);
|
|
||||||
while (gets(command) == (char *) 0)
|
|
||||||
;
|
|
||||||
#else
|
|
||||||
rtems_monitor_line_editor (command);
|
rtems_monitor_line_editor (command);
|
||||||
#endif
|
|
||||||
|
|
||||||
return rtems_monitor_make_argv (command, argc, argv);
|
return rtems_monitor_make_argv (command, argc, argv);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user