1-----------------------------------------------------------------------------
2--  This is just a quick hack to show what a command to be run by AdaBrowse
3--  should NOT do: it reads from stdin, and it doesn't return.
4-----------------------------------------------------------------------------
5
6with Ada.Text_IO;
7
8procedure Nasty is
9   use Ada.Text_IO;
10
11   Std_In : File_Access := Standard_Input;
12begin
13   Put_Line ("nasty starts...");
14   while not End_Of_File (Std_In.all) loop
15      declare
16         Buf : String (1 .. 500);
17         Last : Natural;
18      begin
19         Get_Line (Std_In.all, Buf, Last);
20         Put_Line (Current_Error, "nasty read: " & Buf (1 .. Last));
21      end;
22   end loop;
23   Put_Line ("nasty won't end.");
24   loop
25      null;
26   end loop;
27end Nasty;
28