ada-examples-4-10-branch
Last change
on this file since c53f12b was
c53f12b,
checked in by Joel Sherrill <joel.sherrill@…>, on 02/02/11 at 19:08:06
|
2011-02-02 Joel Sherrill <joel.sherrill@…>
- commands.adb, commands.ads, rtems_shell.ads, shell.adb: Add getopt_r
Package and example command.
- command_line_arguments.adb, command_line_arguments.ads, getopt_r.adb,
getopt_r.ads: New files.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | -- |
---|
2 | -- $Id$ |
---|
3 | -- |
---|
4 | |
---|
5 | with Command_Line_Arguments; use Command_Line_Arguments; |
---|
6 | with Interfaces.C; use Interfaces.C; |
---|
7 | with Interfaces.C.Strings; use Interfaces.C.Strings; |
---|
8 | with Interfaces.C.Pointers; |
---|
9 | |
---|
10 | package RTEMS_Shell is |
---|
11 | |
---|
12 | type Command_Function_Type is access function (ArgC : Argument_Count_Type; |
---|
13 | ArgV : Argument_Vector_Type) return int; |
---|
14 | pragma Convention (C, Command_Function_Type); |
---|
15 | |
---|
16 | procedure RTEMS_Shell_Add_Command(Name : chars_ptr; Category : chars_ptr; |
---|
17 | Help : chars_ptr; Command_Function : Command_Function_Type); |
---|
18 | pragma Import (C, RTEMS_Shell_Add_Command, "rtems_shell_add_cmd"); |
---|
19 | |
---|
20 | type Prompt_Function_Type is access function return chars_ptr; |
---|
21 | pragma Convention (C, Prompt_Function_Type); |
---|
22 | |
---|
23 | procedure Set_RTEMS_Shell_Prompt_Function( |
---|
24 | Prompt_Function : Prompt_Function_Type); |
---|
25 | pragma Import (C, Set_RTEMS_Shell_Prompt_Function, "set_prompt_function"); |
---|
26 | |
---|
27 | procedure Invoke_RTEMS_Shell; |
---|
28 | pragma Import (C, Invoke_RTEMS_Shell, "invoke_rtems_shell"); |
---|
29 | |
---|
30 | procedure Initialize_Telnet_Daemon; |
---|
31 | pragma Import (C, Initialize_Telnet_Daemon, "init_telnet_daemon"); |
---|
32 | |
---|
33 | end RTEMS_Shell; |
---|
Note: See
TracBrowser
for help on using the repository browser.