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,b2d562c6050c39d3 X-Google-Attributes: gid103376,public From: sparre@meyer.fys.ku.dk (Jacob Sparre Andersen) Subject: Re: Redirecting output to a printer Date: 1997/02/26 Message-ID: <1997Feb26.135329.3532@news.nbi.dk>#1/1 X-Deja-AN: 221589458 References: <33110F45.1849@carol.net> Newsgroups: comp.lang.ada Date: 1997-02-26T00:00:00+00:00 List-Id: Jack Lunn (jclunn@carol.net) 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. |__________ I will not claim that this is a better way, but it works (in Unix): - write the text to a temporary file - call the C system routine to print the file ('system ("lpr /tmp/print_it")' on a Unix box) You will have to write a binding to the system routine, but that is not too hard using the Interfaces.C and Interfaces.C.Strings packages. Greetings, Jacob -- Jacob Sparre Andersen http://www.nbi.dk/%7Esparre/ Center for Chaos and Turbulence Studies Phone: (+45) 39 65 53 51 The Niels Bohr Institute (+45) 35 32 53 05 -- "We need a plan to diverge from", Fesser