source: ada-examples/shell/shell.adb @ c53f12b

ada-examples-4-10-branch
Last change on this file since c53f12b was c53f12b, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 2, 2011 at 7:08:06 PM

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: 672 bytes
Line 
1--
2--  $Id$
3--
4
5with Interfaces.C.Strings; use Interfaces.C.Strings;
6with Commands;             use Commands;
7with RTEMS_Shell;          use RTEMS_Shell;
8
9procedure Shell is
10begin
11   RTEMS_Shell_Add_Command
12     (New_String ("getopt"),
13      New_String ("test"),
14      New_String ("Example of getopt with pattern c:di:n:p:u:V"),
15      Command_Getopt_R'Access);
16
17   RTEMS_Shell_Add_Command
18     (New_String ("args"),
19      New_String ("test"),
20      New_String ("Test passing arguments"),
21      Command_Test_Arguments'Access);
22
23   Set_RTEMS_Shell_Prompt_Function (C_Prompt'Access);
24   --  Initialize_Telnet_Daemon;
25   loop
26      Invoke_RTEMS_Shell;
27   end loop;
28end Shell;
Note: See TracBrowser for help on using the repository browser.