4.104.114.84.95
Last change
on this file since e565720a was
dd74e612,
checked in by Joel Sherrill <joel.sherrill@…>, on 04/20/01 at 20:35:45
|
2001-04-20 Correo Fernando-ruiz <correo@…>
- Added initial shell functionality.
- Makefile.am, configure.in, wrapup/Makefile.am:
- shell/.cvsignore, shell/Makefile.am, shell/README,
shell/cmds.c, shell/shell.c, shell/shell.h: New files.
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Line | |
---|
1 | /* |
---|
2 | * $Id$ |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef __SHELL_H__ |
---|
6 | #define __SHELL_H__ |
---|
7 | |
---|
8 | #ifdef __cplusplus |
---|
9 | extern "C" { |
---|
10 | #endif |
---|
11 | |
---|
12 | #include <rtems.h> |
---|
13 | #include <stdio.h> |
---|
14 | #include <termios.h> |
---|
15 | |
---|
16 | typedef int (*shell_command_t)(int argc,char * argv[]); |
---|
17 | |
---|
18 | struct shell_cmd_tt ; |
---|
19 | typedef struct shell_cmd_tt shell_cmd_t; |
---|
20 | |
---|
21 | struct shell_cmd_tt { |
---|
22 | char * name; |
---|
23 | char * usage; |
---|
24 | char * topic; |
---|
25 | shell_command_t command; |
---|
26 | shell_cmd_t * alias; |
---|
27 | shell_cmd_t * next; |
---|
28 | }; |
---|
29 | |
---|
30 | rtems_unsigned32 new_rtems_name(char * rtems_name); |
---|
31 | shell_cmd_t * shell_lookup_cmd(char * cmd); |
---|
32 | shell_cmd_t * shell_add_cmd(char * cmd, |
---|
33 | char * topic, |
---|
34 | char * usage, |
---|
35 | shell_command_t command); |
---|
36 | shell_cmd_t * shell_alias_cmd(char * cmd, char * alias); |
---|
37 | |
---|
38 | int shell_make_args(char * cmd, |
---|
39 | int * pargc, |
---|
40 | char * argv[]); |
---|
41 | |
---|
42 | typedef struct { |
---|
43 | rtems_name magic; /* 'S','E','N','V': Shell Environment */ |
---|
44 | char * devname; |
---|
45 | char * taskname; |
---|
46 | tcflag_t tcflag; |
---|
47 | /* user extensions */ |
---|
48 | int errorlevel; |
---|
49 | int mdump_adr; |
---|
50 | } shell_env_t; |
---|
51 | |
---|
52 | int shell_scanline(char * line,int size,FILE * in,FILE * out) ; |
---|
53 | |
---|
54 | rtems_status_code shell_init(char * task_name , |
---|
55 | rtems_unsigned32 task_stacksize,/*0 default*/ |
---|
56 | rtems_task_priority task_priority , |
---|
57 | char * devname , |
---|
58 | tcflag_t tcflag ); |
---|
59 | |
---|
60 | extern shell_env_t global_shell_env, |
---|
61 | * current_shell_env; |
---|
62 | /*--------*/ |
---|
63 | /* cmds.c */ |
---|
64 | /*--------*/ |
---|
65 | int str2int(char * s); |
---|
66 | void register_cmds(void); |
---|
67 | |
---|
68 | #ifdef __cplusplus |
---|
69 | } |
---|
70 | #endif |
---|
71 | |
---|
72 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.