*BSD News Article 39150


Return to BSD News archive

From: mcw@aus.hp.com (M.C Wong)
Date: Tue, 6 Dec 1994 23:14:12 GMT
Subject: Re: Re: printcap filters
Message-ID: <1994Dec6.231412.12336@hparc0.aus.hp.com>
Organization: HP Australasian Response Centre (Melbourne)
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!apollo.hp.com!lf.hp.com!hpscit.sc.hp.com!hpujjpo!yan.hp.com!hpujis34!hpyhde4!hpcc05!hparc0.aus.hp.com!mcw
Newsgroups: comp.os.386bsd.questions
References: <RICK.94Nov24045024@vox.trystero.com> <D0DG9L.F35@latcs1.lat.oz.au>
Sender: news@hparc0.aus.hp.com (News Adminstrator)
Nntp-Posting-Host: hpautow.aus.hp.com
X-Newsreader: TIN [version 1.2 021193BETA PL3]
Lines: 39

: I guess, I can do :

: lpr file.ps

: and let apsfilter figures out it is a PS or DVI or etc file, as apsfilter does
: detect file type. I haven't got the chance to test it yet, but I will test
: it today, and if that works, I am diving into lpd codes.

Just to confirm my guessing above, yes it works without any switch specfying
the type of file to be printer, as apsfilter itself does the check, and I
got .ps .dvi files printer out without problem. The only problem now is that
when ever you do :

lprm <job_id>

while waiting it to be finished printed, it will leave a temp file of the
name apsfilter.[0-9][0-9]* ( where the traling figure is the apsfilter
pid) in $TMP_DIR, ie without cleaning things up. I am not sure about the
interaction between filter program and lpd, ie when a job gets rm'ed, does
lpd send a signal to the filter program ? And if so, the filter program
itself should be catching the expected signal and does the cleaning up
itself. However, this is dependent on the implementation of the lp* suite.

On the other hand, whenever a command line switch (such as -v, -d, etc) is
specified to lpr indicating the type of file to print, the spawned copy of 
the lpd coredumps. Has anyone using 2.0R looked into this yet ? Is this
in 2.0* ? 

Also, Norbert Bladt <nbladt@autelca.ascom.ch> told me that he used 
printf(1) instead of bash's echo, and yes it works for me too, without
replacing : echo "whatever\c" to echo -n "whatever". Thanks Norbert.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 M.C Wong 				   Email: mcw@hpato.aus.hp.com 
 Australian Telecom Operation              Voice: +61 3 272 8058        
 Hewlett-Packard Australia Ltd             Fax:   +61 3 898 9257        
 31 Joseph St, Blackburn 3130, Australia   OS: FreeBSD-1.1.5.1
 http://hpautow.aus.hp.com:9999/~mcw/mcw.html (or http://hpautorf/~mcw)