comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal MALAISE <malaise@magic.fr>
Subject: Re: file to printer (spooling)
Date: 2000/03/23
Date: 2000-03-23T19:49:13+00:00	[thread overview]
Message-ID: <38DA7505.F3E842CE@magic.fr> (raw)
In-Reply-To: 8bddei$gmg$1@infosun2.rus.uni-stuttgart.de

Peter Hermann wrote:
> 
> we need help:
> (First of all, our primary goal is portability)
> We create, write (several ada.text_io.put_line),
> and close a text file.
> Thereafter we want to spool that file to the printer
> in order to let it print asynchronously.
> How should we do this from within the Ada program?
> We do need that action from within the running Ada program.

Do you mean that the printing request has to be performed IN the
ada program or BY the ada program?

In the second alternative, you can assume that the (compiler/OS)
specific
ada runtime allows you to start another program. This procedure can be
encapsulted in a "to_port" package.
In the ada program: SYS_CALLS.CALL_SYSTEM(PRINTER_COMMAND & " " &
FILE_NAME);

PRINTER_COMMAND is shell script on UNIX, a command file on VMS, or a
batch file on DOS)
and submits the printing.

On unix the script is only "lpr $*"

-- 
Pascal MALAISE
(priv) mailto:malaise@magic.fr
(prof) mailto:malaise@fr.airsysatm.thomson-csf.com




  reply	other threads:[~2000-03-23  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-23  0:00 file to printer (spooling) Peter Hermann
2000-03-23  0:00 ` Pascal MALAISE [this message]
2000-03-23  0:00 ` Larry Kilgallen
2000-03-23  0:00   ` Tucker Taft
2000-03-23  0:00 ` John J Cupak Jr
2000-03-23  0:00   ` Larry Kilgallen
2000-03-23  0:00   ` Robert Dewar
2000-03-24  0:00 ` Tarjei T. Jensen
replies disabled

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