comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: GNAT.Expect on Windows, without terminal window
Date: Sun, 14 Feb 2010 05:38:36 -0800 (PST)
Date: 2010-02-14T05:38:36-08:00	[thread overview]
Message-ID: <52dac0bf-a160-4c17-82f4-023791c4399a@v25g2000yqk.googlegroups.com> (raw)
In-Reply-To: bc4e7ae5-c800-4138-a39c-25b6d337119f@j31g2000yqa.googlegroups.com

Finally, I went on with a specific MS Windows solution.
The usage is as simple as:
--
with Ada.Text_IO;
procedure Output_a_line(l: String) is
begin
  Ada.Text_IO.Put_Line('[' & l & ']');
end;
--
with Output_a_line, Windows_pipes;
procedure Win_Pipe_test is
  use Windows_pipes;
  p: Piped_process;
begin
  Start(p, "cmd.exe /c dir", ".", Output_a_line'Access);
  while Alive(p) loop
    Check_progress(p);
  end loop;
end Win_Pipe_test;

The code is there...
http://gnavi.svn.sourceforge.net/viewvc/gnavi/gwenerator/src/Windows_pipes.ads?view=markup&pathrev=87
______________________________________________________________
Gautier's Ada programming -- http://gautiersblog.blogspot.com/



      reply	other threads:[~2010-02-14 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 21:46 GNAT.Expect on Windows, without terminal window Gautier write-only
2010-02-14 13:38 ` Gautier write-only [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox