From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114c38,b2077f5b728fb9af X-Google-Attributes: gid114c38,public X-Google-Thread: 103376,b2077f5b728fb9af X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-11 05:30:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!cyclone.bc.net!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada,comp.os.vxworks Subject: Re: redirecting the standard output Date: 11 Apr 2001 08:06:26 -0400 Organization: NASA Goddard Space Flight Center Message-ID: References: <3ad31759$1@pull.gecm.com> <9avdcq$s6j1@cui1.lmms.lmco.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 986991679 19054 128.183.220.71 (11 Apr 2001 12:21:19 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 11 Apr 2001 12:21:19 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6 Xref: supernews.google.com comp.lang.ada:6749 comp.os.vxworks:6407 Date: 2001-04-11T12:21:19+00:00 List-Id: "Smark" writes: > "Martin Dowie" wrote in message > news:3ad31759$1@pull.gecm.com... > > This time with a subject... :-) > > > > Target System: PowerPC, AdaMULTI v1.8.9b, VxWorks 5.4 > > > > How do I redirect the standard output? I'd like to redirect it to device > > "/null" > > > > Attempts: > > Open (DevNull, Append_File, "/null"); > > Open (DevNull, "/null", "/null"); > > > > just cause Status_Error, i.e. the device is already "open". So how can > > I then "Set_Output (DevNull);" without having the device object in > > File_Type form?.. > > > > > > I have also had problems redirecting Ada.Text_Io on the same platform. > When I use the applicable VxWorks calls, ioGlobalStdSet or ioTaskStdSet, > my printf's from C programs are redirected, but Ada.Text_Io seems to > be unaffected. In my case, I'm trying to redirect IO to an open > socket. > > The solution I'm toying with is making an Ada interface to printf. > Is there a better way to get Ada IO to respond to calls to the > above VxWorks functions? I don't know precisely, but you should definitely ask your Ada vendor how to do it. If you are using GNAT, look at the source for Text_IO and see what they are doing. Interfacing to printf is _not_ easy. 'puts' is a better C function to call, if you have to resort to that. -- -- Stephe