*BSD News Article 40340


Return to BSD News archive

Xref: sserve comp.os.386bsd.bugs:2809 comp.os.386bsd.questions:15598
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!otis.apana.org.au!serval.net.wsu.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!lll-winken.llnl.gov!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!pipex!uunet!zib-berlin.de!easix!knobel.gun.de!andreas
From: andreas@knobel.GUN.de (Andreas Klemm)
Newsgroups: comp.os.386bsd.bugs,comp.os.386bsd.questions
Subject: Re: HP deskjet and fs#020 in printcap
Followup-To: comp.os.386bsd.bugs,comp.os.386bsd.questions
Date: 2 Jan 1995 20:36:49 GMT
Organization: Solaris 2.4 research kitchen
Lines: 71
Distribution: world
Message-ID: <3e9o51$1k1@knobel.gun.de>
References: <3d447r$qre@ixnews2.ix.netcom.com> <3droofINN4np3@rs1.rrz.Uni-Koeln.DE>
NNTP-Posting-Host: knobel.gun.de
X-Newsreader: TIN [version 1.2 PL2]

Stefan Esser (se@fileserv1.MI.Uni-Koeln.DE) wrote:
: In article <3d447r$qre@ixnews2.ix.netcom.com>, jlr2@ix.netcom.com (John Ryan) writes:
: |> 
: |> I have an HP deskjet plus which does linefeed instead of lf-cr
: |> so I want to set CRMOD via the fs variable in /etc/printcap.  Nothing
: |> seems to work. Bug or ignorance?

: I'm doing it this way (don't forget to make the 
: output filter mode 0755):

: -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here --
: #
: # /etc/printcap entry for HP DeskJet:
: #
: dj|lp|HP-DeskJet:\
:         :lp=/dev/lpt0:\
:         :sd=/var/spool/lpd/dj:\
: 	:lf=/var/log/lpd-errs:\
: 	:if=/usr/local/lib/lpdfilters/DeskJet:\
: 	:mx#0:sh:tr=:
: -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here --
: #!/bin/sh
: ########################################################################
: # Output Filter for HP DeskJet (/usr/local/lib/lpdfilters/DeskJet)
: #

: # init printer
: INIT="\033E\033&k2G\c"

: # reset printer
: UNINIT="\033E\c"

: echo -e $INIT
: cat
: echo -e $UNINIT

: # signal success
: exit 0
: -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here --

Or simply try apsfilter 481, see signature ...
For FreeBSD you only need another src/rewindstdin:

#ifdef __FreeBSD__
#include <unistd.h>
#endif

main()
{
#ifdef __FreeBSD__
	return lseek(STDIN_FILENO, (off_t)0, SEEK_SET) < 0;
#else
	return lseek(0,0L,0) < 0;
#endif
}

apsfilter-4.9 is in preparation which includes this fix, but 
it will last 1 or 2 weeks ... So this fix/replacement  might be 
of interest for you.

	Andreas ///
--
andreas@knobel.gun.de	    /\/\___ Wiechers & Partner Datentechnik GmbH
   Andreas Klemm	___/\/\/        - Support Unix - akl@wup.de - 

                *** apsfilter - irgendwie clever ***
    ftp: ftp.Germany.EU.net:/pub/os/Linux/Incoming.EUnet/aps-481.tgz

		            \|/
		           --*-- Happy new year !!!
		            /|\