File : horse.adb
1 pragma Restrictions (No_Implicit_Heap_Allocations);
2
3 with ada.text_io;
4 use ada.text_io;
5
6
7 with Buf_Streams; use Buf_Streams;
8 with Blocks; use Blocks;
9
10 with Ada.Command_Line; use Ada.Command_Line;
11
12
13 package body horse is
14
15 procedure Tst is
16 B : Block;
17 Buf : aliased Buf_Stream(1048576);
18 begin
19
20 if Argument_Count = 0 then
21 Put_Line(Current_Error, "Error - No file names given.");
22 Set_Exit_Status(Failure);
23 else
24 -- Do each file:
25 for Arg in 1 .. Argument_Count loop
26 Fill_From_File(Buf, Argument(Arg));
27 Block'Read(Buf'Access, B);
28 end loop;
29 end if;
30 end Tst;
31
32 end horse;