1 | --
|
---|
2 | -- $Id$
|
---|
3 | --
|
---|
4 |
|
---|
5 | with Interfaces.C; use Interfaces.C;
|
---|
6 | with Interfaces.C.Strings; use Interfaces.C.Strings;
|
---|
7 | with Interfaces.C.Pointers;
|
---|
8 |
|
---|
9 | package RTEMS_Shell is
|
---|
10 |
|
---|
11 | type Argument_Array is array (ptrdiff_t range <>) of aliased chars_ptr;
|
---|
12 |
|
---|
13 | package Argument_Vector_Package is
|
---|
14 | new Pointers (Index => ptrdiff_t,
|
---|
15 | Element => chars_ptr,
|
---|
16 | Element_Array => Argument_Array,
|
---|
17 | Default_Terminator => Null_Ptr);
|
---|
18 |
|
---|
19 | subtype Argument_Count_Type is ptrdiff_t;
|
---|
20 | subtype Argument_Vector_Type is Argument_Vector_Package.Pointer;
|
---|
21 |
|
---|
22 | type Command_Function_Type is access function (ArgC : Argument_Count_Type;
|
---|
23 | ArgV : Argument_Vector_Type) return int;
|
---|
24 | pragma Convention (C, Command_Function_Type);
|
---|
25 |
|
---|
26 | procedure RTEMS_Shell_Add_Command(Name : chars_ptr; Category : chars_ptr;
|
---|
27 | Help : chars_ptr; Command_Function : Command_Function_Type);
|
---|
28 | pragma Import (C, RTEMS_Shell_Add_Command, "rtems_shell_add_cmd");
|
---|
29 |
|
---|
30 | type Prompt_Function_Type is access function return chars_ptr;
|
---|
31 | pragma Convention (C, Prompt_Function_Type);
|
---|
32 |
|
---|
33 | procedure Set_RTEMS_Shell_Prompt_Function(
|
---|
34 | Prompt_Function : Prompt_Function_Type);
|
---|
35 | pragma Import (C, Set_RTEMS_Shell_Prompt_Function, "set_prompt_function");
|
---|
36 |
|
---|
37 | procedure Invoke_RTEMS_Shell;
|
---|
38 | pragma Import (C, Invoke_RTEMS_Shell, "invoke_rtems_shell");
|
---|
39 |
|
---|
40 | procedure Initialize_Telnet_Daemon;
|
---|
41 | pragma Import (C, Initialize_Telnet_Daemon, "init_telnet_daemon");
|
---|
42 |
|
---|
43 | end RTEMS_Shell;
|
---|