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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7d6b00835cfb92fc X-Google-Attributes: gid103376,public From: Pascal MALAISE Subject: Re: file to printer (spooling) Date: 2000/03/23 Message-ID: <38DA7505.F3E842CE@magic.fr>#1/1 X-Deja-AN: 601427874 Content-Transfer-Encoding: 7bit References: <8bddei$gmg$1@infosun2.rus.uni-stuttgart.de> X-Client: Magic OnLine [unknown@ppp-12.net4.magic.fr] X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-MoL: NNTPD/DED-02012000 X-Complaints-To: abuse@magic.fr X-Trace: paris.magic.fr 953840953 10518 195.115.17.10 (23 Mar 2000 19:49:13 GMT) Organization: Itaque Mime-Version: 1.0 NNTP-Posting-Date: 23 Mar 2000 19:49:13 GMT Newsgroups: comp.lang.ada Date: 2000-03-23T19:49:13+00:00 List-Id: 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