*BSD News Article 68115


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!swrinde!newsfeed.internetmci.com!in2.uu.net!news.vader.org!news.demon.co.uk!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Remote printing through a filter
Date: 9 May 1996 11:40:29 +0100
Organization: Coverform Ltd.
Lines: 41
Message-ID: <4msi2t$1ov@anorak.coverform.lan>
X-NNTP-Posting-Host: awfulhak.demon.co.uk
X-Newsreader: TIN [version 1.2 PL2]

I have a remote laser printer that wants CR-LF that I want to set up
as a local 'lp'.

Is there a good reason that lpd doesn't use an output filter for a remote
printer ?  If not, the following patch to /usr/src/usr.sbin/lpr/lpd/printjob.c
will allow it:



*** printjob.c	Thu May  9 11:29:56 1996
--- printjob.c.orig	Sat Sep  2 18:53:14 1995
***************
*** 216,220 ****
  		if (write(lfd, line, i) != i)
  			syslog(LOG_ERR, "%s: %s: %m", printer, LO);
! 		if (!remote || ofilter)
  			i = printit(q->q_name);
  		else
--- 216,220 ----
  		if (write(lfd, line, i) != i)
  			syslog(LOG_ERR, "%s: %s: %m", printer, LO);
! 		if (!remote)
  			i = printit(q->q_name);
  		else
***************
*** 1260,1264 ****
  	 * Start up an output filter, if needed.
  	 */
! 	if (OF) {
  		int p[2];
  		char *cp;
--- 1260,1264 ----
  	 * Start up an output filter, if needed.
  	 */
! 	if (!remote && OF) {
  		int p[2];
  		char *cp;

--
Brian <brian@awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour....