diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-02-02 19:08:06 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-02-02 19:08:06 +0000 |
commit | c53f12b1de543dc1fe9c6adf62655068c37e405d (patch) | |
tree | ea0f045c271bf166823c738e7a023da51875b154 /shell/shell.adb | |
parent | e5636e3951c806b378bdc56dd731ffad7cea28d3 (diff) |
2011-02-02 Joel Sherrill <joel.sherrill@gmail.com>
* 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.
Diffstat (limited to 'shell/shell.adb')
-rw-r--r-- | shell/shell.adb | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/shell/shell.adb b/shell/shell.adb index a4ae014..1bd5096 100644 --- a/shell/shell.adb +++ b/shell/shell.adb @@ -1,21 +1,28 @@ ---
--- $Id$
---
-
-with Interfaces.C.Strings; use Interfaces.C.Strings;
-with Commands; use Commands;
-with RTEMS_Shell; use RTEMS_Shell;
-
-procedure Main is
-begin
- RTEMS_Shell_Add_Command
- (New_String ("args"),
- New_String ("test"),
- New_String ("Test passing arguments"),
- Command_Test_Arguments'Access);
- Set_RTEMS_Shell_Prompt_Function (C_Prompt'Access);
- Initialize_Telnet_Daemon;
- loop
- Invoke_RTEMS_Shell;
- end loop;
-end Main;
+-- +-- $Id$ +-- + +with Interfaces.C.Strings; use Interfaces.C.Strings; +with Commands; use Commands; +with RTEMS_Shell; use RTEMS_Shell; + +procedure Shell is +begin + RTEMS_Shell_Add_Command + (New_String ("getopt"), + New_String ("test"), + New_String ("Example of getopt with pattern c:di:n:p:u:V"), + Command_Getopt_R'Access); + + RTEMS_Shell_Add_Command + (New_String ("args"), + New_String ("test"), + New_String ("Test passing arguments"), + Command_Test_Arguments'Access); + + Set_RTEMS_Shell_Prompt_Function (C_Prompt'Access); + -- Initialize_Telnet_Daemon; + loop + Invoke_RTEMS_Shell; + end loop; +end Shell; |