From: John Apa <japa@delphi.dasd.honeywell.com>
To: Jack Lunn <jclunn@carol.net>
Subject: Re: Redirecting output to a printer
Date: 1997/02/27
Date: 1997-02-27T00:00:00+00:00 [thread overview]
Message-ID: <3315FB74.62F4@delphi.dasd.honeywell.com> (raw)
In-Reply-To: 33110F45.1849@carol.net
Jack Lunn wrote:
>
> How do you redirect output to a printer from within an Ada
> procedure (Unix and DOS environments)?
>
> Creating an Out_File called "lpt1" seems to work in DOS. I'm
> just wondering if there is a better way.
>
> Thanks for your help.
On a unix machine I found that it's best to send output to a file in
/tmp and then when you're done creating it use a system call (I forget
the package/procedure name, but it's system dependent anyway) to fire it
off to the printer using whatever command line action you would normally
use. The function allows you to execute a command line from within your
program. It took a string like "p -o -l -s "\!*" <\!* | lpr
-Pps_lps_w14u". Worked pretty good.
Hope it helps.
--
***********************************
John Thomas Apa
Honeywell Defense Avionics Systems
Albuquerque, New Mexico.
***********************************
prev parent reply other threads:[~1997-02-27 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-23 0:00 Redirecting output to a printer Jack Lunn
1997-02-26 0:00 ` Jacob Sparre Andersen
1997-02-27 0:00 ` John Apa [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