source: ada-examples/shell/commands.adb @ f421fee

ada-examples-4-10-branch
Last change on this file since f421fee 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: 749 bytes
RevLine 
[f421fee]1--
2--  $Id$
3--
4
5with Ada.Text_IO; use Ada.Text_IO;
6
7package body Commands is
8
9   function Prompt return String is begin
10      return "RTEMS> ";
11   end Prompt;
12
13   function C_Prompt return chars_ptr is
14   begin
15      return New_String (Prompt);
16   end C_Prompt;
17
18   function Command_Test_Arguments
19     (ArgC : Argument_Count_Type;
20      ArgV : Argument_Vector_Type)
21      return int
22   is
23      Arguments : Argument_Array (1 .. ArgC);
24      Count     : Argument_Count_Type := 1;
25   begin
26      Arguments := Argument_Vector_Package.Value (ArgV, ArgC);
27      loop
28         exit when Count > ArgC;
29         Put_Line (Value (Arguments (Count)));
30         Count := Count + 1;
31      end loop;
32      return 0;
33   end Command_Test_Arguments;
34
35end Commands;
Note: See TracBrowser for help on using the repository browser.