source: ada-examples/shell/rtems_shell.ads @ 92f495a

ada-examples-4-10-branch
Last change on this file since 92f495a was f421fee, checked in by Joel Sherrill <joel.sherrill@…>, on 09/15/09 at 21:11:42

2009-09-15 Joel Sherrill <joel.sherrill@…>

  • .cvsignore, ChangeLog?, Makefile, README, commands.adb, commands.ads, config.h, main.adb, rtems_shell.ads, shell_init.c: New files.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1--
2--  $Id$
3--
4
5with Interfaces.C;          use Interfaces.C;
6with Interfaces.C.Strings;  use Interfaces.C.Strings;
7with Interfaces.C.Pointers;
8
9package 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
43end RTEMS_Shell;
Note: See TracBrowser for help on using the repository browser.